Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
132 ashish 35
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 36
 
37
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
38
 
132 ashish 39
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 40
 
132 ashish 41
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
42
 
68 ashish 43
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
44
 
45
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
46
 
1398 varun.gupt 47
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException;
1382 varun.gupt 48
 
483 rajveer 49
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 50
 
1133 chandransh 51
    /**
52
     * Returns orders within a range of their billing dates
53
     * 
54
     * @param status
55
     * @param start_billing_date
56
     * @param end_billing_date
57
     * @param warehouse_id
58
     */
1022 varun.gupt 59
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
60
 
1382 varun.gupt 61
    /**
62
     * Returns order ids for orders which can be returned
63
     * 
64
     * @param customer_id
65
     * @param limit
66
     */
67
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
68
 
69
    /**
70
     * Returns order ids for orders which can be cancelled
71
     * 
72
     * @param customer_id
73
     * @param limit
74
     */
75
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
76
 
483 rajveer 77
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 78
 
1148 chandransh 79
    /**
80
     * Add billing details such as the bill number and the biller to the Order.
81
     * 
82
     * @param orderId
83
     * @param invoice_number
84
     * @param billed_by
85
     */
86
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 87
 
1148 chandransh 88
    /**
2364 chandransh 89
     * Adds jacket number and IMEI no. to the order. Doesn't update the IMEI no. if a -1 is supplied.
2383 rajveer 90
     * Also marks the order as billed and sets the billing timestamp.
91
     * Return false if it doesn't find the order with the given ID.
1148 chandransh 92
     * 
93
     * @param orderId
94
     * @param jacketNumber
95
     */
2383 rajveer 96
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException;
1148 chandransh 97
 
923 rajveer 98
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
99
 
100
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
101
 
1529 ankur.sing 102
    /**
103
     * Returns list of orders for given transaction Id. Also filters based on customer Id so that
104
     * only user who owns the transaction can view its order details.
105
     * 
106
     * @param transactionId
107
     * @param customerId
108
     */
109
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException;
68 ashish 110
 
483 rajveer 111
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 112
 
483 rajveer 113
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 114
 
483 rajveer 115
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 116
 
483 rajveer 117
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 118
 
758 chandransh 119
    /**
1529 ankur.sing 120
     * Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
121
     * Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
122
     * 
123
     * @param orderId
124
     * @param customerId
125
     */
126
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException;
127
 
128
    /**
1221 chandransh 129
     * Create a batch of all the pending orders for the given warehouse.
130
     * The returned list is orderd by created_timestamp.
131
     * If there are no pending orders, an empty list is returned.
132
     * 
133
     * @param warehouseId
134
     */
135
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
136
 
137
    /**
1209 chandransh 138
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
139
     * 
140
     * @param orderId
141
     */
142
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
143
 
144
    /**
758 chandransh 145
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
146
     * 
147
     * @param warehouseId
148
     * @param providerId
149
     */
150
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
151
 
1114 chandransh 152
    /**
153
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
154
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
155
     * Raises an exception if we encounter report for an AWB number that we did not ship.
156
     * 
157
     * @param providerId
158
     * @param pickupDetails
159
     */
1245 chandransh 160
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 161
 
1133 chandransh 162
    /**
163
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
164
     * the name of the receiver.
165
     * Raises an exception if we encounter report for an AWB number that we did not ship.
166
     * 
167
     * @param providerId
168
     * @param deliveredOrders
169
     */
170
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
171
 
172
    /**
173
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
174
     * Raises an exception if we encounter report for an AWB number that we did not ship.
175
     * 
176
     * @param providerId
177
     * @param returnedOrders
178
     */
179
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
180
 
1245 chandransh 181
    /**
182
     * Update the status description of orders whose AWB numbers are keys of the Map.
183
     * 
184
     * @param providerId
185
     * @param undeliveredOrders
186
     */
187
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
188
 
1406 ankur.sing 189
    /**
190
     * Returns the list of orders whose delivery time has passed but have not been
191
     * delivered yet for the given provider and warehouse. To get a complete list of
192
     * undelivered orders, pass them as -1.
193
     * Returns an empty list if no such orders exist.
194
     * 
195
     * @param providerId
196
     * @param warehouseId
197
     */
198
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
199
 
483 rajveer 200
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 201
 
483 rajveer 202
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 203
 
1598 ankur.sing 204
    /**
205
     * Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
206
     */
207
    public long getValidOrderCount() throws TException;
208
 
1629 ankur.sing 209
    /**
210
     * Returns the number of distinct customers who have done successful transactions
211
     */
212
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException;
213
 
214
    /**
1731 ankur.sing 215
     * Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
216
     * List contains two values, first minimum amount and second maximum amount.
1629 ankur.sing 217
     */
1731 ankur.sing 218
    public List<Double> getValidOrdersAmountRange() throws TException;
1629 ankur.sing 219
 
1886 ankur.sing 220
    /**
221
     * Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
222
     * If limit is passed as 0, then all valid Orders are returned.
223
     * 
224
     * @param limit
225
     */
226
    public List<Order> getValidOrders(long limit) throws TException;
227
 
2538 chandransh 228
    /**
229
     * Toggle the DOA flag of an order. This should be used to flag an order for follow-up and unflag it when the follow-up is complete.
230
     * Returns the final flag status.
231
     * Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
232
     * 
233
     * @param orderId
234
     */
235
    public boolean toggleDOAFlag(long orderId) throws TransactionServiceException, TException;
236
 
237
    /**
238
     * Sends out an email to the account manager of the original courier provider used to ship the order.
239
     * If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
240
     * If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
241
     * For any other status, it returns false.
242
     * Throws an exception if the order with the given id couldn't be found.
243
     * 
244
     * @param orderId
245
     */
246
    public boolean requestPickupNumber(long orderId) throws TransactionServiceException, TException;
247
 
248
    /**
249
     * If the order status is DOA_PICKUP_REQUESTED, it does the following
250
     * 	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
251
     * 	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
252
     * 	3. Returns true
2590 chandransh 253
     * If the order is in any other status, it returns false.
2538 chandransh 254
     * Throws an exception if the order with the given id couldn't be found.
255
     * 
256
     * @param orderId
257
     * @param pickupNumber
258
     */
259
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException;
260
 
2590 chandransh 261
    /**
2601 chandransh 262
     * If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
2615 chandransh 263
     * If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
2590 chandransh 264
     * If the order is in any other state, it returns false.
265
     * Throws an exception if the order with the given id couldn't be found.
266
     * 
267
     * @param orderId
268
     */
2615 chandransh 269
    public boolean receiveReturn(long orderId) throws TransactionServiceException, TException;
2590 chandransh 270
 
271
    /**
2601 chandransh 272
     * Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
2615 chandransh 273
     * the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
2590 chandransh 274
     * If the order is in any other state, it returns false.
275
     * Throws an exception if the order with the given id couldn't be found.
276
     * 
277
     * @param orderId
278
     * @param isValid
279
     */
280
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException;
281
 
2615 chandransh 282
    /**
283
     * If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
284
     * 	1. Creates a new order for processing in the BILLED state. All billing information is saved.
285
     * 	2. Marks the current order as one of the final states SALES_RET_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
286
     * 	
287
     * If the order is in DOA_CERT_VALID state, it does the following:
288
     * 	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
289
     * 	2. Creates a return order for the warehouse executive to return the DOA material.
290
     * 	3. Marks the current order as the final DOA_RESHIPPED state.
291
     * 
292
     * Returns the id of the newly created order.
293
     * 
294
     * Throws an exception if the order with the given id couldn't be found.
295
     * 
296
     * @param orderId
297
     */
298
    public long reshipOrder(long orderId) throws TransactionServiceException, TException;
299
 
300
    /**
301
     * If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
302
     * 	1. Creates a refund request for batch processing.
303
     * 	2. Creates a return order for the warehouse executive to return the shipped material.
304
     * 	3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
305
     * 
306
     * If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
307
     * 	1. Creates a refund request for batch processing.
308
     * 	2. Marks the current order as the REFUNDED final state.
309
     * 
310
     * Returns True if it is successful, False otherwise.
311
     * 
312
     * Throws an exception if the order with the given id couldn't be found.
313
     * 
314
     * @param orderId
315
     */
316
    public boolean refundOrder(long orderId) throws TransactionServiceException, TException;
317
 
68 ashish 318
  }
319
 
320
  public static class Client implements Iface {
321
    public Client(TProtocol prot)
322
    {
323
      this(prot, prot);
324
    }
325
 
326
    public Client(TProtocol iprot, TProtocol oprot)
327
    {
328
      iprot_ = iprot;
329
      oprot_ = oprot;
330
    }
331
 
332
    protected TProtocol iprot_;
333
    protected TProtocol oprot_;
334
 
335
    protected int seqid_;
336
 
337
    public TProtocol getInputProtocol()
338
    {
339
      return this.iprot_;
340
    }
341
 
342
    public TProtocol getOutputProtocol()
343
    {
344
      return this.oprot_;
345
    }
346
 
764 rajveer 347
    public void closeSession() throws TException
348
    {
349
      send_closeSession();
350
      recv_closeSession();
351
    }
352
 
353
    public void send_closeSession() throws TException
354
    {
355
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
356
      closeSession_args args = new closeSession_args();
357
      args.write(oprot_);
358
      oprot_.writeMessageEnd();
359
      oprot_.getTransport().flush();
360
    }
361
 
362
    public void recv_closeSession() throws TException
363
    {
364
      TMessage msg = iprot_.readMessageBegin();
365
      if (msg.type == TMessageType.EXCEPTION) {
366
        TApplicationException x = TApplicationException.read(iprot_);
367
        iprot_.readMessageEnd();
368
        throw x;
369
      }
370
      closeSession_result result = new closeSession_result();
371
      result.read(iprot_);
372
      iprot_.readMessageEnd();
373
      return;
374
    }
375
 
132 ashish 376
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 377
    {
378
      send_createTransaction(transaction);
132 ashish 379
      return recv_createTransaction();
68 ashish 380
    }
381
 
382
    public void send_createTransaction(Transaction transaction) throws TException
383
    {
384
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
385
      createTransaction_args args = new createTransaction_args();
386
      args.transaction = transaction;
387
      args.write(oprot_);
388
      oprot_.writeMessageEnd();
389
      oprot_.getTransport().flush();
390
    }
391
 
132 ashish 392
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 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
      createTransaction_result result = new createTransaction_result();
401
      result.read(iprot_);
402
      iprot_.readMessageEnd();
132 ashish 403
      if (result.isSetSuccess()) {
404
        return result.success;
405
      }
68 ashish 406
      if (result.ex != null) {
407
        throw result.ex;
408
      }
132 ashish 409
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 410
    }
411
 
412
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
413
    {
414
      send_getTransaction(id);
415
      return recv_getTransaction();
416
    }
417
 
418
    public void send_getTransaction(long id) throws TException
419
    {
420
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
421
      getTransaction_args args = new getTransaction_args();
422
      args.id = id;
423
      args.write(oprot_);
424
      oprot_.writeMessageEnd();
425
      oprot_.getTransport().flush();
426
    }
427
 
428
    public Transaction recv_getTransaction() 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
      getTransaction_result result = new getTransaction_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, "getTransaction failed: unknown result");
446
    }
447
 
132 ashish 448
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 449
    {
132 ashish 450
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 451
      return recv_getTransactionsForCustomer();
452
    }
453
 
132 ashish 454
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 455
    {
456
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
457
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
458
      args.customerId = customerId;
132 ashish 459
      args.from_date = from_date;
460
      args.to_date = to_date;
68 ashish 461
      args.status = status;
462
      args.write(oprot_);
463
      oprot_.writeMessageEnd();
464
      oprot_.getTransport().flush();
465
    }
466
 
467
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
468
    {
469
      TMessage msg = iprot_.readMessageBegin();
470
      if (msg.type == TMessageType.EXCEPTION) {
471
        TApplicationException x = TApplicationException.read(iprot_);
472
        iprot_.readMessageEnd();
473
        throw x;
474
      }
475
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
476
      result.read(iprot_);
477
      iprot_.readMessageEnd();
478
      if (result.isSetSuccess()) {
479
        return result.success;
480
      }
481
      if (result.ex != null) {
482
        throw result.ex;
483
      }
484
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
485
    }
486
 
132 ashish 487
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
488
    {
489
      send_getTransactionsForShoppingCartId(shoppingCartId);
490
      return recv_getTransactionsForShoppingCartId();
491
    }
492
 
493
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
494
    {
495
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
496
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
497
      args.shoppingCartId = shoppingCartId;
498
      args.write(oprot_);
499
      oprot_.writeMessageEnd();
500
      oprot_.getTransport().flush();
501
    }
502
 
503
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
504
    {
505
      TMessage msg = iprot_.readMessageBegin();
506
      if (msg.type == TMessageType.EXCEPTION) {
507
        TApplicationException x = TApplicationException.read(iprot_);
508
        iprot_.readMessageEnd();
509
        throw x;
510
      }
511
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
512
      result.read(iprot_);
513
      iprot_.readMessageEnd();
514
      if (result.isSetSuccess()) {
515
        return result.success;
516
      }
517
      if (result.ex != null) {
518
        throw result.ex;
519
      }
520
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
521
    }
522
 
68 ashish 523
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
524
    {
525
      send_getTransactionStatus(transactionId);
526
      return recv_getTransactionStatus();
527
    }
528
 
529
    public void send_getTransactionStatus(long transactionId) throws TException
530
    {
531
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
532
      getTransactionStatus_args args = new getTransactionStatus_args();
533
      args.transactionId = transactionId;
534
      args.write(oprot_);
535
      oprot_.writeMessageEnd();
536
      oprot_.getTransport().flush();
537
    }
538
 
539
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
540
    {
541
      TMessage msg = iprot_.readMessageBegin();
542
      if (msg.type == TMessageType.EXCEPTION) {
543
        TApplicationException x = TApplicationException.read(iprot_);
544
        iprot_.readMessageEnd();
545
        throw x;
546
      }
547
      getTransactionStatus_result result = new getTransactionStatus_result();
548
      result.read(iprot_);
549
      iprot_.readMessageEnd();
550
      if (result.isSetSuccess()) {
551
        return result.success;
552
      }
553
      if (result.ex != null) {
554
        throw result.ex;
555
      }
556
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
557
    }
558
 
559
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
560
    {
561
      send_changeTransactionStatus(transactionId, status, description);
562
      return recv_changeTransactionStatus();
563
    }
564
 
565
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
566
    {
567
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
568
      changeTransactionStatus_args args = new changeTransactionStatus_args();
569
      args.transactionId = transactionId;
570
      args.status = status;
571
      args.description = description;
572
      args.write(oprot_);
573
      oprot_.writeMessageEnd();
574
      oprot_.getTransport().flush();
575
    }
576
 
577
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
578
    {
579
      TMessage msg = iprot_.readMessageBegin();
580
      if (msg.type == TMessageType.EXCEPTION) {
581
        TApplicationException x = TApplicationException.read(iprot_);
582
        iprot_.readMessageEnd();
583
        throw x;
584
      }
585
      changeTransactionStatus_result result = new changeTransactionStatus_result();
586
      result.read(iprot_);
587
      iprot_.readMessageEnd();
588
      if (result.isSetSuccess()) {
589
        return result.success;
590
      }
591
      if (result.ex != null) {
592
        throw result.ex;
593
      }
594
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
595
    }
596
 
1398 varun.gupt 597
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 598
    {
1398 varun.gupt 599
      send_enqueueTransactionInfoEmail(transactionId);
600
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 601
    }
602
 
1398 varun.gupt 603
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 604
    {
1398 varun.gupt 605
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
606
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 607
      args.transactionId = transactionId;
608
      args.write(oprot_);
609
      oprot_.writeMessageEnd();
610
      oprot_.getTransport().flush();
611
    }
612
 
1398 varun.gupt 613
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 614
    {
615
      TMessage msg = iprot_.readMessageBegin();
616
      if (msg.type == TMessageType.EXCEPTION) {
617
        TApplicationException x = TApplicationException.read(iprot_);
618
        iprot_.readMessageEnd();
619
        throw x;
620
      }
1398 varun.gupt 621
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 622
      result.read(iprot_);
623
      iprot_.readMessageEnd();
624
      if (result.isSetSuccess()) {
625
        return result.success;
626
      }
627
      if (result.ex != null) {
628
        throw result.ex;
629
      }
1398 varun.gupt 630
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 631
    }
632
 
483 rajveer 633
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 634
    {
483 rajveer 635
      send_getAllOrders(status, from_date, to_date, warehouse_id);
636
      return recv_getAllOrders();
68 ashish 637
    }
638
 
483 rajveer 639
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 640
    {
483 rajveer 641
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
642
      getAllOrders_args args = new getAllOrders_args();
643
      args.status = status;
644
      args.from_date = from_date;
645
      args.to_date = to_date;
646
      args.warehouse_id = warehouse_id;
68 ashish 647
      args.write(oprot_);
648
      oprot_.writeMessageEnd();
649
      oprot_.getTransport().flush();
650
    }
651
 
483 rajveer 652
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 653
    {
654
      TMessage msg = iprot_.readMessageBegin();
655
      if (msg.type == TMessageType.EXCEPTION) {
656
        TApplicationException x = TApplicationException.read(iprot_);
657
        iprot_.readMessageEnd();
658
        throw x;
659
      }
483 rajveer 660
      getAllOrders_result result = new getAllOrders_result();
68 ashish 661
      result.read(iprot_);
662
      iprot_.readMessageEnd();
663
      if (result.isSetSuccess()) {
664
        return result.success;
665
      }
666
      if (result.ex != null) {
667
        throw result.ex;
668
      }
483 rajveer 669
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 670
    }
671
 
1022 varun.gupt 672
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
673
    {
674
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
675
      return recv_getOrdersByBillingDate();
676
    }
677
 
678
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
679
    {
680
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
681
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
682
      args.status = status;
683
      args.start_billing_date = start_billing_date;
684
      args.end_billing_date = end_billing_date;
685
      args.warehouse_id = warehouse_id;
686
      args.write(oprot_);
687
      oprot_.writeMessageEnd();
688
      oprot_.getTransport().flush();
689
    }
690
 
691
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
692
    {
693
      TMessage msg = iprot_.readMessageBegin();
694
      if (msg.type == TMessageType.EXCEPTION) {
695
        TApplicationException x = TApplicationException.read(iprot_);
696
        iprot_.readMessageEnd();
697
        throw x;
698
      }
699
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
700
      result.read(iprot_);
701
      iprot_.readMessageEnd();
702
      if (result.isSetSuccess()) {
703
        return result.success;
704
      }
705
      if (result.ex != null) {
706
        throw result.ex;
707
      }
708
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
709
    }
710
 
1382 varun.gupt 711
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
712
    {
713
      send_getReturnableOrdersForCustomer(customer_id, limit);
714
      return recv_getReturnableOrdersForCustomer();
715
    }
716
 
717
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
718
    {
719
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
720
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
721
      args.customer_id = customer_id;
722
      args.limit = limit;
723
      args.write(oprot_);
724
      oprot_.writeMessageEnd();
725
      oprot_.getTransport().flush();
726
    }
727
 
728
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
729
    {
730
      TMessage msg = iprot_.readMessageBegin();
731
      if (msg.type == TMessageType.EXCEPTION) {
732
        TApplicationException x = TApplicationException.read(iprot_);
733
        iprot_.readMessageEnd();
734
        throw x;
735
      }
736
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
737
      result.read(iprot_);
738
      iprot_.readMessageEnd();
739
      if (result.isSetSuccess()) {
740
        return result.success;
741
      }
742
      if (result.ex != null) {
743
        throw result.ex;
744
      }
745
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
746
    }
747
 
748
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
749
    {
750
      send_getCancellableOrdersForCustomer(customer_id, limit);
751
      return recv_getCancellableOrdersForCustomer();
752
    }
753
 
754
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
755
    {
756
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
757
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
758
      args.customer_id = customer_id;
759
      args.limit = limit;
760
      args.write(oprot_);
761
      oprot_.writeMessageEnd();
762
      oprot_.getTransport().flush();
763
    }
764
 
765
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
766
    {
767
      TMessage msg = iprot_.readMessageBegin();
768
      if (msg.type == TMessageType.EXCEPTION) {
769
        TApplicationException x = TApplicationException.read(iprot_);
770
        iprot_.readMessageEnd();
771
        throw x;
772
      }
773
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
774
      result.read(iprot_);
775
      iprot_.readMessageEnd();
776
      if (result.isSetSuccess()) {
777
        return result.success;
778
      }
779
      if (result.ex != null) {
780
        throw result.ex;
781
      }
782
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
783
    }
784
 
483 rajveer 785
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 786
    {
483 rajveer 787
      send_changeOrderStatus(orderId, status, description);
788
      return recv_changeOrderStatus();
68 ashish 789
    }
790
 
483 rajveer 791
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 792
    {
483 rajveer 793
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
794
      changeOrderStatus_args args = new changeOrderStatus_args();
795
      args.orderId = orderId;
796
      args.status = status;
797
      args.description = description;
68 ashish 798
      args.write(oprot_);
799
      oprot_.writeMessageEnd();
800
      oprot_.getTransport().flush();
801
    }
802
 
483 rajveer 803
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 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
      }
483 rajveer 811
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 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
      }
483 rajveer 820
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 821
    }
822
 
1148 chandransh 823
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 824
    {
1148 chandransh 825
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 826
      return recv_addBillingDetails();
827
    }
828
 
1148 chandransh 829
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 830
    {
831
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
832
      addBillingDetails_args args = new addBillingDetails_args();
833
      args.orderId = orderId;
834
      args.invoice_number = invoice_number;
835
      args.billed_by = billed_by;
836
      args.write(oprot_);
837
      oprot_.writeMessageEnd();
838
      oprot_.getTransport().flush();
839
    }
840
 
841
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
842
    {
843
      TMessage msg = iprot_.readMessageBegin();
844
      if (msg.type == TMessageType.EXCEPTION) {
845
        TApplicationException x = TApplicationException.read(iprot_);
846
        iprot_.readMessageEnd();
847
        throw x;
848
      }
849
      addBillingDetails_result result = new addBillingDetails_result();
850
      result.read(iprot_);
851
      iprot_.readMessageEnd();
852
      if (result.isSetSuccess()) {
853
        return result.success;
854
      }
855
      if (result.ex != null) {
856
        throw result.ex;
857
      }
858
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
859
    }
860
 
2383 rajveer 861
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
1148 chandransh 862
    {
2383 rajveer 863
      send_addJacketNumber(orderId, jacketNumber);
1148 chandransh 864
      return recv_addJacketNumber();
865
    }
866
 
2383 rajveer 867
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
1148 chandransh 868
    {
869
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
870
      addJacketNumber_args args = new addJacketNumber_args();
871
      args.orderId = orderId;
872
      args.jacketNumber = jacketNumber;
873
      args.write(oprot_);
874
      oprot_.writeMessageEnd();
875
      oprot_.getTransport().flush();
876
    }
877
 
878
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
879
    {
880
      TMessage msg = iprot_.readMessageBegin();
881
      if (msg.type == TMessageType.EXCEPTION) {
882
        TApplicationException x = TApplicationException.read(iprot_);
883
        iprot_.readMessageEnd();
884
        throw x;
885
      }
886
      addJacketNumber_result result = new addJacketNumber_result();
887
      result.read(iprot_);
888
      iprot_.readMessageEnd();
889
      if (result.isSetSuccess()) {
890
        return result.success;
891
      }
892
      if (result.ex != null) {
893
        throw result.ex;
894
      }
895
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
896
    }
897
 
923 rajveer 898
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
899
    {
900
      send_acceptOrder(orderId);
901
      return recv_acceptOrder();
902
    }
903
 
904
    public void send_acceptOrder(long orderId) throws TException
905
    {
906
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
907
      acceptOrder_args args = new acceptOrder_args();
908
      args.orderId = orderId;
909
      args.write(oprot_);
910
      oprot_.writeMessageEnd();
911
      oprot_.getTransport().flush();
912
    }
913
 
914
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
915
    {
916
      TMessage msg = iprot_.readMessageBegin();
917
      if (msg.type == TMessageType.EXCEPTION) {
918
        TApplicationException x = TApplicationException.read(iprot_);
919
        iprot_.readMessageEnd();
920
        throw x;
921
      }
922
      acceptOrder_result result = new acceptOrder_result();
923
      result.read(iprot_);
924
      iprot_.readMessageEnd();
925
      if (result.isSetSuccess()) {
926
        return result.success;
927
      }
928
      if (result.ex != null) {
929
        throw result.ex;
930
      }
931
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
932
    }
933
 
934
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
935
    {
936
      send_billOrder(orderId);
937
      return recv_billOrder();
938
    }
939
 
940
    public void send_billOrder(long orderId) throws TException
941
    {
942
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
943
      billOrder_args args = new billOrder_args();
944
      args.orderId = orderId;
945
      args.write(oprot_);
946
      oprot_.writeMessageEnd();
947
      oprot_.getTransport().flush();
948
    }
949
 
950
    public boolean recv_billOrder() throws TransactionServiceException, TException
951
    {
952
      TMessage msg = iprot_.readMessageBegin();
953
      if (msg.type == TMessageType.EXCEPTION) {
954
        TApplicationException x = TApplicationException.read(iprot_);
955
        iprot_.readMessageEnd();
956
        throw x;
957
      }
958
      billOrder_result result = new billOrder_result();
959
      result.read(iprot_);
960
      iprot_.readMessageEnd();
961
      if (result.isSetSuccess()) {
962
        return result.success;
963
      }
964
      if (result.ex != null) {
965
        throw result.ex;
966
      }
967
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
968
    }
969
 
1529 ankur.sing 970
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 971
    {
1529 ankur.sing 972
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 973
      return recv_getOrdersForTransaction();
68 ashish 974
    }
975
 
1529 ankur.sing 976
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 977
    {
483 rajveer 978
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
979
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 980
      args.transactionId = transactionId;
1529 ankur.sing 981
      args.customerId = customerId;
68 ashish 982
      args.write(oprot_);
983
      oprot_.writeMessageEnd();
984
      oprot_.getTransport().flush();
985
    }
986
 
483 rajveer 987
    public List<Order> recv_getOrdersForTransaction() 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
      getOrdersForTransaction_result result = new getOrdersForTransaction_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, "getOrdersForTransaction failed: unknown result");
68 ashish 1005
    }
1006
 
483 rajveer 1007
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 1008
    {
483 rajveer 1009
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
1010
      return recv_getOrdersForCustomer();
68 ashish 1011
    }
1012
 
483 rajveer 1013
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 1014
    {
483 rajveer 1015
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
1016
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
1017
      args.customerId = customerId;
1018
      args.from_date = from_date;
1019
      args.to_date = to_date;
1020
      args.status = status;
68 ashish 1021
      args.write(oprot_);
1022
      oprot_.writeMessageEnd();
1023
      oprot_.getTransport().flush();
1024
    }
1025
 
483 rajveer 1026
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 1027
    {
1028
      TMessage msg = iprot_.readMessageBegin();
1029
      if (msg.type == TMessageType.EXCEPTION) {
1030
        TApplicationException x = TApplicationException.read(iprot_);
1031
        iprot_.readMessageEnd();
1032
        throw x;
1033
      }
483 rajveer 1034
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1035
      result.read(iprot_);
1036
      iprot_.readMessageEnd();
1037
      if (result.isSetSuccess()) {
1038
        return result.success;
1039
      }
1040
      if (result.ex != null) {
1041
        throw result.ex;
1042
      }
483 rajveer 1043
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 1044
    }
1045
 
483 rajveer 1046
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 1047
    {
483 rajveer 1048
      send_createOrder(order);
1049
      return recv_createOrder();
68 ashish 1050
    }
1051
 
483 rajveer 1052
    public void send_createOrder(Order order) throws TException
68 ashish 1053
    {
483 rajveer 1054
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
1055
      createOrder_args args = new createOrder_args();
1056
      args.order = order;
68 ashish 1057
      args.write(oprot_);
1058
      oprot_.writeMessageEnd();
1059
      oprot_.getTransport().flush();
1060
    }
1061
 
483 rajveer 1062
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 1063
    {
1064
      TMessage msg = iprot_.readMessageBegin();
1065
      if (msg.type == TMessageType.EXCEPTION) {
1066
        TApplicationException x = TApplicationException.read(iprot_);
1067
        iprot_.readMessageEnd();
1068
        throw x;
1069
      }
483 rajveer 1070
      createOrder_result result = new createOrder_result();
68 ashish 1071
      result.read(iprot_);
1072
      iprot_.readMessageEnd();
1073
      if (result.isSetSuccess()) {
1074
        return result.success;
1075
      }
1076
      if (result.ex != null) {
1077
        throw result.ex;
1078
      }
483 rajveer 1079
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 1080
    }
1081
 
483 rajveer 1082
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 1083
    {
483 rajveer 1084
      send_getOrder(id);
1085
      return recv_getOrder();
68 ashish 1086
    }
1087
 
483 rajveer 1088
    public void send_getOrder(long id) throws TException
68 ashish 1089
    {
483 rajveer 1090
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
1091
      getOrder_args args = new getOrder_args();
1092
      args.id = id;
68 ashish 1093
      args.write(oprot_);
1094
      oprot_.writeMessageEnd();
1095
      oprot_.getTransport().flush();
1096
    }
1097
 
483 rajveer 1098
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 1099
    {
1100
      TMessage msg = iprot_.readMessageBegin();
1101
      if (msg.type == TMessageType.EXCEPTION) {
1102
        TApplicationException x = TApplicationException.read(iprot_);
1103
        iprot_.readMessageEnd();
1104
        throw x;
1105
      }
483 rajveer 1106
      getOrder_result result = new getOrder_result();
68 ashish 1107
      result.read(iprot_);
1108
      iprot_.readMessageEnd();
1109
      if (result.isSetSuccess()) {
1110
        return result.success;
1111
      }
1112
      if (result.ex != null) {
1113
        throw result.ex;
1114
      }
483 rajveer 1115
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1116
    }
1117
 
483 rajveer 1118
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1119
    {
483 rajveer 1120
      send_getLineItemsForOrder(orderId);
1121
      return recv_getLineItemsForOrder();
68 ashish 1122
    }
1123
 
483 rajveer 1124
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1125
    {
483 rajveer 1126
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1127
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1128
      args.orderId = orderId;
68 ashish 1129
      args.write(oprot_);
1130
      oprot_.writeMessageEnd();
1131
      oprot_.getTransport().flush();
1132
    }
1133
 
483 rajveer 1134
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1135
    {
1136
      TMessage msg = iprot_.readMessageBegin();
1137
      if (msg.type == TMessageType.EXCEPTION) {
1138
        TApplicationException x = TApplicationException.read(iprot_);
1139
        iprot_.readMessageEnd();
1140
        throw x;
1141
      }
483 rajveer 1142
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1143
      result.read(iprot_);
1144
      iprot_.readMessageEnd();
1145
      if (result.isSetSuccess()) {
1146
        return result.success;
1147
      }
1148
      if (result.ex != null) {
1149
        throw result.ex;
1150
      }
483 rajveer 1151
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1152
    }
1153
 
1529 ankur.sing 1154
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1155
    {
1156
      send_getOrderForCustomer(orderId, customerId);
1157
      return recv_getOrderForCustomer();
1158
    }
1159
 
1160
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1161
    {
1162
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1163
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1164
      args.orderId = orderId;
1165
      args.customerId = customerId;
1166
      args.write(oprot_);
1167
      oprot_.writeMessageEnd();
1168
      oprot_.getTransport().flush();
1169
    }
1170
 
1171
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1172
    {
1173
      TMessage msg = iprot_.readMessageBegin();
1174
      if (msg.type == TMessageType.EXCEPTION) {
1175
        TApplicationException x = TApplicationException.read(iprot_);
1176
        iprot_.readMessageEnd();
1177
        throw x;
1178
      }
1179
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1180
      result.read(iprot_);
1181
      iprot_.readMessageEnd();
1182
      if (result.isSetSuccess()) {
1183
        return result.success;
1184
      }
1185
      if (result.ex != null) {
1186
        throw result.ex;
1187
      }
1188
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1189
    }
1190
 
1221 chandransh 1191
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1192
    {
1193
      send_batchOrders(warehouseId);
1194
      return recv_batchOrders();
1195
    }
1196
 
1197
    public void send_batchOrders(long warehouseId) throws TException
1198
    {
1199
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1200
      batchOrders_args args = new batchOrders_args();
1201
      args.warehouseId = warehouseId;
1202
      args.write(oprot_);
1203
      oprot_.writeMessageEnd();
1204
      oprot_.getTransport().flush();
1205
    }
1206
 
1207
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1208
    {
1209
      TMessage msg = iprot_.readMessageBegin();
1210
      if (msg.type == TMessageType.EXCEPTION) {
1211
        TApplicationException x = TApplicationException.read(iprot_);
1212
        iprot_.readMessageEnd();
1213
        throw x;
1214
      }
1215
      batchOrders_result result = new batchOrders_result();
1216
      result.read(iprot_);
1217
      iprot_.readMessageEnd();
1218
      if (result.isSetSuccess()) {
1219
        return result.success;
1220
      }
1221
      if (result.ex != null) {
1222
        throw result.ex;
1223
      }
1224
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1225
    }
1226
 
1209 chandransh 1227
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1228
    {
1229
      send_markOrderAsOutOfStock(orderId);
1230
      return recv_markOrderAsOutOfStock();
1231
    }
1232
 
1233
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1234
    {
1235
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1236
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1237
      args.orderId = orderId;
1238
      args.write(oprot_);
1239
      oprot_.writeMessageEnd();
1240
      oprot_.getTransport().flush();
1241
    }
1242
 
1243
    public boolean recv_markOrderAsOutOfStock() 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
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1252
      result.read(iprot_);
1253
      iprot_.readMessageEnd();
1254
      if (result.isSetSuccess()) {
1255
        return result.success;
1256
      }
1257
      if (result.ex != null) {
1258
        throw result.ex;
1259
      }
1260
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1261
    }
1262
 
758 chandransh 1263
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1264
    {
1265
      send_markOrdersAsManifested(warehouseId, providerId);
1266
      return recv_markOrdersAsManifested();
1267
    }
1268
 
1269
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1270
    {
1271
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1272
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1273
      args.warehouseId = warehouseId;
1274
      args.providerId = providerId;
1275
      args.write(oprot_);
1276
      oprot_.writeMessageEnd();
1277
      oprot_.getTransport().flush();
1278
    }
1279
 
1280
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1281
    {
1282
      TMessage msg = iprot_.readMessageBegin();
1283
      if (msg.type == TMessageType.EXCEPTION) {
1284
        TApplicationException x = TApplicationException.read(iprot_);
1285
        iprot_.readMessageEnd();
1286
        throw x;
1287
      }
1288
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1289
      result.read(iprot_);
1290
      iprot_.readMessageEnd();
1291
      if (result.isSetSuccess()) {
1292
        return result.success;
1293
      }
1294
      if (result.ex != null) {
1295
        throw result.ex;
1296
      }
1297
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1298
    }
1299
 
1245 chandransh 1300
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1301
    {
1302
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1303
      return recv_markOrdersAsPickedUp();
1304
    }
1305
 
1245 chandransh 1306
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1307
    {
1308
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1309
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1310
      args.providerId = providerId;
1311
      args.pickupDetails = pickupDetails;
1312
      args.write(oprot_);
1313
      oprot_.writeMessageEnd();
1314
      oprot_.getTransport().flush();
1315
    }
1316
 
1317
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1318
    {
1319
      TMessage msg = iprot_.readMessageBegin();
1320
      if (msg.type == TMessageType.EXCEPTION) {
1321
        TApplicationException x = TApplicationException.read(iprot_);
1322
        iprot_.readMessageEnd();
1323
        throw x;
1324
      }
1325
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1326
      result.read(iprot_);
1327
      iprot_.readMessageEnd();
1328
      if (result.isSetSuccess()) {
1329
        return result.success;
1330
      }
1331
      if (result.ex != null) {
1332
        throw result.ex;
1333
      }
1334
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1335
    }
1336
 
1133 chandransh 1337
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1338
    {
1339
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1340
      recv_markOrdersAsDelivered();
1341
    }
1342
 
1343
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1344
    {
1345
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1346
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1347
      args.providerId = providerId;
1348
      args.deliveredOrders = deliveredOrders;
1349
      args.write(oprot_);
1350
      oprot_.writeMessageEnd();
1351
      oprot_.getTransport().flush();
1352
    }
1353
 
1354
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1355
    {
1356
      TMessage msg = iprot_.readMessageBegin();
1357
      if (msg.type == TMessageType.EXCEPTION) {
1358
        TApplicationException x = TApplicationException.read(iprot_);
1359
        iprot_.readMessageEnd();
1360
        throw x;
1361
      }
1362
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1363
      result.read(iprot_);
1364
      iprot_.readMessageEnd();
1365
      if (result.ex != null) {
1366
        throw result.ex;
1367
      }
1368
      return;
1369
    }
1370
 
1371
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1372
    {
1373
      send_markOrdersAsFailed(providerId, returnedOrders);
1374
      recv_markOrdersAsFailed();
1375
    }
1376
 
1377
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1378
    {
1379
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1380
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1381
      args.providerId = providerId;
1382
      args.returnedOrders = returnedOrders;
1383
      args.write(oprot_);
1384
      oprot_.writeMessageEnd();
1385
      oprot_.getTransport().flush();
1386
    }
1387
 
1388
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1389
    {
1390
      TMessage msg = iprot_.readMessageBegin();
1391
      if (msg.type == TMessageType.EXCEPTION) {
1392
        TApplicationException x = TApplicationException.read(iprot_);
1393
        iprot_.readMessageEnd();
1394
        throw x;
1395
      }
1396
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1397
      result.read(iprot_);
1398
      iprot_.readMessageEnd();
1399
      if (result.ex != null) {
1400
        throw result.ex;
1401
      }
1402
      return;
1403
    }
1404
 
1245 chandransh 1405
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1406
    {
1407
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1408
      recv_updateNonDeliveryReason();
1409
    }
1410
 
1411
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1412
    {
1413
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1414
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1415
      args.providerId = providerId;
1416
      args.undeliveredOrders = undeliveredOrders;
1417
      args.write(oprot_);
1418
      oprot_.writeMessageEnd();
1419
      oprot_.getTransport().flush();
1420
    }
1421
 
1422
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1423
    {
1424
      TMessage msg = iprot_.readMessageBegin();
1425
      if (msg.type == TMessageType.EXCEPTION) {
1426
        TApplicationException x = TApplicationException.read(iprot_);
1427
        iprot_.readMessageEnd();
1428
        throw x;
1429
      }
1430
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1431
      result.read(iprot_);
1432
      iprot_.readMessageEnd();
1433
      if (result.ex != null) {
1434
        throw result.ex;
1435
      }
1436
      return;
1437
    }
1438
 
1406 ankur.sing 1439
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1440
    {
1441
      send_getUndeliveredOrders(providerId, warehouseId);
1442
      return recv_getUndeliveredOrders();
1443
    }
1444
 
1445
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1446
    {
1447
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1448
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1449
      args.providerId = providerId;
1450
      args.warehouseId = warehouseId;
1451
      args.write(oprot_);
1452
      oprot_.writeMessageEnd();
1453
      oprot_.getTransport().flush();
1454
    }
1455
 
1456
    public List<Order> recv_getUndeliveredOrders() throws TException
1457
    {
1458
      TMessage msg = iprot_.readMessageBegin();
1459
      if (msg.type == TMessageType.EXCEPTION) {
1460
        TApplicationException x = TApplicationException.read(iprot_);
1461
        iprot_.readMessageEnd();
1462
        throw x;
1463
      }
1464
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1465
      result.read(iprot_);
1466
      iprot_.readMessageEnd();
1467
      if (result.isSetSuccess()) {
1468
        return result.success;
1469
      }
1470
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1471
    }
1472
 
483 rajveer 1473
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1474
    {
483 rajveer 1475
      send_getAlerts(orderId, valid);
305 ashish 1476
      return recv_getAlerts();
1477
    }
1478
 
483 rajveer 1479
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1480
    {
1481
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1482
      getAlerts_args args = new getAlerts_args();
483 rajveer 1483
      args.orderId = orderId;
305 ashish 1484
      args.valid = valid;
1485
      args.write(oprot_);
1486
      oprot_.writeMessageEnd();
1487
      oprot_.getTransport().flush();
1488
    }
1489
 
1490
    public List<Alert> recv_getAlerts() throws TException
1491
    {
1492
      TMessage msg = iprot_.readMessageBegin();
1493
      if (msg.type == TMessageType.EXCEPTION) {
1494
        TApplicationException x = TApplicationException.read(iprot_);
1495
        iprot_.readMessageEnd();
1496
        throw x;
1497
      }
1498
      getAlerts_result result = new getAlerts_result();
1499
      result.read(iprot_);
1500
      iprot_.readMessageEnd();
1501
      if (result.isSetSuccess()) {
1502
        return result.success;
1503
      }
1504
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1505
    }
1506
 
483 rajveer 1507
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1508
    {
483 rajveer 1509
      send_setAlert(orderId, unset, type, comment);
305 ashish 1510
      recv_setAlert();
1511
    }
1512
 
483 rajveer 1513
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1514
    {
1515
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1516
      setAlert_args args = new setAlert_args();
483 rajveer 1517
      args.orderId = orderId;
305 ashish 1518
      args.unset = unset;
1519
      args.type = type;
1520
      args.comment = comment;
1521
      args.write(oprot_);
1522
      oprot_.writeMessageEnd();
1523
      oprot_.getTransport().flush();
1524
    }
1525
 
1526
    public void recv_setAlert() throws TException
1527
    {
1528
      TMessage msg = iprot_.readMessageBegin();
1529
      if (msg.type == TMessageType.EXCEPTION) {
1530
        TApplicationException x = TApplicationException.read(iprot_);
1531
        iprot_.readMessageEnd();
1532
        throw x;
1533
      }
1534
      setAlert_result result = new setAlert_result();
1535
      result.read(iprot_);
1536
      iprot_.readMessageEnd();
1537
      return;
1538
    }
1539
 
1598 ankur.sing 1540
    public long getValidOrderCount() throws TException
1541
    {
1542
      send_getValidOrderCount();
1543
      return recv_getValidOrderCount();
1544
    }
1545
 
1546
    public void send_getValidOrderCount() throws TException
1547
    {
1548
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1549
      getValidOrderCount_args args = new getValidOrderCount_args();
1550
      args.write(oprot_);
1551
      oprot_.writeMessageEnd();
1552
      oprot_.getTransport().flush();
1553
    }
1554
 
1555
    public long recv_getValidOrderCount() throws TException
1556
    {
1557
      TMessage msg = iprot_.readMessageBegin();
1558
      if (msg.type == TMessageType.EXCEPTION) {
1559
        TApplicationException x = TApplicationException.read(iprot_);
1560
        iprot_.readMessageEnd();
1561
        throw x;
1562
      }
1563
      getValidOrderCount_result result = new getValidOrderCount_result();
1564
      result.read(iprot_);
1565
      iprot_.readMessageEnd();
1566
      if (result.isSetSuccess()) {
1567
        return result.success;
1568
      }
1569
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1570
    }
1571
 
1629 ankur.sing 1572
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException
1573
    {
1574
      send_getNoOfCustomersWithSuccessfulTransaction();
1575
      return recv_getNoOfCustomersWithSuccessfulTransaction();
1576
    }
1577
 
1578
    public void send_getNoOfCustomersWithSuccessfulTransaction() throws TException
1579
    {
1580
      oprot_.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.CALL, seqid_));
1581
      getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
1582
      args.write(oprot_);
1583
      oprot_.writeMessageEnd();
1584
      oprot_.getTransport().flush();
1585
    }
1586
 
1587
    public long recv_getNoOfCustomersWithSuccessfulTransaction() throws TException
1588
    {
1589
      TMessage msg = iprot_.readMessageBegin();
1590
      if (msg.type == TMessageType.EXCEPTION) {
1591
        TApplicationException x = TApplicationException.read(iprot_);
1592
        iprot_.readMessageEnd();
1593
        throw x;
1594
      }
1595
      getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
1596
      result.read(iprot_);
1597
      iprot_.readMessageEnd();
1598
      if (result.isSetSuccess()) {
1599
        return result.success;
1600
      }
1601
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1602
    }
1603
 
1731 ankur.sing 1604
    public List<Double> getValidOrdersAmountRange() throws TException
1629 ankur.sing 1605
    {
1731 ankur.sing 1606
      send_getValidOrdersAmountRange();
1607
      return recv_getValidOrdersAmountRange();
1629 ankur.sing 1608
    }
1609
 
1731 ankur.sing 1610
    public void send_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1611
    {
1731 ankur.sing 1612
      oprot_.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.CALL, seqid_));
1613
      getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 1614
      args.write(oprot_);
1615
      oprot_.writeMessageEnd();
1616
      oprot_.getTransport().flush();
1617
    }
1618
 
1731 ankur.sing 1619
    public List<Double> recv_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1620
    {
1621
      TMessage msg = iprot_.readMessageBegin();
1622
      if (msg.type == TMessageType.EXCEPTION) {
1623
        TApplicationException x = TApplicationException.read(iprot_);
1624
        iprot_.readMessageEnd();
1625
        throw x;
1626
      }
1731 ankur.sing 1627
      getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
1629 ankur.sing 1628
      result.read(iprot_);
1629
      iprot_.readMessageEnd();
1630
      if (result.isSetSuccess()) {
1631
        return result.success;
1632
      }
1731 ankur.sing 1633
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1629 ankur.sing 1634
    }
1635
 
1886 ankur.sing 1636
    public List<Order> getValidOrders(long limit) throws TException
1637
    {
1638
      send_getValidOrders(limit);
1639
      return recv_getValidOrders();
1640
    }
1641
 
1642
    public void send_getValidOrders(long limit) throws TException
1643
    {
1644
      oprot_.writeMessageBegin(new TMessage("getValidOrders", TMessageType.CALL, seqid_));
1645
      getValidOrders_args args = new getValidOrders_args();
1646
      args.limit = limit;
1647
      args.write(oprot_);
1648
      oprot_.writeMessageEnd();
1649
      oprot_.getTransport().flush();
1650
    }
1651
 
1652
    public List<Order> recv_getValidOrders() throws TException
1653
    {
1654
      TMessage msg = iprot_.readMessageBegin();
1655
      if (msg.type == TMessageType.EXCEPTION) {
1656
        TApplicationException x = TApplicationException.read(iprot_);
1657
        iprot_.readMessageEnd();
1658
        throw x;
1659
      }
1660
      getValidOrders_result result = new getValidOrders_result();
1661
      result.read(iprot_);
1662
      iprot_.readMessageEnd();
1663
      if (result.isSetSuccess()) {
1664
        return result.success;
1665
      }
1666
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1667
    }
1668
 
2538 chandransh 1669
    public boolean toggleDOAFlag(long orderId) throws TransactionServiceException, TException
1670
    {
1671
      send_toggleDOAFlag(orderId);
1672
      return recv_toggleDOAFlag();
1673
    }
1674
 
1675
    public void send_toggleDOAFlag(long orderId) throws TException
1676
    {
1677
      oprot_.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.CALL, seqid_));
1678
      toggleDOAFlag_args args = new toggleDOAFlag_args();
1679
      args.orderId = orderId;
1680
      args.write(oprot_);
1681
      oprot_.writeMessageEnd();
1682
      oprot_.getTransport().flush();
1683
    }
1684
 
1685
    public boolean recv_toggleDOAFlag() throws TransactionServiceException, TException
1686
    {
1687
      TMessage msg = iprot_.readMessageBegin();
1688
      if (msg.type == TMessageType.EXCEPTION) {
1689
        TApplicationException x = TApplicationException.read(iprot_);
1690
        iprot_.readMessageEnd();
1691
        throw x;
1692
      }
1693
      toggleDOAFlag_result result = new toggleDOAFlag_result();
1694
      result.read(iprot_);
1695
      iprot_.readMessageEnd();
1696
      if (result.isSetSuccess()) {
1697
        return result.success;
1698
      }
1699
      if (result.ex != null) {
1700
        throw result.ex;
1701
      }
1702
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");
1703
    }
1704
 
1705
    public boolean requestPickupNumber(long orderId) throws TransactionServiceException, TException
1706
    {
1707
      send_requestPickupNumber(orderId);
1708
      return recv_requestPickupNumber();
1709
    }
1710
 
1711
    public void send_requestPickupNumber(long orderId) throws TException
1712
    {
1713
      oprot_.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.CALL, seqid_));
1714
      requestPickupNumber_args args = new requestPickupNumber_args();
1715
      args.orderId = orderId;
1716
      args.write(oprot_);
1717
      oprot_.writeMessageEnd();
1718
      oprot_.getTransport().flush();
1719
    }
1720
 
1721
    public boolean recv_requestPickupNumber() throws TransactionServiceException, TException
1722
    {
1723
      TMessage msg = iprot_.readMessageBegin();
1724
      if (msg.type == TMessageType.EXCEPTION) {
1725
        TApplicationException x = TApplicationException.read(iprot_);
1726
        iprot_.readMessageEnd();
1727
        throw x;
1728
      }
1729
      requestPickupNumber_result result = new requestPickupNumber_result();
1730
      result.read(iprot_);
1731
      iprot_.readMessageEnd();
1732
      if (result.isSetSuccess()) {
1733
        return result.success;
1734
      }
1735
      if (result.ex != null) {
1736
        throw result.ex;
1737
      }
1738
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");
1739
    }
1740
 
1741
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException
1742
    {
1743
      send_authorizePickup(orderId, pickupNumber);
1744
      return recv_authorizePickup();
1745
    }
1746
 
1747
    public void send_authorizePickup(long orderId, String pickupNumber) throws TException
1748
    {
1749
      oprot_.writeMessageBegin(new TMessage("authorizePickup", TMessageType.CALL, seqid_));
1750
      authorizePickup_args args = new authorizePickup_args();
1751
      args.orderId = orderId;
1752
      args.pickupNumber = pickupNumber;
1753
      args.write(oprot_);
1754
      oprot_.writeMessageEnd();
1755
      oprot_.getTransport().flush();
1756
    }
1757
 
1758
    public boolean recv_authorizePickup() throws TransactionServiceException, TException
1759
    {
1760
      TMessage msg = iprot_.readMessageBegin();
1761
      if (msg.type == TMessageType.EXCEPTION) {
1762
        TApplicationException x = TApplicationException.read(iprot_);
1763
        iprot_.readMessageEnd();
1764
        throw x;
1765
      }
1766
      authorizePickup_result result = new authorizePickup_result();
1767
      result.read(iprot_);
1768
      iprot_.readMessageEnd();
1769
      if (result.isSetSuccess()) {
1770
        return result.success;
1771
      }
1772
      if (result.ex != null) {
1773
        throw result.ex;
1774
      }
1775
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1776
    }
1777
 
2615 chandransh 1778
    public boolean receiveReturn(long orderId) throws TransactionServiceException, TException
2590 chandransh 1779
    {
2615 chandransh 1780
      send_receiveReturn(orderId);
1781
      return recv_receiveReturn();
2590 chandransh 1782
    }
1783
 
2615 chandransh 1784
    public void send_receiveReturn(long orderId) throws TException
2590 chandransh 1785
    {
2615 chandransh 1786
      oprot_.writeMessageBegin(new TMessage("receiveReturn", TMessageType.CALL, seqid_));
1787
      receiveReturn_args args = new receiveReturn_args();
2590 chandransh 1788
      args.orderId = orderId;
1789
      args.write(oprot_);
1790
      oprot_.writeMessageEnd();
1791
      oprot_.getTransport().flush();
1792
    }
1793
 
2615 chandransh 1794
    public boolean recv_receiveReturn() throws TransactionServiceException, TException
2590 chandransh 1795
    {
1796
      TMessage msg = iprot_.readMessageBegin();
1797
      if (msg.type == TMessageType.EXCEPTION) {
1798
        TApplicationException x = TApplicationException.read(iprot_);
1799
        iprot_.readMessageEnd();
1800
        throw x;
1801
      }
2615 chandransh 1802
      receiveReturn_result result = new receiveReturn_result();
2590 chandransh 1803
      result.read(iprot_);
1804
      iprot_.readMessageEnd();
1805
      if (result.isSetSuccess()) {
1806
        return result.success;
1807
      }
1808
      if (result.ex != null) {
1809
        throw result.ex;
1810
      }
2615 chandransh 1811
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "receiveReturn failed: unknown result");
2590 chandransh 1812
    }
1813
 
1814
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException
1815
    {
1816
      send_validateDoa(orderId, isValid);
1817
      return recv_validateDoa();
1818
    }
1819
 
1820
    public void send_validateDoa(long orderId, boolean isValid) throws TException
1821
    {
1822
      oprot_.writeMessageBegin(new TMessage("validateDoa", TMessageType.CALL, seqid_));
1823
      validateDoa_args args = new validateDoa_args();
1824
      args.orderId = orderId;
1825
      args.isValid = isValid;
1826
      args.write(oprot_);
1827
      oprot_.writeMessageEnd();
1828
      oprot_.getTransport().flush();
1829
    }
1830
 
1831
    public boolean recv_validateDoa() throws TransactionServiceException, TException
1832
    {
1833
      TMessage msg = iprot_.readMessageBegin();
1834
      if (msg.type == TMessageType.EXCEPTION) {
1835
        TApplicationException x = TApplicationException.read(iprot_);
1836
        iprot_.readMessageEnd();
1837
        throw x;
1838
      }
1839
      validateDoa_result result = new validateDoa_result();
1840
      result.read(iprot_);
1841
      iprot_.readMessageEnd();
1842
      if (result.isSetSuccess()) {
1843
        return result.success;
1844
      }
1845
      if (result.ex != null) {
1846
        throw result.ex;
1847
      }
1848
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
1849
    }
1850
 
2615 chandransh 1851
    public long reshipOrder(long orderId) throws TransactionServiceException, TException
1852
    {
1853
      send_reshipOrder(orderId);
1854
      return recv_reshipOrder();
1855
    }
1856
 
1857
    public void send_reshipOrder(long orderId) throws TException
1858
    {
1859
      oprot_.writeMessageBegin(new TMessage("reshipOrder", TMessageType.CALL, seqid_));
1860
      reshipOrder_args args = new reshipOrder_args();
1861
      args.orderId = orderId;
1862
      args.write(oprot_);
1863
      oprot_.writeMessageEnd();
1864
      oprot_.getTransport().flush();
1865
    }
1866
 
1867
    public long recv_reshipOrder() throws TransactionServiceException, TException
1868
    {
1869
      TMessage msg = iprot_.readMessageBegin();
1870
      if (msg.type == TMessageType.EXCEPTION) {
1871
        TApplicationException x = TApplicationException.read(iprot_);
1872
        iprot_.readMessageEnd();
1873
        throw x;
1874
      }
1875
      reshipOrder_result result = new reshipOrder_result();
1876
      result.read(iprot_);
1877
      iprot_.readMessageEnd();
1878
      if (result.isSetSuccess()) {
1879
        return result.success;
1880
      }
1881
      if (result.ex != null) {
1882
        throw result.ex;
1883
      }
1884
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "reshipOrder failed: unknown result");
1885
    }
1886
 
1887
    public boolean refundOrder(long orderId) throws TransactionServiceException, TException
1888
    {
1889
      send_refundOrder(orderId);
1890
      return recv_refundOrder();
1891
    }
1892
 
1893
    public void send_refundOrder(long orderId) throws TException
1894
    {
1895
      oprot_.writeMessageBegin(new TMessage("refundOrder", TMessageType.CALL, seqid_));
1896
      refundOrder_args args = new refundOrder_args();
1897
      args.orderId = orderId;
1898
      args.write(oprot_);
1899
      oprot_.writeMessageEnd();
1900
      oprot_.getTransport().flush();
1901
    }
1902
 
1903
    public boolean recv_refundOrder() throws TransactionServiceException, TException
1904
    {
1905
      TMessage msg = iprot_.readMessageBegin();
1906
      if (msg.type == TMessageType.EXCEPTION) {
1907
        TApplicationException x = TApplicationException.read(iprot_);
1908
        iprot_.readMessageEnd();
1909
        throw x;
1910
      }
1911
      refundOrder_result result = new refundOrder_result();
1912
      result.read(iprot_);
1913
      iprot_.readMessageEnd();
1914
      if (result.isSetSuccess()) {
1915
        return result.success;
1916
      }
1917
      if (result.ex != null) {
1918
        throw result.ex;
1919
      }
1920
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "refundOrder failed: unknown result");
1921
    }
1922
 
68 ashish 1923
  }
1924
  public static class Processor implements TProcessor {
1925
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1926
    public Processor(Iface iface)
1927
    {
1928
      iface_ = iface;
764 rajveer 1929
      processMap_.put("closeSession", new closeSession());
68 ashish 1930
      processMap_.put("createTransaction", new createTransaction());
1931
      processMap_.put("getTransaction", new getTransaction());
1932
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1933
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1934
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1935
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1936
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1937
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1938
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1939
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1940
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1941
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1942
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1943
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1944
      processMap_.put("acceptOrder", new acceptOrder());
1945
      processMap_.put("billOrder", new billOrder());
483 rajveer 1946
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1947
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1948
      processMap_.put("createOrder", new createOrder());
1949
      processMap_.put("getOrder", new getOrder());
1950
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 1951
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 1952
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1953
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1954
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1955
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1956
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1957
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1958
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1959
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1960
      processMap_.put("getAlerts", new getAlerts());
1961
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 1962
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1629 ankur.sing 1963
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1731 ankur.sing 1964
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1886 ankur.sing 1965
      processMap_.put("getValidOrders", new getValidOrders());
2538 chandransh 1966
      processMap_.put("toggleDOAFlag", new toggleDOAFlag());
1967
      processMap_.put("requestPickupNumber", new requestPickupNumber());
1968
      processMap_.put("authorizePickup", new authorizePickup());
2615 chandransh 1969
      processMap_.put("receiveReturn", new receiveReturn());
2590 chandransh 1970
      processMap_.put("validateDoa", new validateDoa());
2615 chandransh 1971
      processMap_.put("reshipOrder", new reshipOrder());
1972
      processMap_.put("refundOrder", new refundOrder());
68 ashish 1973
    }
1974
 
1975
    protected static interface ProcessFunction {
1976
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1977
    }
1978
 
1979
    private Iface iface_;
1980
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1981
 
1982
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1983
    {
1984
      TMessage msg = iprot.readMessageBegin();
1985
      ProcessFunction fn = processMap_.get(msg.name);
1986
      if (fn == null) {
1987
        TProtocolUtil.skip(iprot, TType.STRUCT);
1988
        iprot.readMessageEnd();
1989
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1990
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1991
        x.write(oprot);
1992
        oprot.writeMessageEnd();
1993
        oprot.getTransport().flush();
1994
        return true;
1995
      }
1996
      fn.process(msg.seqid, iprot, oprot);
1997
      return true;
1998
    }
1999
 
764 rajveer 2000
    private class closeSession implements ProcessFunction {
2001
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2002
      {
2003
        closeSession_args args = new closeSession_args();
2004
        args.read(iprot);
2005
        iprot.readMessageEnd();
2006
        closeSession_result result = new closeSession_result();
2007
        iface_.closeSession();
2008
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
2009
        result.write(oprot);
2010
        oprot.writeMessageEnd();
2011
        oprot.getTransport().flush();
2012
      }
2013
 
2014
    }
2015
 
68 ashish 2016
    private class createTransaction implements ProcessFunction {
2017
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2018
      {
2019
        createTransaction_args args = new createTransaction_args();
2020
        args.read(iprot);
2021
        iprot.readMessageEnd();
2022
        createTransaction_result result = new createTransaction_result();
2023
        try {
132 ashish 2024
          result.success = iface_.createTransaction(args.transaction);
2025
          result.setSuccessIsSet(true);
68 ashish 2026
        } catch (TransactionServiceException ex) {
2027
          result.ex = ex;
2028
        } catch (Throwable th) {
2029
          LOGGER.error("Internal error processing createTransaction", th);
2030
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
2031
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
2032
          x.write(oprot);
2033
          oprot.writeMessageEnd();
2034
          oprot.getTransport().flush();
2035
          return;
2036
        }
2037
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
2038
        result.write(oprot);
2039
        oprot.writeMessageEnd();
2040
        oprot.getTransport().flush();
2041
      }
2042
 
2043
    }
2044
 
2045
    private class getTransaction implements ProcessFunction {
2046
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2047
      {
2048
        getTransaction_args args = new getTransaction_args();
2049
        args.read(iprot);
2050
        iprot.readMessageEnd();
2051
        getTransaction_result result = new getTransaction_result();
2052
        try {
2053
          result.success = iface_.getTransaction(args.id);
2054
        } catch (TransactionServiceException ex) {
2055
          result.ex = ex;
2056
        } catch (Throwable th) {
2057
          LOGGER.error("Internal error processing getTransaction", th);
2058
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
2059
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
2060
          x.write(oprot);
2061
          oprot.writeMessageEnd();
2062
          oprot.getTransport().flush();
2063
          return;
2064
        }
2065
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
2066
        result.write(oprot);
2067
        oprot.writeMessageEnd();
2068
        oprot.getTransport().flush();
2069
      }
2070
 
2071
    }
2072
 
2073
    private class getTransactionsForCustomer implements ProcessFunction {
2074
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2075
      {
2076
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
2077
        args.read(iprot);
2078
        iprot.readMessageEnd();
2079
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
2080
        try {
132 ashish 2081
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2082
        } catch (TransactionServiceException ex) {
2083
          result.ex = ex;
2084
        } catch (Throwable th) {
2085
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
2086
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
2087
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
2088
          x.write(oprot);
2089
          oprot.writeMessageEnd();
2090
          oprot.getTransport().flush();
2091
          return;
2092
        }
2093
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
2094
        result.write(oprot);
2095
        oprot.writeMessageEnd();
2096
        oprot.getTransport().flush();
2097
      }
2098
 
2099
    }
2100
 
132 ashish 2101
    private class getTransactionsForShoppingCartId implements ProcessFunction {
2102
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2103
      {
2104
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
2105
        args.read(iprot);
2106
        iprot.readMessageEnd();
2107
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
2108
        try {
2109
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
2110
        } catch (TransactionServiceException ex) {
2111
          result.ex = ex;
2112
        } catch (Throwable th) {
2113
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
2114
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
2115
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
2116
          x.write(oprot);
2117
          oprot.writeMessageEnd();
2118
          oprot.getTransport().flush();
2119
          return;
2120
        }
2121
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
2122
        result.write(oprot);
2123
        oprot.writeMessageEnd();
2124
        oprot.getTransport().flush();
2125
      }
2126
 
2127
    }
2128
 
68 ashish 2129
    private class getTransactionStatus implements ProcessFunction {
2130
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2131
      {
2132
        getTransactionStatus_args args = new getTransactionStatus_args();
2133
        args.read(iprot);
2134
        iprot.readMessageEnd();
2135
        getTransactionStatus_result result = new getTransactionStatus_result();
2136
        try {
2137
          result.success = iface_.getTransactionStatus(args.transactionId);
2138
        } catch (TransactionServiceException ex) {
2139
          result.ex = ex;
2140
        } catch (Throwable th) {
2141
          LOGGER.error("Internal error processing getTransactionStatus", th);
2142
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
2143
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
2144
          x.write(oprot);
2145
          oprot.writeMessageEnd();
2146
          oprot.getTransport().flush();
2147
          return;
2148
        }
2149
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
2150
        result.write(oprot);
2151
        oprot.writeMessageEnd();
2152
        oprot.getTransport().flush();
2153
      }
2154
 
2155
    }
2156
 
2157
    private class changeTransactionStatus implements ProcessFunction {
2158
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2159
      {
2160
        changeTransactionStatus_args args = new changeTransactionStatus_args();
2161
        args.read(iprot);
2162
        iprot.readMessageEnd();
2163
        changeTransactionStatus_result result = new changeTransactionStatus_result();
2164
        try {
2165
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
2166
          result.setSuccessIsSet(true);
2167
        } catch (TransactionServiceException ex) {
2168
          result.ex = ex;
2169
        } catch (Throwable th) {
2170
          LOGGER.error("Internal error processing changeTransactionStatus", th);
2171
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
2172
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
2173
          x.write(oprot);
2174
          oprot.writeMessageEnd();
2175
          oprot.getTransport().flush();
2176
          return;
2177
        }
2178
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
2179
        result.write(oprot);
2180
        oprot.writeMessageEnd();
2181
        oprot.getTransport().flush();
2182
      }
2183
 
2184
    }
2185
 
1398 varun.gupt 2186
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 2187
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2188
      {
1398 varun.gupt 2189
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 2190
        args.read(iprot);
2191
        iprot.readMessageEnd();
1398 varun.gupt 2192
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 2193
        try {
1398 varun.gupt 2194
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 2195
          result.setSuccessIsSet(true);
2196
        } catch (TransactionServiceException ex) {
2197
          result.ex = ex;
2198
        } catch (Throwable th) {
1398 varun.gupt 2199
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
2200
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
2201
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 2202
          x.write(oprot);
2203
          oprot.writeMessageEnd();
2204
          oprot.getTransport().flush();
2205
          return;
2206
        }
1398 varun.gupt 2207
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 2208
        result.write(oprot);
2209
        oprot.writeMessageEnd();
2210
        oprot.getTransport().flush();
2211
      }
2212
 
2213
    }
2214
 
483 rajveer 2215
    private class getAllOrders implements ProcessFunction {
68 ashish 2216
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2217
      {
483 rajveer 2218
        getAllOrders_args args = new getAllOrders_args();
68 ashish 2219
        args.read(iprot);
2220
        iprot.readMessageEnd();
483 rajveer 2221
        getAllOrders_result result = new getAllOrders_result();
68 ashish 2222
        try {
483 rajveer 2223
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 2224
        } catch (TransactionServiceException ex) {
2225
          result.ex = ex;
2226
        } catch (Throwable th) {
483 rajveer 2227
          LOGGER.error("Internal error processing getAllOrders", th);
2228
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
2229
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 2230
          x.write(oprot);
2231
          oprot.writeMessageEnd();
2232
          oprot.getTransport().flush();
2233
          return;
2234
        }
483 rajveer 2235
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 2236
        result.write(oprot);
2237
        oprot.writeMessageEnd();
2238
        oprot.getTransport().flush();
2239
      }
2240
 
2241
    }
2242
 
1022 varun.gupt 2243
    private class getOrdersByBillingDate implements ProcessFunction {
2244
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2245
      {
2246
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
2247
        args.read(iprot);
2248
        iprot.readMessageEnd();
2249
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
2250
        try {
2251
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
2252
        } catch (TransactionServiceException ex) {
2253
          result.ex = ex;
2254
        } catch (Throwable th) {
2255
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
2256
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
2257
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
2258
          x.write(oprot);
2259
          oprot.writeMessageEnd();
2260
          oprot.getTransport().flush();
2261
          return;
2262
        }
2263
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
2264
        result.write(oprot);
2265
        oprot.writeMessageEnd();
2266
        oprot.getTransport().flush();
2267
      }
2268
 
2269
    }
2270
 
1382 varun.gupt 2271
    private class getReturnableOrdersForCustomer implements ProcessFunction {
2272
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2273
      {
2274
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
2275
        args.read(iprot);
2276
        iprot.readMessageEnd();
2277
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
2278
        try {
2279
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
2280
        } catch (TransactionServiceException ex) {
2281
          result.ex = ex;
2282
        } catch (Throwable th) {
2283
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
2284
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
2285
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2286
          x.write(oprot);
2287
          oprot.writeMessageEnd();
2288
          oprot.getTransport().flush();
2289
          return;
2290
        }
2291
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
2292
        result.write(oprot);
2293
        oprot.writeMessageEnd();
2294
        oprot.getTransport().flush();
2295
      }
2296
 
2297
    }
2298
 
2299
    private class getCancellableOrdersForCustomer implements ProcessFunction {
2300
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2301
      {
2302
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
2303
        args.read(iprot);
2304
        iprot.readMessageEnd();
2305
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
2306
        try {
2307
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
2308
        } catch (TransactionServiceException ex) {
2309
          result.ex = ex;
2310
        } catch (Throwable th) {
2311
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
2312
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
2313
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2314
          x.write(oprot);
2315
          oprot.writeMessageEnd();
2316
          oprot.getTransport().flush();
2317
          return;
2318
        }
2319
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
2320
        result.write(oprot);
2321
        oprot.writeMessageEnd();
2322
        oprot.getTransport().flush();
2323
      }
2324
 
2325
    }
2326
 
483 rajveer 2327
    private class changeOrderStatus implements ProcessFunction {
68 ashish 2328
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2329
      {
483 rajveer 2330
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 2331
        args.read(iprot);
2332
        iprot.readMessageEnd();
483 rajveer 2333
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 2334
        try {
483 rajveer 2335
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 2336
          result.setSuccessIsSet(true);
2337
        } catch (TransactionServiceException ex) {
2338
          result.ex = ex;
2339
        } catch (Throwable th) {
483 rajveer 2340
          LOGGER.error("Internal error processing changeOrderStatus", th);
2341
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
2342
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 2343
          x.write(oprot);
2344
          oprot.writeMessageEnd();
2345
          oprot.getTransport().flush();
2346
          return;
2347
        }
483 rajveer 2348
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 2349
        result.write(oprot);
2350
        oprot.writeMessageEnd();
2351
        oprot.getTransport().flush();
2352
      }
2353
 
2354
    }
2355
 
495 rajveer 2356
    private class addBillingDetails implements ProcessFunction {
2357
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2358
      {
2359
        addBillingDetails_args args = new addBillingDetails_args();
2360
        args.read(iprot);
2361
        iprot.readMessageEnd();
2362
        addBillingDetails_result result = new addBillingDetails_result();
2363
        try {
1148 chandransh 2364
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 2365
          result.setSuccessIsSet(true);
2366
        } catch (TransactionServiceException ex) {
2367
          result.ex = ex;
2368
        } catch (Throwable th) {
2369
          LOGGER.error("Internal error processing addBillingDetails", th);
2370
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
2371
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
2372
          x.write(oprot);
2373
          oprot.writeMessageEnd();
2374
          oprot.getTransport().flush();
2375
          return;
2376
        }
2377
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
2378
        result.write(oprot);
2379
        oprot.writeMessageEnd();
2380
        oprot.getTransport().flush();
2381
      }
2382
 
2383
    }
2384
 
1148 chandransh 2385
    private class addJacketNumber implements ProcessFunction {
2386
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2387
      {
2388
        addJacketNumber_args args = new addJacketNumber_args();
2389
        args.read(iprot);
2390
        iprot.readMessageEnd();
2391
        addJacketNumber_result result = new addJacketNumber_result();
2392
        try {
2383 rajveer 2393
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1148 chandransh 2394
          result.setSuccessIsSet(true);
2395
        } catch (TransactionServiceException ex) {
2396
          result.ex = ex;
2397
        } catch (Throwable th) {
2398
          LOGGER.error("Internal error processing addJacketNumber", th);
2399
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
2400
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
2401
          x.write(oprot);
2402
          oprot.writeMessageEnd();
2403
          oprot.getTransport().flush();
2404
          return;
2405
        }
2406
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
2407
        result.write(oprot);
2408
        oprot.writeMessageEnd();
2409
        oprot.getTransport().flush();
2410
      }
2411
 
2412
    }
2413
 
923 rajveer 2414
    private class acceptOrder implements ProcessFunction {
2415
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2416
      {
2417
        acceptOrder_args args = new acceptOrder_args();
2418
        args.read(iprot);
2419
        iprot.readMessageEnd();
2420
        acceptOrder_result result = new acceptOrder_result();
2421
        try {
2422
          result.success = iface_.acceptOrder(args.orderId);
2423
          result.setSuccessIsSet(true);
2424
        } catch (TransactionServiceException ex) {
2425
          result.ex = ex;
2426
        } catch (Throwable th) {
2427
          LOGGER.error("Internal error processing acceptOrder", th);
2428
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
2429
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
2430
          x.write(oprot);
2431
          oprot.writeMessageEnd();
2432
          oprot.getTransport().flush();
2433
          return;
2434
        }
2435
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
2436
        result.write(oprot);
2437
        oprot.writeMessageEnd();
2438
        oprot.getTransport().flush();
2439
      }
2440
 
2441
    }
2442
 
2443
    private class billOrder implements ProcessFunction {
2444
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2445
      {
2446
        billOrder_args args = new billOrder_args();
2447
        args.read(iprot);
2448
        iprot.readMessageEnd();
2449
        billOrder_result result = new billOrder_result();
2450
        try {
2451
          result.success = iface_.billOrder(args.orderId);
2452
          result.setSuccessIsSet(true);
2453
        } catch (TransactionServiceException ex) {
2454
          result.ex = ex;
2455
        } catch (Throwable th) {
2456
          LOGGER.error("Internal error processing billOrder", th);
2457
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
2458
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
2459
          x.write(oprot);
2460
          oprot.writeMessageEnd();
2461
          oprot.getTransport().flush();
2462
          return;
2463
        }
2464
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
2465
        result.write(oprot);
2466
        oprot.writeMessageEnd();
2467
        oprot.getTransport().flush();
2468
      }
2469
 
2470
    }
2471
 
483 rajveer 2472
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2473
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2474
      {
483 rajveer 2475
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2476
        args.read(iprot);
2477
        iprot.readMessageEnd();
483 rajveer 2478
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2479
        try {
1529 ankur.sing 2480
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2481
        } catch (TransactionServiceException ex) {
2482
          result.ex = ex;
2483
        } catch (Throwable th) {
483 rajveer 2484
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2485
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2486
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2487
          x.write(oprot);
2488
          oprot.writeMessageEnd();
2489
          oprot.getTransport().flush();
2490
          return;
2491
        }
483 rajveer 2492
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2493
        result.write(oprot);
2494
        oprot.writeMessageEnd();
2495
        oprot.getTransport().flush();
2496
      }
2497
 
2498
    }
2499
 
483 rajveer 2500
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2501
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2502
      {
483 rajveer 2503
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2504
        args.read(iprot);
2505
        iprot.readMessageEnd();
483 rajveer 2506
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2507
        try {
483 rajveer 2508
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2509
        } catch (TransactionServiceException ex) {
2510
          result.ex = ex;
2511
        } catch (Throwable th) {
483 rajveer 2512
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2513
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2514
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2515
          x.write(oprot);
2516
          oprot.writeMessageEnd();
2517
          oprot.getTransport().flush();
2518
          return;
2519
        }
483 rajveer 2520
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2521
        result.write(oprot);
2522
        oprot.writeMessageEnd();
2523
        oprot.getTransport().flush();
2524
      }
2525
 
2526
    }
2527
 
483 rajveer 2528
    private class createOrder implements ProcessFunction {
68 ashish 2529
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2530
      {
483 rajveer 2531
        createOrder_args args = new createOrder_args();
68 ashish 2532
        args.read(iprot);
2533
        iprot.readMessageEnd();
483 rajveer 2534
        createOrder_result result = new createOrder_result();
68 ashish 2535
        try {
483 rajveer 2536
          result.success = iface_.createOrder(args.order);
68 ashish 2537
          result.setSuccessIsSet(true);
2538
        } catch (TransactionServiceException ex) {
2539
          result.ex = ex;
2540
        } catch (Throwable th) {
483 rajveer 2541
          LOGGER.error("Internal error processing createOrder", th);
2542
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2543
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2544
          x.write(oprot);
2545
          oprot.writeMessageEnd();
2546
          oprot.getTransport().flush();
2547
          return;
2548
        }
483 rajveer 2549
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2550
        result.write(oprot);
2551
        oprot.writeMessageEnd();
2552
        oprot.getTransport().flush();
2553
      }
2554
 
2555
    }
2556
 
483 rajveer 2557
    private class getOrder implements ProcessFunction {
68 ashish 2558
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2559
      {
483 rajveer 2560
        getOrder_args args = new getOrder_args();
68 ashish 2561
        args.read(iprot);
2562
        iprot.readMessageEnd();
483 rajveer 2563
        getOrder_result result = new getOrder_result();
68 ashish 2564
        try {
483 rajveer 2565
          result.success = iface_.getOrder(args.id);
68 ashish 2566
        } catch (TransactionServiceException ex) {
2567
          result.ex = ex;
2568
        } catch (Throwable th) {
483 rajveer 2569
          LOGGER.error("Internal error processing getOrder", th);
2570
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2571
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2572
          x.write(oprot);
2573
          oprot.writeMessageEnd();
2574
          oprot.getTransport().flush();
2575
          return;
2576
        }
483 rajveer 2577
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2578
        result.write(oprot);
2579
        oprot.writeMessageEnd();
2580
        oprot.getTransport().flush();
2581
      }
2582
 
2583
    }
2584
 
483 rajveer 2585
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2586
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2587
      {
483 rajveer 2588
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2589
        args.read(iprot);
2590
        iprot.readMessageEnd();
483 rajveer 2591
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2592
        try {
483 rajveer 2593
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2594
        } catch (TransactionServiceException ex) {
2595
          result.ex = ex;
2596
        } catch (Throwable th) {
483 rajveer 2597
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2598
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2599
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2600
          x.write(oprot);
2601
          oprot.writeMessageEnd();
2602
          oprot.getTransport().flush();
2603
          return;
2604
        }
483 rajveer 2605
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2606
        result.write(oprot);
2607
        oprot.writeMessageEnd();
2608
        oprot.getTransport().flush();
2609
      }
2610
 
2611
    }
2612
 
1529 ankur.sing 2613
    private class getOrderForCustomer implements ProcessFunction {
2614
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2615
      {
2616
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2617
        args.read(iprot);
2618
        iprot.readMessageEnd();
2619
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2620
        try {
2621
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2622
        } catch (TransactionServiceException ex) {
2623
          result.ex = ex;
2624
        } catch (Throwable th) {
2625
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2626
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2627
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2628
          x.write(oprot);
2629
          oprot.writeMessageEnd();
2630
          oprot.getTransport().flush();
2631
          return;
2632
        }
2633
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2634
        result.write(oprot);
2635
        oprot.writeMessageEnd();
2636
        oprot.getTransport().flush();
2637
      }
2638
 
2639
    }
2640
 
1221 chandransh 2641
    private class batchOrders implements ProcessFunction {
2642
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2643
      {
2644
        batchOrders_args args = new batchOrders_args();
2645
        args.read(iprot);
2646
        iprot.readMessageEnd();
2647
        batchOrders_result result = new batchOrders_result();
2648
        try {
2649
          result.success = iface_.batchOrders(args.warehouseId);
2650
        } catch (TransactionServiceException ex) {
2651
          result.ex = ex;
2652
        } catch (Throwable th) {
2653
          LOGGER.error("Internal error processing batchOrders", th);
2654
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2655
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2656
          x.write(oprot);
2657
          oprot.writeMessageEnd();
2658
          oprot.getTransport().flush();
2659
          return;
2660
        }
2661
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2662
        result.write(oprot);
2663
        oprot.writeMessageEnd();
2664
        oprot.getTransport().flush();
2665
      }
2666
 
2667
    }
2668
 
1209 chandransh 2669
    private class markOrderAsOutOfStock implements ProcessFunction {
2670
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2671
      {
2672
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2673
        args.read(iprot);
2674
        iprot.readMessageEnd();
2675
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2676
        try {
2677
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2678
          result.setSuccessIsSet(true);
2679
        } catch (TransactionServiceException ex) {
2680
          result.ex = ex;
2681
        } catch (Throwable th) {
2682
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2683
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2684
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2685
          x.write(oprot);
2686
          oprot.writeMessageEnd();
2687
          oprot.getTransport().flush();
2688
          return;
2689
        }
2690
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2691
        result.write(oprot);
2692
        oprot.writeMessageEnd();
2693
        oprot.getTransport().flush();
2694
      }
2695
 
2696
    }
2697
 
758 chandransh 2698
    private class markOrdersAsManifested implements ProcessFunction {
2699
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2700
      {
2701
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2702
        args.read(iprot);
2703
        iprot.readMessageEnd();
2704
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2705
        try {
2706
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2707
          result.setSuccessIsSet(true);
2708
        } catch (TransactionServiceException ex) {
2709
          result.ex = ex;
2710
        } catch (Throwable th) {
2711
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2712
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2713
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2714
          x.write(oprot);
2715
          oprot.writeMessageEnd();
2716
          oprot.getTransport().flush();
2717
          return;
2718
        }
2719
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2720
        result.write(oprot);
2721
        oprot.writeMessageEnd();
2722
        oprot.getTransport().flush();
2723
      }
2724
 
2725
    }
2726
 
1114 chandransh 2727
    private class markOrdersAsPickedUp implements ProcessFunction {
2728
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2729
      {
2730
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2731
        args.read(iprot);
2732
        iprot.readMessageEnd();
2733
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2734
        try {
2735
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2736
        } catch (TransactionServiceException ex) {
2737
          result.ex = ex;
2738
        } catch (Throwable th) {
2739
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2740
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2741
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2742
          x.write(oprot);
2743
          oprot.writeMessageEnd();
2744
          oprot.getTransport().flush();
2745
          return;
2746
        }
2747
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2748
        result.write(oprot);
2749
        oprot.writeMessageEnd();
2750
        oprot.getTransport().flush();
2751
      }
2752
 
2753
    }
2754
 
1133 chandransh 2755
    private class markOrdersAsDelivered implements ProcessFunction {
2756
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2757
      {
2758
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2759
        args.read(iprot);
2760
        iprot.readMessageEnd();
2761
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2762
        try {
2763
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2764
        } catch (TransactionServiceException ex) {
2765
          result.ex = ex;
2766
        } catch (Throwable th) {
2767
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2768
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2769
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2770
          x.write(oprot);
2771
          oprot.writeMessageEnd();
2772
          oprot.getTransport().flush();
2773
          return;
2774
        }
2775
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2776
        result.write(oprot);
2777
        oprot.writeMessageEnd();
2778
        oprot.getTransport().flush();
2779
      }
2780
 
2781
    }
2782
 
2783
    private class markOrdersAsFailed implements ProcessFunction {
2784
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2785
      {
2786
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2787
        args.read(iprot);
2788
        iprot.readMessageEnd();
2789
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2790
        try {
2791
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2792
        } catch (TransactionServiceException ex) {
2793
          result.ex = ex;
2794
        } catch (Throwable th) {
2795
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2796
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2797
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2798
          x.write(oprot);
2799
          oprot.writeMessageEnd();
2800
          oprot.getTransport().flush();
2801
          return;
2802
        }
2803
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2804
        result.write(oprot);
2805
        oprot.writeMessageEnd();
2806
        oprot.getTransport().flush();
2807
      }
2808
 
2809
    }
2810
 
1245 chandransh 2811
    private class updateNonDeliveryReason implements ProcessFunction {
2812
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2813
      {
2814
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2815
        args.read(iprot);
2816
        iprot.readMessageEnd();
2817
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2818
        try {
2819
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2820
        } catch (TransactionServiceException ex) {
2821
          result.ex = ex;
2822
        } catch (Throwable th) {
2823
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2824
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2825
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2826
          x.write(oprot);
2827
          oprot.writeMessageEnd();
2828
          oprot.getTransport().flush();
2829
          return;
2830
        }
2831
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2832
        result.write(oprot);
2833
        oprot.writeMessageEnd();
2834
        oprot.getTransport().flush();
2835
      }
2836
 
2837
    }
2838
 
1406 ankur.sing 2839
    private class getUndeliveredOrders implements ProcessFunction {
2840
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2841
      {
2842
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2843
        args.read(iprot);
2844
        iprot.readMessageEnd();
2845
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2846
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2847
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2848
        result.write(oprot);
2849
        oprot.writeMessageEnd();
2850
        oprot.getTransport().flush();
2851
      }
2852
 
2853
    }
2854
 
305 ashish 2855
    private class getAlerts implements ProcessFunction {
2856
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2857
      {
2858
        getAlerts_args args = new getAlerts_args();
2859
        args.read(iprot);
2860
        iprot.readMessageEnd();
2861
        getAlerts_result result = new getAlerts_result();
483 rajveer 2862
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2863
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2864
        result.write(oprot);
2865
        oprot.writeMessageEnd();
2866
        oprot.getTransport().flush();
2867
      }
2868
 
2869
    }
2870
 
2871
    private class setAlert implements ProcessFunction {
2872
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2873
      {
2874
        setAlert_args args = new setAlert_args();
2875
        args.read(iprot);
2876
        iprot.readMessageEnd();
2877
        setAlert_result result = new setAlert_result();
483 rajveer 2878
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2879
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2880
        result.write(oprot);
2881
        oprot.writeMessageEnd();
2882
        oprot.getTransport().flush();
2883
      }
2884
 
2885
    }
2886
 
1598 ankur.sing 2887
    private class getValidOrderCount implements ProcessFunction {
2888
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2889
      {
2890
        getValidOrderCount_args args = new getValidOrderCount_args();
2891
        args.read(iprot);
2892
        iprot.readMessageEnd();
2893
        getValidOrderCount_result result = new getValidOrderCount_result();
2894
        result.success = iface_.getValidOrderCount();
2895
        result.setSuccessIsSet(true);
2896
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
2897
        result.write(oprot);
2898
        oprot.writeMessageEnd();
2899
        oprot.getTransport().flush();
2900
      }
2901
 
2902
    }
2903
 
1629 ankur.sing 2904
    private class getNoOfCustomersWithSuccessfulTransaction implements ProcessFunction {
2905
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2906
      {
2907
        getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
2908
        args.read(iprot);
2909
        iprot.readMessageEnd();
2910
        getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
2911
        result.success = iface_.getNoOfCustomersWithSuccessfulTransaction();
2912
        result.setSuccessIsSet(true);
2913
        oprot.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid));
2914
        result.write(oprot);
2915
        oprot.writeMessageEnd();
2916
        oprot.getTransport().flush();
2917
      }
2918
 
2919
    }
2920
 
1731 ankur.sing 2921
    private class getValidOrdersAmountRange implements ProcessFunction {
1629 ankur.sing 2922
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2923
      {
1731 ankur.sing 2924
        getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 2925
        args.read(iprot);
2926
        iprot.readMessageEnd();
1731 ankur.sing 2927
        getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
2928
        result.success = iface_.getValidOrdersAmountRange();
2929
        oprot.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 2930
        result.write(oprot);
2931
        oprot.writeMessageEnd();
2932
        oprot.getTransport().flush();
2933
      }
2934
 
2935
    }
2936
 
1886 ankur.sing 2937
    private class getValidOrders implements ProcessFunction {
2938
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2939
      {
2940
        getValidOrders_args args = new getValidOrders_args();
2941
        args.read(iprot);
2942
        iprot.readMessageEnd();
2943
        getValidOrders_result result = new getValidOrders_result();
2944
        result.success = iface_.getValidOrders(args.limit);
2945
        oprot.writeMessageBegin(new TMessage("getValidOrders", TMessageType.REPLY, seqid));
2946
        result.write(oprot);
2947
        oprot.writeMessageEnd();
2948
        oprot.getTransport().flush();
2949
      }
2950
 
2951
    }
2952
 
2538 chandransh 2953
    private class toggleDOAFlag implements ProcessFunction {
2954
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2955
      {
2956
        toggleDOAFlag_args args = new toggleDOAFlag_args();
2957
        args.read(iprot);
2958
        iprot.readMessageEnd();
2959
        toggleDOAFlag_result result = new toggleDOAFlag_result();
2960
        try {
2961
          result.success = iface_.toggleDOAFlag(args.orderId);
2962
          result.setSuccessIsSet(true);
2963
        } catch (TransactionServiceException ex) {
2964
          result.ex = ex;
2965
        } catch (Throwable th) {
2966
          LOGGER.error("Internal error processing toggleDOAFlag", th);
2967
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing toggleDOAFlag");
2968
          oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.EXCEPTION, seqid));
2969
          x.write(oprot);
2970
          oprot.writeMessageEnd();
2971
          oprot.getTransport().flush();
2972
          return;
2973
        }
2974
        oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.REPLY, seqid));
2975
        result.write(oprot);
2976
        oprot.writeMessageEnd();
2977
        oprot.getTransport().flush();
2978
      }
2979
 
2980
    }
2981
 
2982
    private class requestPickupNumber implements ProcessFunction {
2983
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2984
      {
2985
        requestPickupNumber_args args = new requestPickupNumber_args();
2986
        args.read(iprot);
2987
        iprot.readMessageEnd();
2988
        requestPickupNumber_result result = new requestPickupNumber_result();
2989
        try {
2990
          result.success = iface_.requestPickupNumber(args.orderId);
2991
          result.setSuccessIsSet(true);
2992
        } catch (TransactionServiceException ex) {
2993
          result.ex = ex;
2994
        } catch (Throwable th) {
2995
          LOGGER.error("Internal error processing requestPickupNumber", th);
2996
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing requestPickupNumber");
2997
          oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.EXCEPTION, seqid));
2998
          x.write(oprot);
2999
          oprot.writeMessageEnd();
3000
          oprot.getTransport().flush();
3001
          return;
3002
        }
3003
        oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.REPLY, seqid));
3004
        result.write(oprot);
3005
        oprot.writeMessageEnd();
3006
        oprot.getTransport().flush();
3007
      }
3008
 
3009
    }
3010
 
3011
    private class authorizePickup implements ProcessFunction {
3012
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3013
      {
3014
        authorizePickup_args args = new authorizePickup_args();
3015
        args.read(iprot);
3016
        iprot.readMessageEnd();
3017
        authorizePickup_result result = new authorizePickup_result();
3018
        try {
3019
          result.success = iface_.authorizePickup(args.orderId, args.pickupNumber);
3020
          result.setSuccessIsSet(true);
3021
        } catch (TransactionServiceException ex) {
3022
          result.ex = ex;
3023
        } catch (Throwable th) {
3024
          LOGGER.error("Internal error processing authorizePickup", th);
3025
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authorizePickup");
3026
          oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.EXCEPTION, seqid));
3027
          x.write(oprot);
3028
          oprot.writeMessageEnd();
3029
          oprot.getTransport().flush();
3030
          return;
3031
        }
3032
        oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.REPLY, seqid));
3033
        result.write(oprot);
3034
        oprot.writeMessageEnd();
3035
        oprot.getTransport().flush();
3036
      }
3037
 
3038
    }
3039
 
2615 chandransh 3040
    private class receiveReturn implements ProcessFunction {
2590 chandransh 3041
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3042
      {
2615 chandransh 3043
        receiveReturn_args args = new receiveReturn_args();
2590 chandransh 3044
        args.read(iprot);
3045
        iprot.readMessageEnd();
2615 chandransh 3046
        receiveReturn_result result = new receiveReturn_result();
2590 chandransh 3047
        try {
2615 chandransh 3048
          result.success = iface_.receiveReturn(args.orderId);
2590 chandransh 3049
          result.setSuccessIsSet(true);
3050
        } catch (TransactionServiceException ex) {
3051
          result.ex = ex;
3052
        } catch (Throwable th) {
2615 chandransh 3053
          LOGGER.error("Internal error processing receiveReturn", th);
3054
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing receiveReturn");
3055
          oprot.writeMessageBegin(new TMessage("receiveReturn", TMessageType.EXCEPTION, seqid));
2590 chandransh 3056
          x.write(oprot);
3057
          oprot.writeMessageEnd();
3058
          oprot.getTransport().flush();
3059
          return;
3060
        }
2615 chandransh 3061
        oprot.writeMessageBegin(new TMessage("receiveReturn", TMessageType.REPLY, seqid));
2590 chandransh 3062
        result.write(oprot);
3063
        oprot.writeMessageEnd();
3064
        oprot.getTransport().flush();
3065
      }
3066
 
3067
    }
3068
 
3069
    private class validateDoa implements ProcessFunction {
3070
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3071
      {
3072
        validateDoa_args args = new validateDoa_args();
3073
        args.read(iprot);
3074
        iprot.readMessageEnd();
3075
        validateDoa_result result = new validateDoa_result();
3076
        try {
3077
          result.success = iface_.validateDoa(args.orderId, args.isValid);
3078
          result.setSuccessIsSet(true);
3079
        } catch (TransactionServiceException ex) {
3080
          result.ex = ex;
3081
        } catch (Throwable th) {
3082
          LOGGER.error("Internal error processing validateDoa", th);
3083
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateDoa");
3084
          oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.EXCEPTION, seqid));
3085
          x.write(oprot);
3086
          oprot.writeMessageEnd();
3087
          oprot.getTransport().flush();
3088
          return;
3089
        }
3090
        oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.REPLY, seqid));
3091
        result.write(oprot);
3092
        oprot.writeMessageEnd();
3093
        oprot.getTransport().flush();
3094
      }
3095
 
3096
    }
3097
 
2615 chandransh 3098
    private class reshipOrder implements ProcessFunction {
3099
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3100
      {
3101
        reshipOrder_args args = new reshipOrder_args();
3102
        args.read(iprot);
3103
        iprot.readMessageEnd();
3104
        reshipOrder_result result = new reshipOrder_result();
3105
        try {
3106
          result.success = iface_.reshipOrder(args.orderId);
3107
          result.setSuccessIsSet(true);
3108
        } catch (TransactionServiceException ex) {
3109
          result.ex = ex;
3110
        } catch (Throwable th) {
3111
          LOGGER.error("Internal error processing reshipOrder", th);
3112
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing reshipOrder");
3113
          oprot.writeMessageBegin(new TMessage("reshipOrder", TMessageType.EXCEPTION, seqid));
3114
          x.write(oprot);
3115
          oprot.writeMessageEnd();
3116
          oprot.getTransport().flush();
3117
          return;
3118
        }
3119
        oprot.writeMessageBegin(new TMessage("reshipOrder", TMessageType.REPLY, seqid));
3120
        result.write(oprot);
3121
        oprot.writeMessageEnd();
3122
        oprot.getTransport().flush();
3123
      }
3124
 
3125
    }
3126
 
3127
    private class refundOrder implements ProcessFunction {
3128
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3129
      {
3130
        refundOrder_args args = new refundOrder_args();
3131
        args.read(iprot);
3132
        iprot.readMessageEnd();
3133
        refundOrder_result result = new refundOrder_result();
3134
        try {
3135
          result.success = iface_.refundOrder(args.orderId);
3136
          result.setSuccessIsSet(true);
3137
        } catch (TransactionServiceException ex) {
3138
          result.ex = ex;
3139
        } catch (Throwable th) {
3140
          LOGGER.error("Internal error processing refundOrder", th);
3141
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing refundOrder");
3142
          oprot.writeMessageBegin(new TMessage("refundOrder", TMessageType.EXCEPTION, seqid));
3143
          x.write(oprot);
3144
          oprot.writeMessageEnd();
3145
          oprot.getTransport().flush();
3146
          return;
3147
        }
3148
        oprot.writeMessageBegin(new TMessage("refundOrder", TMessageType.REPLY, seqid));
3149
        result.write(oprot);
3150
        oprot.writeMessageEnd();
3151
        oprot.getTransport().flush();
3152
      }
3153
 
3154
    }
3155
 
68 ashish 3156
  }
3157
 
764 rajveer 3158
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3159
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3160
 
3161
 
3162
 
3163
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3164
    public enum _Fields implements TFieldIdEnum {
3165
;
3166
 
3167
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3168
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3169
 
3170
      static {
3171
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3172
          byId.put((int)field._thriftId, field);
3173
          byName.put(field.getFieldName(), field);
3174
        }
3175
      }
3176
 
3177
      /**
3178
       * Find the _Fields constant that matches fieldId, or null if its not found.
3179
       */
3180
      public static _Fields findByThriftId(int fieldId) {
3181
        return byId.get(fieldId);
3182
      }
3183
 
3184
      /**
3185
       * Find the _Fields constant that matches fieldId, throwing an exception
3186
       * if it is not found.
3187
       */
3188
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3189
        _Fields fields = findByThriftId(fieldId);
3190
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3191
        return fields;
3192
      }
3193
 
3194
      /**
3195
       * Find the _Fields constant that matches name, or null if its not found.
3196
       */
3197
      public static _Fields findByName(String name) {
3198
        return byName.get(name);
3199
      }
3200
 
3201
      private final short _thriftId;
3202
      private final String _fieldName;
3203
 
3204
      _Fields(short thriftId, String fieldName) {
3205
        _thriftId = thriftId;
3206
        _fieldName = fieldName;
3207
      }
3208
 
3209
      public short getThriftFieldId() {
3210
        return _thriftId;
3211
      }
3212
 
3213
      public String getFieldName() {
3214
        return _fieldName;
3215
      }
3216
    }
3217
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3218
    }});
3219
 
3220
    static {
3221
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3222
    }
3223
 
3224
    public closeSession_args() {
3225
    }
3226
 
3227
    /**
3228
     * Performs a deep copy on <i>other</i>.
3229
     */
3230
    public closeSession_args(closeSession_args other) {
3231
    }
3232
 
3233
    public closeSession_args deepCopy() {
3234
      return new closeSession_args(this);
3235
    }
3236
 
3237
    @Deprecated
3238
    public closeSession_args clone() {
3239
      return new closeSession_args(this);
3240
    }
3241
 
3242
    public void setFieldValue(_Fields field, Object value) {
3243
      switch (field) {
3244
      }
3245
    }
3246
 
3247
    public void setFieldValue(int fieldID, Object value) {
3248
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3249
    }
3250
 
3251
    public Object getFieldValue(_Fields field) {
3252
      switch (field) {
3253
      }
3254
      throw new IllegalStateException();
3255
    }
3256
 
3257
    public Object getFieldValue(int fieldId) {
3258
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3259
    }
3260
 
3261
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3262
    public boolean isSet(_Fields field) {
3263
      switch (field) {
3264
      }
3265
      throw new IllegalStateException();
3266
    }
3267
 
3268
    public boolean isSet(int fieldID) {
3269
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3270
    }
3271
 
3272
    @Override
3273
    public boolean equals(Object that) {
3274
      if (that == null)
3275
        return false;
3276
      if (that instanceof closeSession_args)
3277
        return this.equals((closeSession_args)that);
3278
      return false;
3279
    }
3280
 
3281
    public boolean equals(closeSession_args that) {
3282
      if (that == null)
3283
        return false;
3284
 
3285
      return true;
3286
    }
3287
 
3288
    @Override
3289
    public int hashCode() {
3290
      return 0;
3291
    }
3292
 
3293
    public int compareTo(closeSession_args other) {
3294
      if (!getClass().equals(other.getClass())) {
3295
        return getClass().getName().compareTo(other.getClass().getName());
3296
      }
3297
 
3298
      int lastComparison = 0;
3299
      closeSession_args typedOther = (closeSession_args)other;
3300
 
3301
      return 0;
3302
    }
3303
 
3304
    public void read(TProtocol iprot) throws TException {
3305
      TField field;
3306
      iprot.readStructBegin();
3307
      while (true)
3308
      {
3309
        field = iprot.readFieldBegin();
3310
        if (field.type == TType.STOP) { 
3311
          break;
3312
        }
3313
        _Fields fieldId = _Fields.findByThriftId(field.id);
3314
        if (fieldId == null) {
3315
          TProtocolUtil.skip(iprot, field.type);
3316
        } else {
3317
          switch (fieldId) {
3318
          }
3319
          iprot.readFieldEnd();
3320
        }
3321
      }
3322
      iprot.readStructEnd();
3323
      validate();
3324
    }
3325
 
3326
    public void write(TProtocol oprot) throws TException {
3327
      validate();
3328
 
3329
      oprot.writeStructBegin(STRUCT_DESC);
3330
      oprot.writeFieldStop();
3331
      oprot.writeStructEnd();
3332
    }
3333
 
3334
    @Override
3335
    public String toString() {
3336
      StringBuilder sb = new StringBuilder("closeSession_args(");
3337
      boolean first = true;
3338
 
3339
      sb.append(")");
3340
      return sb.toString();
3341
    }
3342
 
3343
    public void validate() throws TException {
3344
      // check for required fields
3345
    }
3346
 
3347
  }
3348
 
3349
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3350
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3351
 
3352
 
3353
 
3354
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3355
    public enum _Fields implements TFieldIdEnum {
3356
;
3357
 
3358
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3359
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3360
 
3361
      static {
3362
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3363
          byId.put((int)field._thriftId, field);
3364
          byName.put(field.getFieldName(), field);
3365
        }
3366
      }
3367
 
3368
      /**
3369
       * Find the _Fields constant that matches fieldId, or null if its not found.
3370
       */
3371
      public static _Fields findByThriftId(int fieldId) {
3372
        return byId.get(fieldId);
3373
      }
3374
 
3375
      /**
3376
       * Find the _Fields constant that matches fieldId, throwing an exception
3377
       * if it is not found.
3378
       */
3379
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3380
        _Fields fields = findByThriftId(fieldId);
3381
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3382
        return fields;
3383
      }
3384
 
3385
      /**
3386
       * Find the _Fields constant that matches name, or null if its not found.
3387
       */
3388
      public static _Fields findByName(String name) {
3389
        return byName.get(name);
3390
      }
3391
 
3392
      private final short _thriftId;
3393
      private final String _fieldName;
3394
 
3395
      _Fields(short thriftId, String fieldName) {
3396
        _thriftId = thriftId;
3397
        _fieldName = fieldName;
3398
      }
3399
 
3400
      public short getThriftFieldId() {
3401
        return _thriftId;
3402
      }
3403
 
3404
      public String getFieldName() {
3405
        return _fieldName;
3406
      }
3407
    }
3408
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3409
    }});
3410
 
3411
    static {
3412
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3413
    }
3414
 
3415
    public closeSession_result() {
3416
    }
3417
 
3418
    /**
3419
     * Performs a deep copy on <i>other</i>.
3420
     */
3421
    public closeSession_result(closeSession_result other) {
3422
    }
3423
 
3424
    public closeSession_result deepCopy() {
3425
      return new closeSession_result(this);
3426
    }
3427
 
3428
    @Deprecated
3429
    public closeSession_result clone() {
3430
      return new closeSession_result(this);
3431
    }
3432
 
3433
    public void setFieldValue(_Fields field, Object value) {
3434
      switch (field) {
3435
      }
3436
    }
3437
 
3438
    public void setFieldValue(int fieldID, Object value) {
3439
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3440
    }
3441
 
3442
    public Object getFieldValue(_Fields field) {
3443
      switch (field) {
3444
      }
3445
      throw new IllegalStateException();
3446
    }
3447
 
3448
    public Object getFieldValue(int fieldId) {
3449
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3450
    }
3451
 
3452
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3453
    public boolean isSet(_Fields field) {
3454
      switch (field) {
3455
      }
3456
      throw new IllegalStateException();
3457
    }
3458
 
3459
    public boolean isSet(int fieldID) {
3460
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3461
    }
3462
 
3463
    @Override
3464
    public boolean equals(Object that) {
3465
      if (that == null)
3466
        return false;
3467
      if (that instanceof closeSession_result)
3468
        return this.equals((closeSession_result)that);
3469
      return false;
3470
    }
3471
 
3472
    public boolean equals(closeSession_result that) {
3473
      if (that == null)
3474
        return false;
3475
 
3476
      return true;
3477
    }
3478
 
3479
    @Override
3480
    public int hashCode() {
3481
      return 0;
3482
    }
3483
 
3484
    public int compareTo(closeSession_result other) {
3485
      if (!getClass().equals(other.getClass())) {
3486
        return getClass().getName().compareTo(other.getClass().getName());
3487
      }
3488
 
3489
      int lastComparison = 0;
3490
      closeSession_result typedOther = (closeSession_result)other;
3491
 
3492
      return 0;
3493
    }
3494
 
3495
    public void read(TProtocol iprot) throws TException {
3496
      TField field;
3497
      iprot.readStructBegin();
3498
      while (true)
3499
      {
3500
        field = iprot.readFieldBegin();
3501
        if (field.type == TType.STOP) { 
3502
          break;
3503
        }
3504
        _Fields fieldId = _Fields.findByThriftId(field.id);
3505
        if (fieldId == null) {
3506
          TProtocolUtil.skip(iprot, field.type);
3507
        } else {
3508
          switch (fieldId) {
3509
          }
3510
          iprot.readFieldEnd();
3511
        }
3512
      }
3513
      iprot.readStructEnd();
3514
      validate();
3515
    }
3516
 
3517
    public void write(TProtocol oprot) throws TException {
3518
      oprot.writeStructBegin(STRUCT_DESC);
3519
 
3520
      oprot.writeFieldStop();
3521
      oprot.writeStructEnd();
3522
    }
3523
 
3524
    @Override
3525
    public String toString() {
3526
      StringBuilder sb = new StringBuilder("closeSession_result(");
3527
      boolean first = true;
3528
 
3529
      sb.append(")");
3530
      return sb.toString();
3531
    }
3532
 
3533
    public void validate() throws TException {
3534
      // check for required fields
3535
    }
3536
 
3537
  }
3538
 
684 chandransh 3539
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 3540
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
3541
 
3542
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
3543
 
3544
    private Transaction transaction;
3545
 
3546
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3547
    public enum _Fields implements TFieldIdEnum {
3548
      TRANSACTION((short)1, "transaction");
3549
 
3550
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3551
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3552
 
3553
      static {
3554
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3555
          byId.put((int)field._thriftId, field);
3556
          byName.put(field.getFieldName(), field);
3557
        }
3558
      }
3559
 
3560
      /**
3561
       * Find the _Fields constant that matches fieldId, or null if its not found.
3562
       */
3563
      public static _Fields findByThriftId(int fieldId) {
3564
        return byId.get(fieldId);
3565
      }
3566
 
3567
      /**
3568
       * Find the _Fields constant that matches fieldId, throwing an exception
3569
       * if it is not found.
3570
       */
3571
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3572
        _Fields fields = findByThriftId(fieldId);
3573
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3574
        return fields;
3575
      }
3576
 
3577
      /**
3578
       * Find the _Fields constant that matches name, or null if its not found.
3579
       */
3580
      public static _Fields findByName(String name) {
3581
        return byName.get(name);
3582
      }
3583
 
3584
      private final short _thriftId;
3585
      private final String _fieldName;
3586
 
3587
      _Fields(short thriftId, String fieldName) {
3588
        _thriftId = thriftId;
3589
        _fieldName = fieldName;
3590
      }
3591
 
3592
      public short getThriftFieldId() {
3593
        return _thriftId;
3594
      }
3595
 
3596
      public String getFieldName() {
3597
        return _fieldName;
3598
      }
3599
    }
3600
 
3601
    // isset id assignments
3602
 
3603
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3604
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
3605
          new StructMetaData(TType.STRUCT, Transaction.class)));
3606
    }});
3607
 
3608
    static {
3609
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
3610
    }
3611
 
3612
    public createTransaction_args() {
3613
    }
3614
 
3615
    public createTransaction_args(
3616
      Transaction transaction)
3617
    {
3618
      this();
3619
      this.transaction = transaction;
3620
    }
3621
 
3622
    /**
3623
     * Performs a deep copy on <i>other</i>.
3624
     */
3625
    public createTransaction_args(createTransaction_args other) {
3626
      if (other.isSetTransaction()) {
3627
        this.transaction = new Transaction(other.transaction);
3628
      }
3629
    }
3630
 
3631
    public createTransaction_args deepCopy() {
3632
      return new createTransaction_args(this);
3633
    }
3634
 
3635
    @Deprecated
3636
    public createTransaction_args clone() {
3637
      return new createTransaction_args(this);
3638
    }
3639
 
3640
    public Transaction getTransaction() {
3641
      return this.transaction;
3642
    }
3643
 
3644
    public createTransaction_args setTransaction(Transaction transaction) {
3645
      this.transaction = transaction;
3646
      return this;
3647
    }
3648
 
3649
    public void unsetTransaction() {
3650
      this.transaction = null;
3651
    }
3652
 
3653
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
3654
    public boolean isSetTransaction() {
3655
      return this.transaction != null;
3656
    }
3657
 
3658
    public void setTransactionIsSet(boolean value) {
3659
      if (!value) {
3660
        this.transaction = null;
3661
      }
3662
    }
3663
 
3664
    public void setFieldValue(_Fields field, Object value) {
3665
      switch (field) {
3666
      case TRANSACTION:
3667
        if (value == null) {
3668
          unsetTransaction();
3669
        } else {
3670
          setTransaction((Transaction)value);
3671
        }
3672
        break;
3673
 
3674
      }
3675
    }
3676
 
3677
    public void setFieldValue(int fieldID, Object value) {
3678
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3679
    }
3680
 
3681
    public Object getFieldValue(_Fields field) {
3682
      switch (field) {
3683
      case TRANSACTION:
3684
        return getTransaction();
3685
 
3686
      }
3687
      throw new IllegalStateException();
3688
    }
3689
 
3690
    public Object getFieldValue(int fieldId) {
3691
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3692
    }
3693
 
3694
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3695
    public boolean isSet(_Fields field) {
3696
      switch (field) {
3697
      case TRANSACTION:
3698
        return isSetTransaction();
3699
      }
3700
      throw new IllegalStateException();
3701
    }
3702
 
3703
    public boolean isSet(int fieldID) {
3704
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3705
    }
3706
 
3707
    @Override
3708
    public boolean equals(Object that) {
3709
      if (that == null)
3710
        return false;
3711
      if (that instanceof createTransaction_args)
3712
        return this.equals((createTransaction_args)that);
3713
      return false;
3714
    }
3715
 
3716
    public boolean equals(createTransaction_args that) {
3717
      if (that == null)
3718
        return false;
3719
 
3720
      boolean this_present_transaction = true && this.isSetTransaction();
3721
      boolean that_present_transaction = true && that.isSetTransaction();
3722
      if (this_present_transaction || that_present_transaction) {
3723
        if (!(this_present_transaction && that_present_transaction))
3724
          return false;
3725
        if (!this.transaction.equals(that.transaction))
3726
          return false;
3727
      }
3728
 
3729
      return true;
3730
    }
3731
 
3732
    @Override
3733
    public int hashCode() {
3734
      return 0;
3735
    }
3736
 
684 chandransh 3737
    public int compareTo(createTransaction_args other) {
3738
      if (!getClass().equals(other.getClass())) {
3739
        return getClass().getName().compareTo(other.getClass().getName());
3740
      }
3741
 
3742
      int lastComparison = 0;
3743
      createTransaction_args typedOther = (createTransaction_args)other;
3744
 
3745
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
3746
      if (lastComparison != 0) {
3747
        return lastComparison;
3748
      }
3749
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
3750
      if (lastComparison != 0) {
3751
        return lastComparison;
3752
      }
3753
      return 0;
3754
    }
3755
 
68 ashish 3756
    public void read(TProtocol iprot) throws TException {
3757
      TField field;
3758
      iprot.readStructBegin();
3759
      while (true)
3760
      {
3761
        field = iprot.readFieldBegin();
3762
        if (field.type == TType.STOP) { 
3763
          break;
3764
        }
3765
        _Fields fieldId = _Fields.findByThriftId(field.id);
3766
        if (fieldId == null) {
3767
          TProtocolUtil.skip(iprot, field.type);
3768
        } else {
3769
          switch (fieldId) {
3770
            case TRANSACTION:
3771
              if (field.type == TType.STRUCT) {
3772
                this.transaction = new Transaction();
3773
                this.transaction.read(iprot);
3774
              } else { 
3775
                TProtocolUtil.skip(iprot, field.type);
3776
              }
3777
              break;
3778
          }
3779
          iprot.readFieldEnd();
3780
        }
3781
      }
3782
      iprot.readStructEnd();
3783
      validate();
3784
    }
3785
 
3786
    public void write(TProtocol oprot) throws TException {
3787
      validate();
3788
 
3789
      oprot.writeStructBegin(STRUCT_DESC);
3790
      if (this.transaction != null) {
3791
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
3792
        this.transaction.write(oprot);
3793
        oprot.writeFieldEnd();
3794
      }
3795
      oprot.writeFieldStop();
3796
      oprot.writeStructEnd();
3797
    }
3798
 
3799
    @Override
3800
    public String toString() {
3801
      StringBuilder sb = new StringBuilder("createTransaction_args(");
3802
      boolean first = true;
3803
 
3804
      sb.append("transaction:");
3805
      if (this.transaction == null) {
3806
        sb.append("null");
3807
      } else {
3808
        sb.append(this.transaction);
3809
      }
3810
      first = false;
3811
      sb.append(")");
3812
      return sb.toString();
3813
    }
3814
 
3815
    public void validate() throws TException {
3816
      // check for required fields
3817
    }
3818
 
3819
  }
3820
 
3821
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
3822
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
3823
 
132 ashish 3824
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 3825
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3826
 
132 ashish 3827
    private long success;
68 ashish 3828
    private TransactionServiceException ex;
3829
 
3830
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3831
    public enum _Fields implements TFieldIdEnum {
132 ashish 3832
      SUCCESS((short)0, "success"),
68 ashish 3833
      EX((short)1, "ex");
3834
 
3835
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3836
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3837
 
3838
      static {
3839
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3840
          byId.put((int)field._thriftId, field);
3841
          byName.put(field.getFieldName(), field);
3842
        }
3843
      }
3844
 
3845
      /**
3846
       * Find the _Fields constant that matches fieldId, or null if its not found.
3847
       */
3848
      public static _Fields findByThriftId(int fieldId) {
3849
        return byId.get(fieldId);
3850
      }
3851
 
3852
      /**
3853
       * Find the _Fields constant that matches fieldId, throwing an exception
3854
       * if it is not found.
3855
       */
3856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3857
        _Fields fields = findByThriftId(fieldId);
3858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3859
        return fields;
3860
      }
3861
 
3862
      /**
3863
       * Find the _Fields constant that matches name, or null if its not found.
3864
       */
3865
      public static _Fields findByName(String name) {
3866
        return byName.get(name);
3867
      }
3868
 
3869
      private final short _thriftId;
3870
      private final String _fieldName;
3871
 
3872
      _Fields(short thriftId, String fieldName) {
3873
        _thriftId = thriftId;
3874
        _fieldName = fieldName;
3875
      }
3876
 
3877
      public short getThriftFieldId() {
3878
        return _thriftId;
3879
      }
3880
 
3881
      public String getFieldName() {
3882
        return _fieldName;
3883
      }
3884
    }
3885
 
3886
    // isset id assignments
132 ashish 3887
    private static final int __SUCCESS_ISSET_ID = 0;
3888
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3889
 
3890
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3891
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3892
          new FieldValueMetaData(TType.I64)));
68 ashish 3893
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3894
          new FieldValueMetaData(TType.STRUCT)));
3895
    }});
3896
 
3897
    static {
3898
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3899
    }
3900
 
3901
    public createTransaction_result() {
3902
    }
3903
 
3904
    public createTransaction_result(
132 ashish 3905
      long success,
68 ashish 3906
      TransactionServiceException ex)
3907
    {
3908
      this();
132 ashish 3909
      this.success = success;
3910
      setSuccessIsSet(true);
68 ashish 3911
      this.ex = ex;
3912
    }
3913
 
3914
    /**
3915
     * Performs a deep copy on <i>other</i>.
3916
     */
3917
    public createTransaction_result(createTransaction_result other) {
132 ashish 3918
      __isset_bit_vector.clear();
3919
      __isset_bit_vector.or(other.__isset_bit_vector);
3920
      this.success = other.success;
68 ashish 3921
      if (other.isSetEx()) {
3922
        this.ex = new TransactionServiceException(other.ex);
3923
      }
3924
    }
3925
 
3926
    public createTransaction_result deepCopy() {
3927
      return new createTransaction_result(this);
3928
    }
3929
 
3930
    @Deprecated
3931
    public createTransaction_result clone() {
3932
      return new createTransaction_result(this);
3933
    }
3934
 
132 ashish 3935
    public long getSuccess() {
3936
      return this.success;
3937
    }
3938
 
3939
    public createTransaction_result setSuccess(long success) {
3940
      this.success = success;
3941
      setSuccessIsSet(true);
3942
      return this;
3943
    }
3944
 
3945
    public void unsetSuccess() {
3946
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3947
    }
3948
 
3949
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3950
    public boolean isSetSuccess() {
3951
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3952
    }
3953
 
3954
    public void setSuccessIsSet(boolean value) {
3955
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3956
    }
3957
 
68 ashish 3958
    public TransactionServiceException getEx() {
3959
      return this.ex;
3960
    }
3961
 
3962
    public createTransaction_result setEx(TransactionServiceException ex) {
3963
      this.ex = ex;
3964
      return this;
3965
    }
3966
 
3967
    public void unsetEx() {
3968
      this.ex = null;
3969
    }
3970
 
3971
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3972
    public boolean isSetEx() {
3973
      return this.ex != null;
3974
    }
3975
 
3976
    public void setExIsSet(boolean value) {
3977
      if (!value) {
3978
        this.ex = null;
3979
      }
3980
    }
3981
 
3982
    public void setFieldValue(_Fields field, Object value) {
3983
      switch (field) {
132 ashish 3984
      case SUCCESS:
3985
        if (value == null) {
3986
          unsetSuccess();
3987
        } else {
3988
          setSuccess((Long)value);
3989
        }
3990
        break;
3991
 
68 ashish 3992
      case EX:
3993
        if (value == null) {
3994
          unsetEx();
3995
        } else {
3996
          setEx((TransactionServiceException)value);
3997
        }
3998
        break;
3999
 
4000
      }
4001
    }
4002
 
4003
    public void setFieldValue(int fieldID, Object value) {
4004
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4005
    }
4006
 
4007
    public Object getFieldValue(_Fields field) {
4008
      switch (field) {
132 ashish 4009
      case SUCCESS:
4010
        return new Long(getSuccess());
4011
 
68 ashish 4012
      case EX:
4013
        return getEx();
4014
 
4015
      }
4016
      throw new IllegalStateException();
4017
    }
4018
 
4019
    public Object getFieldValue(int fieldId) {
4020
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4021
    }
4022
 
4023
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4024
    public boolean isSet(_Fields field) {
4025
      switch (field) {
132 ashish 4026
      case SUCCESS:
4027
        return isSetSuccess();
68 ashish 4028
      case EX:
4029
        return isSetEx();
4030
      }
4031
      throw new IllegalStateException();
4032
    }
4033
 
4034
    public boolean isSet(int fieldID) {
4035
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4036
    }
4037
 
4038
    @Override
4039
    public boolean equals(Object that) {
4040
      if (that == null)
4041
        return false;
4042
      if (that instanceof createTransaction_result)
4043
        return this.equals((createTransaction_result)that);
4044
      return false;
4045
    }
4046
 
4047
    public boolean equals(createTransaction_result that) {
4048
      if (that == null)
4049
        return false;
4050
 
132 ashish 4051
      boolean this_present_success = true;
4052
      boolean that_present_success = true;
4053
      if (this_present_success || that_present_success) {
4054
        if (!(this_present_success && that_present_success))
4055
          return false;
4056
        if (this.success != that.success)
4057
          return false;
4058
      }
4059
 
68 ashish 4060
      boolean this_present_ex = true && this.isSetEx();
4061
      boolean that_present_ex = true && that.isSetEx();
4062
      if (this_present_ex || that_present_ex) {
4063
        if (!(this_present_ex && that_present_ex))
4064
          return false;
4065
        if (!this.ex.equals(that.ex))
4066
          return false;
4067
      }
4068
 
4069
      return true;
4070
    }
4071
 
4072
    @Override
4073
    public int hashCode() {
4074
      return 0;
4075
    }
4076
 
4077
    public int compareTo(createTransaction_result other) {
4078
      if (!getClass().equals(other.getClass())) {
4079
        return getClass().getName().compareTo(other.getClass().getName());
4080
      }
4081
 
4082
      int lastComparison = 0;
4083
      createTransaction_result typedOther = (createTransaction_result)other;
4084
 
132 ashish 4085
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4086
      if (lastComparison != 0) {
4087
        return lastComparison;
4088
      }
4089
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4090
      if (lastComparison != 0) {
4091
        return lastComparison;
4092
      }
68 ashish 4093
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4094
      if (lastComparison != 0) {
4095
        return lastComparison;
4096
      }
4097
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4098
      if (lastComparison != 0) {
4099
        return lastComparison;
4100
      }
4101
      return 0;
4102
    }
4103
 
4104
    public void read(TProtocol iprot) throws TException {
4105
      TField field;
4106
      iprot.readStructBegin();
4107
      while (true)
4108
      {
4109
        field = iprot.readFieldBegin();
4110
        if (field.type == TType.STOP) { 
4111
          break;
4112
        }
4113
        _Fields fieldId = _Fields.findByThriftId(field.id);
4114
        if (fieldId == null) {
4115
          TProtocolUtil.skip(iprot, field.type);
4116
        } else {
4117
          switch (fieldId) {
132 ashish 4118
            case SUCCESS:
4119
              if (field.type == TType.I64) {
4120
                this.success = iprot.readI64();
4121
                setSuccessIsSet(true);
4122
              } else { 
4123
                TProtocolUtil.skip(iprot, field.type);
4124
              }
4125
              break;
68 ashish 4126
            case EX:
4127
              if (field.type == TType.STRUCT) {
4128
                this.ex = new TransactionServiceException();
4129
                this.ex.read(iprot);
4130
              } else { 
4131
                TProtocolUtil.skip(iprot, field.type);
4132
              }
4133
              break;
4134
          }
4135
          iprot.readFieldEnd();
4136
        }
4137
      }
4138
      iprot.readStructEnd();
4139
      validate();
4140
    }
4141
 
4142
    public void write(TProtocol oprot) throws TException {
4143
      oprot.writeStructBegin(STRUCT_DESC);
4144
 
132 ashish 4145
      if (this.isSetSuccess()) {
4146
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4147
        oprot.writeI64(this.success);
4148
        oprot.writeFieldEnd();
4149
      } else if (this.isSetEx()) {
68 ashish 4150
        oprot.writeFieldBegin(EX_FIELD_DESC);
4151
        this.ex.write(oprot);
4152
        oprot.writeFieldEnd();
4153
      }
4154
      oprot.writeFieldStop();
4155
      oprot.writeStructEnd();
4156
    }
4157
 
4158
    @Override
4159
    public String toString() {
4160
      StringBuilder sb = new StringBuilder("createTransaction_result(");
4161
      boolean first = true;
4162
 
132 ashish 4163
      sb.append("success:");
4164
      sb.append(this.success);
4165
      first = false;
4166
      if (!first) sb.append(", ");
68 ashish 4167
      sb.append("ex:");
4168
      if (this.ex == null) {
4169
        sb.append("null");
4170
      } else {
4171
        sb.append(this.ex);
4172
      }
4173
      first = false;
4174
      sb.append(")");
4175
      return sb.toString();
4176
    }
4177
 
4178
    public void validate() throws TException {
4179
      // check for required fields
4180
    }
4181
 
4182
  }
4183
 
4184
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
4185
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
4186
 
4187
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
4188
 
4189
    private long id;
4190
 
4191
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4192
    public enum _Fields implements TFieldIdEnum {
4193
      ID((short)1, "id");
4194
 
4195
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4196
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4197
 
4198
      static {
4199
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4200
          byId.put((int)field._thriftId, field);
4201
          byName.put(field.getFieldName(), field);
4202
        }
4203
      }
4204
 
4205
      /**
4206
       * Find the _Fields constant that matches fieldId, or null if its not found.
4207
       */
4208
      public static _Fields findByThriftId(int fieldId) {
4209
        return byId.get(fieldId);
4210
      }
4211
 
4212
      /**
4213
       * Find the _Fields constant that matches fieldId, throwing an exception
4214
       * if it is not found.
4215
       */
4216
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4217
        _Fields fields = findByThriftId(fieldId);
4218
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4219
        return fields;
4220
      }
4221
 
4222
      /**
4223
       * Find the _Fields constant that matches name, or null if its not found.
4224
       */
4225
      public static _Fields findByName(String name) {
4226
        return byName.get(name);
4227
      }
4228
 
4229
      private final short _thriftId;
4230
      private final String _fieldName;
4231
 
4232
      _Fields(short thriftId, String fieldName) {
4233
        _thriftId = thriftId;
4234
        _fieldName = fieldName;
4235
      }
4236
 
4237
      public short getThriftFieldId() {
4238
        return _thriftId;
4239
      }
4240
 
4241
      public String getFieldName() {
4242
        return _fieldName;
4243
      }
4244
    }
4245
 
4246
    // isset id assignments
4247
    private static final int __ID_ISSET_ID = 0;
4248
    private BitSet __isset_bit_vector = new BitSet(1);
4249
 
4250
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4251
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
4252
          new FieldValueMetaData(TType.I64)));
4253
    }});
4254
 
4255
    static {
4256
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
4257
    }
4258
 
4259
    public getTransaction_args() {
4260
    }
4261
 
4262
    public getTransaction_args(
4263
      long id)
4264
    {
4265
      this();
4266
      this.id = id;
4267
      setIdIsSet(true);
4268
    }
4269
 
4270
    /**
4271
     * Performs a deep copy on <i>other</i>.
4272
     */
4273
    public getTransaction_args(getTransaction_args other) {
4274
      __isset_bit_vector.clear();
4275
      __isset_bit_vector.or(other.__isset_bit_vector);
4276
      this.id = other.id;
4277
    }
4278
 
4279
    public getTransaction_args deepCopy() {
4280
      return new getTransaction_args(this);
4281
    }
4282
 
4283
    @Deprecated
4284
    public getTransaction_args clone() {
4285
      return new getTransaction_args(this);
4286
    }
4287
 
4288
    public long getId() {
4289
      return this.id;
4290
    }
4291
 
4292
    public getTransaction_args setId(long id) {
4293
      this.id = id;
4294
      setIdIsSet(true);
4295
      return this;
4296
    }
4297
 
4298
    public void unsetId() {
4299
      __isset_bit_vector.clear(__ID_ISSET_ID);
4300
    }
4301
 
4302
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
4303
    public boolean isSetId() {
4304
      return __isset_bit_vector.get(__ID_ISSET_ID);
4305
    }
4306
 
4307
    public void setIdIsSet(boolean value) {
4308
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4309
    }
4310
 
4311
    public void setFieldValue(_Fields field, Object value) {
4312
      switch (field) {
4313
      case ID:
4314
        if (value == null) {
4315
          unsetId();
4316
        } else {
4317
          setId((Long)value);
4318
        }
4319
        break;
4320
 
4321
      }
4322
    }
4323
 
4324
    public void setFieldValue(int fieldID, Object value) {
4325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4326
    }
4327
 
4328
    public Object getFieldValue(_Fields field) {
4329
      switch (field) {
4330
      case ID:
4331
        return new Long(getId());
4332
 
4333
      }
4334
      throw new IllegalStateException();
4335
    }
4336
 
4337
    public Object getFieldValue(int fieldId) {
4338
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4339
    }
4340
 
4341
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4342
    public boolean isSet(_Fields field) {
4343
      switch (field) {
4344
      case ID:
4345
        return isSetId();
4346
      }
4347
      throw new IllegalStateException();
4348
    }
4349
 
4350
    public boolean isSet(int fieldID) {
4351
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4352
    }
4353
 
4354
    @Override
4355
    public boolean equals(Object that) {
4356
      if (that == null)
4357
        return false;
4358
      if (that instanceof getTransaction_args)
4359
        return this.equals((getTransaction_args)that);
4360
      return false;
4361
    }
4362
 
4363
    public boolean equals(getTransaction_args that) {
4364
      if (that == null)
4365
        return false;
4366
 
4367
      boolean this_present_id = true;
4368
      boolean that_present_id = true;
4369
      if (this_present_id || that_present_id) {
4370
        if (!(this_present_id && that_present_id))
4371
          return false;
4372
        if (this.id != that.id)
4373
          return false;
4374
      }
4375
 
4376
      return true;
4377
    }
4378
 
4379
    @Override
4380
    public int hashCode() {
4381
      return 0;
4382
    }
4383
 
4384
    public int compareTo(getTransaction_args other) {
4385
      if (!getClass().equals(other.getClass())) {
4386
        return getClass().getName().compareTo(other.getClass().getName());
4387
      }
4388
 
4389
      int lastComparison = 0;
4390
      getTransaction_args typedOther = (getTransaction_args)other;
4391
 
4392
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
4393
      if (lastComparison != 0) {
4394
        return lastComparison;
4395
      }
4396
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
4397
      if (lastComparison != 0) {
4398
        return lastComparison;
4399
      }
4400
      return 0;
4401
    }
4402
 
4403
    public void read(TProtocol iprot) throws TException {
4404
      TField field;
4405
      iprot.readStructBegin();
4406
      while (true)
4407
      {
4408
        field = iprot.readFieldBegin();
4409
        if (field.type == TType.STOP) { 
4410
          break;
4411
        }
4412
        _Fields fieldId = _Fields.findByThriftId(field.id);
4413
        if (fieldId == null) {
4414
          TProtocolUtil.skip(iprot, field.type);
4415
        } else {
4416
          switch (fieldId) {
4417
            case ID:
4418
              if (field.type == TType.I64) {
4419
                this.id = iprot.readI64();
4420
                setIdIsSet(true);
4421
              } else { 
4422
                TProtocolUtil.skip(iprot, field.type);
4423
              }
4424
              break;
4425
          }
4426
          iprot.readFieldEnd();
4427
        }
4428
      }
4429
      iprot.readStructEnd();
4430
      validate();
4431
    }
4432
 
4433
    public void write(TProtocol oprot) throws TException {
4434
      validate();
4435
 
4436
      oprot.writeStructBegin(STRUCT_DESC);
4437
      oprot.writeFieldBegin(ID_FIELD_DESC);
4438
      oprot.writeI64(this.id);
4439
      oprot.writeFieldEnd();
4440
      oprot.writeFieldStop();
4441
      oprot.writeStructEnd();
4442
    }
4443
 
4444
    @Override
4445
    public String toString() {
4446
      StringBuilder sb = new StringBuilder("getTransaction_args(");
4447
      boolean first = true;
4448
 
4449
      sb.append("id:");
4450
      sb.append(this.id);
4451
      first = false;
4452
      sb.append(")");
4453
      return sb.toString();
4454
    }
4455
 
4456
    public void validate() throws TException {
4457
      // check for required fields
4458
    }
4459
 
4460
  }
4461
 
684 chandransh 4462
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 4463
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
4464
 
4465
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4466
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4467
 
4468
    private Transaction success;
4469
    private TransactionServiceException ex;
4470
 
4471
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4472
    public enum _Fields implements TFieldIdEnum {
4473
      SUCCESS((short)0, "success"),
4474
      EX((short)1, "ex");
4475
 
4476
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4477
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4478
 
4479
      static {
4480
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4481
          byId.put((int)field._thriftId, field);
4482
          byName.put(field.getFieldName(), field);
4483
        }
4484
      }
4485
 
4486
      /**
4487
       * Find the _Fields constant that matches fieldId, or null if its not found.
4488
       */
4489
      public static _Fields findByThriftId(int fieldId) {
4490
        return byId.get(fieldId);
4491
      }
4492
 
4493
      /**
4494
       * Find the _Fields constant that matches fieldId, throwing an exception
4495
       * if it is not found.
4496
       */
4497
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4498
        _Fields fields = findByThriftId(fieldId);
4499
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4500
        return fields;
4501
      }
4502
 
4503
      /**
4504
       * Find the _Fields constant that matches name, or null if its not found.
4505
       */
4506
      public static _Fields findByName(String name) {
4507
        return byName.get(name);
4508
      }
4509
 
4510
      private final short _thriftId;
4511
      private final String _fieldName;
4512
 
4513
      _Fields(short thriftId, String fieldName) {
4514
        _thriftId = thriftId;
4515
        _fieldName = fieldName;
4516
      }
4517
 
4518
      public short getThriftFieldId() {
4519
        return _thriftId;
4520
      }
4521
 
4522
      public String getFieldName() {
4523
        return _fieldName;
4524
      }
4525
    }
4526
 
4527
    // isset id assignments
4528
 
4529
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4530
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4531
          new StructMetaData(TType.STRUCT, Transaction.class)));
4532
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4533
          new FieldValueMetaData(TType.STRUCT)));
4534
    }});
4535
 
4536
    static {
4537
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
4538
    }
4539
 
4540
    public getTransaction_result() {
4541
    }
4542
 
4543
    public getTransaction_result(
4544
      Transaction success,
4545
      TransactionServiceException ex)
4546
    {
4547
      this();
4548
      this.success = success;
4549
      this.ex = ex;
4550
    }
4551
 
4552
    /**
4553
     * Performs a deep copy on <i>other</i>.
4554
     */
4555
    public getTransaction_result(getTransaction_result other) {
4556
      if (other.isSetSuccess()) {
4557
        this.success = new Transaction(other.success);
4558
      }
4559
      if (other.isSetEx()) {
4560
        this.ex = new TransactionServiceException(other.ex);
4561
      }
4562
    }
4563
 
4564
    public getTransaction_result deepCopy() {
4565
      return new getTransaction_result(this);
4566
    }
4567
 
4568
    @Deprecated
4569
    public getTransaction_result clone() {
4570
      return new getTransaction_result(this);
4571
    }
4572
 
4573
    public Transaction getSuccess() {
4574
      return this.success;
4575
    }
4576
 
4577
    public getTransaction_result setSuccess(Transaction success) {
4578
      this.success = success;
4579
      return this;
4580
    }
4581
 
4582
    public void unsetSuccess() {
4583
      this.success = null;
4584
    }
4585
 
4586
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4587
    public boolean isSetSuccess() {
4588
      return this.success != null;
4589
    }
4590
 
4591
    public void setSuccessIsSet(boolean value) {
4592
      if (!value) {
4593
        this.success = null;
4594
      }
4595
    }
4596
 
4597
    public TransactionServiceException getEx() {
4598
      return this.ex;
4599
    }
4600
 
4601
    public getTransaction_result setEx(TransactionServiceException ex) {
4602
      this.ex = ex;
4603
      return this;
4604
    }
4605
 
4606
    public void unsetEx() {
4607
      this.ex = null;
4608
    }
4609
 
4610
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4611
    public boolean isSetEx() {
4612
      return this.ex != null;
4613
    }
4614
 
4615
    public void setExIsSet(boolean value) {
4616
      if (!value) {
4617
        this.ex = null;
4618
      }
4619
    }
4620
 
4621
    public void setFieldValue(_Fields field, Object value) {
4622
      switch (field) {
4623
      case SUCCESS:
4624
        if (value == null) {
4625
          unsetSuccess();
4626
        } else {
4627
          setSuccess((Transaction)value);
4628
        }
4629
        break;
4630
 
4631
      case EX:
4632
        if (value == null) {
4633
          unsetEx();
4634
        } else {
4635
          setEx((TransactionServiceException)value);
4636
        }
4637
        break;
4638
 
4639
      }
4640
    }
4641
 
4642
    public void setFieldValue(int fieldID, Object value) {
4643
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4644
    }
4645
 
4646
    public Object getFieldValue(_Fields field) {
4647
      switch (field) {
4648
      case SUCCESS:
4649
        return getSuccess();
4650
 
4651
      case EX:
4652
        return getEx();
4653
 
4654
      }
4655
      throw new IllegalStateException();
4656
    }
4657
 
4658
    public Object getFieldValue(int fieldId) {
4659
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4660
    }
4661
 
4662
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4663
    public boolean isSet(_Fields field) {
4664
      switch (field) {
4665
      case SUCCESS:
4666
        return isSetSuccess();
4667
      case EX:
4668
        return isSetEx();
4669
      }
4670
      throw new IllegalStateException();
4671
    }
4672
 
4673
    public boolean isSet(int fieldID) {
4674
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4675
    }
4676
 
4677
    @Override
4678
    public boolean equals(Object that) {
4679
      if (that == null)
4680
        return false;
4681
      if (that instanceof getTransaction_result)
4682
        return this.equals((getTransaction_result)that);
4683
      return false;
4684
    }
4685
 
4686
    public boolean equals(getTransaction_result that) {
4687
      if (that == null)
4688
        return false;
4689
 
4690
      boolean this_present_success = true && this.isSetSuccess();
4691
      boolean that_present_success = true && that.isSetSuccess();
4692
      if (this_present_success || that_present_success) {
4693
        if (!(this_present_success && that_present_success))
4694
          return false;
4695
        if (!this.success.equals(that.success))
4696
          return false;
4697
      }
4698
 
4699
      boolean this_present_ex = true && this.isSetEx();
4700
      boolean that_present_ex = true && that.isSetEx();
4701
      if (this_present_ex || that_present_ex) {
4702
        if (!(this_present_ex && that_present_ex))
4703
          return false;
4704
        if (!this.ex.equals(that.ex))
4705
          return false;
4706
      }
4707
 
4708
      return true;
4709
    }
4710
 
4711
    @Override
4712
    public int hashCode() {
4713
      return 0;
4714
    }
4715
 
684 chandransh 4716
    public int compareTo(getTransaction_result other) {
4717
      if (!getClass().equals(other.getClass())) {
4718
        return getClass().getName().compareTo(other.getClass().getName());
4719
      }
4720
 
4721
      int lastComparison = 0;
4722
      getTransaction_result typedOther = (getTransaction_result)other;
4723
 
4724
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4725
      if (lastComparison != 0) {
4726
        return lastComparison;
4727
      }
4728
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4729
      if (lastComparison != 0) {
4730
        return lastComparison;
4731
      }
4732
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4733
      if (lastComparison != 0) {
4734
        return lastComparison;
4735
      }
4736
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4737
      if (lastComparison != 0) {
4738
        return lastComparison;
4739
      }
4740
      return 0;
4741
    }
4742
 
68 ashish 4743
    public void read(TProtocol iprot) throws TException {
4744
      TField field;
4745
      iprot.readStructBegin();
4746
      while (true)
4747
      {
4748
        field = iprot.readFieldBegin();
4749
        if (field.type == TType.STOP) { 
4750
          break;
4751
        }
4752
        _Fields fieldId = _Fields.findByThriftId(field.id);
4753
        if (fieldId == null) {
4754
          TProtocolUtil.skip(iprot, field.type);
4755
        } else {
4756
          switch (fieldId) {
4757
            case SUCCESS:
4758
              if (field.type == TType.STRUCT) {
4759
                this.success = new Transaction();
4760
                this.success.read(iprot);
4761
              } else { 
4762
                TProtocolUtil.skip(iprot, field.type);
4763
              }
4764
              break;
4765
            case EX:
4766
              if (field.type == TType.STRUCT) {
4767
                this.ex = new TransactionServiceException();
4768
                this.ex.read(iprot);
4769
              } else { 
4770
                TProtocolUtil.skip(iprot, field.type);
4771
              }
4772
              break;
4773
          }
4774
          iprot.readFieldEnd();
4775
        }
4776
      }
4777
      iprot.readStructEnd();
4778
      validate();
4779
    }
4780
 
4781
    public void write(TProtocol oprot) throws TException {
4782
      oprot.writeStructBegin(STRUCT_DESC);
4783
 
4784
      if (this.isSetSuccess()) {
4785
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4786
        this.success.write(oprot);
4787
        oprot.writeFieldEnd();
4788
      } else if (this.isSetEx()) {
4789
        oprot.writeFieldBegin(EX_FIELD_DESC);
4790
        this.ex.write(oprot);
4791
        oprot.writeFieldEnd();
4792
      }
4793
      oprot.writeFieldStop();
4794
      oprot.writeStructEnd();
4795
    }
4796
 
4797
    @Override
4798
    public String toString() {
4799
      StringBuilder sb = new StringBuilder("getTransaction_result(");
4800
      boolean first = true;
4801
 
4802
      sb.append("success:");
4803
      if (this.success == null) {
4804
        sb.append("null");
4805
      } else {
4806
        sb.append(this.success);
4807
      }
4808
      first = false;
4809
      if (!first) sb.append(", ");
4810
      sb.append("ex:");
4811
      if (this.ex == null) {
4812
        sb.append("null");
4813
      } else {
4814
        sb.append(this.ex);
4815
      }
4816
      first = false;
4817
      sb.append(")");
4818
      return sb.toString();
4819
    }
4820
 
4821
    public void validate() throws TException {
4822
      // check for required fields
4823
    }
4824
 
4825
  }
4826
 
4827
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4828
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4829
 
4830
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4831
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4832
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4833
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4834
 
4835
    private long customerId;
132 ashish 4836
    private long from_date;
4837
    private long to_date;
68 ashish 4838
    private TransactionStatus status;
4839
 
4840
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4841
    public enum _Fields implements TFieldIdEnum {
4842
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4843
      FROM_DATE((short)2, "from_date"),
4844
      TO_DATE((short)3, "to_date"),
68 ashish 4845
      /**
4846
       * 
4847
       * @see TransactionStatus
4848
       */
4849
      STATUS((short)4, "status");
4850
 
4851
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4852
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4853
 
4854
      static {
4855
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4856
          byId.put((int)field._thriftId, field);
4857
          byName.put(field.getFieldName(), field);
4858
        }
4859
      }
4860
 
4861
      /**
4862
       * Find the _Fields constant that matches fieldId, or null if its not found.
4863
       */
4864
      public static _Fields findByThriftId(int fieldId) {
4865
        return byId.get(fieldId);
4866
      }
4867
 
4868
      /**
4869
       * Find the _Fields constant that matches fieldId, throwing an exception
4870
       * if it is not found.
4871
       */
4872
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4873
        _Fields fields = findByThriftId(fieldId);
4874
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4875
        return fields;
4876
      }
4877
 
4878
      /**
4879
       * Find the _Fields constant that matches name, or null if its not found.
4880
       */
4881
      public static _Fields findByName(String name) {
4882
        return byName.get(name);
4883
      }
4884
 
4885
      private final short _thriftId;
4886
      private final String _fieldName;
4887
 
4888
      _Fields(short thriftId, String fieldName) {
4889
        _thriftId = thriftId;
4890
        _fieldName = fieldName;
4891
      }
4892
 
4893
      public short getThriftFieldId() {
4894
        return _thriftId;
4895
      }
4896
 
4897
      public String getFieldName() {
4898
        return _fieldName;
4899
      }
4900
    }
4901
 
4902
    // isset id assignments
4903
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4904
    private static final int __FROM_DATE_ISSET_ID = 1;
4905
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4906
    private BitSet __isset_bit_vector = new BitSet(3);
4907
 
4908
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4909
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4910
          new FieldValueMetaData(TType.I64)));
132 ashish 4911
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4912
          new FieldValueMetaData(TType.I64)));
132 ashish 4913
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4914
          new FieldValueMetaData(TType.I64)));
4915
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4916
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4917
    }});
4918
 
4919
    static {
4920
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4921
    }
4922
 
4923
    public getTransactionsForCustomer_args() {
4924
    }
4925
 
4926
    public getTransactionsForCustomer_args(
4927
      long customerId,
132 ashish 4928
      long from_date,
4929
      long to_date,
68 ashish 4930
      TransactionStatus status)
4931
    {
4932
      this();
4933
      this.customerId = customerId;
4934
      setCustomerIdIsSet(true);
132 ashish 4935
      this.from_date = from_date;
4936
      setFrom_dateIsSet(true);
4937
      this.to_date = to_date;
4938
      setTo_dateIsSet(true);
68 ashish 4939
      this.status = status;
4940
    }
4941
 
4942
    /**
4943
     * Performs a deep copy on <i>other</i>.
4944
     */
4945
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4946
      __isset_bit_vector.clear();
4947
      __isset_bit_vector.or(other.__isset_bit_vector);
4948
      this.customerId = other.customerId;
132 ashish 4949
      this.from_date = other.from_date;
4950
      this.to_date = other.to_date;
68 ashish 4951
      if (other.isSetStatus()) {
4952
        this.status = other.status;
4953
      }
4954
    }
4955
 
4956
    public getTransactionsForCustomer_args deepCopy() {
4957
      return new getTransactionsForCustomer_args(this);
4958
    }
4959
 
4960
    @Deprecated
4961
    public getTransactionsForCustomer_args clone() {
4962
      return new getTransactionsForCustomer_args(this);
4963
    }
4964
 
4965
    public long getCustomerId() {
4966
      return this.customerId;
4967
    }
4968
 
4969
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4970
      this.customerId = customerId;
4971
      setCustomerIdIsSet(true);
4972
      return this;
4973
    }
4974
 
4975
    public void unsetCustomerId() {
4976
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4977
    }
4978
 
4979
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4980
    public boolean isSetCustomerId() {
4981
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4982
    }
4983
 
4984
    public void setCustomerIdIsSet(boolean value) {
4985
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4986
    }
4987
 
132 ashish 4988
    public long getFrom_date() {
4989
      return this.from_date;
68 ashish 4990
    }
4991
 
132 ashish 4992
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4993
      this.from_date = from_date;
4994
      setFrom_dateIsSet(true);
68 ashish 4995
      return this;
4996
    }
4997
 
132 ashish 4998
    public void unsetFrom_date() {
4999
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 5000
    }
5001
 
132 ashish 5002
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
5003
    public boolean isSetFrom_date() {
5004
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 5005
    }
5006
 
132 ashish 5007
    public void setFrom_dateIsSet(boolean value) {
5008
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 5009
    }
5010
 
132 ashish 5011
    public long getTo_date() {
5012
      return this.to_date;
68 ashish 5013
    }
5014
 
132 ashish 5015
    public getTransactionsForCustomer_args setTo_date(long to_date) {
5016
      this.to_date = to_date;
5017
      setTo_dateIsSet(true);
68 ashish 5018
      return this;
5019
    }
5020
 
132 ashish 5021
    public void unsetTo_date() {
5022
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 5023
    }
5024
 
132 ashish 5025
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
5026
    public boolean isSetTo_date() {
5027
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 5028
    }
5029
 
132 ashish 5030
    public void setTo_dateIsSet(boolean value) {
5031
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 5032
    }
5033
 
5034
    /**
5035
     * 
5036
     * @see TransactionStatus
5037
     */
5038
    public TransactionStatus getStatus() {
5039
      return this.status;
5040
    }
5041
 
5042
    /**
5043
     * 
5044
     * @see TransactionStatus
5045
     */
5046
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
5047
      this.status = status;
5048
      return this;
5049
    }
5050
 
5051
    public void unsetStatus() {
5052
      this.status = null;
5053
    }
5054
 
5055
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5056
    public boolean isSetStatus() {
5057
      return this.status != null;
5058
    }
5059
 
5060
    public void setStatusIsSet(boolean value) {
5061
      if (!value) {
5062
        this.status = null;
5063
      }
5064
    }
5065
 
5066
    public void setFieldValue(_Fields field, Object value) {
5067
      switch (field) {
5068
      case CUSTOMER_ID:
5069
        if (value == null) {
5070
          unsetCustomerId();
5071
        } else {
5072
          setCustomerId((Long)value);
5073
        }
5074
        break;
5075
 
132 ashish 5076
      case FROM_DATE:
68 ashish 5077
        if (value == null) {
132 ashish 5078
          unsetFrom_date();
68 ashish 5079
        } else {
132 ashish 5080
          setFrom_date((Long)value);
68 ashish 5081
        }
5082
        break;
5083
 
132 ashish 5084
      case TO_DATE:
68 ashish 5085
        if (value == null) {
132 ashish 5086
          unsetTo_date();
68 ashish 5087
        } else {
132 ashish 5088
          setTo_date((Long)value);
68 ashish 5089
        }
5090
        break;
5091
 
5092
      case STATUS:
5093
        if (value == null) {
5094
          unsetStatus();
5095
        } else {
5096
          setStatus((TransactionStatus)value);
5097
        }
5098
        break;
5099
 
5100
      }
5101
    }
5102
 
5103
    public void setFieldValue(int fieldID, Object value) {
5104
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5105
    }
5106
 
5107
    public Object getFieldValue(_Fields field) {
5108
      switch (field) {
5109
      case CUSTOMER_ID:
5110
        return new Long(getCustomerId());
5111
 
132 ashish 5112
      case FROM_DATE:
5113
        return new Long(getFrom_date());
68 ashish 5114
 
132 ashish 5115
      case TO_DATE:
5116
        return new Long(getTo_date());
68 ashish 5117
 
5118
      case STATUS:
5119
        return getStatus();
5120
 
5121
      }
5122
      throw new IllegalStateException();
5123
    }
5124
 
5125
    public Object getFieldValue(int fieldId) {
5126
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5127
    }
5128
 
5129
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5130
    public boolean isSet(_Fields field) {
5131
      switch (field) {
5132
      case CUSTOMER_ID:
5133
        return isSetCustomerId();
132 ashish 5134
      case FROM_DATE:
5135
        return isSetFrom_date();
5136
      case TO_DATE:
5137
        return isSetTo_date();
68 ashish 5138
      case STATUS:
5139
        return isSetStatus();
5140
      }
5141
      throw new IllegalStateException();
5142
    }
5143
 
5144
    public boolean isSet(int fieldID) {
5145
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5146
    }
5147
 
5148
    @Override
5149
    public boolean equals(Object that) {
5150
      if (that == null)
5151
        return false;
5152
      if (that instanceof getTransactionsForCustomer_args)
5153
        return this.equals((getTransactionsForCustomer_args)that);
5154
      return false;
5155
    }
5156
 
5157
    public boolean equals(getTransactionsForCustomer_args that) {
5158
      if (that == null)
5159
        return false;
5160
 
5161
      boolean this_present_customerId = true;
5162
      boolean that_present_customerId = true;
5163
      if (this_present_customerId || that_present_customerId) {
5164
        if (!(this_present_customerId && that_present_customerId))
5165
          return false;
5166
        if (this.customerId != that.customerId)
5167
          return false;
5168
      }
5169
 
132 ashish 5170
      boolean this_present_from_date = true;
5171
      boolean that_present_from_date = true;
5172
      if (this_present_from_date || that_present_from_date) {
5173
        if (!(this_present_from_date && that_present_from_date))
68 ashish 5174
          return false;
132 ashish 5175
        if (this.from_date != that.from_date)
68 ashish 5176
          return false;
5177
      }
5178
 
132 ashish 5179
      boolean this_present_to_date = true;
5180
      boolean that_present_to_date = true;
5181
      if (this_present_to_date || that_present_to_date) {
5182
        if (!(this_present_to_date && that_present_to_date))
68 ashish 5183
          return false;
132 ashish 5184
        if (this.to_date != that.to_date)
68 ashish 5185
          return false;
5186
      }
5187
 
5188
      boolean this_present_status = true && this.isSetStatus();
5189
      boolean that_present_status = true && that.isSetStatus();
5190
      if (this_present_status || that_present_status) {
5191
        if (!(this_present_status && that_present_status))
5192
          return false;
5193
        if (!this.status.equals(that.status))
5194
          return false;
5195
      }
5196
 
5197
      return true;
5198
    }
5199
 
5200
    @Override
5201
    public int hashCode() {
5202
      return 0;
5203
    }
5204
 
5205
    public int compareTo(getTransactionsForCustomer_args other) {
5206
      if (!getClass().equals(other.getClass())) {
5207
        return getClass().getName().compareTo(other.getClass().getName());
5208
      }
5209
 
5210
      int lastComparison = 0;
5211
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
5212
 
5213
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
5214
      if (lastComparison != 0) {
5215
        return lastComparison;
5216
      }
5217
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
5218
      if (lastComparison != 0) {
5219
        return lastComparison;
5220
      }
132 ashish 5221
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 5222
      if (lastComparison != 0) {
5223
        return lastComparison;
5224
      }
132 ashish 5225
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 5226
      if (lastComparison != 0) {
5227
        return lastComparison;
5228
      }
132 ashish 5229
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 5230
      if (lastComparison != 0) {
5231
        return lastComparison;
5232
      }
132 ashish 5233
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 5234
      if (lastComparison != 0) {
5235
        return lastComparison;
5236
      }
5237
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
5238
      if (lastComparison != 0) {
5239
        return lastComparison;
5240
      }
5241
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
5242
      if (lastComparison != 0) {
5243
        return lastComparison;
5244
      }
5245
      return 0;
5246
    }
5247
 
5248
    public void read(TProtocol iprot) throws TException {
5249
      TField field;
5250
      iprot.readStructBegin();
5251
      while (true)
5252
      {
5253
        field = iprot.readFieldBegin();
5254
        if (field.type == TType.STOP) { 
5255
          break;
5256
        }
5257
        _Fields fieldId = _Fields.findByThriftId(field.id);
5258
        if (fieldId == null) {
5259
          TProtocolUtil.skip(iprot, field.type);
5260
        } else {
5261
          switch (fieldId) {
5262
            case CUSTOMER_ID:
5263
              if (field.type == TType.I64) {
5264
                this.customerId = iprot.readI64();
5265
                setCustomerIdIsSet(true);
5266
              } else { 
5267
                TProtocolUtil.skip(iprot, field.type);
5268
              }
5269
              break;
132 ashish 5270
            case FROM_DATE:
68 ashish 5271
              if (field.type == TType.I64) {
132 ashish 5272
                this.from_date = iprot.readI64();
5273
                setFrom_dateIsSet(true);
68 ashish 5274
              } else { 
5275
                TProtocolUtil.skip(iprot, field.type);
5276
              }
5277
              break;
132 ashish 5278
            case TO_DATE:
68 ashish 5279
              if (field.type == TType.I64) {
132 ashish 5280
                this.to_date = iprot.readI64();
5281
                setTo_dateIsSet(true);
68 ashish 5282
              } else { 
5283
                TProtocolUtil.skip(iprot, field.type);
5284
              }
5285
              break;
5286
            case STATUS:
5287
              if (field.type == TType.I32) {
5288
                this.status = TransactionStatus.findByValue(iprot.readI32());
5289
              } else { 
5290
                TProtocolUtil.skip(iprot, field.type);
5291
              }
5292
              break;
5293
          }
5294
          iprot.readFieldEnd();
5295
        }
5296
      }
5297
      iprot.readStructEnd();
5298
      validate();
5299
    }
5300
 
5301
    public void write(TProtocol oprot) throws TException {
5302
      validate();
5303
 
5304
      oprot.writeStructBegin(STRUCT_DESC);
5305
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
5306
      oprot.writeI64(this.customerId);
5307
      oprot.writeFieldEnd();
132 ashish 5308
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
5309
      oprot.writeI64(this.from_date);
68 ashish 5310
      oprot.writeFieldEnd();
132 ashish 5311
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
5312
      oprot.writeI64(this.to_date);
68 ashish 5313
      oprot.writeFieldEnd();
5314
      if (this.status != null) {
5315
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5316
        oprot.writeI32(this.status.getValue());
5317
        oprot.writeFieldEnd();
5318
      }
5319
      oprot.writeFieldStop();
5320
      oprot.writeStructEnd();
5321
    }
5322
 
5323
    @Override
5324
    public String toString() {
5325
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
5326
      boolean first = true;
5327
 
5328
      sb.append("customerId:");
5329
      sb.append(this.customerId);
5330
      first = false;
5331
      if (!first) sb.append(", ");
132 ashish 5332
      sb.append("from_date:");
5333
      sb.append(this.from_date);
68 ashish 5334
      first = false;
5335
      if (!first) sb.append(", ");
132 ashish 5336
      sb.append("to_date:");
5337
      sb.append(this.to_date);
68 ashish 5338
      first = false;
5339
      if (!first) sb.append(", ");
5340
      sb.append("status:");
5341
      if (this.status == null) {
5342
        sb.append("null");
5343
      } else {
5344
        String status_name = status.name();
5345
        if (status_name != null) {
5346
          sb.append(status_name);
5347
          sb.append(" (");
5348
        }
5349
        sb.append(this.status);
5350
        if (status_name != null) {
5351
          sb.append(")");
5352
        }
5353
      }
5354
      first = false;
5355
      sb.append(")");
5356
      return sb.toString();
5357
    }
5358
 
5359
    public void validate() throws TException {
5360
      // check for required fields
5361
    }
5362
 
5363
  }
5364
 
684 chandransh 5365
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 5366
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
5367
 
5368
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5369
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5370
 
5371
    private List<Transaction> success;
5372
    private TransactionServiceException ex;
5373
 
5374
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5375
    public enum _Fields implements TFieldIdEnum {
5376
      SUCCESS((short)0, "success"),
5377
      EX((short)1, "ex");
5378
 
5379
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5380
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5381
 
5382
      static {
5383
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5384
          byId.put((int)field._thriftId, field);
5385
          byName.put(field.getFieldName(), field);
5386
        }
5387
      }
5388
 
5389
      /**
5390
       * Find the _Fields constant that matches fieldId, or null if its not found.
5391
       */
5392
      public static _Fields findByThriftId(int fieldId) {
5393
        return byId.get(fieldId);
5394
      }
5395
 
5396
      /**
5397
       * Find the _Fields constant that matches fieldId, throwing an exception
5398
       * if it is not found.
5399
       */
5400
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5401
        _Fields fields = findByThriftId(fieldId);
5402
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5403
        return fields;
5404
      }
5405
 
5406
      /**
5407
       * Find the _Fields constant that matches name, or null if its not found.
5408
       */
5409
      public static _Fields findByName(String name) {
5410
        return byName.get(name);
5411
      }
5412
 
5413
      private final short _thriftId;
5414
      private final String _fieldName;
5415
 
5416
      _Fields(short thriftId, String fieldName) {
5417
        _thriftId = thriftId;
5418
        _fieldName = fieldName;
5419
      }
5420
 
5421
      public short getThriftFieldId() {
5422
        return _thriftId;
5423
      }
5424
 
5425
      public String getFieldName() {
5426
        return _fieldName;
5427
      }
5428
    }
5429
 
5430
    // isset id assignments
5431
 
5432
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5433
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5434
          new ListMetaData(TType.LIST, 
5435
              new StructMetaData(TType.STRUCT, Transaction.class))));
5436
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5437
          new FieldValueMetaData(TType.STRUCT)));
5438
    }});
5439
 
5440
    static {
5441
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
5442
    }
5443
 
5444
    public getTransactionsForCustomer_result() {
5445
    }
5446
 
5447
    public getTransactionsForCustomer_result(
5448
      List<Transaction> success,
5449
      TransactionServiceException ex)
5450
    {
5451
      this();
5452
      this.success = success;
5453
      this.ex = ex;
5454
    }
5455
 
5456
    /**
5457
     * Performs a deep copy on <i>other</i>.
5458
     */
5459
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
5460
      if (other.isSetSuccess()) {
5461
        List<Transaction> __this__success = new ArrayList<Transaction>();
5462
        for (Transaction other_element : other.success) {
5463
          __this__success.add(new Transaction(other_element));
5464
        }
5465
        this.success = __this__success;
5466
      }
5467
      if (other.isSetEx()) {
5468
        this.ex = new TransactionServiceException(other.ex);
5469
      }
5470
    }
5471
 
5472
    public getTransactionsForCustomer_result deepCopy() {
5473
      return new getTransactionsForCustomer_result(this);
5474
    }
5475
 
5476
    @Deprecated
5477
    public getTransactionsForCustomer_result clone() {
5478
      return new getTransactionsForCustomer_result(this);
5479
    }
5480
 
5481
    public int getSuccessSize() {
5482
      return (this.success == null) ? 0 : this.success.size();
5483
    }
5484
 
5485
    public java.util.Iterator<Transaction> getSuccessIterator() {
5486
      return (this.success == null) ? null : this.success.iterator();
5487
    }
5488
 
5489
    public void addToSuccess(Transaction elem) {
5490
      if (this.success == null) {
5491
        this.success = new ArrayList<Transaction>();
5492
      }
5493
      this.success.add(elem);
5494
    }
5495
 
5496
    public List<Transaction> getSuccess() {
5497
      return this.success;
5498
    }
5499
 
5500
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
5501
      this.success = success;
5502
      return this;
5503
    }
5504
 
5505
    public void unsetSuccess() {
5506
      this.success = null;
5507
    }
5508
 
5509
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5510
    public boolean isSetSuccess() {
5511
      return this.success != null;
5512
    }
5513
 
5514
    public void setSuccessIsSet(boolean value) {
5515
      if (!value) {
5516
        this.success = null;
5517
      }
5518
    }
5519
 
5520
    public TransactionServiceException getEx() {
5521
      return this.ex;
5522
    }
5523
 
5524
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
5525
      this.ex = ex;
5526
      return this;
5527
    }
5528
 
5529
    public void unsetEx() {
5530
      this.ex = null;
5531
    }
5532
 
5533
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5534
    public boolean isSetEx() {
5535
      return this.ex != null;
5536
    }
5537
 
5538
    public void setExIsSet(boolean value) {
5539
      if (!value) {
5540
        this.ex = null;
5541
      }
5542
    }
5543
 
5544
    public void setFieldValue(_Fields field, Object value) {
5545
      switch (field) {
5546
      case SUCCESS:
5547
        if (value == null) {
5548
          unsetSuccess();
5549
        } else {
5550
          setSuccess((List<Transaction>)value);
5551
        }
5552
        break;
5553
 
5554
      case EX:
5555
        if (value == null) {
5556
          unsetEx();
5557
        } else {
5558
          setEx((TransactionServiceException)value);
5559
        }
5560
        break;
5561
 
5562
      }
5563
    }
5564
 
5565
    public void setFieldValue(int fieldID, Object value) {
5566
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5567
    }
5568
 
5569
    public Object getFieldValue(_Fields field) {
5570
      switch (field) {
5571
      case SUCCESS:
5572
        return getSuccess();
5573
 
5574
      case EX:
5575
        return getEx();
5576
 
5577
      }
5578
      throw new IllegalStateException();
5579
    }
5580
 
5581
    public Object getFieldValue(int fieldId) {
5582
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5583
    }
5584
 
5585
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5586
    public boolean isSet(_Fields field) {
5587
      switch (field) {
5588
      case SUCCESS:
5589
        return isSetSuccess();
5590
      case EX:
5591
        return isSetEx();
5592
      }
5593
      throw new IllegalStateException();
5594
    }
5595
 
5596
    public boolean isSet(int fieldID) {
5597
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5598
    }
5599
 
5600
    @Override
5601
    public boolean equals(Object that) {
5602
      if (that == null)
5603
        return false;
5604
      if (that instanceof getTransactionsForCustomer_result)
5605
        return this.equals((getTransactionsForCustomer_result)that);
5606
      return false;
5607
    }
5608
 
5609
    public boolean equals(getTransactionsForCustomer_result that) {
5610
      if (that == null)
5611
        return false;
5612
 
5613
      boolean this_present_success = true && this.isSetSuccess();
5614
      boolean that_present_success = true && that.isSetSuccess();
5615
      if (this_present_success || that_present_success) {
5616
        if (!(this_present_success && that_present_success))
5617
          return false;
5618
        if (!this.success.equals(that.success))
5619
          return false;
5620
      }
5621
 
5622
      boolean this_present_ex = true && this.isSetEx();
5623
      boolean that_present_ex = true && that.isSetEx();
5624
      if (this_present_ex || that_present_ex) {
5625
        if (!(this_present_ex && that_present_ex))
5626
          return false;
5627
        if (!this.ex.equals(that.ex))
5628
          return false;
5629
      }
5630
 
5631
      return true;
5632
    }
5633
 
5634
    @Override
5635
    public int hashCode() {
5636
      return 0;
5637
    }
5638
 
684 chandransh 5639
    public int compareTo(getTransactionsForCustomer_result other) {
5640
      if (!getClass().equals(other.getClass())) {
5641
        return getClass().getName().compareTo(other.getClass().getName());
5642
      }
5643
 
5644
      int lastComparison = 0;
5645
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
5646
 
5647
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5648
      if (lastComparison != 0) {
5649
        return lastComparison;
5650
      }
5651
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5652
      if (lastComparison != 0) {
5653
        return lastComparison;
5654
      }
5655
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5656
      if (lastComparison != 0) {
5657
        return lastComparison;
5658
      }
5659
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5660
      if (lastComparison != 0) {
5661
        return lastComparison;
5662
      }
5663
      return 0;
5664
    }
5665
 
68 ashish 5666
    public void read(TProtocol iprot) throws TException {
5667
      TField field;
5668
      iprot.readStructBegin();
5669
      while (true)
5670
      {
5671
        field = iprot.readFieldBegin();
5672
        if (field.type == TType.STOP) { 
5673
          break;
5674
        }
5675
        _Fields fieldId = _Fields.findByThriftId(field.id);
5676
        if (fieldId == null) {
5677
          TProtocolUtil.skip(iprot, field.type);
5678
        } else {
5679
          switch (fieldId) {
5680
            case SUCCESS:
5681
              if (field.type == TType.LIST) {
5682
                {
684 chandransh 5683
                  TList _list8 = iprot.readListBegin();
5684
                  this.success = new ArrayList<Transaction>(_list8.size);
5685
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 5686
                  {
684 chandransh 5687
                    Transaction _elem10;
5688
                    _elem10 = new Transaction();
5689
                    _elem10.read(iprot);
5690
                    this.success.add(_elem10);
68 ashish 5691
                  }
5692
                  iprot.readListEnd();
5693
                }
5694
              } else { 
5695
                TProtocolUtil.skip(iprot, field.type);
5696
              }
5697
              break;
5698
            case EX:
5699
              if (field.type == TType.STRUCT) {
5700
                this.ex = new TransactionServiceException();
5701
                this.ex.read(iprot);
5702
              } else { 
5703
                TProtocolUtil.skip(iprot, field.type);
5704
              }
5705
              break;
5706
          }
5707
          iprot.readFieldEnd();
5708
        }
5709
      }
5710
      iprot.readStructEnd();
5711
      validate();
5712
    }
5713
 
5714
    public void write(TProtocol oprot) throws TException {
5715
      oprot.writeStructBegin(STRUCT_DESC);
5716
 
5717
      if (this.isSetSuccess()) {
5718
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5719
        {
5720
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5721
          for (Transaction _iter11 : this.success)
68 ashish 5722
          {
684 chandransh 5723
            _iter11.write(oprot);
68 ashish 5724
          }
5725
          oprot.writeListEnd();
5726
        }
5727
        oprot.writeFieldEnd();
5728
      } else if (this.isSetEx()) {
5729
        oprot.writeFieldBegin(EX_FIELD_DESC);
5730
        this.ex.write(oprot);
5731
        oprot.writeFieldEnd();
5732
      }
5733
      oprot.writeFieldStop();
5734
      oprot.writeStructEnd();
5735
    }
5736
 
5737
    @Override
5738
    public String toString() {
5739
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5740
      boolean first = true;
5741
 
5742
      sb.append("success:");
5743
      if (this.success == null) {
5744
        sb.append("null");
5745
      } else {
5746
        sb.append(this.success);
5747
      }
5748
      first = false;
5749
      if (!first) sb.append(", ");
5750
      sb.append("ex:");
5751
      if (this.ex == null) {
5752
        sb.append("null");
5753
      } else {
5754
        sb.append(this.ex);
5755
      }
5756
      first = false;
5757
      sb.append(")");
5758
      return sb.toString();
5759
    }
5760
 
5761
    public void validate() throws TException {
5762
      // check for required fields
5763
    }
5764
 
5765
  }
5766
 
132 ashish 5767
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
5768
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
5769
 
5770
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
5771
 
5772
    private long shoppingCartId;
5773
 
5774
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5775
    public enum _Fields implements TFieldIdEnum {
5776
      SHOPPING_CART_ID((short)1, "shoppingCartId");
5777
 
5778
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5779
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5780
 
5781
      static {
5782
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5783
          byId.put((int)field._thriftId, field);
5784
          byName.put(field.getFieldName(), field);
5785
        }
5786
      }
5787
 
5788
      /**
5789
       * Find the _Fields constant that matches fieldId, or null if its not found.
5790
       */
5791
      public static _Fields findByThriftId(int fieldId) {
5792
        return byId.get(fieldId);
5793
      }
5794
 
5795
      /**
5796
       * Find the _Fields constant that matches fieldId, throwing an exception
5797
       * if it is not found.
5798
       */
5799
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5800
        _Fields fields = findByThriftId(fieldId);
5801
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5802
        return fields;
5803
      }
5804
 
5805
      /**
5806
       * Find the _Fields constant that matches name, or null if its not found.
5807
       */
5808
      public static _Fields findByName(String name) {
5809
        return byName.get(name);
5810
      }
5811
 
5812
      private final short _thriftId;
5813
      private final String _fieldName;
5814
 
5815
      _Fields(short thriftId, String fieldName) {
5816
        _thriftId = thriftId;
5817
        _fieldName = fieldName;
5818
      }
5819
 
5820
      public short getThriftFieldId() {
5821
        return _thriftId;
5822
      }
5823
 
5824
      public String getFieldName() {
5825
        return _fieldName;
5826
      }
5827
    }
5828
 
5829
    // isset id assignments
5830
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
5831
    private BitSet __isset_bit_vector = new BitSet(1);
5832
 
5833
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5834
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
5835
          new FieldValueMetaData(TType.I64)));
5836
    }});
5837
 
5838
    static {
5839
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
5840
    }
5841
 
5842
    public getTransactionsForShoppingCartId_args() {
5843
    }
5844
 
5845
    public getTransactionsForShoppingCartId_args(
5846
      long shoppingCartId)
5847
    {
5848
      this();
5849
      this.shoppingCartId = shoppingCartId;
5850
      setShoppingCartIdIsSet(true);
5851
    }
5852
 
5853
    /**
5854
     * Performs a deep copy on <i>other</i>.
5855
     */
5856
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
5857
      __isset_bit_vector.clear();
5858
      __isset_bit_vector.or(other.__isset_bit_vector);
5859
      this.shoppingCartId = other.shoppingCartId;
5860
    }
5861
 
5862
    public getTransactionsForShoppingCartId_args deepCopy() {
5863
      return new getTransactionsForShoppingCartId_args(this);
5864
    }
5865
 
5866
    @Deprecated
5867
    public getTransactionsForShoppingCartId_args clone() {
5868
      return new getTransactionsForShoppingCartId_args(this);
5869
    }
5870
 
5871
    public long getShoppingCartId() {
5872
      return this.shoppingCartId;
5873
    }
5874
 
5875
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5876
      this.shoppingCartId = shoppingCartId;
5877
      setShoppingCartIdIsSet(true);
5878
      return this;
5879
    }
5880
 
5881
    public void unsetShoppingCartId() {
5882
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5883
    }
5884
 
5885
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5886
    public boolean isSetShoppingCartId() {
5887
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5888
    }
5889
 
5890
    public void setShoppingCartIdIsSet(boolean value) {
5891
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5892
    }
5893
 
5894
    public void setFieldValue(_Fields field, Object value) {
5895
      switch (field) {
5896
      case SHOPPING_CART_ID:
5897
        if (value == null) {
5898
          unsetShoppingCartId();
5899
        } else {
5900
          setShoppingCartId((Long)value);
5901
        }
5902
        break;
5903
 
5904
      }
5905
    }
5906
 
5907
    public void setFieldValue(int fieldID, Object value) {
5908
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5909
    }
5910
 
5911
    public Object getFieldValue(_Fields field) {
5912
      switch (field) {
5913
      case SHOPPING_CART_ID:
5914
        return new Long(getShoppingCartId());
5915
 
5916
      }
5917
      throw new IllegalStateException();
5918
    }
5919
 
5920
    public Object getFieldValue(int fieldId) {
5921
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5922
    }
5923
 
5924
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5925
    public boolean isSet(_Fields field) {
5926
      switch (field) {
5927
      case SHOPPING_CART_ID:
5928
        return isSetShoppingCartId();
5929
      }
5930
      throw new IllegalStateException();
5931
    }
5932
 
5933
    public boolean isSet(int fieldID) {
5934
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5935
    }
5936
 
5937
    @Override
5938
    public boolean equals(Object that) {
5939
      if (that == null)
5940
        return false;
5941
      if (that instanceof getTransactionsForShoppingCartId_args)
5942
        return this.equals((getTransactionsForShoppingCartId_args)that);
5943
      return false;
5944
    }
5945
 
5946
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5947
      if (that == null)
5948
        return false;
5949
 
5950
      boolean this_present_shoppingCartId = true;
5951
      boolean that_present_shoppingCartId = true;
5952
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5953
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5954
          return false;
5955
        if (this.shoppingCartId != that.shoppingCartId)
5956
          return false;
5957
      }
5958
 
5959
      return true;
5960
    }
5961
 
5962
    @Override
5963
    public int hashCode() {
5964
      return 0;
5965
    }
5966
 
5967
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5968
      if (!getClass().equals(other.getClass())) {
5969
        return getClass().getName().compareTo(other.getClass().getName());
5970
      }
5971
 
5972
      int lastComparison = 0;
5973
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5974
 
5975
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5976
      if (lastComparison != 0) {
5977
        return lastComparison;
5978
      }
5979
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5980
      if (lastComparison != 0) {
5981
        return lastComparison;
5982
      }
5983
      return 0;
5984
    }
5985
 
5986
    public void read(TProtocol iprot) throws TException {
5987
      TField field;
5988
      iprot.readStructBegin();
5989
      while (true)
5990
      {
5991
        field = iprot.readFieldBegin();
5992
        if (field.type == TType.STOP) { 
5993
          break;
5994
        }
5995
        _Fields fieldId = _Fields.findByThriftId(field.id);
5996
        if (fieldId == null) {
5997
          TProtocolUtil.skip(iprot, field.type);
5998
        } else {
5999
          switch (fieldId) {
6000
            case SHOPPING_CART_ID:
6001
              if (field.type == TType.I64) {
6002
                this.shoppingCartId = iprot.readI64();
6003
                setShoppingCartIdIsSet(true);
6004
              } else { 
6005
                TProtocolUtil.skip(iprot, field.type);
6006
              }
6007
              break;
6008
          }
6009
          iprot.readFieldEnd();
6010
        }
6011
      }
6012
      iprot.readStructEnd();
6013
      validate();
6014
    }
6015
 
6016
    public void write(TProtocol oprot) throws TException {
6017
      validate();
6018
 
6019
      oprot.writeStructBegin(STRUCT_DESC);
6020
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
6021
      oprot.writeI64(this.shoppingCartId);
6022
      oprot.writeFieldEnd();
6023
      oprot.writeFieldStop();
6024
      oprot.writeStructEnd();
6025
    }
6026
 
6027
    @Override
6028
    public String toString() {
6029
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
6030
      boolean first = true;
6031
 
6032
      sb.append("shoppingCartId:");
6033
      sb.append(this.shoppingCartId);
6034
      first = false;
6035
      sb.append(")");
6036
      return sb.toString();
6037
    }
6038
 
6039
    public void validate() throws TException {
6040
      // check for required fields
6041
    }
6042
 
6043
  }
6044
 
684 chandransh 6045
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 6046
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
6047
 
6048
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
6049
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6050
 
6051
    private List<Transaction> success;
6052
    private TransactionServiceException ex;
6053
 
6054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6055
    public enum _Fields implements TFieldIdEnum {
6056
      SUCCESS((short)0, "success"),
6057
      EX((short)1, "ex");
6058
 
6059
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6060
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6061
 
6062
      static {
6063
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6064
          byId.put((int)field._thriftId, field);
6065
          byName.put(field.getFieldName(), field);
6066
        }
6067
      }
6068
 
6069
      /**
6070
       * Find the _Fields constant that matches fieldId, or null if its not found.
6071
       */
6072
      public static _Fields findByThriftId(int fieldId) {
6073
        return byId.get(fieldId);
6074
      }
6075
 
6076
      /**
6077
       * Find the _Fields constant that matches fieldId, throwing an exception
6078
       * if it is not found.
6079
       */
6080
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6081
        _Fields fields = findByThriftId(fieldId);
6082
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6083
        return fields;
6084
      }
6085
 
6086
      /**
6087
       * Find the _Fields constant that matches name, or null if its not found.
6088
       */
6089
      public static _Fields findByName(String name) {
6090
        return byName.get(name);
6091
      }
6092
 
6093
      private final short _thriftId;
6094
      private final String _fieldName;
6095
 
6096
      _Fields(short thriftId, String fieldName) {
6097
        _thriftId = thriftId;
6098
        _fieldName = fieldName;
6099
      }
6100
 
6101
      public short getThriftFieldId() {
6102
        return _thriftId;
6103
      }
6104
 
6105
      public String getFieldName() {
6106
        return _fieldName;
6107
      }
6108
    }
6109
 
6110
    // isset id assignments
6111
 
6112
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6113
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6114
          new ListMetaData(TType.LIST, 
6115
              new StructMetaData(TType.STRUCT, Transaction.class))));
6116
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6117
          new FieldValueMetaData(TType.STRUCT)));
6118
    }});
6119
 
6120
    static {
6121
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
6122
    }
6123
 
6124
    public getTransactionsForShoppingCartId_result() {
6125
    }
6126
 
6127
    public getTransactionsForShoppingCartId_result(
6128
      List<Transaction> success,
6129
      TransactionServiceException ex)
6130
    {
6131
      this();
6132
      this.success = success;
6133
      this.ex = ex;
6134
    }
6135
 
6136
    /**
6137
     * Performs a deep copy on <i>other</i>.
6138
     */
6139
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
6140
      if (other.isSetSuccess()) {
6141
        List<Transaction> __this__success = new ArrayList<Transaction>();
6142
        for (Transaction other_element : other.success) {
6143
          __this__success.add(new Transaction(other_element));
6144
        }
6145
        this.success = __this__success;
6146
      }
6147
      if (other.isSetEx()) {
6148
        this.ex = new TransactionServiceException(other.ex);
6149
      }
6150
    }
6151
 
6152
    public getTransactionsForShoppingCartId_result deepCopy() {
6153
      return new getTransactionsForShoppingCartId_result(this);
6154
    }
6155
 
6156
    @Deprecated
6157
    public getTransactionsForShoppingCartId_result clone() {
6158
      return new getTransactionsForShoppingCartId_result(this);
6159
    }
6160
 
6161
    public int getSuccessSize() {
6162
      return (this.success == null) ? 0 : this.success.size();
6163
    }
6164
 
6165
    public java.util.Iterator<Transaction> getSuccessIterator() {
6166
      return (this.success == null) ? null : this.success.iterator();
6167
    }
6168
 
6169
    public void addToSuccess(Transaction elem) {
6170
      if (this.success == null) {
6171
        this.success = new ArrayList<Transaction>();
6172
      }
6173
      this.success.add(elem);
6174
    }
6175
 
6176
    public List<Transaction> getSuccess() {
6177
      return this.success;
6178
    }
6179
 
6180
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
6181
      this.success = success;
6182
      return this;
6183
    }
6184
 
6185
    public void unsetSuccess() {
6186
      this.success = null;
6187
    }
6188
 
6189
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6190
    public boolean isSetSuccess() {
6191
      return this.success != null;
6192
    }
6193
 
6194
    public void setSuccessIsSet(boolean value) {
6195
      if (!value) {
6196
        this.success = null;
6197
      }
6198
    }
6199
 
6200
    public TransactionServiceException getEx() {
6201
      return this.ex;
6202
    }
6203
 
6204
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
6205
      this.ex = ex;
6206
      return this;
6207
    }
6208
 
6209
    public void unsetEx() {
6210
      this.ex = null;
6211
    }
6212
 
6213
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6214
    public boolean isSetEx() {
6215
      return this.ex != null;
6216
    }
6217
 
6218
    public void setExIsSet(boolean value) {
6219
      if (!value) {
6220
        this.ex = null;
6221
      }
6222
    }
6223
 
6224
    public void setFieldValue(_Fields field, Object value) {
6225
      switch (field) {
6226
      case SUCCESS:
6227
        if (value == null) {
6228
          unsetSuccess();
6229
        } else {
6230
          setSuccess((List<Transaction>)value);
6231
        }
6232
        break;
6233
 
6234
      case EX:
6235
        if (value == null) {
6236
          unsetEx();
6237
        } else {
6238
          setEx((TransactionServiceException)value);
6239
        }
6240
        break;
6241
 
6242
      }
6243
    }
6244
 
6245
    public void setFieldValue(int fieldID, Object value) {
6246
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6247
    }
6248
 
6249
    public Object getFieldValue(_Fields field) {
6250
      switch (field) {
6251
      case SUCCESS:
6252
        return getSuccess();
6253
 
6254
      case EX:
6255
        return getEx();
6256
 
6257
      }
6258
      throw new IllegalStateException();
6259
    }
6260
 
6261
    public Object getFieldValue(int fieldId) {
6262
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6263
    }
6264
 
6265
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6266
    public boolean isSet(_Fields field) {
6267
      switch (field) {
6268
      case SUCCESS:
6269
        return isSetSuccess();
6270
      case EX:
6271
        return isSetEx();
6272
      }
6273
      throw new IllegalStateException();
6274
    }
6275
 
6276
    public boolean isSet(int fieldID) {
6277
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6278
    }
6279
 
6280
    @Override
6281
    public boolean equals(Object that) {
6282
      if (that == null)
6283
        return false;
6284
      if (that instanceof getTransactionsForShoppingCartId_result)
6285
        return this.equals((getTransactionsForShoppingCartId_result)that);
6286
      return false;
6287
    }
6288
 
6289
    public boolean equals(getTransactionsForShoppingCartId_result that) {
6290
      if (that == null)
6291
        return false;
6292
 
6293
      boolean this_present_success = true && this.isSetSuccess();
6294
      boolean that_present_success = true && that.isSetSuccess();
6295
      if (this_present_success || that_present_success) {
6296
        if (!(this_present_success && that_present_success))
6297
          return false;
6298
        if (!this.success.equals(that.success))
6299
          return false;
6300
      }
6301
 
6302
      boolean this_present_ex = true && this.isSetEx();
6303
      boolean that_present_ex = true && that.isSetEx();
6304
      if (this_present_ex || that_present_ex) {
6305
        if (!(this_present_ex && that_present_ex))
6306
          return false;
6307
        if (!this.ex.equals(that.ex))
6308
          return false;
6309
      }
6310
 
6311
      return true;
6312
    }
6313
 
6314
    @Override
6315
    public int hashCode() {
6316
      return 0;
6317
    }
6318
 
684 chandransh 6319
    public int compareTo(getTransactionsForShoppingCartId_result other) {
6320
      if (!getClass().equals(other.getClass())) {
6321
        return getClass().getName().compareTo(other.getClass().getName());
6322
      }
6323
 
6324
      int lastComparison = 0;
6325
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
6326
 
6327
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6328
      if (lastComparison != 0) {
6329
        return lastComparison;
6330
      }
6331
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6332
      if (lastComparison != 0) {
6333
        return lastComparison;
6334
      }
6335
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6336
      if (lastComparison != 0) {
6337
        return lastComparison;
6338
      }
6339
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6340
      if (lastComparison != 0) {
6341
        return lastComparison;
6342
      }
6343
      return 0;
6344
    }
6345
 
132 ashish 6346
    public void read(TProtocol iprot) throws TException {
6347
      TField field;
6348
      iprot.readStructBegin();
6349
      while (true)
6350
      {
6351
        field = iprot.readFieldBegin();
6352
        if (field.type == TType.STOP) { 
6353
          break;
6354
        }
6355
        _Fields fieldId = _Fields.findByThriftId(field.id);
6356
        if (fieldId == null) {
6357
          TProtocolUtil.skip(iprot, field.type);
6358
        } else {
6359
          switch (fieldId) {
6360
            case SUCCESS:
6361
              if (field.type == TType.LIST) {
6362
                {
684 chandransh 6363
                  TList _list12 = iprot.readListBegin();
6364
                  this.success = new ArrayList<Transaction>(_list12.size);
6365
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 6366
                  {
684 chandransh 6367
                    Transaction _elem14;
6368
                    _elem14 = new Transaction();
6369
                    _elem14.read(iprot);
6370
                    this.success.add(_elem14);
132 ashish 6371
                  }
6372
                  iprot.readListEnd();
6373
                }
6374
              } else { 
6375
                TProtocolUtil.skip(iprot, field.type);
6376
              }
6377
              break;
6378
            case EX:
6379
              if (field.type == TType.STRUCT) {
6380
                this.ex = new TransactionServiceException();
6381
                this.ex.read(iprot);
6382
              } else { 
6383
                TProtocolUtil.skip(iprot, field.type);
6384
              }
6385
              break;
6386
          }
6387
          iprot.readFieldEnd();
6388
        }
6389
      }
6390
      iprot.readStructEnd();
6391
      validate();
6392
    }
6393
 
6394
    public void write(TProtocol oprot) throws TException {
6395
      oprot.writeStructBegin(STRUCT_DESC);
6396
 
6397
      if (this.isSetSuccess()) {
6398
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6399
        {
6400
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 6401
          for (Transaction _iter15 : this.success)
132 ashish 6402
          {
684 chandransh 6403
            _iter15.write(oprot);
132 ashish 6404
          }
6405
          oprot.writeListEnd();
6406
        }
6407
        oprot.writeFieldEnd();
6408
      } else if (this.isSetEx()) {
6409
        oprot.writeFieldBegin(EX_FIELD_DESC);
6410
        this.ex.write(oprot);
6411
        oprot.writeFieldEnd();
6412
      }
6413
      oprot.writeFieldStop();
6414
      oprot.writeStructEnd();
6415
    }
6416
 
6417
    @Override
6418
    public String toString() {
6419
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
6420
      boolean first = true;
6421
 
6422
      sb.append("success:");
6423
      if (this.success == null) {
6424
        sb.append("null");
6425
      } else {
6426
        sb.append(this.success);
6427
      }
6428
      first = false;
6429
      if (!first) sb.append(", ");
6430
      sb.append("ex:");
6431
      if (this.ex == null) {
6432
        sb.append("null");
6433
      } else {
6434
        sb.append(this.ex);
6435
      }
6436
      first = false;
6437
      sb.append(")");
6438
      return sb.toString();
6439
    }
6440
 
6441
    public void validate() throws TException {
6442
      // check for required fields
6443
    }
6444
 
6445
  }
6446
 
68 ashish 6447
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
6448
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
6449
 
6450
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6451
 
6452
    private long transactionId;
6453
 
6454
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6455
    public enum _Fields implements TFieldIdEnum {
6456
      TRANSACTION_ID((short)1, "transactionId");
6457
 
6458
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6459
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6460
 
6461
      static {
6462
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6463
          byId.put((int)field._thriftId, field);
6464
          byName.put(field.getFieldName(), field);
6465
        }
6466
      }
6467
 
6468
      /**
6469
       * Find the _Fields constant that matches fieldId, or null if its not found.
6470
       */
6471
      public static _Fields findByThriftId(int fieldId) {
6472
        return byId.get(fieldId);
6473
      }
6474
 
6475
      /**
6476
       * Find the _Fields constant that matches fieldId, throwing an exception
6477
       * if it is not found.
6478
       */
6479
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6480
        _Fields fields = findByThriftId(fieldId);
6481
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6482
        return fields;
6483
      }
6484
 
6485
      /**
6486
       * Find the _Fields constant that matches name, or null if its not found.
6487
       */
6488
      public static _Fields findByName(String name) {
6489
        return byName.get(name);
6490
      }
6491
 
6492
      private final short _thriftId;
6493
      private final String _fieldName;
6494
 
6495
      _Fields(short thriftId, String fieldName) {
6496
        _thriftId = thriftId;
6497
        _fieldName = fieldName;
6498
      }
6499
 
6500
      public short getThriftFieldId() {
6501
        return _thriftId;
6502
      }
6503
 
6504
      public String getFieldName() {
6505
        return _fieldName;
6506
      }
6507
    }
6508
 
6509
    // isset id assignments
6510
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6511
    private BitSet __isset_bit_vector = new BitSet(1);
6512
 
6513
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6514
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6515
          new FieldValueMetaData(TType.I64)));
6516
    }});
6517
 
6518
    static {
6519
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
6520
    }
6521
 
6522
    public getTransactionStatus_args() {
6523
    }
6524
 
6525
    public getTransactionStatus_args(
6526
      long transactionId)
6527
    {
6528
      this();
6529
      this.transactionId = transactionId;
6530
      setTransactionIdIsSet(true);
6531
    }
6532
 
6533
    /**
6534
     * Performs a deep copy on <i>other</i>.
6535
     */
6536
    public getTransactionStatus_args(getTransactionStatus_args other) {
6537
      __isset_bit_vector.clear();
6538
      __isset_bit_vector.or(other.__isset_bit_vector);
6539
      this.transactionId = other.transactionId;
6540
    }
6541
 
6542
    public getTransactionStatus_args deepCopy() {
6543
      return new getTransactionStatus_args(this);
6544
    }
6545
 
6546
    @Deprecated
6547
    public getTransactionStatus_args clone() {
6548
      return new getTransactionStatus_args(this);
6549
    }
6550
 
6551
    public long getTransactionId() {
6552
      return this.transactionId;
6553
    }
6554
 
6555
    public getTransactionStatus_args setTransactionId(long transactionId) {
6556
      this.transactionId = transactionId;
6557
      setTransactionIdIsSet(true);
6558
      return this;
6559
    }
6560
 
6561
    public void unsetTransactionId() {
6562
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6563
    }
6564
 
6565
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6566
    public boolean isSetTransactionId() {
6567
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6568
    }
6569
 
6570
    public void setTransactionIdIsSet(boolean value) {
6571
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6572
    }
6573
 
6574
    public void setFieldValue(_Fields field, Object value) {
6575
      switch (field) {
6576
      case TRANSACTION_ID:
6577
        if (value == null) {
6578
          unsetTransactionId();
6579
        } else {
6580
          setTransactionId((Long)value);
6581
        }
6582
        break;
6583
 
6584
      }
6585
    }
6586
 
6587
    public void setFieldValue(int fieldID, Object value) {
6588
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6589
    }
6590
 
6591
    public Object getFieldValue(_Fields field) {
6592
      switch (field) {
6593
      case TRANSACTION_ID:
6594
        return new Long(getTransactionId());
6595
 
6596
      }
6597
      throw new IllegalStateException();
6598
    }
6599
 
6600
    public Object getFieldValue(int fieldId) {
6601
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6602
    }
6603
 
6604
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6605
    public boolean isSet(_Fields field) {
6606
      switch (field) {
6607
      case TRANSACTION_ID:
6608
        return isSetTransactionId();
6609
      }
6610
      throw new IllegalStateException();
6611
    }
6612
 
6613
    public boolean isSet(int fieldID) {
6614
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6615
    }
6616
 
6617
    @Override
6618
    public boolean equals(Object that) {
6619
      if (that == null)
6620
        return false;
6621
      if (that instanceof getTransactionStatus_args)
6622
        return this.equals((getTransactionStatus_args)that);
6623
      return false;
6624
    }
6625
 
6626
    public boolean equals(getTransactionStatus_args that) {
6627
      if (that == null)
6628
        return false;
6629
 
6630
      boolean this_present_transactionId = true;
6631
      boolean that_present_transactionId = true;
6632
      if (this_present_transactionId || that_present_transactionId) {
6633
        if (!(this_present_transactionId && that_present_transactionId))
6634
          return false;
6635
        if (this.transactionId != that.transactionId)
6636
          return false;
6637
      }
6638
 
6639
      return true;
6640
    }
6641
 
6642
    @Override
6643
    public int hashCode() {
6644
      return 0;
6645
    }
6646
 
6647
    public int compareTo(getTransactionStatus_args other) {
6648
      if (!getClass().equals(other.getClass())) {
6649
        return getClass().getName().compareTo(other.getClass().getName());
6650
      }
6651
 
6652
      int lastComparison = 0;
6653
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
6654
 
6655
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6656
      if (lastComparison != 0) {
6657
        return lastComparison;
6658
      }
6659
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6660
      if (lastComparison != 0) {
6661
        return lastComparison;
6662
      }
6663
      return 0;
6664
    }
6665
 
6666
    public void read(TProtocol iprot) throws TException {
6667
      TField field;
6668
      iprot.readStructBegin();
6669
      while (true)
6670
      {
6671
        field = iprot.readFieldBegin();
6672
        if (field.type == TType.STOP) { 
6673
          break;
6674
        }
6675
        _Fields fieldId = _Fields.findByThriftId(field.id);
6676
        if (fieldId == null) {
6677
          TProtocolUtil.skip(iprot, field.type);
6678
        } else {
6679
          switch (fieldId) {
6680
            case TRANSACTION_ID:
6681
              if (field.type == TType.I64) {
6682
                this.transactionId = iprot.readI64();
6683
                setTransactionIdIsSet(true);
6684
              } else { 
6685
                TProtocolUtil.skip(iprot, field.type);
6686
              }
6687
              break;
6688
          }
6689
          iprot.readFieldEnd();
6690
        }
6691
      }
6692
      iprot.readStructEnd();
6693
      validate();
6694
    }
6695
 
6696
    public void write(TProtocol oprot) throws TException {
6697
      validate();
6698
 
6699
      oprot.writeStructBegin(STRUCT_DESC);
6700
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6701
      oprot.writeI64(this.transactionId);
6702
      oprot.writeFieldEnd();
6703
      oprot.writeFieldStop();
6704
      oprot.writeStructEnd();
6705
    }
6706
 
6707
    @Override
6708
    public String toString() {
6709
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
6710
      boolean first = true;
6711
 
6712
      sb.append("transactionId:");
6713
      sb.append(this.transactionId);
6714
      first = false;
6715
      sb.append(")");
6716
      return sb.toString();
6717
    }
6718
 
6719
    public void validate() throws TException {
6720
      // check for required fields
6721
    }
6722
 
6723
  }
6724
 
6725
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
6726
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
6727
 
6728
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
6729
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6730
 
6731
    private TransactionStatus success;
6732
    private TransactionServiceException ex;
6733
 
6734
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6735
    public enum _Fields implements TFieldIdEnum {
6736
      /**
6737
       * 
6738
       * @see TransactionStatus
6739
       */
6740
      SUCCESS((short)0, "success"),
6741
      EX((short)1, "ex");
6742
 
6743
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6744
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6745
 
6746
      static {
6747
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6748
          byId.put((int)field._thriftId, field);
6749
          byName.put(field.getFieldName(), field);
6750
        }
6751
      }
6752
 
6753
      /**
6754
       * Find the _Fields constant that matches fieldId, or null if its not found.
6755
       */
6756
      public static _Fields findByThriftId(int fieldId) {
6757
        return byId.get(fieldId);
6758
      }
6759
 
6760
      /**
6761
       * Find the _Fields constant that matches fieldId, throwing an exception
6762
       * if it is not found.
6763
       */
6764
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6765
        _Fields fields = findByThriftId(fieldId);
6766
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6767
        return fields;
6768
      }
6769
 
6770
      /**
6771
       * Find the _Fields constant that matches name, or null if its not found.
6772
       */
6773
      public static _Fields findByName(String name) {
6774
        return byName.get(name);
6775
      }
6776
 
6777
      private final short _thriftId;
6778
      private final String _fieldName;
6779
 
6780
      _Fields(short thriftId, String fieldName) {
6781
        _thriftId = thriftId;
6782
        _fieldName = fieldName;
6783
      }
6784
 
6785
      public short getThriftFieldId() {
6786
        return _thriftId;
6787
      }
6788
 
6789
      public String getFieldName() {
6790
        return _fieldName;
6791
      }
6792
    }
6793
 
6794
    // isset id assignments
6795
 
6796
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6797
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6798
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6799
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6800
          new FieldValueMetaData(TType.STRUCT)));
6801
    }});
6802
 
6803
    static {
6804
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
6805
    }
6806
 
6807
    public getTransactionStatus_result() {
6808
    }
6809
 
6810
    public getTransactionStatus_result(
6811
      TransactionStatus success,
6812
      TransactionServiceException ex)
6813
    {
6814
      this();
6815
      this.success = success;
6816
      this.ex = ex;
6817
    }
6818
 
6819
    /**
6820
     * Performs a deep copy on <i>other</i>.
6821
     */
6822
    public getTransactionStatus_result(getTransactionStatus_result other) {
6823
      if (other.isSetSuccess()) {
6824
        this.success = other.success;
6825
      }
6826
      if (other.isSetEx()) {
6827
        this.ex = new TransactionServiceException(other.ex);
6828
      }
6829
    }
6830
 
6831
    public getTransactionStatus_result deepCopy() {
6832
      return new getTransactionStatus_result(this);
6833
    }
6834
 
6835
    @Deprecated
6836
    public getTransactionStatus_result clone() {
6837
      return new getTransactionStatus_result(this);
6838
    }
6839
 
6840
    /**
6841
     * 
6842
     * @see TransactionStatus
6843
     */
6844
    public TransactionStatus getSuccess() {
6845
      return this.success;
6846
    }
6847
 
6848
    /**
6849
     * 
6850
     * @see TransactionStatus
6851
     */
6852
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
6853
      this.success = success;
6854
      return this;
6855
    }
6856
 
6857
    public void unsetSuccess() {
6858
      this.success = null;
6859
    }
6860
 
6861
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6862
    public boolean isSetSuccess() {
6863
      return this.success != null;
6864
    }
6865
 
6866
    public void setSuccessIsSet(boolean value) {
6867
      if (!value) {
6868
        this.success = null;
6869
      }
6870
    }
6871
 
6872
    public TransactionServiceException getEx() {
6873
      return this.ex;
6874
    }
6875
 
6876
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6877
      this.ex = ex;
6878
      return this;
6879
    }
6880
 
6881
    public void unsetEx() {
6882
      this.ex = null;
6883
    }
6884
 
6885
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6886
    public boolean isSetEx() {
6887
      return this.ex != null;
6888
    }
6889
 
6890
    public void setExIsSet(boolean value) {
6891
      if (!value) {
6892
        this.ex = null;
6893
      }
6894
    }
6895
 
6896
    public void setFieldValue(_Fields field, Object value) {
6897
      switch (field) {
6898
      case SUCCESS:
6899
        if (value == null) {
6900
          unsetSuccess();
6901
        } else {
6902
          setSuccess((TransactionStatus)value);
6903
        }
6904
        break;
6905
 
6906
      case EX:
6907
        if (value == null) {
6908
          unsetEx();
6909
        } else {
6910
          setEx((TransactionServiceException)value);
6911
        }
6912
        break;
6913
 
6914
      }
6915
    }
6916
 
6917
    public void setFieldValue(int fieldID, Object value) {
6918
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6919
    }
6920
 
6921
    public Object getFieldValue(_Fields field) {
6922
      switch (field) {
6923
      case SUCCESS:
6924
        return getSuccess();
6925
 
6926
      case EX:
6927
        return getEx();
6928
 
6929
      }
6930
      throw new IllegalStateException();
6931
    }
6932
 
6933
    public Object getFieldValue(int fieldId) {
6934
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6935
    }
6936
 
6937
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6938
    public boolean isSet(_Fields field) {
6939
      switch (field) {
6940
      case SUCCESS:
6941
        return isSetSuccess();
6942
      case EX:
6943
        return isSetEx();
6944
      }
6945
      throw new IllegalStateException();
6946
    }
6947
 
6948
    public boolean isSet(int fieldID) {
6949
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6950
    }
6951
 
6952
    @Override
6953
    public boolean equals(Object that) {
6954
      if (that == null)
6955
        return false;
6956
      if (that instanceof getTransactionStatus_result)
6957
        return this.equals((getTransactionStatus_result)that);
6958
      return false;
6959
    }
6960
 
6961
    public boolean equals(getTransactionStatus_result that) {
6962
      if (that == null)
6963
        return false;
6964
 
6965
      boolean this_present_success = true && this.isSetSuccess();
6966
      boolean that_present_success = true && that.isSetSuccess();
6967
      if (this_present_success || that_present_success) {
6968
        if (!(this_present_success && that_present_success))
6969
          return false;
6970
        if (!this.success.equals(that.success))
6971
          return false;
6972
      }
6973
 
6974
      boolean this_present_ex = true && this.isSetEx();
6975
      boolean that_present_ex = true && that.isSetEx();
6976
      if (this_present_ex || that_present_ex) {
6977
        if (!(this_present_ex && that_present_ex))
6978
          return false;
6979
        if (!this.ex.equals(that.ex))
6980
          return false;
6981
      }
6982
 
6983
      return true;
6984
    }
6985
 
6986
    @Override
6987
    public int hashCode() {
6988
      return 0;
6989
    }
6990
 
6991
    public int compareTo(getTransactionStatus_result other) {
6992
      if (!getClass().equals(other.getClass())) {
6993
        return getClass().getName().compareTo(other.getClass().getName());
6994
      }
6995
 
6996
      int lastComparison = 0;
6997
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6998
 
6999
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7000
      if (lastComparison != 0) {
7001
        return lastComparison;
7002
      }
7003
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7004
      if (lastComparison != 0) {
7005
        return lastComparison;
7006
      }
7007
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7008
      if (lastComparison != 0) {
7009
        return lastComparison;
7010
      }
7011
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7012
      if (lastComparison != 0) {
7013
        return lastComparison;
7014
      }
7015
      return 0;
7016
    }
7017
 
7018
    public void read(TProtocol iprot) throws TException {
7019
      TField field;
7020
      iprot.readStructBegin();
7021
      while (true)
7022
      {
7023
        field = iprot.readFieldBegin();
7024
        if (field.type == TType.STOP) { 
7025
          break;
7026
        }
7027
        _Fields fieldId = _Fields.findByThriftId(field.id);
7028
        if (fieldId == null) {
7029
          TProtocolUtil.skip(iprot, field.type);
7030
        } else {
7031
          switch (fieldId) {
7032
            case SUCCESS:
7033
              if (field.type == TType.I32) {
7034
                this.success = TransactionStatus.findByValue(iprot.readI32());
7035
              } else { 
7036
                TProtocolUtil.skip(iprot, field.type);
7037
              }
7038
              break;
7039
            case EX:
7040
              if (field.type == TType.STRUCT) {
7041
                this.ex = new TransactionServiceException();
7042
                this.ex.read(iprot);
7043
              } else { 
7044
                TProtocolUtil.skip(iprot, field.type);
7045
              }
7046
              break;
7047
          }
7048
          iprot.readFieldEnd();
7049
        }
7050
      }
7051
      iprot.readStructEnd();
7052
      validate();
7053
    }
7054
 
7055
    public void write(TProtocol oprot) throws TException {
7056
      oprot.writeStructBegin(STRUCT_DESC);
7057
 
7058
      if (this.isSetSuccess()) {
7059
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7060
        oprot.writeI32(this.success.getValue());
7061
        oprot.writeFieldEnd();
7062
      } else if (this.isSetEx()) {
7063
        oprot.writeFieldBegin(EX_FIELD_DESC);
7064
        this.ex.write(oprot);
7065
        oprot.writeFieldEnd();
7066
      }
7067
      oprot.writeFieldStop();
7068
      oprot.writeStructEnd();
7069
    }
7070
 
7071
    @Override
7072
    public String toString() {
7073
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
7074
      boolean first = true;
7075
 
7076
      sb.append("success:");
7077
      if (this.success == null) {
7078
        sb.append("null");
7079
      } else {
7080
        String success_name = success.name();
7081
        if (success_name != null) {
7082
          sb.append(success_name);
7083
          sb.append(" (");
7084
        }
7085
        sb.append(this.success);
7086
        if (success_name != null) {
7087
          sb.append(")");
7088
        }
7089
      }
7090
      first = false;
7091
      if (!first) sb.append(", ");
7092
      sb.append("ex:");
7093
      if (this.ex == null) {
7094
        sb.append("null");
7095
      } else {
7096
        sb.append(this.ex);
7097
      }
7098
      first = false;
7099
      sb.append(")");
7100
      return sb.toString();
7101
    }
7102
 
7103
    public void validate() throws TException {
7104
      // check for required fields
7105
    }
7106
 
7107
  }
7108
 
7109
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
7110
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
7111
 
7112
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7113
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
7114
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
7115
 
7116
    private long transactionId;
7117
    private TransactionStatus status;
7118
    private String description;
7119
 
7120
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7121
    public enum _Fields implements TFieldIdEnum {
7122
      TRANSACTION_ID((short)1, "transactionId"),
7123
      /**
7124
       * 
7125
       * @see TransactionStatus
7126
       */
7127
      STATUS((short)2, "status"),
7128
      DESCRIPTION((short)3, "description");
7129
 
7130
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7131
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7132
 
7133
      static {
7134
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7135
          byId.put((int)field._thriftId, field);
7136
          byName.put(field.getFieldName(), field);
7137
        }
7138
      }
7139
 
7140
      /**
7141
       * Find the _Fields constant that matches fieldId, or null if its not found.
7142
       */
7143
      public static _Fields findByThriftId(int fieldId) {
7144
        return byId.get(fieldId);
7145
      }
7146
 
7147
      /**
7148
       * Find the _Fields constant that matches fieldId, throwing an exception
7149
       * if it is not found.
7150
       */
7151
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7152
        _Fields fields = findByThriftId(fieldId);
7153
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7154
        return fields;
7155
      }
7156
 
7157
      /**
7158
       * Find the _Fields constant that matches name, or null if its not found.
7159
       */
7160
      public static _Fields findByName(String name) {
7161
        return byName.get(name);
7162
      }
7163
 
7164
      private final short _thriftId;
7165
      private final String _fieldName;
7166
 
7167
      _Fields(short thriftId, String fieldName) {
7168
        _thriftId = thriftId;
7169
        _fieldName = fieldName;
7170
      }
7171
 
7172
      public short getThriftFieldId() {
7173
        return _thriftId;
7174
      }
7175
 
7176
      public String getFieldName() {
7177
        return _fieldName;
7178
      }
7179
    }
7180
 
7181
    // isset id assignments
7182
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7183
    private BitSet __isset_bit_vector = new BitSet(1);
7184
 
7185
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7186
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7187
          new FieldValueMetaData(TType.I64)));
7188
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7189
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7190
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
7191
          new FieldValueMetaData(TType.STRING)));
7192
    }});
7193
 
7194
    static {
7195
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
7196
    }
7197
 
7198
    public changeTransactionStatus_args() {
7199
    }
7200
 
7201
    public changeTransactionStatus_args(
7202
      long transactionId,
7203
      TransactionStatus status,
7204
      String description)
7205
    {
7206
      this();
7207
      this.transactionId = transactionId;
7208
      setTransactionIdIsSet(true);
7209
      this.status = status;
7210
      this.description = description;
7211
    }
7212
 
7213
    /**
7214
     * Performs a deep copy on <i>other</i>.
7215
     */
7216
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
7217
      __isset_bit_vector.clear();
7218
      __isset_bit_vector.or(other.__isset_bit_vector);
7219
      this.transactionId = other.transactionId;
7220
      if (other.isSetStatus()) {
7221
        this.status = other.status;
7222
      }
7223
      if (other.isSetDescription()) {
7224
        this.description = other.description;
7225
      }
7226
    }
7227
 
7228
    public changeTransactionStatus_args deepCopy() {
7229
      return new changeTransactionStatus_args(this);
7230
    }
7231
 
7232
    @Deprecated
7233
    public changeTransactionStatus_args clone() {
7234
      return new changeTransactionStatus_args(this);
7235
    }
7236
 
7237
    public long getTransactionId() {
7238
      return this.transactionId;
7239
    }
7240
 
7241
    public changeTransactionStatus_args setTransactionId(long transactionId) {
7242
      this.transactionId = transactionId;
7243
      setTransactionIdIsSet(true);
7244
      return this;
7245
    }
7246
 
7247
    public void unsetTransactionId() {
7248
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7249
    }
7250
 
7251
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7252
    public boolean isSetTransactionId() {
7253
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7254
    }
7255
 
7256
    public void setTransactionIdIsSet(boolean value) {
7257
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7258
    }
7259
 
7260
    /**
7261
     * 
7262
     * @see TransactionStatus
7263
     */
7264
    public TransactionStatus getStatus() {
7265
      return this.status;
7266
    }
7267
 
7268
    /**
7269
     * 
7270
     * @see TransactionStatus
7271
     */
7272
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
7273
      this.status = status;
7274
      return this;
7275
    }
7276
 
7277
    public void unsetStatus() {
7278
      this.status = null;
7279
    }
7280
 
7281
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7282
    public boolean isSetStatus() {
7283
      return this.status != null;
7284
    }
7285
 
7286
    public void setStatusIsSet(boolean value) {
7287
      if (!value) {
7288
        this.status = null;
7289
      }
7290
    }
7291
 
7292
    public String getDescription() {
7293
      return this.description;
7294
    }
7295
 
7296
    public changeTransactionStatus_args setDescription(String description) {
7297
      this.description = description;
7298
      return this;
7299
    }
7300
 
7301
    public void unsetDescription() {
7302
      this.description = null;
7303
    }
7304
 
7305
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
7306
    public boolean isSetDescription() {
7307
      return this.description != null;
7308
    }
7309
 
7310
    public void setDescriptionIsSet(boolean value) {
7311
      if (!value) {
7312
        this.description = null;
7313
      }
7314
    }
7315
 
7316
    public void setFieldValue(_Fields field, Object value) {
7317
      switch (field) {
7318
      case TRANSACTION_ID:
7319
        if (value == null) {
7320
          unsetTransactionId();
7321
        } else {
7322
          setTransactionId((Long)value);
7323
        }
7324
        break;
7325
 
7326
      case STATUS:
7327
        if (value == null) {
7328
          unsetStatus();
7329
        } else {
7330
          setStatus((TransactionStatus)value);
7331
        }
7332
        break;
7333
 
7334
      case DESCRIPTION:
7335
        if (value == null) {
7336
          unsetDescription();
7337
        } else {
7338
          setDescription((String)value);
7339
        }
7340
        break;
7341
 
7342
      }
7343
    }
7344
 
7345
    public void setFieldValue(int fieldID, Object value) {
7346
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7347
    }
7348
 
7349
    public Object getFieldValue(_Fields field) {
7350
      switch (field) {
7351
      case TRANSACTION_ID:
7352
        return new Long(getTransactionId());
7353
 
7354
      case STATUS:
7355
        return getStatus();
7356
 
7357
      case DESCRIPTION:
7358
        return getDescription();
7359
 
7360
      }
7361
      throw new IllegalStateException();
7362
    }
7363
 
7364
    public Object getFieldValue(int fieldId) {
7365
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7366
    }
7367
 
7368
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7369
    public boolean isSet(_Fields field) {
7370
      switch (field) {
7371
      case TRANSACTION_ID:
7372
        return isSetTransactionId();
7373
      case STATUS:
7374
        return isSetStatus();
7375
      case DESCRIPTION:
7376
        return isSetDescription();
7377
      }
7378
      throw new IllegalStateException();
7379
    }
7380
 
7381
    public boolean isSet(int fieldID) {
7382
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7383
    }
7384
 
7385
    @Override
7386
    public boolean equals(Object that) {
7387
      if (that == null)
7388
        return false;
7389
      if (that instanceof changeTransactionStatus_args)
7390
        return this.equals((changeTransactionStatus_args)that);
7391
      return false;
7392
    }
7393
 
7394
    public boolean equals(changeTransactionStatus_args that) {
7395
      if (that == null)
7396
        return false;
7397
 
7398
      boolean this_present_transactionId = true;
7399
      boolean that_present_transactionId = true;
7400
      if (this_present_transactionId || that_present_transactionId) {
7401
        if (!(this_present_transactionId && that_present_transactionId))
7402
          return false;
7403
        if (this.transactionId != that.transactionId)
7404
          return false;
7405
      }
7406
 
7407
      boolean this_present_status = true && this.isSetStatus();
7408
      boolean that_present_status = true && that.isSetStatus();
7409
      if (this_present_status || that_present_status) {
7410
        if (!(this_present_status && that_present_status))
7411
          return false;
7412
        if (!this.status.equals(that.status))
7413
          return false;
7414
      }
7415
 
7416
      boolean this_present_description = true && this.isSetDescription();
7417
      boolean that_present_description = true && that.isSetDescription();
7418
      if (this_present_description || that_present_description) {
7419
        if (!(this_present_description && that_present_description))
7420
          return false;
7421
        if (!this.description.equals(that.description))
7422
          return false;
7423
      }
7424
 
7425
      return true;
7426
    }
7427
 
7428
    @Override
7429
    public int hashCode() {
7430
      return 0;
7431
    }
7432
 
7433
    public int compareTo(changeTransactionStatus_args other) {
7434
      if (!getClass().equals(other.getClass())) {
7435
        return getClass().getName().compareTo(other.getClass().getName());
7436
      }
7437
 
7438
      int lastComparison = 0;
7439
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
7440
 
7441
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7442
      if (lastComparison != 0) {
7443
        return lastComparison;
7444
      }
7445
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7446
      if (lastComparison != 0) {
7447
        return lastComparison;
7448
      }
7449
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7450
      if (lastComparison != 0) {
7451
        return lastComparison;
7452
      }
7453
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7454
      if (lastComparison != 0) {
7455
        return lastComparison;
7456
      }
7457
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
7458
      if (lastComparison != 0) {
7459
        return lastComparison;
7460
      }
7461
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
7462
      if (lastComparison != 0) {
7463
        return lastComparison;
7464
      }
7465
      return 0;
7466
    }
7467
 
7468
    public void read(TProtocol iprot) throws TException {
7469
      TField field;
7470
      iprot.readStructBegin();
7471
      while (true)
7472
      {
7473
        field = iprot.readFieldBegin();
7474
        if (field.type == TType.STOP) { 
7475
          break;
7476
        }
7477
        _Fields fieldId = _Fields.findByThriftId(field.id);
7478
        if (fieldId == null) {
7479
          TProtocolUtil.skip(iprot, field.type);
7480
        } else {
7481
          switch (fieldId) {
7482
            case TRANSACTION_ID:
7483
              if (field.type == TType.I64) {
7484
                this.transactionId = iprot.readI64();
7485
                setTransactionIdIsSet(true);
7486
              } else { 
7487
                TProtocolUtil.skip(iprot, field.type);
7488
              }
7489
              break;
7490
            case STATUS:
7491
              if (field.type == TType.I32) {
7492
                this.status = TransactionStatus.findByValue(iprot.readI32());
7493
              } else { 
7494
                TProtocolUtil.skip(iprot, field.type);
7495
              }
7496
              break;
7497
            case DESCRIPTION:
7498
              if (field.type == TType.STRING) {
7499
                this.description = iprot.readString();
7500
              } else { 
7501
                TProtocolUtil.skip(iprot, field.type);
7502
              }
7503
              break;
7504
          }
7505
          iprot.readFieldEnd();
7506
        }
7507
      }
7508
      iprot.readStructEnd();
7509
      validate();
7510
    }
7511
 
7512
    public void write(TProtocol oprot) throws TException {
7513
      validate();
7514
 
7515
      oprot.writeStructBegin(STRUCT_DESC);
7516
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7517
      oprot.writeI64(this.transactionId);
7518
      oprot.writeFieldEnd();
7519
      if (this.status != null) {
7520
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7521
        oprot.writeI32(this.status.getValue());
7522
        oprot.writeFieldEnd();
7523
      }
7524
      if (this.description != null) {
7525
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
7526
        oprot.writeString(this.description);
7527
        oprot.writeFieldEnd();
7528
      }
7529
      oprot.writeFieldStop();
7530
      oprot.writeStructEnd();
7531
    }
7532
 
7533
    @Override
7534
    public String toString() {
7535
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
7536
      boolean first = true;
7537
 
7538
      sb.append("transactionId:");
7539
      sb.append(this.transactionId);
7540
      first = false;
7541
      if (!first) sb.append(", ");
7542
      sb.append("status:");
7543
      if (this.status == null) {
7544
        sb.append("null");
7545
      } else {
7546
        String status_name = status.name();
7547
        if (status_name != null) {
7548
          sb.append(status_name);
7549
          sb.append(" (");
7550
        }
7551
        sb.append(this.status);
7552
        if (status_name != null) {
7553
          sb.append(")");
7554
        }
7555
      }
7556
      first = false;
7557
      if (!first) sb.append(", ");
7558
      sb.append("description:");
7559
      if (this.description == null) {
7560
        sb.append("null");
7561
      } else {
7562
        sb.append(this.description);
7563
      }
7564
      first = false;
7565
      sb.append(")");
7566
      return sb.toString();
7567
    }
7568
 
7569
    public void validate() throws TException {
7570
      // check for required fields
7571
    }
7572
 
7573
  }
7574
 
7575
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
7576
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
7577
 
7578
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7579
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7580
 
7581
    private boolean success;
7582
    private TransactionServiceException ex;
7583
 
7584
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7585
    public enum _Fields implements TFieldIdEnum {
7586
      SUCCESS((short)0, "success"),
7587
      EX((short)1, "ex");
7588
 
7589
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7590
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7591
 
7592
      static {
7593
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7594
          byId.put((int)field._thriftId, field);
7595
          byName.put(field.getFieldName(), field);
7596
        }
7597
      }
7598
 
7599
      /**
7600
       * Find the _Fields constant that matches fieldId, or null if its not found.
7601
       */
7602
      public static _Fields findByThriftId(int fieldId) {
7603
        return byId.get(fieldId);
7604
      }
7605
 
7606
      /**
7607
       * Find the _Fields constant that matches fieldId, throwing an exception
7608
       * if it is not found.
7609
       */
7610
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7611
        _Fields fields = findByThriftId(fieldId);
7612
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7613
        return fields;
7614
      }
7615
 
7616
      /**
7617
       * Find the _Fields constant that matches name, or null if its not found.
7618
       */
7619
      public static _Fields findByName(String name) {
7620
        return byName.get(name);
7621
      }
7622
 
7623
      private final short _thriftId;
7624
      private final String _fieldName;
7625
 
7626
      _Fields(short thriftId, String fieldName) {
7627
        _thriftId = thriftId;
7628
        _fieldName = fieldName;
7629
      }
7630
 
7631
      public short getThriftFieldId() {
7632
        return _thriftId;
7633
      }
7634
 
7635
      public String getFieldName() {
7636
        return _fieldName;
7637
      }
7638
    }
7639
 
7640
    // isset id assignments
7641
    private static final int __SUCCESS_ISSET_ID = 0;
7642
    private BitSet __isset_bit_vector = new BitSet(1);
7643
 
7644
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7645
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7646
          new FieldValueMetaData(TType.BOOL)));
7647
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7648
          new FieldValueMetaData(TType.STRUCT)));
7649
    }});
7650
 
7651
    static {
7652
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
7653
    }
7654
 
7655
    public changeTransactionStatus_result() {
7656
    }
7657
 
7658
    public changeTransactionStatus_result(
7659
      boolean success,
7660
      TransactionServiceException ex)
7661
    {
7662
      this();
7663
      this.success = success;
7664
      setSuccessIsSet(true);
7665
      this.ex = ex;
7666
    }
7667
 
7668
    /**
7669
     * Performs a deep copy on <i>other</i>.
7670
     */
7671
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
7672
      __isset_bit_vector.clear();
7673
      __isset_bit_vector.or(other.__isset_bit_vector);
7674
      this.success = other.success;
7675
      if (other.isSetEx()) {
7676
        this.ex = new TransactionServiceException(other.ex);
7677
      }
7678
    }
7679
 
7680
    public changeTransactionStatus_result deepCopy() {
7681
      return new changeTransactionStatus_result(this);
7682
    }
7683
 
7684
    @Deprecated
7685
    public changeTransactionStatus_result clone() {
7686
      return new changeTransactionStatus_result(this);
7687
    }
7688
 
7689
    public boolean isSuccess() {
7690
      return this.success;
7691
    }
7692
 
7693
    public changeTransactionStatus_result setSuccess(boolean success) {
7694
      this.success = success;
7695
      setSuccessIsSet(true);
7696
      return this;
7697
    }
7698
 
7699
    public void unsetSuccess() {
7700
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7701
    }
7702
 
7703
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7704
    public boolean isSetSuccess() {
7705
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7706
    }
7707
 
7708
    public void setSuccessIsSet(boolean value) {
7709
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7710
    }
7711
 
7712
    public TransactionServiceException getEx() {
7713
      return this.ex;
7714
    }
7715
 
7716
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
7717
      this.ex = ex;
7718
      return this;
7719
    }
7720
 
7721
    public void unsetEx() {
7722
      this.ex = null;
7723
    }
7724
 
7725
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7726
    public boolean isSetEx() {
7727
      return this.ex != null;
7728
    }
7729
 
7730
    public void setExIsSet(boolean value) {
7731
      if (!value) {
7732
        this.ex = null;
7733
      }
7734
    }
7735
 
7736
    public void setFieldValue(_Fields field, Object value) {
7737
      switch (field) {
7738
      case SUCCESS:
7739
        if (value == null) {
7740
          unsetSuccess();
7741
        } else {
7742
          setSuccess((Boolean)value);
7743
        }
7744
        break;
7745
 
7746
      case EX:
7747
        if (value == null) {
7748
          unsetEx();
7749
        } else {
7750
          setEx((TransactionServiceException)value);
7751
        }
7752
        break;
7753
 
7754
      }
7755
    }
7756
 
7757
    public void setFieldValue(int fieldID, Object value) {
7758
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7759
    }
7760
 
7761
    public Object getFieldValue(_Fields field) {
7762
      switch (field) {
7763
      case SUCCESS:
7764
        return new Boolean(isSuccess());
7765
 
7766
      case EX:
7767
        return getEx();
7768
 
7769
      }
7770
      throw new IllegalStateException();
7771
    }
7772
 
7773
    public Object getFieldValue(int fieldId) {
7774
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7775
    }
7776
 
7777
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7778
    public boolean isSet(_Fields field) {
7779
      switch (field) {
7780
      case SUCCESS:
7781
        return isSetSuccess();
7782
      case EX:
7783
        return isSetEx();
7784
      }
7785
      throw new IllegalStateException();
7786
    }
7787
 
7788
    public boolean isSet(int fieldID) {
7789
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7790
    }
7791
 
7792
    @Override
7793
    public boolean equals(Object that) {
7794
      if (that == null)
7795
        return false;
7796
      if (that instanceof changeTransactionStatus_result)
7797
        return this.equals((changeTransactionStatus_result)that);
7798
      return false;
7799
    }
7800
 
7801
    public boolean equals(changeTransactionStatus_result that) {
7802
      if (that == null)
7803
        return false;
7804
 
7805
      boolean this_present_success = true;
7806
      boolean that_present_success = true;
7807
      if (this_present_success || that_present_success) {
7808
        if (!(this_present_success && that_present_success))
7809
          return false;
7810
        if (this.success != that.success)
7811
          return false;
7812
      }
7813
 
7814
      boolean this_present_ex = true && this.isSetEx();
7815
      boolean that_present_ex = true && that.isSetEx();
7816
      if (this_present_ex || that_present_ex) {
7817
        if (!(this_present_ex && that_present_ex))
7818
          return false;
7819
        if (!this.ex.equals(that.ex))
7820
          return false;
7821
      }
7822
 
7823
      return true;
7824
    }
7825
 
7826
    @Override
7827
    public int hashCode() {
7828
      return 0;
7829
    }
7830
 
7831
    public int compareTo(changeTransactionStatus_result other) {
7832
      if (!getClass().equals(other.getClass())) {
7833
        return getClass().getName().compareTo(other.getClass().getName());
7834
      }
7835
 
7836
      int lastComparison = 0;
7837
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
7838
 
7839
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7840
      if (lastComparison != 0) {
7841
        return lastComparison;
7842
      }
7843
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7844
      if (lastComparison != 0) {
7845
        return lastComparison;
7846
      }
7847
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7848
      if (lastComparison != 0) {
7849
        return lastComparison;
7850
      }
7851
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7852
      if (lastComparison != 0) {
7853
        return lastComparison;
7854
      }
7855
      return 0;
7856
    }
7857
 
7858
    public void read(TProtocol iprot) throws TException {
7859
      TField field;
7860
      iprot.readStructBegin();
7861
      while (true)
7862
      {
7863
        field = iprot.readFieldBegin();
7864
        if (field.type == TType.STOP) { 
7865
          break;
7866
        }
7867
        _Fields fieldId = _Fields.findByThriftId(field.id);
7868
        if (fieldId == null) {
7869
          TProtocolUtil.skip(iprot, field.type);
7870
        } else {
7871
          switch (fieldId) {
7872
            case SUCCESS:
7873
              if (field.type == TType.BOOL) {
7874
                this.success = iprot.readBool();
7875
                setSuccessIsSet(true);
7876
              } else { 
7877
                TProtocolUtil.skip(iprot, field.type);
7878
              }
7879
              break;
7880
            case EX:
7881
              if (field.type == TType.STRUCT) {
7882
                this.ex = new TransactionServiceException();
7883
                this.ex.read(iprot);
7884
              } else { 
7885
                TProtocolUtil.skip(iprot, field.type);
7886
              }
7887
              break;
7888
          }
7889
          iprot.readFieldEnd();
7890
        }
7891
      }
7892
      iprot.readStructEnd();
7893
      validate();
7894
    }
7895
 
7896
    public void write(TProtocol oprot) throws TException {
7897
      oprot.writeStructBegin(STRUCT_DESC);
7898
 
7899
      if (this.isSetSuccess()) {
7900
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7901
        oprot.writeBool(this.success);
7902
        oprot.writeFieldEnd();
7903
      } else if (this.isSetEx()) {
7904
        oprot.writeFieldBegin(EX_FIELD_DESC);
7905
        this.ex.write(oprot);
7906
        oprot.writeFieldEnd();
7907
      }
7908
      oprot.writeFieldStop();
7909
      oprot.writeStructEnd();
7910
    }
7911
 
7912
    @Override
7913
    public String toString() {
7914
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7915
      boolean first = true;
7916
 
7917
      sb.append("success:");
7918
      sb.append(this.success);
7919
      first = false;
7920
      if (!first) sb.append(", ");
7921
      sb.append("ex:");
7922
      if (this.ex == null) {
7923
        sb.append("null");
7924
      } else {
7925
        sb.append(this.ex);
7926
      }
7927
      first = false;
7928
      sb.append(")");
7929
      return sb.toString();
7930
    }
7931
 
7932
    public void validate() throws TException {
7933
      // check for required fields
7934
    }
7935
 
7936
  }
7937
 
1398 varun.gupt 7938
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7939
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7940
 
7941
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7942
 
7943
    private long transactionId;
7944
 
7945
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7946
    public enum _Fields implements TFieldIdEnum {
7947
      TRANSACTION_ID((short)1, "transactionId");
7948
 
7949
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7950
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7951
 
7952
      static {
7953
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7954
          byId.put((int)field._thriftId, field);
7955
          byName.put(field.getFieldName(), field);
7956
        }
7957
      }
7958
 
7959
      /**
7960
       * Find the _Fields constant that matches fieldId, or null if its not found.
7961
       */
7962
      public static _Fields findByThriftId(int fieldId) {
7963
        return byId.get(fieldId);
7964
      }
7965
 
7966
      /**
7967
       * Find the _Fields constant that matches fieldId, throwing an exception
7968
       * if it is not found.
7969
       */
7970
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7971
        _Fields fields = findByThriftId(fieldId);
7972
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7973
        return fields;
7974
      }
7975
 
7976
      /**
7977
       * Find the _Fields constant that matches name, or null if its not found.
7978
       */
7979
      public static _Fields findByName(String name) {
7980
        return byName.get(name);
7981
      }
7982
 
7983
      private final short _thriftId;
7984
      private final String _fieldName;
7985
 
7986
      _Fields(short thriftId, String fieldName) {
7987
        _thriftId = thriftId;
7988
        _fieldName = fieldName;
7989
      }
7990
 
7991
      public short getThriftFieldId() {
7992
        return _thriftId;
7993
      }
7994
 
7995
      public String getFieldName() {
7996
        return _fieldName;
7997
      }
7998
    }
7999
 
8000
    // isset id assignments
8001
    private static final int __TRANSACTIONID_ISSET_ID = 0;
8002
    private BitSet __isset_bit_vector = new BitSet(1);
8003
 
8004
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8005
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
8006
          new FieldValueMetaData(TType.I64)));
8007
    }});
8008
 
8009
    static {
1398 varun.gupt 8010
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 8011
    }
8012
 
1398 varun.gupt 8013
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 8014
    }
8015
 
1398 varun.gupt 8016
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 8017
      long transactionId)
8018
    {
8019
      this();
8020
      this.transactionId = transactionId;
8021
      setTransactionIdIsSet(true);
8022
    }
8023
 
8024
    /**
8025
     * Performs a deep copy on <i>other</i>.
8026
     */
1398 varun.gupt 8027
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 8028
      __isset_bit_vector.clear();
8029
      __isset_bit_vector.or(other.__isset_bit_vector);
8030
      this.transactionId = other.transactionId;
8031
    }
8032
 
1398 varun.gupt 8033
    public enqueueTransactionInfoEmail_args deepCopy() {
8034
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 8035
    }
8036
 
8037
    @Deprecated
1398 varun.gupt 8038
    public enqueueTransactionInfoEmail_args clone() {
8039
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 8040
    }
8041
 
8042
    public long getTransactionId() {
8043
      return this.transactionId;
8044
    }
8045
 
1398 varun.gupt 8046
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 8047
      this.transactionId = transactionId;
8048
      setTransactionIdIsSet(true);
8049
      return this;
8050
    }
8051
 
8052
    public void unsetTransactionId() {
8053
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
8054
    }
8055
 
8056
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
8057
    public boolean isSetTransactionId() {
8058
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
8059
    }
8060
 
8061
    public void setTransactionIdIsSet(boolean value) {
8062
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
8063
    }
8064
 
8065
    public void setFieldValue(_Fields field, Object value) {
8066
      switch (field) {
8067
      case TRANSACTION_ID:
8068
        if (value == null) {
8069
          unsetTransactionId();
8070
        } else {
8071
          setTransactionId((Long)value);
8072
        }
8073
        break;
8074
 
8075
      }
8076
    }
8077
 
8078
    public void setFieldValue(int fieldID, Object value) {
8079
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8080
    }
8081
 
8082
    public Object getFieldValue(_Fields field) {
8083
      switch (field) {
8084
      case TRANSACTION_ID:
8085
        return new Long(getTransactionId());
8086
 
8087
      }
8088
      throw new IllegalStateException();
8089
    }
8090
 
8091
    public Object getFieldValue(int fieldId) {
8092
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8093
    }
8094
 
8095
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8096
    public boolean isSet(_Fields field) {
8097
      switch (field) {
8098
      case TRANSACTION_ID:
8099
        return isSetTransactionId();
8100
      }
8101
      throw new IllegalStateException();
8102
    }
8103
 
8104
    public boolean isSet(int fieldID) {
8105
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8106
    }
8107
 
8108
    @Override
8109
    public boolean equals(Object that) {
8110
      if (that == null)
8111
        return false;
1398 varun.gupt 8112
      if (that instanceof enqueueTransactionInfoEmail_args)
8113
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 8114
      return false;
8115
    }
8116
 
1398 varun.gupt 8117
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 8118
      if (that == null)
8119
        return false;
8120
 
8121
      boolean this_present_transactionId = true;
8122
      boolean that_present_transactionId = true;
8123
      if (this_present_transactionId || that_present_transactionId) {
8124
        if (!(this_present_transactionId && that_present_transactionId))
8125
          return false;
8126
        if (this.transactionId != that.transactionId)
8127
          return false;
8128
      }
8129
 
8130
      return true;
8131
    }
8132
 
8133
    @Override
8134
    public int hashCode() {
8135
      return 0;
8136
    }
8137
 
1398 varun.gupt 8138
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 8139
      if (!getClass().equals(other.getClass())) {
8140
        return getClass().getName().compareTo(other.getClass().getName());
8141
      }
8142
 
8143
      int lastComparison = 0;
1398 varun.gupt 8144
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 8145
 
8146
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
8147
      if (lastComparison != 0) {
8148
        return lastComparison;
8149
      }
8150
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
8151
      if (lastComparison != 0) {
8152
        return lastComparison;
8153
      }
8154
      return 0;
8155
    }
8156
 
8157
    public void read(TProtocol iprot) throws TException {
8158
      TField field;
8159
      iprot.readStructBegin();
8160
      while (true)
8161
      {
8162
        field = iprot.readFieldBegin();
8163
        if (field.type == TType.STOP) { 
8164
          break;
8165
        }
8166
        _Fields fieldId = _Fields.findByThriftId(field.id);
8167
        if (fieldId == null) {
8168
          TProtocolUtil.skip(iprot, field.type);
8169
        } else {
8170
          switch (fieldId) {
8171
            case TRANSACTION_ID:
8172
              if (field.type == TType.I64) {
8173
                this.transactionId = iprot.readI64();
8174
                setTransactionIdIsSet(true);
8175
              } else { 
8176
                TProtocolUtil.skip(iprot, field.type);
8177
              }
8178
              break;
8179
          }
8180
          iprot.readFieldEnd();
8181
        }
8182
      }
8183
      iprot.readStructEnd();
8184
      validate();
8185
    }
8186
 
8187
    public void write(TProtocol oprot) throws TException {
8188
      validate();
8189
 
8190
      oprot.writeStructBegin(STRUCT_DESC);
8191
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
8192
      oprot.writeI64(this.transactionId);
8193
      oprot.writeFieldEnd();
8194
      oprot.writeFieldStop();
8195
      oprot.writeStructEnd();
8196
    }
8197
 
8198
    @Override
8199
    public String toString() {
1398 varun.gupt 8200
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 8201
      boolean first = true;
8202
 
8203
      sb.append("transactionId:");
8204
      sb.append(this.transactionId);
8205
      first = false;
8206
      sb.append(")");
8207
      return sb.toString();
8208
    }
8209
 
8210
    public void validate() throws TException {
8211
      // check for required fields
8212
    }
8213
 
8214
  }
8215
 
1398 varun.gupt 8216
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
8217
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 8218
 
8219
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8220
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8221
 
8222
    private boolean success;
8223
    private TransactionServiceException ex;
8224
 
8225
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8226
    public enum _Fields implements TFieldIdEnum {
8227
      SUCCESS((short)0, "success"),
8228
      EX((short)1, "ex");
8229
 
8230
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8231
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8232
 
8233
      static {
8234
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8235
          byId.put((int)field._thriftId, field);
8236
          byName.put(field.getFieldName(), field);
8237
        }
8238
      }
8239
 
8240
      /**
8241
       * Find the _Fields constant that matches fieldId, or null if its not found.
8242
       */
8243
      public static _Fields findByThriftId(int fieldId) {
8244
        return byId.get(fieldId);
8245
      }
8246
 
8247
      /**
8248
       * Find the _Fields constant that matches fieldId, throwing an exception
8249
       * if it is not found.
8250
       */
8251
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8252
        _Fields fields = findByThriftId(fieldId);
8253
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8254
        return fields;
8255
      }
8256
 
8257
      /**
8258
       * Find the _Fields constant that matches name, or null if its not found.
8259
       */
8260
      public static _Fields findByName(String name) {
8261
        return byName.get(name);
8262
      }
8263
 
8264
      private final short _thriftId;
8265
      private final String _fieldName;
8266
 
8267
      _Fields(short thriftId, String fieldName) {
8268
        _thriftId = thriftId;
8269
        _fieldName = fieldName;
8270
      }
8271
 
8272
      public short getThriftFieldId() {
8273
        return _thriftId;
8274
      }
8275
 
8276
      public String getFieldName() {
8277
        return _fieldName;
8278
      }
8279
    }
8280
 
8281
    // isset id assignments
8282
    private static final int __SUCCESS_ISSET_ID = 0;
8283
    private BitSet __isset_bit_vector = new BitSet(1);
8284
 
8285
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8286
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8287
          new FieldValueMetaData(TType.BOOL)));
8288
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8289
          new FieldValueMetaData(TType.STRUCT)));
8290
    }});
8291
 
8292
    static {
1398 varun.gupt 8293
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 8294
    }
8295
 
1398 varun.gupt 8296
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 8297
    }
8298
 
1398 varun.gupt 8299
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 8300
      boolean success,
8301
      TransactionServiceException ex)
8302
    {
8303
      this();
8304
      this.success = success;
8305
      setSuccessIsSet(true);
8306
      this.ex = ex;
8307
    }
8308
 
8309
    /**
8310
     * Performs a deep copy on <i>other</i>.
8311
     */
1398 varun.gupt 8312
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 8313
      __isset_bit_vector.clear();
8314
      __isset_bit_vector.or(other.__isset_bit_vector);
8315
      this.success = other.success;
8316
      if (other.isSetEx()) {
8317
        this.ex = new TransactionServiceException(other.ex);
8318
      }
8319
    }
8320
 
1398 varun.gupt 8321
    public enqueueTransactionInfoEmail_result deepCopy() {
8322
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8323
    }
8324
 
8325
    @Deprecated
1398 varun.gupt 8326
    public enqueueTransactionInfoEmail_result clone() {
8327
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8328
    }
8329
 
8330
    public boolean isSuccess() {
8331
      return this.success;
8332
    }
8333
 
1398 varun.gupt 8334
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 8335
      this.success = success;
8336
      setSuccessIsSet(true);
8337
      return this;
8338
    }
8339
 
8340
    public void unsetSuccess() {
8341
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8342
    }
8343
 
8344
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8345
    public boolean isSetSuccess() {
8346
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8347
    }
8348
 
8349
    public void setSuccessIsSet(boolean value) {
8350
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8351
    }
8352
 
8353
    public TransactionServiceException getEx() {
8354
      return this.ex;
8355
    }
8356
 
1398 varun.gupt 8357
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 8358
      this.ex = ex;
8359
      return this;
8360
    }
8361
 
8362
    public void unsetEx() {
8363
      this.ex = null;
8364
    }
8365
 
8366
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8367
    public boolean isSetEx() {
8368
      return this.ex != null;
8369
    }
8370
 
8371
    public void setExIsSet(boolean value) {
8372
      if (!value) {
8373
        this.ex = null;
8374
      }
8375
    }
8376
 
8377
    public void setFieldValue(_Fields field, Object value) {
8378
      switch (field) {
8379
      case SUCCESS:
8380
        if (value == null) {
8381
          unsetSuccess();
8382
        } else {
8383
          setSuccess((Boolean)value);
8384
        }
8385
        break;
8386
 
8387
      case EX:
8388
        if (value == null) {
8389
          unsetEx();
8390
        } else {
8391
          setEx((TransactionServiceException)value);
8392
        }
8393
        break;
8394
 
8395
      }
8396
    }
8397
 
8398
    public void setFieldValue(int fieldID, Object value) {
8399
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8400
    }
8401
 
8402
    public Object getFieldValue(_Fields field) {
8403
      switch (field) {
8404
      case SUCCESS:
8405
        return new Boolean(isSuccess());
8406
 
8407
      case EX:
8408
        return getEx();
8409
 
8410
      }
8411
      throw new IllegalStateException();
8412
    }
8413
 
8414
    public Object getFieldValue(int fieldId) {
8415
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8416
    }
8417
 
8418
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8419
    public boolean isSet(_Fields field) {
8420
      switch (field) {
8421
      case SUCCESS:
8422
        return isSetSuccess();
8423
      case EX:
8424
        return isSetEx();
8425
      }
8426
      throw new IllegalStateException();
8427
    }
8428
 
8429
    public boolean isSet(int fieldID) {
8430
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8431
    }
8432
 
8433
    @Override
8434
    public boolean equals(Object that) {
8435
      if (that == null)
8436
        return false;
1398 varun.gupt 8437
      if (that instanceof enqueueTransactionInfoEmail_result)
8438
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 8439
      return false;
8440
    }
8441
 
1398 varun.gupt 8442
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 8443
      if (that == null)
8444
        return false;
8445
 
8446
      boolean this_present_success = true;
8447
      boolean that_present_success = true;
8448
      if (this_present_success || that_present_success) {
8449
        if (!(this_present_success && that_present_success))
8450
          return false;
8451
        if (this.success != that.success)
8452
          return false;
8453
      }
8454
 
8455
      boolean this_present_ex = true && this.isSetEx();
8456
      boolean that_present_ex = true && that.isSetEx();
8457
      if (this_present_ex || that_present_ex) {
8458
        if (!(this_present_ex && that_present_ex))
8459
          return false;
8460
        if (!this.ex.equals(that.ex))
8461
          return false;
8462
      }
8463
 
8464
      return true;
8465
    }
8466
 
8467
    @Override
8468
    public int hashCode() {
8469
      return 0;
8470
    }
8471
 
1398 varun.gupt 8472
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 8473
      if (!getClass().equals(other.getClass())) {
8474
        return getClass().getName().compareTo(other.getClass().getName());
8475
      }
8476
 
8477
      int lastComparison = 0;
1398 varun.gupt 8478
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 8479
 
8480
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8481
      if (lastComparison != 0) {
8482
        return lastComparison;
8483
      }
8484
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8485
      if (lastComparison != 0) {
8486
        return lastComparison;
8487
      }
8488
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8489
      if (lastComparison != 0) {
8490
        return lastComparison;
8491
      }
8492
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8493
      if (lastComparison != 0) {
8494
        return lastComparison;
8495
      }
8496
      return 0;
8497
    }
8498
 
8499
    public void read(TProtocol iprot) throws TException {
8500
      TField field;
8501
      iprot.readStructBegin();
8502
      while (true)
8503
      {
8504
        field = iprot.readFieldBegin();
8505
        if (field.type == TType.STOP) { 
8506
          break;
8507
        }
8508
        _Fields fieldId = _Fields.findByThriftId(field.id);
8509
        if (fieldId == null) {
8510
          TProtocolUtil.skip(iprot, field.type);
8511
        } else {
8512
          switch (fieldId) {
8513
            case SUCCESS:
8514
              if (field.type == TType.BOOL) {
8515
                this.success = iprot.readBool();
8516
                setSuccessIsSet(true);
8517
              } else { 
8518
                TProtocolUtil.skip(iprot, field.type);
8519
              }
8520
              break;
8521
            case EX:
8522
              if (field.type == TType.STRUCT) {
8523
                this.ex = new TransactionServiceException();
8524
                this.ex.read(iprot);
8525
              } else { 
8526
                TProtocolUtil.skip(iprot, field.type);
8527
              }
8528
              break;
8529
          }
8530
          iprot.readFieldEnd();
8531
        }
8532
      }
8533
      iprot.readStructEnd();
8534
      validate();
8535
    }
8536
 
8537
    public void write(TProtocol oprot) throws TException {
8538
      oprot.writeStructBegin(STRUCT_DESC);
8539
 
8540
      if (this.isSetSuccess()) {
8541
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8542
        oprot.writeBool(this.success);
8543
        oprot.writeFieldEnd();
8544
      } else if (this.isSetEx()) {
8545
        oprot.writeFieldBegin(EX_FIELD_DESC);
8546
        this.ex.write(oprot);
8547
        oprot.writeFieldEnd();
8548
      }
8549
      oprot.writeFieldStop();
8550
      oprot.writeStructEnd();
8551
    }
8552
 
8553
    @Override
8554
    public String toString() {
1398 varun.gupt 8555
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 8556
      boolean first = true;
8557
 
8558
      sb.append("success:");
8559
      sb.append(this.success);
8560
      first = false;
8561
      if (!first) sb.append(", ");
8562
      sb.append("ex:");
8563
      if (this.ex == null) {
8564
        sb.append("null");
8565
      } else {
8566
        sb.append(this.ex);
8567
      }
8568
      first = false;
8569
      sb.append(")");
8570
      return sb.toString();
8571
    }
8572
 
8573
    public void validate() throws TException {
8574
      // check for required fields
8575
    }
8576
 
8577
  }
8578
 
483 rajveer 8579
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
8580
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 8581
 
483 rajveer 8582
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8583
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
8584
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
8585
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 8586
 
483 rajveer 8587
    private OrderStatus status;
8588
    private long from_date;
8589
    private long to_date;
8590
    private long warehouse_id;
68 ashish 8591
 
8592
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8593
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8594
      /**
8595
       * 
8596
       * @see OrderStatus
8597
       */
8598
      STATUS((short)1, "status"),
8599
      FROM_DATE((short)2, "from_date"),
8600
      TO_DATE((short)3, "to_date"),
8601
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 8602
 
8603
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8604
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8605
 
8606
      static {
8607
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8608
          byId.put((int)field._thriftId, field);
8609
          byName.put(field.getFieldName(), field);
8610
        }
8611
      }
8612
 
8613
      /**
8614
       * Find the _Fields constant that matches fieldId, or null if its not found.
8615
       */
8616
      public static _Fields findByThriftId(int fieldId) {
8617
        return byId.get(fieldId);
8618
      }
8619
 
8620
      /**
8621
       * Find the _Fields constant that matches fieldId, throwing an exception
8622
       * if it is not found.
8623
       */
8624
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8625
        _Fields fields = findByThriftId(fieldId);
8626
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8627
        return fields;
8628
      }
8629
 
8630
      /**
8631
       * Find the _Fields constant that matches name, or null if its not found.
8632
       */
8633
      public static _Fields findByName(String name) {
8634
        return byName.get(name);
8635
      }
8636
 
8637
      private final short _thriftId;
8638
      private final String _fieldName;
8639
 
8640
      _Fields(short thriftId, String fieldName) {
8641
        _thriftId = thriftId;
8642
        _fieldName = fieldName;
8643
      }
8644
 
8645
      public short getThriftFieldId() {
8646
        return _thriftId;
8647
      }
8648
 
8649
      public String getFieldName() {
8650
        return _fieldName;
8651
      }
8652
    }
8653
 
8654
    // isset id assignments
483 rajveer 8655
    private static final int __FROM_DATE_ISSET_ID = 0;
8656
    private static final int __TO_DATE_ISSET_ID = 1;
8657
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8658
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 8659
 
8660
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8661
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8662
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8663
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 8664
          new FieldValueMetaData(TType.I64)));
483 rajveer 8665
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
8666
          new FieldValueMetaData(TType.I64)));
8667
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8668
          new FieldValueMetaData(TType.I64)));
68 ashish 8669
    }});
8670
 
8671
    static {
483 rajveer 8672
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 8673
    }
8674
 
483 rajveer 8675
    public getAllOrders_args() {
68 ashish 8676
    }
8677
 
483 rajveer 8678
    public getAllOrders_args(
8679
      OrderStatus status,
8680
      long from_date,
8681
      long to_date,
8682
      long warehouse_id)
68 ashish 8683
    {
8684
      this();
483 rajveer 8685
      this.status = status;
8686
      this.from_date = from_date;
8687
      setFrom_dateIsSet(true);
8688
      this.to_date = to_date;
8689
      setTo_dateIsSet(true);
8690
      this.warehouse_id = warehouse_id;
8691
      setWarehouse_idIsSet(true);
68 ashish 8692
    }
8693
 
8694
    /**
8695
     * Performs a deep copy on <i>other</i>.
8696
     */
483 rajveer 8697
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 8698
      __isset_bit_vector.clear();
8699
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8700
      if (other.isSetStatus()) {
8701
        this.status = other.status;
8702
      }
8703
      this.from_date = other.from_date;
8704
      this.to_date = other.to_date;
8705
      this.warehouse_id = other.warehouse_id;
68 ashish 8706
    }
8707
 
483 rajveer 8708
    public getAllOrders_args deepCopy() {
8709
      return new getAllOrders_args(this);
68 ashish 8710
    }
8711
 
8712
    @Deprecated
483 rajveer 8713
    public getAllOrders_args clone() {
8714
      return new getAllOrders_args(this);
68 ashish 8715
    }
8716
 
483 rajveer 8717
    /**
8718
     * 
8719
     * @see OrderStatus
8720
     */
8721
    public OrderStatus getStatus() {
8722
      return this.status;
68 ashish 8723
    }
8724
 
483 rajveer 8725
    /**
8726
     * 
8727
     * @see OrderStatus
8728
     */
8729
    public getAllOrders_args setStatus(OrderStatus status) {
8730
      this.status = status;
68 ashish 8731
      return this;
8732
    }
8733
 
483 rajveer 8734
    public void unsetStatus() {
8735
      this.status = null;
68 ashish 8736
    }
8737
 
483 rajveer 8738
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8739
    public boolean isSetStatus() {
8740
      return this.status != null;
68 ashish 8741
    }
8742
 
483 rajveer 8743
    public void setStatusIsSet(boolean value) {
8744
      if (!value) {
8745
        this.status = null;
68 ashish 8746
      }
8747
    }
8748
 
483 rajveer 8749
    public long getFrom_date() {
8750
      return this.from_date;
68 ashish 8751
    }
8752
 
483 rajveer 8753
    public getAllOrders_args setFrom_date(long from_date) {
8754
      this.from_date = from_date;
8755
      setFrom_dateIsSet(true);
8756
      return this;
68 ashish 8757
    }
8758
 
483 rajveer 8759
    public void unsetFrom_date() {
8760
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 8761
    }
8762
 
483 rajveer 8763
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
8764
    public boolean isSetFrom_date() {
8765
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 8766
    }
8767
 
483 rajveer 8768
    public void setFrom_dateIsSet(boolean value) {
8769
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 8770
    }
8771
 
483 rajveer 8772
    public long getTo_date() {
8773
      return this.to_date;
68 ashish 8774
    }
8775
 
483 rajveer 8776
    public getAllOrders_args setTo_date(long to_date) {
8777
      this.to_date = to_date;
8778
      setTo_dateIsSet(true);
68 ashish 8779
      return this;
8780
    }
8781
 
483 rajveer 8782
    public void unsetTo_date() {
8783
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 8784
    }
8785
 
483 rajveer 8786
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
8787
    public boolean isSetTo_date() {
8788
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 8789
    }
8790
 
483 rajveer 8791
    public void setTo_dateIsSet(boolean value) {
8792
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 8793
    }
8794
 
483 rajveer 8795
    public long getWarehouse_id() {
8796
      return this.warehouse_id;
68 ashish 8797
    }
8798
 
483 rajveer 8799
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
8800
      this.warehouse_id = warehouse_id;
8801
      setWarehouse_idIsSet(true);
68 ashish 8802
      return this;
8803
    }
8804
 
483 rajveer 8805
    public void unsetWarehouse_id() {
8806
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8807
    }
8808
 
483 rajveer 8809
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8810
    public boolean isSetWarehouse_id() {
8811
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8812
    }
8813
 
483 rajveer 8814
    public void setWarehouse_idIsSet(boolean value) {
8815
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 8816
    }
8817
 
8818
    public void setFieldValue(_Fields field, Object value) {
8819
      switch (field) {
483 rajveer 8820
      case STATUS:
68 ashish 8821
        if (value == null) {
483 rajveer 8822
          unsetStatus();
68 ashish 8823
        } else {
483 rajveer 8824
          setStatus((OrderStatus)value);
68 ashish 8825
        }
8826
        break;
8827
 
483 rajveer 8828
      case FROM_DATE:
68 ashish 8829
        if (value == null) {
483 rajveer 8830
          unsetFrom_date();
68 ashish 8831
        } else {
483 rajveer 8832
          setFrom_date((Long)value);
68 ashish 8833
        }
8834
        break;
8835
 
483 rajveer 8836
      case TO_DATE:
8837
        if (value == null) {
8838
          unsetTo_date();
8839
        } else {
8840
          setTo_date((Long)value);
8841
        }
8842
        break;
8843
 
8844
      case WAREHOUSE_ID:
8845
        if (value == null) {
8846
          unsetWarehouse_id();
8847
        } else {
8848
          setWarehouse_id((Long)value);
8849
        }
8850
        break;
8851
 
68 ashish 8852
      }
8853
    }
8854
 
8855
    public void setFieldValue(int fieldID, Object value) {
8856
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8857
    }
8858
 
8859
    public Object getFieldValue(_Fields field) {
8860
      switch (field) {
483 rajveer 8861
      case STATUS:
8862
        return getStatus();
68 ashish 8863
 
483 rajveer 8864
      case FROM_DATE:
8865
        return new Long(getFrom_date());
68 ashish 8866
 
483 rajveer 8867
      case TO_DATE:
8868
        return new Long(getTo_date());
8869
 
8870
      case WAREHOUSE_ID:
8871
        return new Long(getWarehouse_id());
8872
 
68 ashish 8873
      }
8874
      throw new IllegalStateException();
8875
    }
8876
 
8877
    public Object getFieldValue(int fieldId) {
8878
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8879
    }
8880
 
8881
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8882
    public boolean isSet(_Fields field) {
8883
      switch (field) {
483 rajveer 8884
      case STATUS:
8885
        return isSetStatus();
8886
      case FROM_DATE:
8887
        return isSetFrom_date();
8888
      case TO_DATE:
8889
        return isSetTo_date();
8890
      case WAREHOUSE_ID:
8891
        return isSetWarehouse_id();
68 ashish 8892
      }
8893
      throw new IllegalStateException();
8894
    }
8895
 
8896
    public boolean isSet(int fieldID) {
8897
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8898
    }
8899
 
8900
    @Override
8901
    public boolean equals(Object that) {
8902
      if (that == null)
8903
        return false;
483 rajveer 8904
      if (that instanceof getAllOrders_args)
8905
        return this.equals((getAllOrders_args)that);
68 ashish 8906
      return false;
8907
    }
8908
 
483 rajveer 8909
    public boolean equals(getAllOrders_args that) {
68 ashish 8910
      if (that == null)
8911
        return false;
8912
 
483 rajveer 8913
      boolean this_present_status = true && this.isSetStatus();
8914
      boolean that_present_status = true && that.isSetStatus();
8915
      if (this_present_status || that_present_status) {
8916
        if (!(this_present_status && that_present_status))
68 ashish 8917
          return false;
483 rajveer 8918
        if (!this.status.equals(that.status))
68 ashish 8919
          return false;
8920
      }
8921
 
483 rajveer 8922
      boolean this_present_from_date = true;
8923
      boolean that_present_from_date = true;
8924
      if (this_present_from_date || that_present_from_date) {
8925
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8926
          return false;
483 rajveer 8927
        if (this.from_date != that.from_date)
68 ashish 8928
          return false;
8929
      }
8930
 
483 rajveer 8931
      boolean this_present_to_date = true;
8932
      boolean that_present_to_date = true;
8933
      if (this_present_to_date || that_present_to_date) {
8934
        if (!(this_present_to_date && that_present_to_date))
8935
          return false;
8936
        if (this.to_date != that.to_date)
8937
          return false;
68 ashish 8938
      }
8939
 
483 rajveer 8940
      boolean this_present_warehouse_id = true;
8941
      boolean that_present_warehouse_id = true;
8942
      if (this_present_warehouse_id || that_present_warehouse_id) {
8943
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8944
          return false;
483 rajveer 8945
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8946
          return false;
8947
      }
8948
 
8949
      return true;
8950
    }
8951
 
8952
    @Override
8953
    public int hashCode() {
8954
      return 0;
8955
    }
8956
 
483 rajveer 8957
    public int compareTo(getAllOrders_args other) {
68 ashish 8958
      if (!getClass().equals(other.getClass())) {
8959
        return getClass().getName().compareTo(other.getClass().getName());
8960
      }
8961
 
8962
      int lastComparison = 0;
483 rajveer 8963
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8964
 
483 rajveer 8965
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8966
      if (lastComparison != 0) {
8967
        return lastComparison;
8968
      }
483 rajveer 8969
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8970
      if (lastComparison != 0) {
8971
        return lastComparison;
8972
      }
483 rajveer 8973
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8974
      if (lastComparison != 0) {
8975
        return lastComparison;
8976
      }
8977
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8978
      if (lastComparison != 0) {
8979
        return lastComparison;
8980
      }
8981
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8982
      if (lastComparison != 0) {
8983
        return lastComparison;
8984
      }
8985
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8986
      if (lastComparison != 0) {
8987
        return lastComparison;
8988
      }
8989
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8990
      if (lastComparison != 0) {
8991
        return lastComparison;
8992
      }
8993
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8994
      if (lastComparison != 0) {
8995
        return lastComparison;
8996
      }
68 ashish 8997
      return 0;
8998
    }
8999
 
9000
    public void read(TProtocol iprot) throws TException {
9001
      TField field;
9002
      iprot.readStructBegin();
9003
      while (true)
9004
      {
9005
        field = iprot.readFieldBegin();
9006
        if (field.type == TType.STOP) { 
9007
          break;
9008
        }
9009
        _Fields fieldId = _Fields.findByThriftId(field.id);
9010
        if (fieldId == null) {
9011
          TProtocolUtil.skip(iprot, field.type);
9012
        } else {
9013
          switch (fieldId) {
483 rajveer 9014
            case STATUS:
9015
              if (field.type == TType.I32) {
9016
                this.status = OrderStatus.findByValue(iprot.readI32());
9017
              } else { 
9018
                TProtocolUtil.skip(iprot, field.type);
9019
              }
9020
              break;
9021
            case FROM_DATE:
68 ashish 9022
              if (field.type == TType.I64) {
483 rajveer 9023
                this.from_date = iprot.readI64();
9024
                setFrom_dateIsSet(true);
68 ashish 9025
              } else { 
9026
                TProtocolUtil.skip(iprot, field.type);
9027
              }
9028
              break;
483 rajveer 9029
            case TO_DATE:
9030
              if (field.type == TType.I64) {
9031
                this.to_date = iprot.readI64();
9032
                setTo_dateIsSet(true);
9033
              } else { 
9034
                TProtocolUtil.skip(iprot, field.type);
9035
              }
9036
              break;
9037
            case WAREHOUSE_ID:
9038
              if (field.type == TType.I64) {
9039
                this.warehouse_id = iprot.readI64();
9040
                setWarehouse_idIsSet(true);
9041
              } else { 
9042
                TProtocolUtil.skip(iprot, field.type);
9043
              }
9044
              break;
68 ashish 9045
          }
9046
          iprot.readFieldEnd();
9047
        }
9048
      }
9049
      iprot.readStructEnd();
9050
      validate();
9051
    }
9052
 
9053
    public void write(TProtocol oprot) throws TException {
9054
      validate();
9055
 
9056
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 9057
      if (this.status != null) {
9058
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9059
        oprot.writeI32(this.status.getValue());
9060
        oprot.writeFieldEnd();
9061
      }
9062
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
9063
      oprot.writeI64(this.from_date);
68 ashish 9064
      oprot.writeFieldEnd();
483 rajveer 9065
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
9066
      oprot.writeI64(this.to_date);
9067
      oprot.writeFieldEnd();
9068
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9069
      oprot.writeI64(this.warehouse_id);
9070
      oprot.writeFieldEnd();
68 ashish 9071
      oprot.writeFieldStop();
9072
      oprot.writeStructEnd();
9073
    }
9074
 
9075
    @Override
9076
    public String toString() {
483 rajveer 9077
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 9078
      boolean first = true;
9079
 
483 rajveer 9080
      sb.append("status:");
9081
      if (this.status == null) {
9082
        sb.append("null");
9083
      } else {
9084
        String status_name = status.name();
9085
        if (status_name != null) {
9086
          sb.append(status_name);
9087
          sb.append(" (");
9088
        }
9089
        sb.append(this.status);
9090
        if (status_name != null) {
9091
          sb.append(")");
9092
        }
9093
      }
68 ashish 9094
      first = false;
483 rajveer 9095
      if (!first) sb.append(", ");
9096
      sb.append("from_date:");
9097
      sb.append(this.from_date);
9098
      first = false;
9099
      if (!first) sb.append(", ");
9100
      sb.append("to_date:");
9101
      sb.append(this.to_date);
9102
      first = false;
9103
      if (!first) sb.append(", ");
9104
      sb.append("warehouse_id:");
9105
      sb.append(this.warehouse_id);
9106
      first = false;
68 ashish 9107
      sb.append(")");
9108
      return sb.toString();
9109
    }
9110
 
9111
    public void validate() throws TException {
9112
      // check for required fields
9113
    }
9114
 
9115
  }
9116
 
483 rajveer 9117
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
9118
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 9119
 
483 rajveer 9120
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 9121
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9122
 
483 rajveer 9123
    private List<Order> success;
68 ashish 9124
    private TransactionServiceException ex;
9125
 
9126
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9127
    public enum _Fields implements TFieldIdEnum {
9128
      SUCCESS((short)0, "success"),
9129
      EX((short)1, "ex");
9130
 
9131
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9132
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9133
 
9134
      static {
9135
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9136
          byId.put((int)field._thriftId, field);
9137
          byName.put(field.getFieldName(), field);
9138
        }
9139
      }
9140
 
9141
      /**
9142
       * Find the _Fields constant that matches fieldId, or null if its not found.
9143
       */
9144
      public static _Fields findByThriftId(int fieldId) {
9145
        return byId.get(fieldId);
9146
      }
9147
 
9148
      /**
9149
       * Find the _Fields constant that matches fieldId, throwing an exception
9150
       * if it is not found.
9151
       */
9152
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9153
        _Fields fields = findByThriftId(fieldId);
9154
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9155
        return fields;
9156
      }
9157
 
9158
      /**
9159
       * Find the _Fields constant that matches name, or null if its not found.
9160
       */
9161
      public static _Fields findByName(String name) {
9162
        return byName.get(name);
9163
      }
9164
 
9165
      private final short _thriftId;
9166
      private final String _fieldName;
9167
 
9168
      _Fields(short thriftId, String fieldName) {
9169
        _thriftId = thriftId;
9170
        _fieldName = fieldName;
9171
      }
9172
 
9173
      public short getThriftFieldId() {
9174
        return _thriftId;
9175
      }
9176
 
9177
      public String getFieldName() {
9178
        return _fieldName;
9179
      }
9180
    }
9181
 
9182
    // isset id assignments
9183
 
9184
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9185
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 9186
          new ListMetaData(TType.LIST, 
9187
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 9188
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9189
          new FieldValueMetaData(TType.STRUCT)));
9190
    }});
9191
 
9192
    static {
483 rajveer 9193
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 9194
    }
9195
 
483 rajveer 9196
    public getAllOrders_result() {
68 ashish 9197
    }
9198
 
483 rajveer 9199
    public getAllOrders_result(
9200
      List<Order> success,
68 ashish 9201
      TransactionServiceException ex)
9202
    {
9203
      this();
9204
      this.success = success;
9205
      this.ex = ex;
9206
    }
9207
 
9208
    /**
9209
     * Performs a deep copy on <i>other</i>.
9210
     */
483 rajveer 9211
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 9212
      if (other.isSetSuccess()) {
483 rajveer 9213
        List<Order> __this__success = new ArrayList<Order>();
9214
        for (Order other_element : other.success) {
9215
          __this__success.add(new Order(other_element));
9216
        }
9217
        this.success = __this__success;
68 ashish 9218
      }
9219
      if (other.isSetEx()) {
9220
        this.ex = new TransactionServiceException(other.ex);
9221
      }
9222
    }
9223
 
483 rajveer 9224
    public getAllOrders_result deepCopy() {
9225
      return new getAllOrders_result(this);
68 ashish 9226
    }
9227
 
9228
    @Deprecated
483 rajveer 9229
    public getAllOrders_result clone() {
9230
      return new getAllOrders_result(this);
68 ashish 9231
    }
9232
 
483 rajveer 9233
    public int getSuccessSize() {
9234
      return (this.success == null) ? 0 : this.success.size();
9235
    }
9236
 
9237
    public java.util.Iterator<Order> getSuccessIterator() {
9238
      return (this.success == null) ? null : this.success.iterator();
9239
    }
9240
 
9241
    public void addToSuccess(Order elem) {
9242
      if (this.success == null) {
9243
        this.success = new ArrayList<Order>();
9244
      }
9245
      this.success.add(elem);
9246
    }
9247
 
9248
    public List<Order> getSuccess() {
68 ashish 9249
      return this.success;
9250
    }
9251
 
483 rajveer 9252
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 9253
      this.success = success;
9254
      return this;
9255
    }
9256
 
9257
    public void unsetSuccess() {
9258
      this.success = null;
9259
    }
9260
 
9261
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9262
    public boolean isSetSuccess() {
9263
      return this.success != null;
9264
    }
9265
 
9266
    public void setSuccessIsSet(boolean value) {
9267
      if (!value) {
9268
        this.success = null;
9269
      }
9270
    }
9271
 
9272
    public TransactionServiceException getEx() {
9273
      return this.ex;
9274
    }
9275
 
483 rajveer 9276
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 9277
      this.ex = ex;
9278
      return this;
9279
    }
9280
 
9281
    public void unsetEx() {
9282
      this.ex = null;
9283
    }
9284
 
9285
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9286
    public boolean isSetEx() {
9287
      return this.ex != null;
9288
    }
9289
 
9290
    public void setExIsSet(boolean value) {
9291
      if (!value) {
9292
        this.ex = null;
9293
      }
9294
    }
9295
 
9296
    public void setFieldValue(_Fields field, Object value) {
9297
      switch (field) {
9298
      case SUCCESS:
9299
        if (value == null) {
9300
          unsetSuccess();
9301
        } else {
483 rajveer 9302
          setSuccess((List<Order>)value);
68 ashish 9303
        }
9304
        break;
9305
 
9306
      case EX:
9307
        if (value == null) {
9308
          unsetEx();
9309
        } else {
9310
          setEx((TransactionServiceException)value);
9311
        }
9312
        break;
9313
 
9314
      }
9315
    }
9316
 
9317
    public void setFieldValue(int fieldID, Object value) {
9318
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9319
    }
9320
 
9321
    public Object getFieldValue(_Fields field) {
9322
      switch (field) {
9323
      case SUCCESS:
9324
        return getSuccess();
9325
 
9326
      case EX:
9327
        return getEx();
9328
 
9329
      }
9330
      throw new IllegalStateException();
9331
    }
9332
 
9333
    public Object getFieldValue(int fieldId) {
9334
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9335
    }
9336
 
9337
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9338
    public boolean isSet(_Fields field) {
9339
      switch (field) {
9340
      case SUCCESS:
9341
        return isSetSuccess();
9342
      case EX:
9343
        return isSetEx();
9344
      }
9345
      throw new IllegalStateException();
9346
    }
9347
 
9348
    public boolean isSet(int fieldID) {
9349
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9350
    }
9351
 
9352
    @Override
9353
    public boolean equals(Object that) {
9354
      if (that == null)
9355
        return false;
483 rajveer 9356
      if (that instanceof getAllOrders_result)
9357
        return this.equals((getAllOrders_result)that);
68 ashish 9358
      return false;
9359
    }
9360
 
483 rajveer 9361
    public boolean equals(getAllOrders_result that) {
68 ashish 9362
      if (that == null)
9363
        return false;
9364
 
9365
      boolean this_present_success = true && this.isSetSuccess();
9366
      boolean that_present_success = true && that.isSetSuccess();
9367
      if (this_present_success || that_present_success) {
9368
        if (!(this_present_success && that_present_success))
9369
          return false;
9370
        if (!this.success.equals(that.success))
9371
          return false;
9372
      }
9373
 
9374
      boolean this_present_ex = true && this.isSetEx();
9375
      boolean that_present_ex = true && that.isSetEx();
9376
      if (this_present_ex || that_present_ex) {
9377
        if (!(this_present_ex && that_present_ex))
9378
          return false;
9379
        if (!this.ex.equals(that.ex))
9380
          return false;
9381
      }
9382
 
9383
      return true;
9384
    }
9385
 
9386
    @Override
9387
    public int hashCode() {
9388
      return 0;
9389
    }
9390
 
483 rajveer 9391
    public int compareTo(getAllOrders_result other) {
9392
      if (!getClass().equals(other.getClass())) {
9393
        return getClass().getName().compareTo(other.getClass().getName());
9394
      }
9395
 
9396
      int lastComparison = 0;
9397
      getAllOrders_result typedOther = (getAllOrders_result)other;
9398
 
9399
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9400
      if (lastComparison != 0) {
9401
        return lastComparison;
9402
      }
9403
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9404
      if (lastComparison != 0) {
9405
        return lastComparison;
9406
      }
9407
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9408
      if (lastComparison != 0) {
9409
        return lastComparison;
9410
      }
9411
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9412
      if (lastComparison != 0) {
9413
        return lastComparison;
9414
      }
9415
      return 0;
9416
    }
9417
 
68 ashish 9418
    public void read(TProtocol iprot) throws TException {
9419
      TField field;
9420
      iprot.readStructBegin();
9421
      while (true)
9422
      {
9423
        field = iprot.readFieldBegin();
9424
        if (field.type == TType.STOP) { 
9425
          break;
9426
        }
9427
        _Fields fieldId = _Fields.findByThriftId(field.id);
9428
        if (fieldId == null) {
9429
          TProtocolUtil.skip(iprot, field.type);
9430
        } else {
9431
          switch (fieldId) {
9432
            case SUCCESS:
483 rajveer 9433
              if (field.type == TType.LIST) {
9434
                {
684 chandransh 9435
                  TList _list16 = iprot.readListBegin();
9436
                  this.success = new ArrayList<Order>(_list16.size);
9437
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 9438
                  {
684 chandransh 9439
                    Order _elem18;
9440
                    _elem18 = new Order();
9441
                    _elem18.read(iprot);
9442
                    this.success.add(_elem18);
483 rajveer 9443
                  }
9444
                  iprot.readListEnd();
9445
                }
68 ashish 9446
              } else { 
9447
                TProtocolUtil.skip(iprot, field.type);
9448
              }
9449
              break;
9450
            case EX:
9451
              if (field.type == TType.STRUCT) {
9452
                this.ex = new TransactionServiceException();
9453
                this.ex.read(iprot);
9454
              } else { 
9455
                TProtocolUtil.skip(iprot, field.type);
9456
              }
9457
              break;
9458
          }
9459
          iprot.readFieldEnd();
9460
        }
9461
      }
9462
      iprot.readStructEnd();
9463
      validate();
9464
    }
9465
 
9466
    public void write(TProtocol oprot) throws TException {
9467
      oprot.writeStructBegin(STRUCT_DESC);
9468
 
9469
      if (this.isSetSuccess()) {
9470
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 9471
        {
9472
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 9473
          for (Order _iter19 : this.success)
483 rajveer 9474
          {
684 chandransh 9475
            _iter19.write(oprot);
483 rajveer 9476
          }
9477
          oprot.writeListEnd();
9478
        }
68 ashish 9479
        oprot.writeFieldEnd();
9480
      } else if (this.isSetEx()) {
9481
        oprot.writeFieldBegin(EX_FIELD_DESC);
9482
        this.ex.write(oprot);
9483
        oprot.writeFieldEnd();
9484
      }
9485
      oprot.writeFieldStop();
9486
      oprot.writeStructEnd();
9487
    }
9488
 
9489
    @Override
9490
    public String toString() {
483 rajveer 9491
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 9492
      boolean first = true;
9493
 
9494
      sb.append("success:");
9495
      if (this.success == null) {
9496
        sb.append("null");
9497
      } else {
9498
        sb.append(this.success);
9499
      }
9500
      first = false;
9501
      if (!first) sb.append(", ");
9502
      sb.append("ex:");
9503
      if (this.ex == null) {
9504
        sb.append("null");
9505
      } else {
9506
        sb.append(this.ex);
9507
      }
9508
      first = false;
9509
      sb.append(")");
9510
      return sb.toString();
9511
    }
9512
 
9513
    public void validate() throws TException {
9514
      // check for required fields
9515
    }
9516
 
9517
  }
9518
 
1022 varun.gupt 9519
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
9520
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
9521
 
9522
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
9523
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
9524
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
9525
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
9526
 
9527
    private OrderStatus status;
9528
    private long start_billing_date;
9529
    private long end_billing_date;
9530
    private long warehouse_id;
9531
 
9532
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9533
    public enum _Fields implements TFieldIdEnum {
9534
      /**
9535
       * 
9536
       * @see OrderStatus
9537
       */
9538
      STATUS((short)1, "status"),
9539
      START_BILLING_DATE((short)2, "start_billing_date"),
9540
      END_BILLING_DATE((short)3, "end_billing_date"),
9541
      WAREHOUSE_ID((short)4, "warehouse_id");
9542
 
9543
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9544
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9545
 
9546
      static {
9547
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9548
          byId.put((int)field._thriftId, field);
9549
          byName.put(field.getFieldName(), field);
9550
        }
9551
      }
9552
 
9553
      /**
9554
       * Find the _Fields constant that matches fieldId, or null if its not found.
9555
       */
9556
      public static _Fields findByThriftId(int fieldId) {
9557
        return byId.get(fieldId);
9558
      }
9559
 
9560
      /**
9561
       * Find the _Fields constant that matches fieldId, throwing an exception
9562
       * if it is not found.
9563
       */
9564
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9565
        _Fields fields = findByThriftId(fieldId);
9566
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9567
        return fields;
9568
      }
9569
 
9570
      /**
9571
       * Find the _Fields constant that matches name, or null if its not found.
9572
       */
9573
      public static _Fields findByName(String name) {
9574
        return byName.get(name);
9575
      }
9576
 
9577
      private final short _thriftId;
9578
      private final String _fieldName;
9579
 
9580
      _Fields(short thriftId, String fieldName) {
9581
        _thriftId = thriftId;
9582
        _fieldName = fieldName;
9583
      }
9584
 
9585
      public short getThriftFieldId() {
9586
        return _thriftId;
9587
      }
9588
 
9589
      public String getFieldName() {
9590
        return _fieldName;
9591
      }
9592
    }
9593
 
9594
    // isset id assignments
9595
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
9596
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
9597
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
9598
    private BitSet __isset_bit_vector = new BitSet(3);
9599
 
9600
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9601
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
9602
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
9603
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
9604
          new FieldValueMetaData(TType.I64)));
9605
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
9606
          new FieldValueMetaData(TType.I64)));
9607
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
9608
          new FieldValueMetaData(TType.I64)));
9609
    }});
9610
 
9611
    static {
9612
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
9613
    }
9614
 
9615
    public getOrdersByBillingDate_args() {
9616
    }
9617
 
9618
    public getOrdersByBillingDate_args(
9619
      OrderStatus status,
9620
      long start_billing_date,
9621
      long end_billing_date,
9622
      long warehouse_id)
9623
    {
9624
      this();
9625
      this.status = status;
9626
      this.start_billing_date = start_billing_date;
9627
      setStart_billing_dateIsSet(true);
9628
      this.end_billing_date = end_billing_date;
9629
      setEnd_billing_dateIsSet(true);
9630
      this.warehouse_id = warehouse_id;
9631
      setWarehouse_idIsSet(true);
9632
    }
9633
 
9634
    /**
9635
     * Performs a deep copy on <i>other</i>.
9636
     */
9637
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
9638
      __isset_bit_vector.clear();
9639
      __isset_bit_vector.or(other.__isset_bit_vector);
9640
      if (other.isSetStatus()) {
9641
        this.status = other.status;
9642
      }
9643
      this.start_billing_date = other.start_billing_date;
9644
      this.end_billing_date = other.end_billing_date;
9645
      this.warehouse_id = other.warehouse_id;
9646
    }
9647
 
9648
    public getOrdersByBillingDate_args deepCopy() {
9649
      return new getOrdersByBillingDate_args(this);
9650
    }
9651
 
9652
    @Deprecated
9653
    public getOrdersByBillingDate_args clone() {
9654
      return new getOrdersByBillingDate_args(this);
9655
    }
9656
 
9657
    /**
9658
     * 
9659
     * @see OrderStatus
9660
     */
9661
    public OrderStatus getStatus() {
9662
      return this.status;
9663
    }
9664
 
9665
    /**
9666
     * 
9667
     * @see OrderStatus
9668
     */
9669
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
9670
      this.status = status;
9671
      return this;
9672
    }
9673
 
9674
    public void unsetStatus() {
9675
      this.status = null;
9676
    }
9677
 
9678
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9679
    public boolean isSetStatus() {
9680
      return this.status != null;
9681
    }
9682
 
9683
    public void setStatusIsSet(boolean value) {
9684
      if (!value) {
9685
        this.status = null;
9686
      }
9687
    }
9688
 
9689
    public long getStart_billing_date() {
9690
      return this.start_billing_date;
9691
    }
9692
 
9693
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
9694
      this.start_billing_date = start_billing_date;
9695
      setStart_billing_dateIsSet(true);
9696
      return this;
9697
    }
9698
 
9699
    public void unsetStart_billing_date() {
9700
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
9701
    }
9702
 
9703
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
9704
    public boolean isSetStart_billing_date() {
9705
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
9706
    }
9707
 
9708
    public void setStart_billing_dateIsSet(boolean value) {
9709
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
9710
    }
9711
 
9712
    public long getEnd_billing_date() {
9713
      return this.end_billing_date;
9714
    }
9715
 
9716
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
9717
      this.end_billing_date = end_billing_date;
9718
      setEnd_billing_dateIsSet(true);
9719
      return this;
9720
    }
9721
 
9722
    public void unsetEnd_billing_date() {
9723
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
9724
    }
9725
 
9726
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
9727
    public boolean isSetEnd_billing_date() {
9728
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
9729
    }
9730
 
9731
    public void setEnd_billing_dateIsSet(boolean value) {
9732
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
9733
    }
9734
 
9735
    public long getWarehouse_id() {
9736
      return this.warehouse_id;
9737
    }
9738
 
9739
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
9740
      this.warehouse_id = warehouse_id;
9741
      setWarehouse_idIsSet(true);
9742
      return this;
9743
    }
9744
 
9745
    public void unsetWarehouse_id() {
9746
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
9747
    }
9748
 
9749
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9750
    public boolean isSetWarehouse_id() {
9751
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
9752
    }
9753
 
9754
    public void setWarehouse_idIsSet(boolean value) {
9755
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
9756
    }
9757
 
9758
    public void setFieldValue(_Fields field, Object value) {
9759
      switch (field) {
9760
      case STATUS:
9761
        if (value == null) {
9762
          unsetStatus();
9763
        } else {
9764
          setStatus((OrderStatus)value);
9765
        }
9766
        break;
9767
 
9768
      case START_BILLING_DATE:
9769
        if (value == null) {
9770
          unsetStart_billing_date();
9771
        } else {
9772
          setStart_billing_date((Long)value);
9773
        }
9774
        break;
9775
 
9776
      case END_BILLING_DATE:
9777
        if (value == null) {
9778
          unsetEnd_billing_date();
9779
        } else {
9780
          setEnd_billing_date((Long)value);
9781
        }
9782
        break;
9783
 
9784
      case WAREHOUSE_ID:
9785
        if (value == null) {
9786
          unsetWarehouse_id();
9787
        } else {
9788
          setWarehouse_id((Long)value);
9789
        }
9790
        break;
9791
 
9792
      }
9793
    }
9794
 
9795
    public void setFieldValue(int fieldID, Object value) {
9796
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9797
    }
9798
 
9799
    public Object getFieldValue(_Fields field) {
9800
      switch (field) {
9801
      case STATUS:
9802
        return getStatus();
9803
 
9804
      case START_BILLING_DATE:
9805
        return new Long(getStart_billing_date());
9806
 
9807
      case END_BILLING_DATE:
9808
        return new Long(getEnd_billing_date());
9809
 
9810
      case WAREHOUSE_ID:
9811
        return new Long(getWarehouse_id());
9812
 
9813
      }
9814
      throw new IllegalStateException();
9815
    }
9816
 
9817
    public Object getFieldValue(int fieldId) {
9818
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9819
    }
9820
 
9821
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9822
    public boolean isSet(_Fields field) {
9823
      switch (field) {
9824
      case STATUS:
9825
        return isSetStatus();
9826
      case START_BILLING_DATE:
9827
        return isSetStart_billing_date();
9828
      case END_BILLING_DATE:
9829
        return isSetEnd_billing_date();
9830
      case WAREHOUSE_ID:
9831
        return isSetWarehouse_id();
9832
      }
9833
      throw new IllegalStateException();
9834
    }
9835
 
9836
    public boolean isSet(int fieldID) {
9837
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9838
    }
9839
 
9840
    @Override
9841
    public boolean equals(Object that) {
9842
      if (that == null)
9843
        return false;
9844
      if (that instanceof getOrdersByBillingDate_args)
9845
        return this.equals((getOrdersByBillingDate_args)that);
9846
      return false;
9847
    }
9848
 
9849
    public boolean equals(getOrdersByBillingDate_args that) {
9850
      if (that == null)
9851
        return false;
9852
 
9853
      boolean this_present_status = true && this.isSetStatus();
9854
      boolean that_present_status = true && that.isSetStatus();
9855
      if (this_present_status || that_present_status) {
9856
        if (!(this_present_status && that_present_status))
9857
          return false;
9858
        if (!this.status.equals(that.status))
9859
          return false;
9860
      }
9861
 
9862
      boolean this_present_start_billing_date = true;
9863
      boolean that_present_start_billing_date = true;
9864
      if (this_present_start_billing_date || that_present_start_billing_date) {
9865
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9866
          return false;
9867
        if (this.start_billing_date != that.start_billing_date)
9868
          return false;
9869
      }
9870
 
9871
      boolean this_present_end_billing_date = true;
9872
      boolean that_present_end_billing_date = true;
9873
      if (this_present_end_billing_date || that_present_end_billing_date) {
9874
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9875
          return false;
9876
        if (this.end_billing_date != that.end_billing_date)
9877
          return false;
9878
      }
9879
 
9880
      boolean this_present_warehouse_id = true;
9881
      boolean that_present_warehouse_id = true;
9882
      if (this_present_warehouse_id || that_present_warehouse_id) {
9883
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9884
          return false;
9885
        if (this.warehouse_id != that.warehouse_id)
9886
          return false;
9887
      }
9888
 
9889
      return true;
9890
    }
9891
 
9892
    @Override
9893
    public int hashCode() {
9894
      return 0;
9895
    }
9896
 
9897
    public int compareTo(getOrdersByBillingDate_args other) {
9898
      if (!getClass().equals(other.getClass())) {
9899
        return getClass().getName().compareTo(other.getClass().getName());
9900
      }
9901
 
9902
      int lastComparison = 0;
9903
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9904
 
9905
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9906
      if (lastComparison != 0) {
9907
        return lastComparison;
9908
      }
9909
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9910
      if (lastComparison != 0) {
9911
        return lastComparison;
9912
      }
9913
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9914
      if (lastComparison != 0) {
9915
        return lastComparison;
9916
      }
9917
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9918
      if (lastComparison != 0) {
9919
        return lastComparison;
9920
      }
9921
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9922
      if (lastComparison != 0) {
9923
        return lastComparison;
9924
      }
9925
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9926
      if (lastComparison != 0) {
9927
        return lastComparison;
9928
      }
9929
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9930
      if (lastComparison != 0) {
9931
        return lastComparison;
9932
      }
9933
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9934
      if (lastComparison != 0) {
9935
        return lastComparison;
9936
      }
9937
      return 0;
9938
    }
9939
 
9940
    public void read(TProtocol iprot) throws TException {
9941
      TField field;
9942
      iprot.readStructBegin();
9943
      while (true)
9944
      {
9945
        field = iprot.readFieldBegin();
9946
        if (field.type == TType.STOP) { 
9947
          break;
9948
        }
9949
        _Fields fieldId = _Fields.findByThriftId(field.id);
9950
        if (fieldId == null) {
9951
          TProtocolUtil.skip(iprot, field.type);
9952
        } else {
9953
          switch (fieldId) {
9954
            case STATUS:
9955
              if (field.type == TType.I32) {
9956
                this.status = OrderStatus.findByValue(iprot.readI32());
9957
              } else { 
9958
                TProtocolUtil.skip(iprot, field.type);
9959
              }
9960
              break;
9961
            case START_BILLING_DATE:
9962
              if (field.type == TType.I64) {
9963
                this.start_billing_date = iprot.readI64();
9964
                setStart_billing_dateIsSet(true);
9965
              } else { 
9966
                TProtocolUtil.skip(iprot, field.type);
9967
              }
9968
              break;
9969
            case END_BILLING_DATE:
9970
              if (field.type == TType.I64) {
9971
                this.end_billing_date = iprot.readI64();
9972
                setEnd_billing_dateIsSet(true);
9973
              } else { 
9974
                TProtocolUtil.skip(iprot, field.type);
9975
              }
9976
              break;
9977
            case WAREHOUSE_ID:
9978
              if (field.type == TType.I64) {
9979
                this.warehouse_id = iprot.readI64();
9980
                setWarehouse_idIsSet(true);
9981
              } else { 
9982
                TProtocolUtil.skip(iprot, field.type);
9983
              }
9984
              break;
9985
          }
9986
          iprot.readFieldEnd();
9987
        }
9988
      }
9989
      iprot.readStructEnd();
9990
      validate();
9991
    }
9992
 
9993
    public void write(TProtocol oprot) throws TException {
9994
      validate();
9995
 
9996
      oprot.writeStructBegin(STRUCT_DESC);
9997
      if (this.status != null) {
9998
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9999
        oprot.writeI32(this.status.getValue());
10000
        oprot.writeFieldEnd();
10001
      }
10002
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
10003
      oprot.writeI64(this.start_billing_date);
10004
      oprot.writeFieldEnd();
10005
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
10006
      oprot.writeI64(this.end_billing_date);
10007
      oprot.writeFieldEnd();
10008
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
10009
      oprot.writeI64(this.warehouse_id);
10010
      oprot.writeFieldEnd();
10011
      oprot.writeFieldStop();
10012
      oprot.writeStructEnd();
10013
    }
10014
 
10015
    @Override
10016
    public String toString() {
10017
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
10018
      boolean first = true;
10019
 
10020
      sb.append("status:");
10021
      if (this.status == null) {
10022
        sb.append("null");
10023
      } else {
10024
        String status_name = status.name();
10025
        if (status_name != null) {
10026
          sb.append(status_name);
10027
          sb.append(" (");
10028
        }
10029
        sb.append(this.status);
10030
        if (status_name != null) {
10031
          sb.append(")");
10032
        }
10033
      }
10034
      first = false;
10035
      if (!first) sb.append(", ");
10036
      sb.append("start_billing_date:");
10037
      sb.append(this.start_billing_date);
10038
      first = false;
10039
      if (!first) sb.append(", ");
10040
      sb.append("end_billing_date:");
10041
      sb.append(this.end_billing_date);
10042
      first = false;
10043
      if (!first) sb.append(", ");
10044
      sb.append("warehouse_id:");
10045
      sb.append(this.warehouse_id);
10046
      first = false;
10047
      sb.append(")");
10048
      return sb.toString();
10049
    }
10050
 
10051
    public void validate() throws TException {
10052
      // check for required fields
10053
    }
10054
 
10055
  }
10056
 
10057
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
10058
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
10059
 
10060
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10061
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10062
 
10063
    private List<Order> success;
10064
    private TransactionServiceException ex;
10065
 
10066
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10067
    public enum _Fields implements TFieldIdEnum {
10068
      SUCCESS((short)0, "success"),
10069
      EX((short)1, "ex");
10070
 
10071
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10072
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10073
 
10074
      static {
10075
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10076
          byId.put((int)field._thriftId, field);
10077
          byName.put(field.getFieldName(), field);
10078
        }
10079
      }
10080
 
10081
      /**
10082
       * Find the _Fields constant that matches fieldId, or null if its not found.
10083
       */
10084
      public static _Fields findByThriftId(int fieldId) {
10085
        return byId.get(fieldId);
10086
      }
10087
 
10088
      /**
10089
       * Find the _Fields constant that matches fieldId, throwing an exception
10090
       * if it is not found.
10091
       */
10092
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10093
        _Fields fields = findByThriftId(fieldId);
10094
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10095
        return fields;
10096
      }
10097
 
10098
      /**
10099
       * Find the _Fields constant that matches name, or null if its not found.
10100
       */
10101
      public static _Fields findByName(String name) {
10102
        return byName.get(name);
10103
      }
10104
 
10105
      private final short _thriftId;
10106
      private final String _fieldName;
10107
 
10108
      _Fields(short thriftId, String fieldName) {
10109
        _thriftId = thriftId;
10110
        _fieldName = fieldName;
10111
      }
10112
 
10113
      public short getThriftFieldId() {
10114
        return _thriftId;
10115
      }
10116
 
10117
      public String getFieldName() {
10118
        return _fieldName;
10119
      }
10120
    }
10121
 
10122
    // isset id assignments
10123
 
10124
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10125
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10126
          new ListMetaData(TType.LIST, 
10127
              new StructMetaData(TType.STRUCT, Order.class))));
10128
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10129
          new FieldValueMetaData(TType.STRUCT)));
10130
    }});
10131
 
10132
    static {
10133
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
10134
    }
10135
 
10136
    public getOrdersByBillingDate_result() {
10137
    }
10138
 
10139
    public getOrdersByBillingDate_result(
10140
      List<Order> success,
10141
      TransactionServiceException ex)
10142
    {
10143
      this();
10144
      this.success = success;
10145
      this.ex = ex;
10146
    }
10147
 
10148
    /**
10149
     * Performs a deep copy on <i>other</i>.
10150
     */
10151
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
10152
      if (other.isSetSuccess()) {
10153
        List<Order> __this__success = new ArrayList<Order>();
10154
        for (Order other_element : other.success) {
10155
          __this__success.add(new Order(other_element));
10156
        }
10157
        this.success = __this__success;
10158
      }
10159
      if (other.isSetEx()) {
10160
        this.ex = new TransactionServiceException(other.ex);
10161
      }
10162
    }
10163
 
10164
    public getOrdersByBillingDate_result deepCopy() {
10165
      return new getOrdersByBillingDate_result(this);
10166
    }
10167
 
10168
    @Deprecated
10169
    public getOrdersByBillingDate_result clone() {
10170
      return new getOrdersByBillingDate_result(this);
10171
    }
10172
 
10173
    public int getSuccessSize() {
10174
      return (this.success == null) ? 0 : this.success.size();
10175
    }
10176
 
10177
    public java.util.Iterator<Order> getSuccessIterator() {
10178
      return (this.success == null) ? null : this.success.iterator();
10179
    }
10180
 
10181
    public void addToSuccess(Order elem) {
10182
      if (this.success == null) {
10183
        this.success = new ArrayList<Order>();
10184
      }
10185
      this.success.add(elem);
10186
    }
10187
 
10188
    public List<Order> getSuccess() {
10189
      return this.success;
10190
    }
10191
 
10192
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
10193
      this.success = success;
10194
      return this;
10195
    }
10196
 
10197
    public void unsetSuccess() {
10198
      this.success = null;
10199
    }
10200
 
10201
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10202
    public boolean isSetSuccess() {
10203
      return this.success != null;
10204
    }
10205
 
10206
    public void setSuccessIsSet(boolean value) {
10207
      if (!value) {
10208
        this.success = null;
10209
      }
10210
    }
10211
 
10212
    public TransactionServiceException getEx() {
10213
      return this.ex;
10214
    }
10215
 
10216
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
10217
      this.ex = ex;
10218
      return this;
10219
    }
10220
 
10221
    public void unsetEx() {
10222
      this.ex = null;
10223
    }
10224
 
10225
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10226
    public boolean isSetEx() {
10227
      return this.ex != null;
10228
    }
10229
 
10230
    public void setExIsSet(boolean value) {
10231
      if (!value) {
10232
        this.ex = null;
10233
      }
10234
    }
10235
 
10236
    public void setFieldValue(_Fields field, Object value) {
10237
      switch (field) {
10238
      case SUCCESS:
10239
        if (value == null) {
10240
          unsetSuccess();
10241
        } else {
10242
          setSuccess((List<Order>)value);
10243
        }
10244
        break;
10245
 
10246
      case EX:
10247
        if (value == null) {
10248
          unsetEx();
10249
        } else {
10250
          setEx((TransactionServiceException)value);
10251
        }
10252
        break;
10253
 
10254
      }
10255
    }
10256
 
10257
    public void setFieldValue(int fieldID, Object value) {
10258
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10259
    }
10260
 
10261
    public Object getFieldValue(_Fields field) {
10262
      switch (field) {
10263
      case SUCCESS:
10264
        return getSuccess();
10265
 
10266
      case EX:
10267
        return getEx();
10268
 
10269
      }
10270
      throw new IllegalStateException();
10271
    }
10272
 
10273
    public Object getFieldValue(int fieldId) {
10274
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10275
    }
10276
 
10277
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10278
    public boolean isSet(_Fields field) {
10279
      switch (field) {
10280
      case SUCCESS:
10281
        return isSetSuccess();
10282
      case EX:
10283
        return isSetEx();
10284
      }
10285
      throw new IllegalStateException();
10286
    }
10287
 
10288
    public boolean isSet(int fieldID) {
10289
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10290
    }
10291
 
10292
    @Override
10293
    public boolean equals(Object that) {
10294
      if (that == null)
10295
        return false;
10296
      if (that instanceof getOrdersByBillingDate_result)
10297
        return this.equals((getOrdersByBillingDate_result)that);
10298
      return false;
10299
    }
10300
 
10301
    public boolean equals(getOrdersByBillingDate_result that) {
10302
      if (that == null)
10303
        return false;
10304
 
10305
      boolean this_present_success = true && this.isSetSuccess();
10306
      boolean that_present_success = true && that.isSetSuccess();
10307
      if (this_present_success || that_present_success) {
10308
        if (!(this_present_success && that_present_success))
10309
          return false;
10310
        if (!this.success.equals(that.success))
10311
          return false;
10312
      }
10313
 
10314
      boolean this_present_ex = true && this.isSetEx();
10315
      boolean that_present_ex = true && that.isSetEx();
10316
      if (this_present_ex || that_present_ex) {
10317
        if (!(this_present_ex && that_present_ex))
10318
          return false;
10319
        if (!this.ex.equals(that.ex))
10320
          return false;
10321
      }
10322
 
10323
      return true;
10324
    }
10325
 
10326
    @Override
10327
    public int hashCode() {
10328
      return 0;
10329
    }
10330
 
10331
    public int compareTo(getOrdersByBillingDate_result other) {
10332
      if (!getClass().equals(other.getClass())) {
10333
        return getClass().getName().compareTo(other.getClass().getName());
10334
      }
10335
 
10336
      int lastComparison = 0;
10337
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
10338
 
10339
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10340
      if (lastComparison != 0) {
10341
        return lastComparison;
10342
      }
10343
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10344
      if (lastComparison != 0) {
10345
        return lastComparison;
10346
      }
10347
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10348
      if (lastComparison != 0) {
10349
        return lastComparison;
10350
      }
10351
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10352
      if (lastComparison != 0) {
10353
        return lastComparison;
10354
      }
10355
      return 0;
10356
    }
10357
 
10358
    public void read(TProtocol iprot) throws TException {
10359
      TField field;
10360
      iprot.readStructBegin();
10361
      while (true)
10362
      {
10363
        field = iprot.readFieldBegin();
10364
        if (field.type == TType.STOP) { 
10365
          break;
10366
        }
10367
        _Fields fieldId = _Fields.findByThriftId(field.id);
10368
        if (fieldId == null) {
10369
          TProtocolUtil.skip(iprot, field.type);
10370
        } else {
10371
          switch (fieldId) {
10372
            case SUCCESS:
10373
              if (field.type == TType.LIST) {
10374
                {
10375
                  TList _list20 = iprot.readListBegin();
10376
                  this.success = new ArrayList<Order>(_list20.size);
10377
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
10378
                  {
10379
                    Order _elem22;
10380
                    _elem22 = new Order();
10381
                    _elem22.read(iprot);
10382
                    this.success.add(_elem22);
10383
                  }
10384
                  iprot.readListEnd();
10385
                }
10386
              } else { 
10387
                TProtocolUtil.skip(iprot, field.type);
10388
              }
10389
              break;
10390
            case EX:
10391
              if (field.type == TType.STRUCT) {
10392
                this.ex = new TransactionServiceException();
10393
                this.ex.read(iprot);
10394
              } else { 
10395
                TProtocolUtil.skip(iprot, field.type);
10396
              }
10397
              break;
10398
          }
10399
          iprot.readFieldEnd();
10400
        }
10401
      }
10402
      iprot.readStructEnd();
10403
      validate();
10404
    }
10405
 
10406
    public void write(TProtocol oprot) throws TException {
10407
      oprot.writeStructBegin(STRUCT_DESC);
10408
 
10409
      if (this.isSetSuccess()) {
10410
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10411
        {
10412
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
10413
          for (Order _iter23 : this.success)
10414
          {
10415
            _iter23.write(oprot);
10416
          }
10417
          oprot.writeListEnd();
10418
        }
10419
        oprot.writeFieldEnd();
10420
      } else if (this.isSetEx()) {
10421
        oprot.writeFieldBegin(EX_FIELD_DESC);
10422
        this.ex.write(oprot);
10423
        oprot.writeFieldEnd();
10424
      }
10425
      oprot.writeFieldStop();
10426
      oprot.writeStructEnd();
10427
    }
10428
 
10429
    @Override
10430
    public String toString() {
10431
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
10432
      boolean first = true;
10433
 
10434
      sb.append("success:");
10435
      if (this.success == null) {
10436
        sb.append("null");
10437
      } else {
10438
        sb.append(this.success);
10439
      }
10440
      first = false;
10441
      if (!first) sb.append(", ");
10442
      sb.append("ex:");
10443
      if (this.ex == null) {
10444
        sb.append("null");
10445
      } else {
10446
        sb.append(this.ex);
10447
      }
10448
      first = false;
10449
      sb.append(")");
10450
      return sb.toString();
10451
    }
10452
 
10453
    public void validate() throws TException {
10454
      // check for required fields
10455
    }
10456
 
10457
  }
10458
 
1382 varun.gupt 10459
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
10460
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
10461
 
10462
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10463
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10464
 
10465
    private long customer_id;
10466
    private long limit;
10467
 
10468
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10469
    public enum _Fields implements TFieldIdEnum {
10470
      CUSTOMER_ID((short)1, "customer_id"),
10471
      LIMIT((short)2, "limit");
10472
 
10473
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10474
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10475
 
10476
      static {
10477
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10478
          byId.put((int)field._thriftId, field);
10479
          byName.put(field.getFieldName(), field);
10480
        }
10481
      }
10482
 
10483
      /**
10484
       * Find the _Fields constant that matches fieldId, or null if its not found.
10485
       */
10486
      public static _Fields findByThriftId(int fieldId) {
10487
        return byId.get(fieldId);
10488
      }
10489
 
10490
      /**
10491
       * Find the _Fields constant that matches fieldId, throwing an exception
10492
       * if it is not found.
10493
       */
10494
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10495
        _Fields fields = findByThriftId(fieldId);
10496
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10497
        return fields;
10498
      }
10499
 
10500
      /**
10501
       * Find the _Fields constant that matches name, or null if its not found.
10502
       */
10503
      public static _Fields findByName(String name) {
10504
        return byName.get(name);
10505
      }
10506
 
10507
      private final short _thriftId;
10508
      private final String _fieldName;
10509
 
10510
      _Fields(short thriftId, String fieldName) {
10511
        _thriftId = thriftId;
10512
        _fieldName = fieldName;
10513
      }
10514
 
10515
      public short getThriftFieldId() {
10516
        return _thriftId;
10517
      }
10518
 
10519
      public String getFieldName() {
10520
        return _fieldName;
10521
      }
10522
    }
10523
 
10524
    // isset id assignments
10525
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10526
    private static final int __LIMIT_ISSET_ID = 1;
10527
    private BitSet __isset_bit_vector = new BitSet(2);
10528
 
10529
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10530
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10531
          new FieldValueMetaData(TType.I64)));
10532
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10533
          new FieldValueMetaData(TType.I64)));
10534
    }});
10535
 
10536
    static {
10537
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
10538
    }
10539
 
10540
    public getReturnableOrdersForCustomer_args() {
10541
    }
10542
 
10543
    public getReturnableOrdersForCustomer_args(
10544
      long customer_id,
10545
      long limit)
10546
    {
10547
      this();
10548
      this.customer_id = customer_id;
10549
      setCustomer_idIsSet(true);
10550
      this.limit = limit;
10551
      setLimitIsSet(true);
10552
    }
10553
 
10554
    /**
10555
     * Performs a deep copy on <i>other</i>.
10556
     */
10557
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
10558
      __isset_bit_vector.clear();
10559
      __isset_bit_vector.or(other.__isset_bit_vector);
10560
      this.customer_id = other.customer_id;
10561
      this.limit = other.limit;
10562
    }
10563
 
10564
    public getReturnableOrdersForCustomer_args deepCopy() {
10565
      return new getReturnableOrdersForCustomer_args(this);
10566
    }
10567
 
10568
    @Deprecated
10569
    public getReturnableOrdersForCustomer_args clone() {
10570
      return new getReturnableOrdersForCustomer_args(this);
10571
    }
10572
 
10573
    public long getCustomer_id() {
10574
      return this.customer_id;
10575
    }
10576
 
10577
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
10578
      this.customer_id = customer_id;
10579
      setCustomer_idIsSet(true);
10580
      return this;
10581
    }
10582
 
10583
    public void unsetCustomer_id() {
10584
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10585
    }
10586
 
10587
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10588
    public boolean isSetCustomer_id() {
10589
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10590
    }
10591
 
10592
    public void setCustomer_idIsSet(boolean value) {
10593
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10594
    }
10595
 
10596
    public long getLimit() {
10597
      return this.limit;
10598
    }
10599
 
10600
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
10601
      this.limit = limit;
10602
      setLimitIsSet(true);
10603
      return this;
10604
    }
10605
 
10606
    public void unsetLimit() {
10607
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10608
    }
10609
 
10610
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10611
    public boolean isSetLimit() {
10612
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10613
    }
10614
 
10615
    public void setLimitIsSet(boolean value) {
10616
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10617
    }
10618
 
10619
    public void setFieldValue(_Fields field, Object value) {
10620
      switch (field) {
10621
      case CUSTOMER_ID:
10622
        if (value == null) {
10623
          unsetCustomer_id();
10624
        } else {
10625
          setCustomer_id((Long)value);
10626
        }
10627
        break;
10628
 
10629
      case LIMIT:
10630
        if (value == null) {
10631
          unsetLimit();
10632
        } else {
10633
          setLimit((Long)value);
10634
        }
10635
        break;
10636
 
10637
      }
10638
    }
10639
 
10640
    public void setFieldValue(int fieldID, Object value) {
10641
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10642
    }
10643
 
10644
    public Object getFieldValue(_Fields field) {
10645
      switch (field) {
10646
      case CUSTOMER_ID:
10647
        return new Long(getCustomer_id());
10648
 
10649
      case LIMIT:
10650
        return new Long(getLimit());
10651
 
10652
      }
10653
      throw new IllegalStateException();
10654
    }
10655
 
10656
    public Object getFieldValue(int fieldId) {
10657
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10658
    }
10659
 
10660
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10661
    public boolean isSet(_Fields field) {
10662
      switch (field) {
10663
      case CUSTOMER_ID:
10664
        return isSetCustomer_id();
10665
      case LIMIT:
10666
        return isSetLimit();
10667
      }
10668
      throw new IllegalStateException();
10669
    }
10670
 
10671
    public boolean isSet(int fieldID) {
10672
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10673
    }
10674
 
10675
    @Override
10676
    public boolean equals(Object that) {
10677
      if (that == null)
10678
        return false;
10679
      if (that instanceof getReturnableOrdersForCustomer_args)
10680
        return this.equals((getReturnableOrdersForCustomer_args)that);
10681
      return false;
10682
    }
10683
 
10684
    public boolean equals(getReturnableOrdersForCustomer_args that) {
10685
      if (that == null)
10686
        return false;
10687
 
10688
      boolean this_present_customer_id = true;
10689
      boolean that_present_customer_id = true;
10690
      if (this_present_customer_id || that_present_customer_id) {
10691
        if (!(this_present_customer_id && that_present_customer_id))
10692
          return false;
10693
        if (this.customer_id != that.customer_id)
10694
          return false;
10695
      }
10696
 
10697
      boolean this_present_limit = true;
10698
      boolean that_present_limit = true;
10699
      if (this_present_limit || that_present_limit) {
10700
        if (!(this_present_limit && that_present_limit))
10701
          return false;
10702
        if (this.limit != that.limit)
10703
          return false;
10704
      }
10705
 
10706
      return true;
10707
    }
10708
 
10709
    @Override
10710
    public int hashCode() {
10711
      return 0;
10712
    }
10713
 
10714
    public int compareTo(getReturnableOrdersForCustomer_args other) {
10715
      if (!getClass().equals(other.getClass())) {
10716
        return getClass().getName().compareTo(other.getClass().getName());
10717
      }
10718
 
10719
      int lastComparison = 0;
10720
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
10721
 
10722
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10723
      if (lastComparison != 0) {
10724
        return lastComparison;
10725
      }
10726
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10727
      if (lastComparison != 0) {
10728
        return lastComparison;
10729
      }
10730
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10731
      if (lastComparison != 0) {
10732
        return lastComparison;
10733
      }
10734
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10735
      if (lastComparison != 0) {
10736
        return lastComparison;
10737
      }
10738
      return 0;
10739
    }
10740
 
10741
    public void read(TProtocol iprot) throws TException {
10742
      TField field;
10743
      iprot.readStructBegin();
10744
      while (true)
10745
      {
10746
        field = iprot.readFieldBegin();
10747
        if (field.type == TType.STOP) { 
10748
          break;
10749
        }
10750
        _Fields fieldId = _Fields.findByThriftId(field.id);
10751
        if (fieldId == null) {
10752
          TProtocolUtil.skip(iprot, field.type);
10753
        } else {
10754
          switch (fieldId) {
10755
            case CUSTOMER_ID:
10756
              if (field.type == TType.I64) {
10757
                this.customer_id = iprot.readI64();
10758
                setCustomer_idIsSet(true);
10759
              } else { 
10760
                TProtocolUtil.skip(iprot, field.type);
10761
              }
10762
              break;
10763
            case LIMIT:
10764
              if (field.type == TType.I64) {
10765
                this.limit = iprot.readI64();
10766
                setLimitIsSet(true);
10767
              } else { 
10768
                TProtocolUtil.skip(iprot, field.type);
10769
              }
10770
              break;
10771
          }
10772
          iprot.readFieldEnd();
10773
        }
10774
      }
10775
      iprot.readStructEnd();
10776
      validate();
10777
    }
10778
 
10779
    public void write(TProtocol oprot) throws TException {
10780
      validate();
10781
 
10782
      oprot.writeStructBegin(STRUCT_DESC);
10783
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10784
      oprot.writeI64(this.customer_id);
10785
      oprot.writeFieldEnd();
10786
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10787
      oprot.writeI64(this.limit);
10788
      oprot.writeFieldEnd();
10789
      oprot.writeFieldStop();
10790
      oprot.writeStructEnd();
10791
    }
10792
 
10793
    @Override
10794
    public String toString() {
10795
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
10796
      boolean first = true;
10797
 
10798
      sb.append("customer_id:");
10799
      sb.append(this.customer_id);
10800
      first = false;
10801
      if (!first) sb.append(", ");
10802
      sb.append("limit:");
10803
      sb.append(this.limit);
10804
      first = false;
10805
      sb.append(")");
10806
      return sb.toString();
10807
    }
10808
 
10809
    public void validate() throws TException {
10810
      // check for required fields
10811
    }
10812
 
10813
  }
10814
 
10815
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
10816
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
10817
 
10818
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10819
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10820
 
10821
    private List<Long> success;
10822
    private TransactionServiceException ex;
10823
 
10824
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10825
    public enum _Fields implements TFieldIdEnum {
10826
      SUCCESS((short)0, "success"),
10827
      EX((short)1, "ex");
10828
 
10829
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10830
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10831
 
10832
      static {
10833
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10834
          byId.put((int)field._thriftId, field);
10835
          byName.put(field.getFieldName(), field);
10836
        }
10837
      }
10838
 
10839
      /**
10840
       * Find the _Fields constant that matches fieldId, or null if its not found.
10841
       */
10842
      public static _Fields findByThriftId(int fieldId) {
10843
        return byId.get(fieldId);
10844
      }
10845
 
10846
      /**
10847
       * Find the _Fields constant that matches fieldId, throwing an exception
10848
       * if it is not found.
10849
       */
10850
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10851
        _Fields fields = findByThriftId(fieldId);
10852
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10853
        return fields;
10854
      }
10855
 
10856
      /**
10857
       * Find the _Fields constant that matches name, or null if its not found.
10858
       */
10859
      public static _Fields findByName(String name) {
10860
        return byName.get(name);
10861
      }
10862
 
10863
      private final short _thriftId;
10864
      private final String _fieldName;
10865
 
10866
      _Fields(short thriftId, String fieldName) {
10867
        _thriftId = thriftId;
10868
        _fieldName = fieldName;
10869
      }
10870
 
10871
      public short getThriftFieldId() {
10872
        return _thriftId;
10873
      }
10874
 
10875
      public String getFieldName() {
10876
        return _fieldName;
10877
      }
10878
    }
10879
 
10880
    // isset id assignments
10881
 
10882
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10883
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10884
          new ListMetaData(TType.LIST, 
10885
              new FieldValueMetaData(TType.I64))));
10886
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10887
          new FieldValueMetaData(TType.STRUCT)));
10888
    }});
10889
 
10890
    static {
10891
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10892
    }
10893
 
10894
    public getReturnableOrdersForCustomer_result() {
10895
    }
10896
 
10897
    public getReturnableOrdersForCustomer_result(
10898
      List<Long> success,
10899
      TransactionServiceException ex)
10900
    {
10901
      this();
10902
      this.success = success;
10903
      this.ex = ex;
10904
    }
10905
 
10906
    /**
10907
     * Performs a deep copy on <i>other</i>.
10908
     */
10909
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10910
      if (other.isSetSuccess()) {
10911
        List<Long> __this__success = new ArrayList<Long>();
10912
        for (Long other_element : other.success) {
10913
          __this__success.add(other_element);
10914
        }
10915
        this.success = __this__success;
10916
      }
10917
      if (other.isSetEx()) {
10918
        this.ex = new TransactionServiceException(other.ex);
10919
      }
10920
    }
10921
 
10922
    public getReturnableOrdersForCustomer_result deepCopy() {
10923
      return new getReturnableOrdersForCustomer_result(this);
10924
    }
10925
 
10926
    @Deprecated
10927
    public getReturnableOrdersForCustomer_result clone() {
10928
      return new getReturnableOrdersForCustomer_result(this);
10929
    }
10930
 
10931
    public int getSuccessSize() {
10932
      return (this.success == null) ? 0 : this.success.size();
10933
    }
10934
 
10935
    public java.util.Iterator<Long> getSuccessIterator() {
10936
      return (this.success == null) ? null : this.success.iterator();
10937
    }
10938
 
10939
    public void addToSuccess(long elem) {
10940
      if (this.success == null) {
10941
        this.success = new ArrayList<Long>();
10942
      }
10943
      this.success.add(elem);
10944
    }
10945
 
10946
    public List<Long> getSuccess() {
10947
      return this.success;
10948
    }
10949
 
10950
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10951
      this.success = success;
10952
      return this;
10953
    }
10954
 
10955
    public void unsetSuccess() {
10956
      this.success = null;
10957
    }
10958
 
10959
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10960
    public boolean isSetSuccess() {
10961
      return this.success != null;
10962
    }
10963
 
10964
    public void setSuccessIsSet(boolean value) {
10965
      if (!value) {
10966
        this.success = null;
10967
      }
10968
    }
10969
 
10970
    public TransactionServiceException getEx() {
10971
      return this.ex;
10972
    }
10973
 
10974
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10975
      this.ex = ex;
10976
      return this;
10977
    }
10978
 
10979
    public void unsetEx() {
10980
      this.ex = null;
10981
    }
10982
 
10983
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10984
    public boolean isSetEx() {
10985
      return this.ex != null;
10986
    }
10987
 
10988
    public void setExIsSet(boolean value) {
10989
      if (!value) {
10990
        this.ex = null;
10991
      }
10992
    }
10993
 
10994
    public void setFieldValue(_Fields field, Object value) {
10995
      switch (field) {
10996
      case SUCCESS:
10997
        if (value == null) {
10998
          unsetSuccess();
10999
        } else {
11000
          setSuccess((List<Long>)value);
11001
        }
11002
        break;
11003
 
11004
      case EX:
11005
        if (value == null) {
11006
          unsetEx();
11007
        } else {
11008
          setEx((TransactionServiceException)value);
11009
        }
11010
        break;
11011
 
11012
      }
11013
    }
11014
 
11015
    public void setFieldValue(int fieldID, Object value) {
11016
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11017
    }
11018
 
11019
    public Object getFieldValue(_Fields field) {
11020
      switch (field) {
11021
      case SUCCESS:
11022
        return getSuccess();
11023
 
11024
      case EX:
11025
        return getEx();
11026
 
11027
      }
11028
      throw new IllegalStateException();
11029
    }
11030
 
11031
    public Object getFieldValue(int fieldId) {
11032
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11033
    }
11034
 
11035
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11036
    public boolean isSet(_Fields field) {
11037
      switch (field) {
11038
      case SUCCESS:
11039
        return isSetSuccess();
11040
      case EX:
11041
        return isSetEx();
11042
      }
11043
      throw new IllegalStateException();
11044
    }
11045
 
11046
    public boolean isSet(int fieldID) {
11047
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11048
    }
11049
 
11050
    @Override
11051
    public boolean equals(Object that) {
11052
      if (that == null)
11053
        return false;
11054
      if (that instanceof getReturnableOrdersForCustomer_result)
11055
        return this.equals((getReturnableOrdersForCustomer_result)that);
11056
      return false;
11057
    }
11058
 
11059
    public boolean equals(getReturnableOrdersForCustomer_result that) {
11060
      if (that == null)
11061
        return false;
11062
 
11063
      boolean this_present_success = true && this.isSetSuccess();
11064
      boolean that_present_success = true && that.isSetSuccess();
11065
      if (this_present_success || that_present_success) {
11066
        if (!(this_present_success && that_present_success))
11067
          return false;
11068
        if (!this.success.equals(that.success))
11069
          return false;
11070
      }
11071
 
11072
      boolean this_present_ex = true && this.isSetEx();
11073
      boolean that_present_ex = true && that.isSetEx();
11074
      if (this_present_ex || that_present_ex) {
11075
        if (!(this_present_ex && that_present_ex))
11076
          return false;
11077
        if (!this.ex.equals(that.ex))
11078
          return false;
11079
      }
11080
 
11081
      return true;
11082
    }
11083
 
11084
    @Override
11085
    public int hashCode() {
11086
      return 0;
11087
    }
11088
 
11089
    public int compareTo(getReturnableOrdersForCustomer_result other) {
11090
      if (!getClass().equals(other.getClass())) {
11091
        return getClass().getName().compareTo(other.getClass().getName());
11092
      }
11093
 
11094
      int lastComparison = 0;
11095
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
11096
 
11097
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11098
      if (lastComparison != 0) {
11099
        return lastComparison;
11100
      }
11101
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11102
      if (lastComparison != 0) {
11103
        return lastComparison;
11104
      }
11105
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11106
      if (lastComparison != 0) {
11107
        return lastComparison;
11108
      }
11109
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11110
      if (lastComparison != 0) {
11111
        return lastComparison;
11112
      }
11113
      return 0;
11114
    }
11115
 
11116
    public void read(TProtocol iprot) throws TException {
11117
      TField field;
11118
      iprot.readStructBegin();
11119
      while (true)
11120
      {
11121
        field = iprot.readFieldBegin();
11122
        if (field.type == TType.STOP) { 
11123
          break;
11124
        }
11125
        _Fields fieldId = _Fields.findByThriftId(field.id);
11126
        if (fieldId == null) {
11127
          TProtocolUtil.skip(iprot, field.type);
11128
        } else {
11129
          switch (fieldId) {
11130
            case SUCCESS:
11131
              if (field.type == TType.LIST) {
11132
                {
11133
                  TList _list24 = iprot.readListBegin();
11134
                  this.success = new ArrayList<Long>(_list24.size);
11135
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
11136
                  {
11137
                    long _elem26;
11138
                    _elem26 = iprot.readI64();
11139
                    this.success.add(_elem26);
11140
                  }
11141
                  iprot.readListEnd();
11142
                }
11143
              } else { 
11144
                TProtocolUtil.skip(iprot, field.type);
11145
              }
11146
              break;
11147
            case EX:
11148
              if (field.type == TType.STRUCT) {
11149
                this.ex = new TransactionServiceException();
11150
                this.ex.read(iprot);
11151
              } else { 
11152
                TProtocolUtil.skip(iprot, field.type);
11153
              }
11154
              break;
11155
          }
11156
          iprot.readFieldEnd();
11157
        }
11158
      }
11159
      iprot.readStructEnd();
11160
      validate();
11161
    }
11162
 
11163
    public void write(TProtocol oprot) throws TException {
11164
      oprot.writeStructBegin(STRUCT_DESC);
11165
 
11166
      if (this.isSetSuccess()) {
11167
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11168
        {
11169
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11170
          for (long _iter27 : this.success)
11171
          {
11172
            oprot.writeI64(_iter27);
11173
          }
11174
          oprot.writeListEnd();
11175
        }
11176
        oprot.writeFieldEnd();
11177
      } else if (this.isSetEx()) {
11178
        oprot.writeFieldBegin(EX_FIELD_DESC);
11179
        this.ex.write(oprot);
11180
        oprot.writeFieldEnd();
11181
      }
11182
      oprot.writeFieldStop();
11183
      oprot.writeStructEnd();
11184
    }
11185
 
11186
    @Override
11187
    public String toString() {
11188
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
11189
      boolean first = true;
11190
 
11191
      sb.append("success:");
11192
      if (this.success == null) {
11193
        sb.append("null");
11194
      } else {
11195
        sb.append(this.success);
11196
      }
11197
      first = false;
11198
      if (!first) sb.append(", ");
11199
      sb.append("ex:");
11200
      if (this.ex == null) {
11201
        sb.append("null");
11202
      } else {
11203
        sb.append(this.ex);
11204
      }
11205
      first = false;
11206
      sb.append(")");
11207
      return sb.toString();
11208
    }
11209
 
11210
    public void validate() throws TException {
11211
      // check for required fields
11212
    }
11213
 
11214
  }
11215
 
11216
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
11217
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
11218
 
11219
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
11220
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
11221
 
11222
    private long customer_id;
11223
    private long limit;
11224
 
11225
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11226
    public enum _Fields implements TFieldIdEnum {
11227
      CUSTOMER_ID((short)1, "customer_id"),
11228
      LIMIT((short)2, "limit");
11229
 
11230
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11231
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11232
 
11233
      static {
11234
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11235
          byId.put((int)field._thriftId, field);
11236
          byName.put(field.getFieldName(), field);
11237
        }
11238
      }
11239
 
11240
      /**
11241
       * Find the _Fields constant that matches fieldId, or null if its not found.
11242
       */
11243
      public static _Fields findByThriftId(int fieldId) {
11244
        return byId.get(fieldId);
11245
      }
11246
 
11247
      /**
11248
       * Find the _Fields constant that matches fieldId, throwing an exception
11249
       * if it is not found.
11250
       */
11251
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11252
        _Fields fields = findByThriftId(fieldId);
11253
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11254
        return fields;
11255
      }
11256
 
11257
      /**
11258
       * Find the _Fields constant that matches name, or null if its not found.
11259
       */
11260
      public static _Fields findByName(String name) {
11261
        return byName.get(name);
11262
      }
11263
 
11264
      private final short _thriftId;
11265
      private final String _fieldName;
11266
 
11267
      _Fields(short thriftId, String fieldName) {
11268
        _thriftId = thriftId;
11269
        _fieldName = fieldName;
11270
      }
11271
 
11272
      public short getThriftFieldId() {
11273
        return _thriftId;
11274
      }
11275
 
11276
      public String getFieldName() {
11277
        return _fieldName;
11278
      }
11279
    }
11280
 
11281
    // isset id assignments
11282
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
11283
    private static final int __LIMIT_ISSET_ID = 1;
11284
    private BitSet __isset_bit_vector = new BitSet(2);
11285
 
11286
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11287
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
11288
          new FieldValueMetaData(TType.I64)));
11289
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
11290
          new FieldValueMetaData(TType.I64)));
11291
    }});
11292
 
11293
    static {
11294
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
11295
    }
11296
 
11297
    public getCancellableOrdersForCustomer_args() {
11298
    }
11299
 
11300
    public getCancellableOrdersForCustomer_args(
11301
      long customer_id,
11302
      long limit)
11303
    {
11304
      this();
11305
      this.customer_id = customer_id;
11306
      setCustomer_idIsSet(true);
11307
      this.limit = limit;
11308
      setLimitIsSet(true);
11309
    }
11310
 
11311
    /**
11312
     * Performs a deep copy on <i>other</i>.
11313
     */
11314
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
11315
      __isset_bit_vector.clear();
11316
      __isset_bit_vector.or(other.__isset_bit_vector);
11317
      this.customer_id = other.customer_id;
11318
      this.limit = other.limit;
11319
    }
11320
 
11321
    public getCancellableOrdersForCustomer_args deepCopy() {
11322
      return new getCancellableOrdersForCustomer_args(this);
11323
    }
11324
 
11325
    @Deprecated
11326
    public getCancellableOrdersForCustomer_args clone() {
11327
      return new getCancellableOrdersForCustomer_args(this);
11328
    }
11329
 
11330
    public long getCustomer_id() {
11331
      return this.customer_id;
11332
    }
11333
 
11334
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
11335
      this.customer_id = customer_id;
11336
      setCustomer_idIsSet(true);
11337
      return this;
11338
    }
11339
 
11340
    public void unsetCustomer_id() {
11341
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
11342
    }
11343
 
11344
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
11345
    public boolean isSetCustomer_id() {
11346
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
11347
    }
11348
 
11349
    public void setCustomer_idIsSet(boolean value) {
11350
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
11351
    }
11352
 
11353
    public long getLimit() {
11354
      return this.limit;
11355
    }
11356
 
11357
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
11358
      this.limit = limit;
11359
      setLimitIsSet(true);
11360
      return this;
11361
    }
11362
 
11363
    public void unsetLimit() {
11364
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
11365
    }
11366
 
11367
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
11368
    public boolean isSetLimit() {
11369
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
11370
    }
11371
 
11372
    public void setLimitIsSet(boolean value) {
11373
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
11374
    }
11375
 
11376
    public void setFieldValue(_Fields field, Object value) {
11377
      switch (field) {
11378
      case CUSTOMER_ID:
11379
        if (value == null) {
11380
          unsetCustomer_id();
11381
        } else {
11382
          setCustomer_id((Long)value);
11383
        }
11384
        break;
11385
 
11386
      case LIMIT:
11387
        if (value == null) {
11388
          unsetLimit();
11389
        } else {
11390
          setLimit((Long)value);
11391
        }
11392
        break;
11393
 
11394
      }
11395
    }
11396
 
11397
    public void setFieldValue(int fieldID, Object value) {
11398
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11399
    }
11400
 
11401
    public Object getFieldValue(_Fields field) {
11402
      switch (field) {
11403
      case CUSTOMER_ID:
11404
        return new Long(getCustomer_id());
11405
 
11406
      case LIMIT:
11407
        return new Long(getLimit());
11408
 
11409
      }
11410
      throw new IllegalStateException();
11411
    }
11412
 
11413
    public Object getFieldValue(int fieldId) {
11414
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11415
    }
11416
 
11417
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11418
    public boolean isSet(_Fields field) {
11419
      switch (field) {
11420
      case CUSTOMER_ID:
11421
        return isSetCustomer_id();
11422
      case LIMIT:
11423
        return isSetLimit();
11424
      }
11425
      throw new IllegalStateException();
11426
    }
11427
 
11428
    public boolean isSet(int fieldID) {
11429
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11430
    }
11431
 
11432
    @Override
11433
    public boolean equals(Object that) {
11434
      if (that == null)
11435
        return false;
11436
      if (that instanceof getCancellableOrdersForCustomer_args)
11437
        return this.equals((getCancellableOrdersForCustomer_args)that);
11438
      return false;
11439
    }
11440
 
11441
    public boolean equals(getCancellableOrdersForCustomer_args that) {
11442
      if (that == null)
11443
        return false;
11444
 
11445
      boolean this_present_customer_id = true;
11446
      boolean that_present_customer_id = true;
11447
      if (this_present_customer_id || that_present_customer_id) {
11448
        if (!(this_present_customer_id && that_present_customer_id))
11449
          return false;
11450
        if (this.customer_id != that.customer_id)
11451
          return false;
11452
      }
11453
 
11454
      boolean this_present_limit = true;
11455
      boolean that_present_limit = true;
11456
      if (this_present_limit || that_present_limit) {
11457
        if (!(this_present_limit && that_present_limit))
11458
          return false;
11459
        if (this.limit != that.limit)
11460
          return false;
11461
      }
11462
 
11463
      return true;
11464
    }
11465
 
11466
    @Override
11467
    public int hashCode() {
11468
      return 0;
11469
    }
11470
 
11471
    public int compareTo(getCancellableOrdersForCustomer_args other) {
11472
      if (!getClass().equals(other.getClass())) {
11473
        return getClass().getName().compareTo(other.getClass().getName());
11474
      }
11475
 
11476
      int lastComparison = 0;
11477
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
11478
 
11479
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
11480
      if (lastComparison != 0) {
11481
        return lastComparison;
11482
      }
11483
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
11484
      if (lastComparison != 0) {
11485
        return lastComparison;
11486
      }
11487
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
11488
      if (lastComparison != 0) {
11489
        return lastComparison;
11490
      }
11491
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
11492
      if (lastComparison != 0) {
11493
        return lastComparison;
11494
      }
11495
      return 0;
11496
    }
11497
 
11498
    public void read(TProtocol iprot) throws TException {
11499
      TField field;
11500
      iprot.readStructBegin();
11501
      while (true)
11502
      {
11503
        field = iprot.readFieldBegin();
11504
        if (field.type == TType.STOP) { 
11505
          break;
11506
        }
11507
        _Fields fieldId = _Fields.findByThriftId(field.id);
11508
        if (fieldId == null) {
11509
          TProtocolUtil.skip(iprot, field.type);
11510
        } else {
11511
          switch (fieldId) {
11512
            case CUSTOMER_ID:
11513
              if (field.type == TType.I64) {
11514
                this.customer_id = iprot.readI64();
11515
                setCustomer_idIsSet(true);
11516
              } else { 
11517
                TProtocolUtil.skip(iprot, field.type);
11518
              }
11519
              break;
11520
            case LIMIT:
11521
              if (field.type == TType.I64) {
11522
                this.limit = iprot.readI64();
11523
                setLimitIsSet(true);
11524
              } else { 
11525
                TProtocolUtil.skip(iprot, field.type);
11526
              }
11527
              break;
11528
          }
11529
          iprot.readFieldEnd();
11530
        }
11531
      }
11532
      iprot.readStructEnd();
11533
      validate();
11534
    }
11535
 
11536
    public void write(TProtocol oprot) throws TException {
11537
      validate();
11538
 
11539
      oprot.writeStructBegin(STRUCT_DESC);
11540
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
11541
      oprot.writeI64(this.customer_id);
11542
      oprot.writeFieldEnd();
11543
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
11544
      oprot.writeI64(this.limit);
11545
      oprot.writeFieldEnd();
11546
      oprot.writeFieldStop();
11547
      oprot.writeStructEnd();
11548
    }
11549
 
11550
    @Override
11551
    public String toString() {
11552
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
11553
      boolean first = true;
11554
 
11555
      sb.append("customer_id:");
11556
      sb.append(this.customer_id);
11557
      first = false;
11558
      if (!first) sb.append(", ");
11559
      sb.append("limit:");
11560
      sb.append(this.limit);
11561
      first = false;
11562
      sb.append(")");
11563
      return sb.toString();
11564
    }
11565
 
11566
    public void validate() throws TException {
11567
      // check for required fields
11568
    }
11569
 
11570
  }
11571
 
11572
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
11573
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
11574
 
11575
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11576
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11577
 
11578
    private List<Long> success;
11579
    private TransactionServiceException ex;
11580
 
11581
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11582
    public enum _Fields implements TFieldIdEnum {
11583
      SUCCESS((short)0, "success"),
11584
      EX((short)1, "ex");
11585
 
11586
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11587
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11588
 
11589
      static {
11590
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11591
          byId.put((int)field._thriftId, field);
11592
          byName.put(field.getFieldName(), field);
11593
        }
11594
      }
11595
 
11596
      /**
11597
       * Find the _Fields constant that matches fieldId, or null if its not found.
11598
       */
11599
      public static _Fields findByThriftId(int fieldId) {
11600
        return byId.get(fieldId);
11601
      }
11602
 
11603
      /**
11604
       * Find the _Fields constant that matches fieldId, throwing an exception
11605
       * if it is not found.
11606
       */
11607
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11608
        _Fields fields = findByThriftId(fieldId);
11609
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11610
        return fields;
11611
      }
11612
 
11613
      /**
11614
       * Find the _Fields constant that matches name, or null if its not found.
11615
       */
11616
      public static _Fields findByName(String name) {
11617
        return byName.get(name);
11618
      }
11619
 
11620
      private final short _thriftId;
11621
      private final String _fieldName;
11622
 
11623
      _Fields(short thriftId, String fieldName) {
11624
        _thriftId = thriftId;
11625
        _fieldName = fieldName;
11626
      }
11627
 
11628
      public short getThriftFieldId() {
11629
        return _thriftId;
11630
      }
11631
 
11632
      public String getFieldName() {
11633
        return _fieldName;
11634
      }
11635
    }
11636
 
11637
    // isset id assignments
11638
 
11639
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11640
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11641
          new ListMetaData(TType.LIST, 
11642
              new FieldValueMetaData(TType.I64))));
11643
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11644
          new FieldValueMetaData(TType.STRUCT)));
11645
    }});
11646
 
11647
    static {
11648
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
11649
    }
11650
 
11651
    public getCancellableOrdersForCustomer_result() {
11652
    }
11653
 
11654
    public getCancellableOrdersForCustomer_result(
11655
      List<Long> success,
11656
      TransactionServiceException ex)
11657
    {
11658
      this();
11659
      this.success = success;
11660
      this.ex = ex;
11661
    }
11662
 
11663
    /**
11664
     * Performs a deep copy on <i>other</i>.
11665
     */
11666
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
11667
      if (other.isSetSuccess()) {
11668
        List<Long> __this__success = new ArrayList<Long>();
11669
        for (Long other_element : other.success) {
11670
          __this__success.add(other_element);
11671
        }
11672
        this.success = __this__success;
11673
      }
11674
      if (other.isSetEx()) {
11675
        this.ex = new TransactionServiceException(other.ex);
11676
      }
11677
    }
11678
 
11679
    public getCancellableOrdersForCustomer_result deepCopy() {
11680
      return new getCancellableOrdersForCustomer_result(this);
11681
    }
11682
 
11683
    @Deprecated
11684
    public getCancellableOrdersForCustomer_result clone() {
11685
      return new getCancellableOrdersForCustomer_result(this);
11686
    }
11687
 
11688
    public int getSuccessSize() {
11689
      return (this.success == null) ? 0 : this.success.size();
11690
    }
11691
 
11692
    public java.util.Iterator<Long> getSuccessIterator() {
11693
      return (this.success == null) ? null : this.success.iterator();
11694
    }
11695
 
11696
    public void addToSuccess(long elem) {
11697
      if (this.success == null) {
11698
        this.success = new ArrayList<Long>();
11699
      }
11700
      this.success.add(elem);
11701
    }
11702
 
11703
    public List<Long> getSuccess() {
11704
      return this.success;
11705
    }
11706
 
11707
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
11708
      this.success = success;
11709
      return this;
11710
    }
11711
 
11712
    public void unsetSuccess() {
11713
      this.success = null;
11714
    }
11715
 
11716
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11717
    public boolean isSetSuccess() {
11718
      return this.success != null;
11719
    }
11720
 
11721
    public void setSuccessIsSet(boolean value) {
11722
      if (!value) {
11723
        this.success = null;
11724
      }
11725
    }
11726
 
11727
    public TransactionServiceException getEx() {
11728
      return this.ex;
11729
    }
11730
 
11731
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11732
      this.ex = ex;
11733
      return this;
11734
    }
11735
 
11736
    public void unsetEx() {
11737
      this.ex = null;
11738
    }
11739
 
11740
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11741
    public boolean isSetEx() {
11742
      return this.ex != null;
11743
    }
11744
 
11745
    public void setExIsSet(boolean value) {
11746
      if (!value) {
11747
        this.ex = null;
11748
      }
11749
    }
11750
 
11751
    public void setFieldValue(_Fields field, Object value) {
11752
      switch (field) {
11753
      case SUCCESS:
11754
        if (value == null) {
11755
          unsetSuccess();
11756
        } else {
11757
          setSuccess((List<Long>)value);
11758
        }
11759
        break;
11760
 
11761
      case EX:
11762
        if (value == null) {
11763
          unsetEx();
11764
        } else {
11765
          setEx((TransactionServiceException)value);
11766
        }
11767
        break;
11768
 
11769
      }
11770
    }
11771
 
11772
    public void setFieldValue(int fieldID, Object value) {
11773
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11774
    }
11775
 
11776
    public Object getFieldValue(_Fields field) {
11777
      switch (field) {
11778
      case SUCCESS:
11779
        return getSuccess();
11780
 
11781
      case EX:
11782
        return getEx();
11783
 
11784
      }
11785
      throw new IllegalStateException();
11786
    }
11787
 
11788
    public Object getFieldValue(int fieldId) {
11789
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11790
    }
11791
 
11792
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11793
    public boolean isSet(_Fields field) {
11794
      switch (field) {
11795
      case SUCCESS:
11796
        return isSetSuccess();
11797
      case EX:
11798
        return isSetEx();
11799
      }
11800
      throw new IllegalStateException();
11801
    }
11802
 
11803
    public boolean isSet(int fieldID) {
11804
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11805
    }
11806
 
11807
    @Override
11808
    public boolean equals(Object that) {
11809
      if (that == null)
11810
        return false;
11811
      if (that instanceof getCancellableOrdersForCustomer_result)
11812
        return this.equals((getCancellableOrdersForCustomer_result)that);
11813
      return false;
11814
    }
11815
 
11816
    public boolean equals(getCancellableOrdersForCustomer_result that) {
11817
      if (that == null)
11818
        return false;
11819
 
11820
      boolean this_present_success = true && this.isSetSuccess();
11821
      boolean that_present_success = true && that.isSetSuccess();
11822
      if (this_present_success || that_present_success) {
11823
        if (!(this_present_success && that_present_success))
11824
          return false;
11825
        if (!this.success.equals(that.success))
11826
          return false;
11827
      }
11828
 
11829
      boolean this_present_ex = true && this.isSetEx();
11830
      boolean that_present_ex = true && that.isSetEx();
11831
      if (this_present_ex || that_present_ex) {
11832
        if (!(this_present_ex && that_present_ex))
11833
          return false;
11834
        if (!this.ex.equals(that.ex))
11835
          return false;
11836
      }
11837
 
11838
      return true;
11839
    }
11840
 
11841
    @Override
11842
    public int hashCode() {
11843
      return 0;
11844
    }
11845
 
11846
    public int compareTo(getCancellableOrdersForCustomer_result other) {
11847
      if (!getClass().equals(other.getClass())) {
11848
        return getClass().getName().compareTo(other.getClass().getName());
11849
      }
11850
 
11851
      int lastComparison = 0;
11852
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
11853
 
11854
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11855
      if (lastComparison != 0) {
11856
        return lastComparison;
11857
      }
11858
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11859
      if (lastComparison != 0) {
11860
        return lastComparison;
11861
      }
11862
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11863
      if (lastComparison != 0) {
11864
        return lastComparison;
11865
      }
11866
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11867
      if (lastComparison != 0) {
11868
        return lastComparison;
11869
      }
11870
      return 0;
11871
    }
11872
 
11873
    public void read(TProtocol iprot) throws TException {
11874
      TField field;
11875
      iprot.readStructBegin();
11876
      while (true)
11877
      {
11878
        field = iprot.readFieldBegin();
11879
        if (field.type == TType.STOP) { 
11880
          break;
11881
        }
11882
        _Fields fieldId = _Fields.findByThriftId(field.id);
11883
        if (fieldId == null) {
11884
          TProtocolUtil.skip(iprot, field.type);
11885
        } else {
11886
          switch (fieldId) {
11887
            case SUCCESS:
11888
              if (field.type == TType.LIST) {
11889
                {
11890
                  TList _list28 = iprot.readListBegin();
11891
                  this.success = new ArrayList<Long>(_list28.size);
11892
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11893
                  {
11894
                    long _elem30;
11895
                    _elem30 = iprot.readI64();
11896
                    this.success.add(_elem30);
11897
                  }
11898
                  iprot.readListEnd();
11899
                }
11900
              } else { 
11901
                TProtocolUtil.skip(iprot, field.type);
11902
              }
11903
              break;
11904
            case EX:
11905
              if (field.type == TType.STRUCT) {
11906
                this.ex = new TransactionServiceException();
11907
                this.ex.read(iprot);
11908
              } else { 
11909
                TProtocolUtil.skip(iprot, field.type);
11910
              }
11911
              break;
11912
          }
11913
          iprot.readFieldEnd();
11914
        }
11915
      }
11916
      iprot.readStructEnd();
11917
      validate();
11918
    }
11919
 
11920
    public void write(TProtocol oprot) throws TException {
11921
      oprot.writeStructBegin(STRUCT_DESC);
11922
 
11923
      if (this.isSetSuccess()) {
11924
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11925
        {
11926
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11927
          for (long _iter31 : this.success)
11928
          {
11929
            oprot.writeI64(_iter31);
11930
          }
11931
          oprot.writeListEnd();
11932
        }
11933
        oprot.writeFieldEnd();
11934
      } else if (this.isSetEx()) {
11935
        oprot.writeFieldBegin(EX_FIELD_DESC);
11936
        this.ex.write(oprot);
11937
        oprot.writeFieldEnd();
11938
      }
11939
      oprot.writeFieldStop();
11940
      oprot.writeStructEnd();
11941
    }
11942
 
11943
    @Override
11944
    public String toString() {
11945
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11946
      boolean first = true;
11947
 
11948
      sb.append("success:");
11949
      if (this.success == null) {
11950
        sb.append("null");
11951
      } else {
11952
        sb.append(this.success);
11953
      }
11954
      first = false;
11955
      if (!first) sb.append(", ");
11956
      sb.append("ex:");
11957
      if (this.ex == null) {
11958
        sb.append("null");
11959
      } else {
11960
        sb.append(this.ex);
11961
      }
11962
      first = false;
11963
      sb.append(")");
11964
      return sb.toString();
11965
    }
11966
 
11967
    public void validate() throws TException {
11968
      // check for required fields
11969
    }
11970
 
11971
  }
11972
 
483 rajveer 11973
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11974
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11975
 
483 rajveer 11976
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11977
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11978
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11979
 
483 rajveer 11980
    private long orderId;
11981
    private OrderStatus status;
11982
    private String description;
68 ashish 11983
 
11984
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11985
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11986
      ORDER_ID((short)1, "orderId"),
11987
      /**
11988
       * 
11989
       * @see OrderStatus
11990
       */
11991
      STATUS((short)2, "status"),
11992
      DESCRIPTION((short)3, "description");
68 ashish 11993
 
11994
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11995
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11996
 
11997
      static {
11998
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11999
          byId.put((int)field._thriftId, field);
12000
          byName.put(field.getFieldName(), field);
12001
        }
12002
      }
12003
 
12004
      /**
12005
       * Find the _Fields constant that matches fieldId, or null if its not found.
12006
       */
12007
      public static _Fields findByThriftId(int fieldId) {
12008
        return byId.get(fieldId);
12009
      }
12010
 
12011
      /**
12012
       * Find the _Fields constant that matches fieldId, throwing an exception
12013
       * if it is not found.
12014
       */
12015
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12016
        _Fields fields = findByThriftId(fieldId);
12017
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12018
        return fields;
12019
      }
12020
 
12021
      /**
12022
       * Find the _Fields constant that matches name, or null if its not found.
12023
       */
12024
      public static _Fields findByName(String name) {
12025
        return byName.get(name);
12026
      }
12027
 
12028
      private final short _thriftId;
12029
      private final String _fieldName;
12030
 
12031
      _Fields(short thriftId, String fieldName) {
12032
        _thriftId = thriftId;
12033
        _fieldName = fieldName;
12034
      }
12035
 
12036
      public short getThriftFieldId() {
12037
        return _thriftId;
12038
      }
12039
 
12040
      public String getFieldName() {
12041
        return _fieldName;
12042
      }
12043
    }
12044
 
12045
    // isset id assignments
483 rajveer 12046
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 12047
    private BitSet __isset_bit_vector = new BitSet(1);
12048
 
12049
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 12050
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 12051
          new FieldValueMetaData(TType.I64)));
483 rajveer 12052
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
12053
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
12054
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
12055
          new FieldValueMetaData(TType.STRING)));
68 ashish 12056
    }});
12057
 
12058
    static {
483 rajveer 12059
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 12060
    }
12061
 
483 rajveer 12062
    public changeOrderStatus_args() {
68 ashish 12063
    }
12064
 
483 rajveer 12065
    public changeOrderStatus_args(
12066
      long orderId,
12067
      OrderStatus status,
12068
      String description)
68 ashish 12069
    {
12070
      this();
483 rajveer 12071
      this.orderId = orderId;
12072
      setOrderIdIsSet(true);
12073
      this.status = status;
12074
      this.description = description;
68 ashish 12075
    }
12076
 
12077
    /**
12078
     * Performs a deep copy on <i>other</i>.
12079
     */
483 rajveer 12080
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 12081
      __isset_bit_vector.clear();
12082
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 12083
      this.orderId = other.orderId;
12084
      if (other.isSetStatus()) {
12085
        this.status = other.status;
12086
      }
12087
      if (other.isSetDescription()) {
12088
        this.description = other.description;
12089
      }
68 ashish 12090
    }
12091
 
483 rajveer 12092
    public changeOrderStatus_args deepCopy() {
12093
      return new changeOrderStatus_args(this);
68 ashish 12094
    }
12095
 
12096
    @Deprecated
483 rajveer 12097
    public changeOrderStatus_args clone() {
12098
      return new changeOrderStatus_args(this);
68 ashish 12099
    }
12100
 
483 rajveer 12101
    public long getOrderId() {
12102
      return this.orderId;
68 ashish 12103
    }
12104
 
483 rajveer 12105
    public changeOrderStatus_args setOrderId(long orderId) {
12106
      this.orderId = orderId;
12107
      setOrderIdIsSet(true);
68 ashish 12108
      return this;
12109
    }
12110
 
483 rajveer 12111
    public void unsetOrderId() {
12112
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 12113
    }
12114
 
483 rajveer 12115
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12116
    public boolean isSetOrderId() {
12117
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 12118
    }
12119
 
483 rajveer 12120
    public void setOrderIdIsSet(boolean value) {
12121
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 12122
    }
12123
 
483 rajveer 12124
    /**
12125
     * 
12126
     * @see OrderStatus
12127
     */
12128
    public OrderStatus getStatus() {
12129
      return this.status;
68 ashish 12130
    }
12131
 
12132
    /**
483 rajveer 12133
     * 
12134
     * @see OrderStatus
68 ashish 12135
     */
483 rajveer 12136
    public changeOrderStatus_args setStatus(OrderStatus status) {
12137
      this.status = status;
68 ashish 12138
      return this;
12139
    }
12140
 
483 rajveer 12141
    public void unsetStatus() {
12142
      this.status = null;
68 ashish 12143
    }
12144
 
483 rajveer 12145
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
12146
    public boolean isSetStatus() {
12147
      return this.status != null;
68 ashish 12148
    }
12149
 
483 rajveer 12150
    public void setStatusIsSet(boolean value) {
68 ashish 12151
      if (!value) {
483 rajveer 12152
        this.status = null;
68 ashish 12153
      }
12154
    }
12155
 
483 rajveer 12156
    public String getDescription() {
12157
      return this.description;
68 ashish 12158
    }
12159
 
483 rajveer 12160
    public changeOrderStatus_args setDescription(String description) {
12161
      this.description = description;
68 ashish 12162
      return this;
12163
    }
12164
 
483 rajveer 12165
    public void unsetDescription() {
12166
      this.description = null;
68 ashish 12167
    }
12168
 
483 rajveer 12169
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
12170
    public boolean isSetDescription() {
12171
      return this.description != null;
68 ashish 12172
    }
12173
 
483 rajveer 12174
    public void setDescriptionIsSet(boolean value) {
68 ashish 12175
      if (!value) {
483 rajveer 12176
        this.description = null;
68 ashish 12177
      }
12178
    }
12179
 
12180
    public void setFieldValue(_Fields field, Object value) {
12181
      switch (field) {
483 rajveer 12182
      case ORDER_ID:
68 ashish 12183
        if (value == null) {
483 rajveer 12184
          unsetOrderId();
68 ashish 12185
        } else {
483 rajveer 12186
          setOrderId((Long)value);
68 ashish 12187
        }
12188
        break;
12189
 
483 rajveer 12190
      case STATUS:
68 ashish 12191
        if (value == null) {
483 rajveer 12192
          unsetStatus();
68 ashish 12193
        } else {
483 rajveer 12194
          setStatus((OrderStatus)value);
68 ashish 12195
        }
12196
        break;
12197
 
483 rajveer 12198
      case DESCRIPTION:
12199
        if (value == null) {
12200
          unsetDescription();
12201
        } else {
12202
          setDescription((String)value);
12203
        }
12204
        break;
12205
 
68 ashish 12206
      }
12207
    }
12208
 
12209
    public void setFieldValue(int fieldID, Object value) {
12210
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12211
    }
12212
 
12213
    public Object getFieldValue(_Fields field) {
12214
      switch (field) {
483 rajveer 12215
      case ORDER_ID:
12216
        return new Long(getOrderId());
68 ashish 12217
 
483 rajveer 12218
      case STATUS:
12219
        return getStatus();
68 ashish 12220
 
483 rajveer 12221
      case DESCRIPTION:
12222
        return getDescription();
12223
 
68 ashish 12224
      }
12225
      throw new IllegalStateException();
12226
    }
12227
 
12228
    public Object getFieldValue(int fieldId) {
12229
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12230
    }
12231
 
12232
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12233
    public boolean isSet(_Fields field) {
12234
      switch (field) {
483 rajveer 12235
      case ORDER_ID:
12236
        return isSetOrderId();
12237
      case STATUS:
12238
        return isSetStatus();
12239
      case DESCRIPTION:
12240
        return isSetDescription();
68 ashish 12241
      }
12242
      throw new IllegalStateException();
12243
    }
12244
 
12245
    public boolean isSet(int fieldID) {
12246
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12247
    }
12248
 
12249
    @Override
12250
    public boolean equals(Object that) {
12251
      if (that == null)
12252
        return false;
483 rajveer 12253
      if (that instanceof changeOrderStatus_args)
12254
        return this.equals((changeOrderStatus_args)that);
68 ashish 12255
      return false;
12256
    }
12257
 
483 rajveer 12258
    public boolean equals(changeOrderStatus_args that) {
68 ashish 12259
      if (that == null)
12260
        return false;
12261
 
483 rajveer 12262
      boolean this_present_orderId = true;
12263
      boolean that_present_orderId = true;
12264
      if (this_present_orderId || that_present_orderId) {
12265
        if (!(this_present_orderId && that_present_orderId))
68 ashish 12266
          return false;
483 rajveer 12267
        if (this.orderId != that.orderId)
68 ashish 12268
          return false;
12269
      }
12270
 
483 rajveer 12271
      boolean this_present_status = true && this.isSetStatus();
12272
      boolean that_present_status = true && that.isSetStatus();
12273
      if (this_present_status || that_present_status) {
12274
        if (!(this_present_status && that_present_status))
68 ashish 12275
          return false;
483 rajveer 12276
        if (!this.status.equals(that.status))
68 ashish 12277
          return false;
12278
      }
12279
 
483 rajveer 12280
      boolean this_present_description = true && this.isSetDescription();
12281
      boolean that_present_description = true && that.isSetDescription();
12282
      if (this_present_description || that_present_description) {
12283
        if (!(this_present_description && that_present_description))
12284
          return false;
12285
        if (!this.description.equals(that.description))
12286
          return false;
12287
      }
12288
 
68 ashish 12289
      return true;
12290
    }
12291
 
12292
    @Override
12293
    public int hashCode() {
12294
      return 0;
12295
    }
12296
 
483 rajveer 12297
    public int compareTo(changeOrderStatus_args other) {
12298
      if (!getClass().equals(other.getClass())) {
12299
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 12300
      }
12301
 
483 rajveer 12302
      int lastComparison = 0;
12303
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 12304
 
483 rajveer 12305
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12306
      if (lastComparison != 0) {
12307
        return lastComparison;
68 ashish 12308
      }
483 rajveer 12309
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12310
      if (lastComparison != 0) {
12311
        return lastComparison;
68 ashish 12312
      }
483 rajveer 12313
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
12314
      if (lastComparison != 0) {
12315
        return lastComparison;
68 ashish 12316
      }
483 rajveer 12317
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
12318
      if (lastComparison != 0) {
12319
        return lastComparison;
68 ashish 12320
      }
483 rajveer 12321
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
12322
      if (lastComparison != 0) {
12323
        return lastComparison;
68 ashish 12324
      }
483 rajveer 12325
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
12326
      if (lastComparison != 0) {
12327
        return lastComparison;
68 ashish 12328
      }
12329
      return 0;
12330
    }
12331
 
12332
    public void read(TProtocol iprot) throws TException {
12333
      TField field;
12334
      iprot.readStructBegin();
12335
      while (true)
12336
      {
12337
        field = iprot.readFieldBegin();
12338
        if (field.type == TType.STOP) { 
12339
          break;
12340
        }
12341
        _Fields fieldId = _Fields.findByThriftId(field.id);
12342
        if (fieldId == null) {
12343
          TProtocolUtil.skip(iprot, field.type);
12344
        } else {
12345
          switch (fieldId) {
483 rajveer 12346
            case ORDER_ID:
68 ashish 12347
              if (field.type == TType.I64) {
483 rajveer 12348
                this.orderId = iprot.readI64();
12349
                setOrderIdIsSet(true);
68 ashish 12350
              } else { 
12351
                TProtocolUtil.skip(iprot, field.type);
12352
              }
12353
              break;
483 rajveer 12354
            case STATUS:
12355
              if (field.type == TType.I32) {
12356
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 12357
              } else { 
12358
                TProtocolUtil.skip(iprot, field.type);
12359
              }
12360
              break;
483 rajveer 12361
            case DESCRIPTION:
12362
              if (field.type == TType.STRING) {
12363
                this.description = iprot.readString();
12364
              } else { 
12365
                TProtocolUtil.skip(iprot, field.type);
12366
              }
12367
              break;
68 ashish 12368
          }
12369
          iprot.readFieldEnd();
12370
        }
12371
      }
12372
      iprot.readStructEnd();
12373
      validate();
12374
    }
12375
 
12376
    public void write(TProtocol oprot) throws TException {
12377
      validate();
12378
 
12379
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12380
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12381
      oprot.writeI64(this.orderId);
68 ashish 12382
      oprot.writeFieldEnd();
483 rajveer 12383
      if (this.status != null) {
12384
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
12385
        oprot.writeI32(this.status.getValue());
68 ashish 12386
        oprot.writeFieldEnd();
12387
      }
483 rajveer 12388
      if (this.description != null) {
12389
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
12390
        oprot.writeString(this.description);
12391
        oprot.writeFieldEnd();
12392
      }
68 ashish 12393
      oprot.writeFieldStop();
12394
      oprot.writeStructEnd();
12395
    }
12396
 
12397
    @Override
12398
    public String toString() {
483 rajveer 12399
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 12400
      boolean first = true;
12401
 
483 rajveer 12402
      sb.append("orderId:");
12403
      sb.append(this.orderId);
68 ashish 12404
      first = false;
12405
      if (!first) sb.append(", ");
483 rajveer 12406
      sb.append("status:");
12407
      if (this.status == null) {
68 ashish 12408
        sb.append("null");
12409
      } else {
483 rajveer 12410
        String status_name = status.name();
12411
        if (status_name != null) {
12412
          sb.append(status_name);
12413
          sb.append(" (");
12414
        }
12415
        sb.append(this.status);
12416
        if (status_name != null) {
12417
          sb.append(")");
12418
        }
68 ashish 12419
      }
12420
      first = false;
483 rajveer 12421
      if (!first) sb.append(", ");
12422
      sb.append("description:");
12423
      if (this.description == null) {
12424
        sb.append("null");
12425
      } else {
12426
        sb.append(this.description);
12427
      }
12428
      first = false;
68 ashish 12429
      sb.append(")");
12430
      return sb.toString();
12431
    }
12432
 
12433
    public void validate() throws TException {
12434
      // check for required fields
12435
    }
12436
 
12437
  }
12438
 
483 rajveer 12439
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
12440
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 12441
 
12442
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12443
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12444
 
12445
    private boolean success;
12446
    private TransactionServiceException ex;
12447
 
12448
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12449
    public enum _Fields implements TFieldIdEnum {
12450
      SUCCESS((short)0, "success"),
12451
      EX((short)1, "ex");
12452
 
12453
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12454
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12455
 
12456
      static {
12457
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12458
          byId.put((int)field._thriftId, field);
12459
          byName.put(field.getFieldName(), field);
12460
        }
12461
      }
12462
 
12463
      /**
12464
       * Find the _Fields constant that matches fieldId, or null if its not found.
12465
       */
12466
      public static _Fields findByThriftId(int fieldId) {
12467
        return byId.get(fieldId);
12468
      }
12469
 
12470
      /**
12471
       * Find the _Fields constant that matches fieldId, throwing an exception
12472
       * if it is not found.
12473
       */
12474
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12475
        _Fields fields = findByThriftId(fieldId);
12476
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12477
        return fields;
12478
      }
12479
 
12480
      /**
12481
       * Find the _Fields constant that matches name, or null if its not found.
12482
       */
12483
      public static _Fields findByName(String name) {
12484
        return byName.get(name);
12485
      }
12486
 
12487
      private final short _thriftId;
12488
      private final String _fieldName;
12489
 
12490
      _Fields(short thriftId, String fieldName) {
12491
        _thriftId = thriftId;
12492
        _fieldName = fieldName;
12493
      }
12494
 
12495
      public short getThriftFieldId() {
12496
        return _thriftId;
12497
      }
12498
 
12499
      public String getFieldName() {
12500
        return _fieldName;
12501
      }
12502
    }
12503
 
12504
    // isset id assignments
12505
    private static final int __SUCCESS_ISSET_ID = 0;
12506
    private BitSet __isset_bit_vector = new BitSet(1);
12507
 
12508
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12509
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12510
          new FieldValueMetaData(TType.BOOL)));
12511
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12512
          new FieldValueMetaData(TType.STRUCT)));
12513
    }});
12514
 
12515
    static {
483 rajveer 12516
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 12517
    }
12518
 
483 rajveer 12519
    public changeOrderStatus_result() {
68 ashish 12520
    }
12521
 
483 rajveer 12522
    public changeOrderStatus_result(
68 ashish 12523
      boolean success,
12524
      TransactionServiceException ex)
12525
    {
12526
      this();
12527
      this.success = success;
12528
      setSuccessIsSet(true);
12529
      this.ex = ex;
12530
    }
12531
 
12532
    /**
12533
     * Performs a deep copy on <i>other</i>.
12534
     */
483 rajveer 12535
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 12536
      __isset_bit_vector.clear();
12537
      __isset_bit_vector.or(other.__isset_bit_vector);
12538
      this.success = other.success;
12539
      if (other.isSetEx()) {
12540
        this.ex = new TransactionServiceException(other.ex);
12541
      }
12542
    }
12543
 
483 rajveer 12544
    public changeOrderStatus_result deepCopy() {
12545
      return new changeOrderStatus_result(this);
68 ashish 12546
    }
12547
 
12548
    @Deprecated
483 rajveer 12549
    public changeOrderStatus_result clone() {
12550
      return new changeOrderStatus_result(this);
68 ashish 12551
    }
12552
 
12553
    public boolean isSuccess() {
12554
      return this.success;
12555
    }
12556
 
483 rajveer 12557
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 12558
      this.success = success;
12559
      setSuccessIsSet(true);
12560
      return this;
12561
    }
12562
 
12563
    public void unsetSuccess() {
12564
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12565
    }
12566
 
12567
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12568
    public boolean isSetSuccess() {
12569
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12570
    }
12571
 
12572
    public void setSuccessIsSet(boolean value) {
12573
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12574
    }
12575
 
12576
    public TransactionServiceException getEx() {
12577
      return this.ex;
12578
    }
12579
 
483 rajveer 12580
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 12581
      this.ex = ex;
12582
      return this;
12583
    }
12584
 
12585
    public void unsetEx() {
12586
      this.ex = null;
12587
    }
12588
 
12589
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12590
    public boolean isSetEx() {
12591
      return this.ex != null;
12592
    }
12593
 
12594
    public void setExIsSet(boolean value) {
12595
      if (!value) {
12596
        this.ex = null;
12597
      }
12598
    }
12599
 
12600
    public void setFieldValue(_Fields field, Object value) {
12601
      switch (field) {
12602
      case SUCCESS:
12603
        if (value == null) {
12604
          unsetSuccess();
12605
        } else {
12606
          setSuccess((Boolean)value);
12607
        }
12608
        break;
12609
 
12610
      case EX:
12611
        if (value == null) {
12612
          unsetEx();
12613
        } else {
12614
          setEx((TransactionServiceException)value);
12615
        }
12616
        break;
12617
 
12618
      }
12619
    }
12620
 
12621
    public void setFieldValue(int fieldID, Object value) {
12622
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12623
    }
12624
 
12625
    public Object getFieldValue(_Fields field) {
12626
      switch (field) {
12627
      case SUCCESS:
12628
        return new Boolean(isSuccess());
12629
 
12630
      case EX:
12631
        return getEx();
12632
 
12633
      }
12634
      throw new IllegalStateException();
12635
    }
12636
 
12637
    public Object getFieldValue(int fieldId) {
12638
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12639
    }
12640
 
12641
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12642
    public boolean isSet(_Fields field) {
12643
      switch (field) {
12644
      case SUCCESS:
12645
        return isSetSuccess();
12646
      case EX:
12647
        return isSetEx();
12648
      }
12649
      throw new IllegalStateException();
12650
    }
12651
 
12652
    public boolean isSet(int fieldID) {
12653
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12654
    }
12655
 
12656
    @Override
12657
    public boolean equals(Object that) {
12658
      if (that == null)
12659
        return false;
483 rajveer 12660
      if (that instanceof changeOrderStatus_result)
12661
        return this.equals((changeOrderStatus_result)that);
68 ashish 12662
      return false;
12663
    }
12664
 
483 rajveer 12665
    public boolean equals(changeOrderStatus_result that) {
68 ashish 12666
      if (that == null)
12667
        return false;
12668
 
12669
      boolean this_present_success = true;
12670
      boolean that_present_success = true;
12671
      if (this_present_success || that_present_success) {
12672
        if (!(this_present_success && that_present_success))
12673
          return false;
12674
        if (this.success != that.success)
12675
          return false;
12676
      }
12677
 
12678
      boolean this_present_ex = true && this.isSetEx();
12679
      boolean that_present_ex = true && that.isSetEx();
12680
      if (this_present_ex || that_present_ex) {
12681
        if (!(this_present_ex && that_present_ex))
12682
          return false;
12683
        if (!this.ex.equals(that.ex))
12684
          return false;
12685
      }
12686
 
12687
      return true;
12688
    }
12689
 
12690
    @Override
12691
    public int hashCode() {
12692
      return 0;
12693
    }
12694
 
483 rajveer 12695
    public int compareTo(changeOrderStatus_result other) {
68 ashish 12696
      if (!getClass().equals(other.getClass())) {
12697
        return getClass().getName().compareTo(other.getClass().getName());
12698
      }
12699
 
12700
      int lastComparison = 0;
483 rajveer 12701
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 12702
 
12703
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12704
      if (lastComparison != 0) {
12705
        return lastComparison;
12706
      }
12707
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12708
      if (lastComparison != 0) {
12709
        return lastComparison;
12710
      }
12711
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12712
      if (lastComparison != 0) {
12713
        return lastComparison;
12714
      }
12715
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12716
      if (lastComparison != 0) {
12717
        return lastComparison;
12718
      }
12719
      return 0;
12720
    }
12721
 
12722
    public void read(TProtocol iprot) throws TException {
12723
      TField field;
12724
      iprot.readStructBegin();
12725
      while (true)
12726
      {
12727
        field = iprot.readFieldBegin();
12728
        if (field.type == TType.STOP) { 
12729
          break;
12730
        }
12731
        _Fields fieldId = _Fields.findByThriftId(field.id);
12732
        if (fieldId == null) {
12733
          TProtocolUtil.skip(iprot, field.type);
12734
        } else {
12735
          switch (fieldId) {
12736
            case SUCCESS:
12737
              if (field.type == TType.BOOL) {
12738
                this.success = iprot.readBool();
12739
                setSuccessIsSet(true);
12740
              } else { 
12741
                TProtocolUtil.skip(iprot, field.type);
12742
              }
12743
              break;
12744
            case EX:
12745
              if (field.type == TType.STRUCT) {
12746
                this.ex = new TransactionServiceException();
12747
                this.ex.read(iprot);
12748
              } else { 
12749
                TProtocolUtil.skip(iprot, field.type);
12750
              }
12751
              break;
12752
          }
12753
          iprot.readFieldEnd();
12754
        }
12755
      }
12756
      iprot.readStructEnd();
12757
      validate();
12758
    }
12759
 
12760
    public void write(TProtocol oprot) throws TException {
12761
      oprot.writeStructBegin(STRUCT_DESC);
12762
 
12763
      if (this.isSetSuccess()) {
12764
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12765
        oprot.writeBool(this.success);
12766
        oprot.writeFieldEnd();
12767
      } else if (this.isSetEx()) {
12768
        oprot.writeFieldBegin(EX_FIELD_DESC);
12769
        this.ex.write(oprot);
12770
        oprot.writeFieldEnd();
12771
      }
12772
      oprot.writeFieldStop();
12773
      oprot.writeStructEnd();
12774
    }
12775
 
12776
    @Override
12777
    public String toString() {
483 rajveer 12778
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 12779
      boolean first = true;
12780
 
12781
      sb.append("success:");
12782
      sb.append(this.success);
12783
      first = false;
12784
      if (!first) sb.append(", ");
12785
      sb.append("ex:");
12786
      if (this.ex == null) {
12787
        sb.append("null");
12788
      } else {
12789
        sb.append(this.ex);
12790
      }
12791
      first = false;
12792
      sb.append(")");
12793
      return sb.toString();
12794
    }
12795
 
12796
    public void validate() throws TException {
12797
      // check for required fields
12798
    }
12799
 
12800
  }
12801
 
495 rajveer 12802
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
12803
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
12804
 
12805
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12806
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 12807
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 12808
 
12809
    private long orderId;
12810
    private String invoice_number;
12811
    private String billed_by;
12812
 
12813
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12814
    public enum _Fields implements TFieldIdEnum {
12815
      ORDER_ID((short)1, "orderId"),
12816
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 12817
      BILLED_BY((short)3, "billed_by");
495 rajveer 12818
 
12819
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12820
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12821
 
12822
      static {
12823
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12824
          byId.put((int)field._thriftId, field);
12825
          byName.put(field.getFieldName(), field);
12826
        }
12827
      }
12828
 
12829
      /**
12830
       * Find the _Fields constant that matches fieldId, or null if its not found.
12831
       */
12832
      public static _Fields findByThriftId(int fieldId) {
12833
        return byId.get(fieldId);
12834
      }
12835
 
12836
      /**
12837
       * Find the _Fields constant that matches fieldId, throwing an exception
12838
       * if it is not found.
12839
       */
12840
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12841
        _Fields fields = findByThriftId(fieldId);
12842
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12843
        return fields;
12844
      }
12845
 
12846
      /**
12847
       * Find the _Fields constant that matches name, or null if its not found.
12848
       */
12849
      public static _Fields findByName(String name) {
12850
        return byName.get(name);
12851
      }
12852
 
12853
      private final short _thriftId;
12854
      private final String _fieldName;
12855
 
12856
      _Fields(short thriftId, String fieldName) {
12857
        _thriftId = thriftId;
12858
        _fieldName = fieldName;
12859
      }
12860
 
12861
      public short getThriftFieldId() {
12862
        return _thriftId;
12863
      }
12864
 
12865
      public String getFieldName() {
12866
        return _fieldName;
12867
      }
12868
    }
12869
 
12870
    // isset id assignments
12871
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12872
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12873
 
12874
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12875
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12876
          new FieldValueMetaData(TType.I64)));
12877
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12878
          new FieldValueMetaData(TType.STRING)));
12879
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12880
          new FieldValueMetaData(TType.STRING)));
12881
    }});
12882
 
12883
    static {
12884
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12885
    }
12886
 
12887
    public addBillingDetails_args() {
12888
    }
12889
 
12890
    public addBillingDetails_args(
12891
      long orderId,
12892
      String invoice_number,
12893
      String billed_by)
12894
    {
12895
      this();
12896
      this.orderId = orderId;
12897
      setOrderIdIsSet(true);
12898
      this.invoice_number = invoice_number;
12899
      this.billed_by = billed_by;
12900
    }
12901
 
12902
    /**
12903
     * Performs a deep copy on <i>other</i>.
12904
     */
12905
    public addBillingDetails_args(addBillingDetails_args other) {
12906
      __isset_bit_vector.clear();
12907
      __isset_bit_vector.or(other.__isset_bit_vector);
12908
      this.orderId = other.orderId;
12909
      if (other.isSetInvoice_number()) {
12910
        this.invoice_number = other.invoice_number;
12911
      }
12912
      if (other.isSetBilled_by()) {
12913
        this.billed_by = other.billed_by;
12914
      }
12915
    }
12916
 
12917
    public addBillingDetails_args deepCopy() {
12918
      return new addBillingDetails_args(this);
12919
    }
12920
 
12921
    @Deprecated
12922
    public addBillingDetails_args clone() {
12923
      return new addBillingDetails_args(this);
12924
    }
12925
 
12926
    public long getOrderId() {
12927
      return this.orderId;
12928
    }
12929
 
12930
    public addBillingDetails_args setOrderId(long orderId) {
12931
      this.orderId = orderId;
12932
      setOrderIdIsSet(true);
12933
      return this;
12934
    }
12935
 
12936
    public void unsetOrderId() {
12937
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12938
    }
12939
 
12940
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12941
    public boolean isSetOrderId() {
12942
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12943
    }
12944
 
12945
    public void setOrderIdIsSet(boolean value) {
12946
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12947
    }
12948
 
12949
    public String getInvoice_number() {
12950
      return this.invoice_number;
12951
    }
12952
 
12953
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12954
      this.invoice_number = invoice_number;
12955
      return this;
12956
    }
12957
 
12958
    public void unsetInvoice_number() {
12959
      this.invoice_number = null;
12960
    }
12961
 
12962
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12963
    public boolean isSetInvoice_number() {
12964
      return this.invoice_number != null;
12965
    }
12966
 
12967
    public void setInvoice_numberIsSet(boolean value) {
12968
      if (!value) {
12969
        this.invoice_number = null;
12970
      }
12971
    }
12972
 
12973
    public String getBilled_by() {
12974
      return this.billed_by;
12975
    }
12976
 
12977
    public addBillingDetails_args setBilled_by(String billed_by) {
12978
      this.billed_by = billed_by;
12979
      return this;
12980
    }
12981
 
12982
    public void unsetBilled_by() {
12983
      this.billed_by = null;
12984
    }
12985
 
12986
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12987
    public boolean isSetBilled_by() {
12988
      return this.billed_by != null;
12989
    }
12990
 
12991
    public void setBilled_byIsSet(boolean value) {
12992
      if (!value) {
12993
        this.billed_by = null;
12994
      }
12995
    }
12996
 
12997
    public void setFieldValue(_Fields field, Object value) {
12998
      switch (field) {
12999
      case ORDER_ID:
13000
        if (value == null) {
13001
          unsetOrderId();
13002
        } else {
13003
          setOrderId((Long)value);
13004
        }
13005
        break;
13006
 
13007
      case INVOICE_NUMBER:
13008
        if (value == null) {
13009
          unsetInvoice_number();
13010
        } else {
13011
          setInvoice_number((String)value);
13012
        }
13013
        break;
13014
 
13015
      case BILLED_BY:
13016
        if (value == null) {
13017
          unsetBilled_by();
13018
        } else {
13019
          setBilled_by((String)value);
13020
        }
13021
        break;
13022
 
13023
      }
13024
    }
13025
 
13026
    public void setFieldValue(int fieldID, Object value) {
13027
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13028
    }
13029
 
13030
    public Object getFieldValue(_Fields field) {
13031
      switch (field) {
13032
      case ORDER_ID:
13033
        return new Long(getOrderId());
13034
 
13035
      case INVOICE_NUMBER:
13036
        return getInvoice_number();
13037
 
13038
      case BILLED_BY:
13039
        return getBilled_by();
13040
 
13041
      }
13042
      throw new IllegalStateException();
13043
    }
13044
 
13045
    public Object getFieldValue(int fieldId) {
13046
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13047
    }
13048
 
13049
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13050
    public boolean isSet(_Fields field) {
13051
      switch (field) {
13052
      case ORDER_ID:
13053
        return isSetOrderId();
13054
      case INVOICE_NUMBER:
13055
        return isSetInvoice_number();
13056
      case BILLED_BY:
13057
        return isSetBilled_by();
13058
      }
13059
      throw new IllegalStateException();
13060
    }
13061
 
13062
    public boolean isSet(int fieldID) {
13063
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13064
    }
13065
 
13066
    @Override
13067
    public boolean equals(Object that) {
13068
      if (that == null)
13069
        return false;
13070
      if (that instanceof addBillingDetails_args)
13071
        return this.equals((addBillingDetails_args)that);
13072
      return false;
13073
    }
13074
 
13075
    public boolean equals(addBillingDetails_args that) {
13076
      if (that == null)
13077
        return false;
13078
 
13079
      boolean this_present_orderId = true;
13080
      boolean that_present_orderId = true;
13081
      if (this_present_orderId || that_present_orderId) {
13082
        if (!(this_present_orderId && that_present_orderId))
13083
          return false;
13084
        if (this.orderId != that.orderId)
13085
          return false;
13086
      }
13087
 
13088
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
13089
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
13090
      if (this_present_invoice_number || that_present_invoice_number) {
13091
        if (!(this_present_invoice_number && that_present_invoice_number))
13092
          return false;
13093
        if (!this.invoice_number.equals(that.invoice_number))
13094
          return false;
13095
      }
13096
 
13097
      boolean this_present_billed_by = true && this.isSetBilled_by();
13098
      boolean that_present_billed_by = true && that.isSetBilled_by();
13099
      if (this_present_billed_by || that_present_billed_by) {
13100
        if (!(this_present_billed_by && that_present_billed_by))
13101
          return false;
13102
        if (!this.billed_by.equals(that.billed_by))
13103
          return false;
13104
      }
13105
 
13106
      return true;
13107
    }
13108
 
13109
    @Override
13110
    public int hashCode() {
13111
      return 0;
13112
    }
13113
 
13114
    public int compareTo(addBillingDetails_args other) {
13115
      if (!getClass().equals(other.getClass())) {
13116
        return getClass().getName().compareTo(other.getClass().getName());
13117
      }
13118
 
13119
      int lastComparison = 0;
13120
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
13121
 
13122
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13123
      if (lastComparison != 0) {
13124
        return lastComparison;
13125
      }
13126
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13127
      if (lastComparison != 0) {
13128
        return lastComparison;
13129
      }
13130
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
13131
      if (lastComparison != 0) {
13132
        return lastComparison;
13133
      }
13134
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
13135
      if (lastComparison != 0) {
13136
        return lastComparison;
13137
      }
13138
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
13139
      if (lastComparison != 0) {
13140
        return lastComparison;
13141
      }
13142
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
13143
      if (lastComparison != 0) {
13144
        return lastComparison;
13145
      }
13146
      return 0;
13147
    }
13148
 
13149
    public void read(TProtocol iprot) throws TException {
13150
      TField field;
13151
      iprot.readStructBegin();
13152
      while (true)
13153
      {
13154
        field = iprot.readFieldBegin();
13155
        if (field.type == TType.STOP) { 
13156
          break;
13157
        }
13158
        _Fields fieldId = _Fields.findByThriftId(field.id);
13159
        if (fieldId == null) {
13160
          TProtocolUtil.skip(iprot, field.type);
13161
        } else {
13162
          switch (fieldId) {
13163
            case ORDER_ID:
13164
              if (field.type == TType.I64) {
13165
                this.orderId = iprot.readI64();
13166
                setOrderIdIsSet(true);
13167
              } else { 
13168
                TProtocolUtil.skip(iprot, field.type);
13169
              }
13170
              break;
13171
            case INVOICE_NUMBER:
13172
              if (field.type == TType.STRING) {
13173
                this.invoice_number = iprot.readString();
13174
              } else { 
13175
                TProtocolUtil.skip(iprot, field.type);
13176
              }
13177
              break;
13178
            case BILLED_BY:
13179
              if (field.type == TType.STRING) {
13180
                this.billed_by = iprot.readString();
13181
              } else { 
13182
                TProtocolUtil.skip(iprot, field.type);
13183
              }
13184
              break;
13185
          }
13186
          iprot.readFieldEnd();
13187
        }
13188
      }
13189
      iprot.readStructEnd();
13190
      validate();
13191
    }
13192
 
13193
    public void write(TProtocol oprot) throws TException {
13194
      validate();
13195
 
13196
      oprot.writeStructBegin(STRUCT_DESC);
13197
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13198
      oprot.writeI64(this.orderId);
13199
      oprot.writeFieldEnd();
13200
      if (this.invoice_number != null) {
13201
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
13202
        oprot.writeString(this.invoice_number);
13203
        oprot.writeFieldEnd();
13204
      }
13205
      if (this.billed_by != null) {
13206
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
13207
        oprot.writeString(this.billed_by);
13208
        oprot.writeFieldEnd();
13209
      }
13210
      oprot.writeFieldStop();
13211
      oprot.writeStructEnd();
13212
    }
13213
 
13214
    @Override
13215
    public String toString() {
13216
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
13217
      boolean first = true;
13218
 
13219
      sb.append("orderId:");
13220
      sb.append(this.orderId);
13221
      first = false;
13222
      if (!first) sb.append(", ");
13223
      sb.append("invoice_number:");
13224
      if (this.invoice_number == null) {
13225
        sb.append("null");
13226
      } else {
13227
        sb.append(this.invoice_number);
13228
      }
13229
      first = false;
13230
      if (!first) sb.append(", ");
13231
      sb.append("billed_by:");
13232
      if (this.billed_by == null) {
13233
        sb.append("null");
13234
      } else {
13235
        sb.append(this.billed_by);
13236
      }
13237
      first = false;
13238
      sb.append(")");
13239
      return sb.toString();
13240
    }
13241
 
13242
    public void validate() throws TException {
13243
      // check for required fields
13244
    }
13245
 
13246
  }
13247
 
13248
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
13249
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
13250
 
13251
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13252
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13253
 
13254
    private boolean success;
13255
    private TransactionServiceException ex;
13256
 
13257
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13258
    public enum _Fields implements TFieldIdEnum {
13259
      SUCCESS((short)0, "success"),
13260
      EX((short)1, "ex");
13261
 
13262
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13263
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13264
 
13265
      static {
13266
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13267
          byId.put((int)field._thriftId, field);
13268
          byName.put(field.getFieldName(), field);
13269
        }
13270
      }
13271
 
13272
      /**
13273
       * Find the _Fields constant that matches fieldId, or null if its not found.
13274
       */
13275
      public static _Fields findByThriftId(int fieldId) {
13276
        return byId.get(fieldId);
13277
      }
13278
 
13279
      /**
13280
       * Find the _Fields constant that matches fieldId, throwing an exception
13281
       * if it is not found.
13282
       */
13283
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13284
        _Fields fields = findByThriftId(fieldId);
13285
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13286
        return fields;
13287
      }
13288
 
13289
      /**
13290
       * Find the _Fields constant that matches name, or null if its not found.
13291
       */
13292
      public static _Fields findByName(String name) {
13293
        return byName.get(name);
13294
      }
13295
 
13296
      private final short _thriftId;
13297
      private final String _fieldName;
13298
 
13299
      _Fields(short thriftId, String fieldName) {
13300
        _thriftId = thriftId;
13301
        _fieldName = fieldName;
13302
      }
13303
 
13304
      public short getThriftFieldId() {
13305
        return _thriftId;
13306
      }
13307
 
13308
      public String getFieldName() {
13309
        return _fieldName;
13310
      }
13311
    }
13312
 
13313
    // isset id assignments
13314
    private static final int __SUCCESS_ISSET_ID = 0;
13315
    private BitSet __isset_bit_vector = new BitSet(1);
13316
 
13317
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13318
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13319
          new FieldValueMetaData(TType.BOOL)));
13320
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13321
          new FieldValueMetaData(TType.STRUCT)));
13322
    }});
13323
 
13324
    static {
13325
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
13326
    }
13327
 
13328
    public addBillingDetails_result() {
13329
    }
13330
 
13331
    public addBillingDetails_result(
13332
      boolean success,
13333
      TransactionServiceException ex)
13334
    {
13335
      this();
13336
      this.success = success;
13337
      setSuccessIsSet(true);
13338
      this.ex = ex;
13339
    }
13340
 
13341
    /**
13342
     * Performs a deep copy on <i>other</i>.
13343
     */
13344
    public addBillingDetails_result(addBillingDetails_result other) {
13345
      __isset_bit_vector.clear();
13346
      __isset_bit_vector.or(other.__isset_bit_vector);
13347
      this.success = other.success;
13348
      if (other.isSetEx()) {
13349
        this.ex = new TransactionServiceException(other.ex);
13350
      }
13351
    }
13352
 
13353
    public addBillingDetails_result deepCopy() {
13354
      return new addBillingDetails_result(this);
13355
    }
13356
 
13357
    @Deprecated
13358
    public addBillingDetails_result clone() {
13359
      return new addBillingDetails_result(this);
13360
    }
13361
 
13362
    public boolean isSuccess() {
13363
      return this.success;
13364
    }
13365
 
13366
    public addBillingDetails_result setSuccess(boolean success) {
13367
      this.success = success;
13368
      setSuccessIsSet(true);
13369
      return this;
13370
    }
13371
 
13372
    public void unsetSuccess() {
13373
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13374
    }
13375
 
13376
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13377
    public boolean isSetSuccess() {
13378
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13379
    }
13380
 
13381
    public void setSuccessIsSet(boolean value) {
13382
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13383
    }
13384
 
13385
    public TransactionServiceException getEx() {
13386
      return this.ex;
13387
    }
13388
 
13389
    public addBillingDetails_result setEx(TransactionServiceException ex) {
13390
      this.ex = ex;
13391
      return this;
13392
    }
13393
 
13394
    public void unsetEx() {
13395
      this.ex = null;
13396
    }
13397
 
13398
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13399
    public boolean isSetEx() {
13400
      return this.ex != null;
13401
    }
13402
 
13403
    public void setExIsSet(boolean value) {
13404
      if (!value) {
13405
        this.ex = null;
13406
      }
13407
    }
13408
 
13409
    public void setFieldValue(_Fields field, Object value) {
13410
      switch (field) {
13411
      case SUCCESS:
13412
        if (value == null) {
13413
          unsetSuccess();
13414
        } else {
13415
          setSuccess((Boolean)value);
13416
        }
13417
        break;
13418
 
13419
      case EX:
13420
        if (value == null) {
13421
          unsetEx();
13422
        } else {
13423
          setEx((TransactionServiceException)value);
13424
        }
13425
        break;
13426
 
13427
      }
13428
    }
13429
 
13430
    public void setFieldValue(int fieldID, Object value) {
13431
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13432
    }
13433
 
13434
    public Object getFieldValue(_Fields field) {
13435
      switch (field) {
13436
      case SUCCESS:
13437
        return new Boolean(isSuccess());
13438
 
13439
      case EX:
13440
        return getEx();
13441
 
13442
      }
13443
      throw new IllegalStateException();
13444
    }
13445
 
13446
    public Object getFieldValue(int fieldId) {
13447
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13448
    }
13449
 
13450
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13451
    public boolean isSet(_Fields field) {
13452
      switch (field) {
13453
      case SUCCESS:
13454
        return isSetSuccess();
13455
      case EX:
13456
        return isSetEx();
13457
      }
13458
      throw new IllegalStateException();
13459
    }
13460
 
13461
    public boolean isSet(int fieldID) {
13462
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13463
    }
13464
 
13465
    @Override
13466
    public boolean equals(Object that) {
13467
      if (that == null)
13468
        return false;
13469
      if (that instanceof addBillingDetails_result)
13470
        return this.equals((addBillingDetails_result)that);
13471
      return false;
13472
    }
13473
 
13474
    public boolean equals(addBillingDetails_result that) {
13475
      if (that == null)
13476
        return false;
13477
 
13478
      boolean this_present_success = true;
13479
      boolean that_present_success = true;
13480
      if (this_present_success || that_present_success) {
13481
        if (!(this_present_success && that_present_success))
13482
          return false;
13483
        if (this.success != that.success)
13484
          return false;
13485
      }
13486
 
13487
      boolean this_present_ex = true && this.isSetEx();
13488
      boolean that_present_ex = true && that.isSetEx();
13489
      if (this_present_ex || that_present_ex) {
13490
        if (!(this_present_ex && that_present_ex))
13491
          return false;
13492
        if (!this.ex.equals(that.ex))
13493
          return false;
13494
      }
13495
 
13496
      return true;
13497
    }
13498
 
13499
    @Override
13500
    public int hashCode() {
13501
      return 0;
13502
    }
13503
 
13504
    public int compareTo(addBillingDetails_result other) {
13505
      if (!getClass().equals(other.getClass())) {
13506
        return getClass().getName().compareTo(other.getClass().getName());
13507
      }
13508
 
13509
      int lastComparison = 0;
13510
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
13511
 
13512
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13513
      if (lastComparison != 0) {
13514
        return lastComparison;
13515
      }
13516
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13517
      if (lastComparison != 0) {
13518
        return lastComparison;
13519
      }
13520
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13521
      if (lastComparison != 0) {
13522
        return lastComparison;
13523
      }
13524
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13525
      if (lastComparison != 0) {
13526
        return lastComparison;
13527
      }
13528
      return 0;
13529
    }
13530
 
13531
    public void read(TProtocol iprot) throws TException {
13532
      TField field;
13533
      iprot.readStructBegin();
13534
      while (true)
13535
      {
13536
        field = iprot.readFieldBegin();
13537
        if (field.type == TType.STOP) { 
13538
          break;
13539
        }
13540
        _Fields fieldId = _Fields.findByThriftId(field.id);
13541
        if (fieldId == null) {
13542
          TProtocolUtil.skip(iprot, field.type);
13543
        } else {
13544
          switch (fieldId) {
13545
            case SUCCESS:
13546
              if (field.type == TType.BOOL) {
13547
                this.success = iprot.readBool();
13548
                setSuccessIsSet(true);
13549
              } else { 
13550
                TProtocolUtil.skip(iprot, field.type);
13551
              }
13552
              break;
13553
            case EX:
13554
              if (field.type == TType.STRUCT) {
13555
                this.ex = new TransactionServiceException();
13556
                this.ex.read(iprot);
13557
              } else { 
13558
                TProtocolUtil.skip(iprot, field.type);
13559
              }
13560
              break;
13561
          }
13562
          iprot.readFieldEnd();
13563
        }
13564
      }
13565
      iprot.readStructEnd();
13566
      validate();
13567
    }
13568
 
13569
    public void write(TProtocol oprot) throws TException {
13570
      oprot.writeStructBegin(STRUCT_DESC);
13571
 
13572
      if (this.isSetSuccess()) {
13573
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13574
        oprot.writeBool(this.success);
13575
        oprot.writeFieldEnd();
13576
      } else if (this.isSetEx()) {
13577
        oprot.writeFieldBegin(EX_FIELD_DESC);
13578
        this.ex.write(oprot);
13579
        oprot.writeFieldEnd();
13580
      }
13581
      oprot.writeFieldStop();
13582
      oprot.writeStructEnd();
13583
    }
13584
 
13585
    @Override
13586
    public String toString() {
13587
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
13588
      boolean first = true;
13589
 
13590
      sb.append("success:");
13591
      sb.append(this.success);
13592
      first = false;
13593
      if (!first) sb.append(", ");
13594
      sb.append("ex:");
13595
      if (this.ex == null) {
13596
        sb.append("null");
13597
      } else {
13598
        sb.append(this.ex);
13599
      }
13600
      first = false;
13601
      sb.append(")");
13602
      return sb.toString();
13603
    }
13604
 
13605
    public void validate() throws TException {
13606
      // check for required fields
13607
    }
13608
 
13609
  }
13610
 
1148 chandransh 13611
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
13612
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
13613
 
13614
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13615
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
13616
 
13617
    private long orderId;
13618
    private long jacketNumber;
13619
 
13620
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13621
    public enum _Fields implements TFieldIdEnum {
13622
      ORDER_ID((short)1, "orderId"),
2383 rajveer 13623
      JACKET_NUMBER((short)2, "jacketNumber");
1148 chandransh 13624
 
13625
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13626
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13627
 
13628
      static {
13629
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13630
          byId.put((int)field._thriftId, field);
13631
          byName.put(field.getFieldName(), field);
13632
        }
13633
      }
13634
 
13635
      /**
13636
       * Find the _Fields constant that matches fieldId, or null if its not found.
13637
       */
13638
      public static _Fields findByThriftId(int fieldId) {
13639
        return byId.get(fieldId);
13640
      }
13641
 
13642
      /**
13643
       * Find the _Fields constant that matches fieldId, throwing an exception
13644
       * if it is not found.
13645
       */
13646
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13647
        _Fields fields = findByThriftId(fieldId);
13648
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13649
        return fields;
13650
      }
13651
 
13652
      /**
13653
       * Find the _Fields constant that matches name, or null if its not found.
13654
       */
13655
      public static _Fields findByName(String name) {
13656
        return byName.get(name);
13657
      }
13658
 
13659
      private final short _thriftId;
13660
      private final String _fieldName;
13661
 
13662
      _Fields(short thriftId, String fieldName) {
13663
        _thriftId = thriftId;
13664
        _fieldName = fieldName;
13665
      }
13666
 
13667
      public short getThriftFieldId() {
13668
        return _thriftId;
13669
      }
13670
 
13671
      public String getFieldName() {
13672
        return _fieldName;
13673
      }
13674
    }
13675
 
13676
    // isset id assignments
13677
    private static final int __ORDERID_ISSET_ID = 0;
13678
    private static final int __JACKETNUMBER_ISSET_ID = 1;
2383 rajveer 13679
    private BitSet __isset_bit_vector = new BitSet(2);
1148 chandransh 13680
 
13681
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13682
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13683
          new FieldValueMetaData(TType.I64)));
13684
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
13685
          new FieldValueMetaData(TType.I64)));
13686
    }});
13687
 
13688
    static {
13689
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
13690
    }
13691
 
13692
    public addJacketNumber_args() {
13693
    }
13694
 
13695
    public addJacketNumber_args(
13696
      long orderId,
2383 rajveer 13697
      long jacketNumber)
1148 chandransh 13698
    {
13699
      this();
13700
      this.orderId = orderId;
13701
      setOrderIdIsSet(true);
13702
      this.jacketNumber = jacketNumber;
13703
      setJacketNumberIsSet(true);
13704
    }
13705
 
13706
    /**
13707
     * Performs a deep copy on <i>other</i>.
13708
     */
13709
    public addJacketNumber_args(addJacketNumber_args other) {
13710
      __isset_bit_vector.clear();
13711
      __isset_bit_vector.or(other.__isset_bit_vector);
13712
      this.orderId = other.orderId;
13713
      this.jacketNumber = other.jacketNumber;
13714
    }
13715
 
13716
    public addJacketNumber_args deepCopy() {
13717
      return new addJacketNumber_args(this);
13718
    }
13719
 
13720
    @Deprecated
13721
    public addJacketNumber_args clone() {
13722
      return new addJacketNumber_args(this);
13723
    }
13724
 
13725
    public long getOrderId() {
13726
      return this.orderId;
13727
    }
13728
 
13729
    public addJacketNumber_args setOrderId(long orderId) {
13730
      this.orderId = orderId;
13731
      setOrderIdIsSet(true);
13732
      return this;
13733
    }
13734
 
13735
    public void unsetOrderId() {
13736
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13737
    }
13738
 
13739
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13740
    public boolean isSetOrderId() {
13741
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13742
    }
13743
 
13744
    public void setOrderIdIsSet(boolean value) {
13745
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13746
    }
13747
 
13748
    public long getJacketNumber() {
13749
      return this.jacketNumber;
13750
    }
13751
 
13752
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
13753
      this.jacketNumber = jacketNumber;
13754
      setJacketNumberIsSet(true);
13755
      return this;
13756
    }
13757
 
13758
    public void unsetJacketNumber() {
13759
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
13760
    }
13761
 
13762
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
13763
    public boolean isSetJacketNumber() {
13764
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
13765
    }
13766
 
13767
    public void setJacketNumberIsSet(boolean value) {
13768
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
13769
    }
13770
 
13771
    public void setFieldValue(_Fields field, Object value) {
13772
      switch (field) {
13773
      case ORDER_ID:
13774
        if (value == null) {
13775
          unsetOrderId();
13776
        } else {
13777
          setOrderId((Long)value);
13778
        }
13779
        break;
13780
 
13781
      case JACKET_NUMBER:
13782
        if (value == null) {
13783
          unsetJacketNumber();
13784
        } else {
13785
          setJacketNumber((Long)value);
13786
        }
13787
        break;
13788
 
13789
      }
13790
    }
13791
 
13792
    public void setFieldValue(int fieldID, Object value) {
13793
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13794
    }
13795
 
13796
    public Object getFieldValue(_Fields field) {
13797
      switch (field) {
13798
      case ORDER_ID:
13799
        return new Long(getOrderId());
13800
 
13801
      case JACKET_NUMBER:
13802
        return new Long(getJacketNumber());
13803
 
13804
      }
13805
      throw new IllegalStateException();
13806
    }
13807
 
13808
    public Object getFieldValue(int fieldId) {
13809
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13810
    }
13811
 
13812
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13813
    public boolean isSet(_Fields field) {
13814
      switch (field) {
13815
      case ORDER_ID:
13816
        return isSetOrderId();
13817
      case JACKET_NUMBER:
13818
        return isSetJacketNumber();
13819
      }
13820
      throw new IllegalStateException();
13821
    }
13822
 
13823
    public boolean isSet(int fieldID) {
13824
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13825
    }
13826
 
13827
    @Override
13828
    public boolean equals(Object that) {
13829
      if (that == null)
13830
        return false;
13831
      if (that instanceof addJacketNumber_args)
13832
        return this.equals((addJacketNumber_args)that);
13833
      return false;
13834
    }
13835
 
13836
    public boolean equals(addJacketNumber_args that) {
13837
      if (that == null)
13838
        return false;
13839
 
13840
      boolean this_present_orderId = true;
13841
      boolean that_present_orderId = true;
13842
      if (this_present_orderId || that_present_orderId) {
13843
        if (!(this_present_orderId && that_present_orderId))
13844
          return false;
13845
        if (this.orderId != that.orderId)
13846
          return false;
13847
      }
13848
 
13849
      boolean this_present_jacketNumber = true;
13850
      boolean that_present_jacketNumber = true;
13851
      if (this_present_jacketNumber || that_present_jacketNumber) {
13852
        if (!(this_present_jacketNumber && that_present_jacketNumber))
13853
          return false;
13854
        if (this.jacketNumber != that.jacketNumber)
13855
          return false;
13856
      }
13857
 
13858
      return true;
13859
    }
13860
 
13861
    @Override
13862
    public int hashCode() {
13863
      return 0;
13864
    }
13865
 
13866
    public int compareTo(addJacketNumber_args other) {
13867
      if (!getClass().equals(other.getClass())) {
13868
        return getClass().getName().compareTo(other.getClass().getName());
13869
      }
13870
 
13871
      int lastComparison = 0;
13872
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13873
 
13874
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13875
      if (lastComparison != 0) {
13876
        return lastComparison;
13877
      }
13878
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13879
      if (lastComparison != 0) {
13880
        return lastComparison;
13881
      }
13882
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13883
      if (lastComparison != 0) {
13884
        return lastComparison;
13885
      }
13886
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13887
      if (lastComparison != 0) {
13888
        return lastComparison;
13889
      }
13890
      return 0;
13891
    }
13892
 
13893
    public void read(TProtocol iprot) throws TException {
13894
      TField field;
13895
      iprot.readStructBegin();
13896
      while (true)
13897
      {
13898
        field = iprot.readFieldBegin();
13899
        if (field.type == TType.STOP) { 
13900
          break;
13901
        }
13902
        _Fields fieldId = _Fields.findByThriftId(field.id);
13903
        if (fieldId == null) {
13904
          TProtocolUtil.skip(iprot, field.type);
13905
        } else {
13906
          switch (fieldId) {
13907
            case ORDER_ID:
13908
              if (field.type == TType.I64) {
13909
                this.orderId = iprot.readI64();
13910
                setOrderIdIsSet(true);
13911
              } else { 
13912
                TProtocolUtil.skip(iprot, field.type);
13913
              }
13914
              break;
13915
            case JACKET_NUMBER:
13916
              if (field.type == TType.I64) {
13917
                this.jacketNumber = iprot.readI64();
13918
                setJacketNumberIsSet(true);
13919
              } else { 
13920
                TProtocolUtil.skip(iprot, field.type);
13921
              }
13922
              break;
13923
          }
13924
          iprot.readFieldEnd();
13925
        }
13926
      }
13927
      iprot.readStructEnd();
13928
      validate();
13929
    }
13930
 
13931
    public void write(TProtocol oprot) throws TException {
13932
      validate();
13933
 
13934
      oprot.writeStructBegin(STRUCT_DESC);
13935
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13936
      oprot.writeI64(this.orderId);
13937
      oprot.writeFieldEnd();
13938
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13939
      oprot.writeI64(this.jacketNumber);
13940
      oprot.writeFieldEnd();
13941
      oprot.writeFieldStop();
13942
      oprot.writeStructEnd();
13943
    }
13944
 
13945
    @Override
13946
    public String toString() {
13947
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13948
      boolean first = true;
13949
 
13950
      sb.append("orderId:");
13951
      sb.append(this.orderId);
13952
      first = false;
13953
      if (!first) sb.append(", ");
13954
      sb.append("jacketNumber:");
13955
      sb.append(this.jacketNumber);
13956
      first = false;
13957
      sb.append(")");
13958
      return sb.toString();
13959
    }
13960
 
13961
    public void validate() throws TException {
13962
      // check for required fields
13963
    }
13964
 
13965
  }
13966
 
13967
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13968
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13969
 
13970
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13971
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13972
 
13973
    private boolean success;
13974
    private TransactionServiceException ex;
13975
 
13976
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13977
    public enum _Fields implements TFieldIdEnum {
13978
      SUCCESS((short)0, "success"),
13979
      EX((short)1, "ex");
13980
 
13981
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13982
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13983
 
13984
      static {
13985
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13986
          byId.put((int)field._thriftId, field);
13987
          byName.put(field.getFieldName(), field);
13988
        }
13989
      }
13990
 
13991
      /**
13992
       * Find the _Fields constant that matches fieldId, or null if its not found.
13993
       */
13994
      public static _Fields findByThriftId(int fieldId) {
13995
        return byId.get(fieldId);
13996
      }
13997
 
13998
      /**
13999
       * Find the _Fields constant that matches fieldId, throwing an exception
14000
       * if it is not found.
14001
       */
14002
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14003
        _Fields fields = findByThriftId(fieldId);
14004
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14005
        return fields;
14006
      }
14007
 
14008
      /**
14009
       * Find the _Fields constant that matches name, or null if its not found.
14010
       */
14011
      public static _Fields findByName(String name) {
14012
        return byName.get(name);
14013
      }
14014
 
14015
      private final short _thriftId;
14016
      private final String _fieldName;
14017
 
14018
      _Fields(short thriftId, String fieldName) {
14019
        _thriftId = thriftId;
14020
        _fieldName = fieldName;
14021
      }
14022
 
14023
      public short getThriftFieldId() {
14024
        return _thriftId;
14025
      }
14026
 
14027
      public String getFieldName() {
14028
        return _fieldName;
14029
      }
14030
    }
14031
 
14032
    // isset id assignments
14033
    private static final int __SUCCESS_ISSET_ID = 0;
14034
    private BitSet __isset_bit_vector = new BitSet(1);
14035
 
14036
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14037
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14038
          new FieldValueMetaData(TType.BOOL)));
14039
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14040
          new FieldValueMetaData(TType.STRUCT)));
14041
    }});
14042
 
14043
    static {
14044
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
14045
    }
14046
 
14047
    public addJacketNumber_result() {
14048
    }
14049
 
14050
    public addJacketNumber_result(
14051
      boolean success,
14052
      TransactionServiceException ex)
14053
    {
14054
      this();
14055
      this.success = success;
14056
      setSuccessIsSet(true);
14057
      this.ex = ex;
14058
    }
14059
 
14060
    /**
14061
     * Performs a deep copy on <i>other</i>.
14062
     */
14063
    public addJacketNumber_result(addJacketNumber_result other) {
14064
      __isset_bit_vector.clear();
14065
      __isset_bit_vector.or(other.__isset_bit_vector);
14066
      this.success = other.success;
14067
      if (other.isSetEx()) {
14068
        this.ex = new TransactionServiceException(other.ex);
14069
      }
14070
    }
14071
 
14072
    public addJacketNumber_result deepCopy() {
14073
      return new addJacketNumber_result(this);
14074
    }
14075
 
14076
    @Deprecated
14077
    public addJacketNumber_result clone() {
14078
      return new addJacketNumber_result(this);
14079
    }
14080
 
14081
    public boolean isSuccess() {
14082
      return this.success;
14083
    }
14084
 
14085
    public addJacketNumber_result setSuccess(boolean success) {
14086
      this.success = success;
14087
      setSuccessIsSet(true);
14088
      return this;
14089
    }
14090
 
14091
    public void unsetSuccess() {
14092
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14093
    }
14094
 
14095
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14096
    public boolean isSetSuccess() {
14097
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14098
    }
14099
 
14100
    public void setSuccessIsSet(boolean value) {
14101
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14102
    }
14103
 
14104
    public TransactionServiceException getEx() {
14105
      return this.ex;
14106
    }
14107
 
14108
    public addJacketNumber_result setEx(TransactionServiceException ex) {
14109
      this.ex = ex;
14110
      return this;
14111
    }
14112
 
14113
    public void unsetEx() {
14114
      this.ex = null;
14115
    }
14116
 
14117
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14118
    public boolean isSetEx() {
14119
      return this.ex != null;
14120
    }
14121
 
14122
    public void setExIsSet(boolean value) {
14123
      if (!value) {
14124
        this.ex = null;
14125
      }
14126
    }
14127
 
14128
    public void setFieldValue(_Fields field, Object value) {
14129
      switch (field) {
14130
      case SUCCESS:
14131
        if (value == null) {
14132
          unsetSuccess();
14133
        } else {
14134
          setSuccess((Boolean)value);
14135
        }
14136
        break;
14137
 
14138
      case EX:
14139
        if (value == null) {
14140
          unsetEx();
14141
        } else {
14142
          setEx((TransactionServiceException)value);
14143
        }
14144
        break;
14145
 
14146
      }
14147
    }
14148
 
14149
    public void setFieldValue(int fieldID, Object value) {
14150
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14151
    }
14152
 
14153
    public Object getFieldValue(_Fields field) {
14154
      switch (field) {
14155
      case SUCCESS:
14156
        return new Boolean(isSuccess());
14157
 
14158
      case EX:
14159
        return getEx();
14160
 
14161
      }
14162
      throw new IllegalStateException();
14163
    }
14164
 
14165
    public Object getFieldValue(int fieldId) {
14166
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14167
    }
14168
 
14169
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14170
    public boolean isSet(_Fields field) {
14171
      switch (field) {
14172
      case SUCCESS:
14173
        return isSetSuccess();
14174
      case EX:
14175
        return isSetEx();
14176
      }
14177
      throw new IllegalStateException();
14178
    }
14179
 
14180
    public boolean isSet(int fieldID) {
14181
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14182
    }
14183
 
14184
    @Override
14185
    public boolean equals(Object that) {
14186
      if (that == null)
14187
        return false;
14188
      if (that instanceof addJacketNumber_result)
14189
        return this.equals((addJacketNumber_result)that);
14190
      return false;
14191
    }
14192
 
14193
    public boolean equals(addJacketNumber_result that) {
14194
      if (that == null)
14195
        return false;
14196
 
14197
      boolean this_present_success = true;
14198
      boolean that_present_success = true;
14199
      if (this_present_success || that_present_success) {
14200
        if (!(this_present_success && that_present_success))
14201
          return false;
14202
        if (this.success != that.success)
14203
          return false;
14204
      }
14205
 
14206
      boolean this_present_ex = true && this.isSetEx();
14207
      boolean that_present_ex = true && that.isSetEx();
14208
      if (this_present_ex || that_present_ex) {
14209
        if (!(this_present_ex && that_present_ex))
14210
          return false;
14211
        if (!this.ex.equals(that.ex))
14212
          return false;
14213
      }
14214
 
14215
      return true;
14216
    }
14217
 
14218
    @Override
14219
    public int hashCode() {
14220
      return 0;
14221
    }
14222
 
14223
    public int compareTo(addJacketNumber_result other) {
14224
      if (!getClass().equals(other.getClass())) {
14225
        return getClass().getName().compareTo(other.getClass().getName());
14226
      }
14227
 
14228
      int lastComparison = 0;
14229
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
14230
 
14231
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14232
      if (lastComparison != 0) {
14233
        return lastComparison;
14234
      }
14235
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14236
      if (lastComparison != 0) {
14237
        return lastComparison;
14238
      }
14239
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14240
      if (lastComparison != 0) {
14241
        return lastComparison;
14242
      }
14243
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14244
      if (lastComparison != 0) {
14245
        return lastComparison;
14246
      }
14247
      return 0;
14248
    }
14249
 
14250
    public void read(TProtocol iprot) throws TException {
14251
      TField field;
14252
      iprot.readStructBegin();
14253
      while (true)
14254
      {
14255
        field = iprot.readFieldBegin();
14256
        if (field.type == TType.STOP) { 
14257
          break;
14258
        }
14259
        _Fields fieldId = _Fields.findByThriftId(field.id);
14260
        if (fieldId == null) {
14261
          TProtocolUtil.skip(iprot, field.type);
14262
        } else {
14263
          switch (fieldId) {
14264
            case SUCCESS:
14265
              if (field.type == TType.BOOL) {
14266
                this.success = iprot.readBool();
14267
                setSuccessIsSet(true);
14268
              } else { 
14269
                TProtocolUtil.skip(iprot, field.type);
14270
              }
14271
              break;
14272
            case EX:
14273
              if (field.type == TType.STRUCT) {
14274
                this.ex = new TransactionServiceException();
14275
                this.ex.read(iprot);
14276
              } else { 
14277
                TProtocolUtil.skip(iprot, field.type);
14278
              }
14279
              break;
14280
          }
14281
          iprot.readFieldEnd();
14282
        }
14283
      }
14284
      iprot.readStructEnd();
14285
      validate();
14286
    }
14287
 
14288
    public void write(TProtocol oprot) throws TException {
14289
      oprot.writeStructBegin(STRUCT_DESC);
14290
 
14291
      if (this.isSetSuccess()) {
14292
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14293
        oprot.writeBool(this.success);
14294
        oprot.writeFieldEnd();
14295
      } else if (this.isSetEx()) {
14296
        oprot.writeFieldBegin(EX_FIELD_DESC);
14297
        this.ex.write(oprot);
14298
        oprot.writeFieldEnd();
14299
      }
14300
      oprot.writeFieldStop();
14301
      oprot.writeStructEnd();
14302
    }
14303
 
14304
    @Override
14305
    public String toString() {
14306
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
14307
      boolean first = true;
14308
 
14309
      sb.append("success:");
14310
      sb.append(this.success);
14311
      first = false;
14312
      if (!first) sb.append(", ");
14313
      sb.append("ex:");
14314
      if (this.ex == null) {
14315
        sb.append("null");
14316
      } else {
14317
        sb.append(this.ex);
14318
      }
14319
      first = false;
14320
      sb.append(")");
14321
      return sb.toString();
14322
    }
14323
 
14324
    public void validate() throws TException {
14325
      // check for required fields
14326
    }
14327
 
14328
  }
14329
 
923 rajveer 14330
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
14331
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
14332
 
14333
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14334
 
14335
    private long orderId;
14336
 
14337
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14338
    public enum _Fields implements TFieldIdEnum {
14339
      ORDER_ID((short)1, "orderId");
14340
 
14341
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14342
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14343
 
14344
      static {
14345
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14346
          byId.put((int)field._thriftId, field);
14347
          byName.put(field.getFieldName(), field);
14348
        }
14349
      }
14350
 
14351
      /**
14352
       * Find the _Fields constant that matches fieldId, or null if its not found.
14353
       */
14354
      public static _Fields findByThriftId(int fieldId) {
14355
        return byId.get(fieldId);
14356
      }
14357
 
14358
      /**
14359
       * Find the _Fields constant that matches fieldId, throwing an exception
14360
       * if it is not found.
14361
       */
14362
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14363
        _Fields fields = findByThriftId(fieldId);
14364
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14365
        return fields;
14366
      }
14367
 
14368
      /**
14369
       * Find the _Fields constant that matches name, or null if its not found.
14370
       */
14371
      public static _Fields findByName(String name) {
14372
        return byName.get(name);
14373
      }
14374
 
14375
      private final short _thriftId;
14376
      private final String _fieldName;
14377
 
14378
      _Fields(short thriftId, String fieldName) {
14379
        _thriftId = thriftId;
14380
        _fieldName = fieldName;
14381
      }
14382
 
14383
      public short getThriftFieldId() {
14384
        return _thriftId;
14385
      }
14386
 
14387
      public String getFieldName() {
14388
        return _fieldName;
14389
      }
14390
    }
14391
 
14392
    // isset id assignments
14393
    private static final int __ORDERID_ISSET_ID = 0;
14394
    private BitSet __isset_bit_vector = new BitSet(1);
14395
 
14396
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14397
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14398
          new FieldValueMetaData(TType.I64)));
14399
    }});
14400
 
14401
    static {
14402
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
14403
    }
14404
 
14405
    public acceptOrder_args() {
14406
    }
14407
 
14408
    public acceptOrder_args(
14409
      long orderId)
14410
    {
14411
      this();
14412
      this.orderId = orderId;
14413
      setOrderIdIsSet(true);
14414
    }
14415
 
14416
    /**
14417
     * Performs a deep copy on <i>other</i>.
14418
     */
14419
    public acceptOrder_args(acceptOrder_args other) {
14420
      __isset_bit_vector.clear();
14421
      __isset_bit_vector.or(other.__isset_bit_vector);
14422
      this.orderId = other.orderId;
14423
    }
14424
 
14425
    public acceptOrder_args deepCopy() {
14426
      return new acceptOrder_args(this);
14427
    }
14428
 
14429
    @Deprecated
14430
    public acceptOrder_args clone() {
14431
      return new acceptOrder_args(this);
14432
    }
14433
 
14434
    public long getOrderId() {
14435
      return this.orderId;
14436
    }
14437
 
14438
    public acceptOrder_args setOrderId(long orderId) {
14439
      this.orderId = orderId;
14440
      setOrderIdIsSet(true);
14441
      return this;
14442
    }
14443
 
14444
    public void unsetOrderId() {
14445
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14446
    }
14447
 
14448
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14449
    public boolean isSetOrderId() {
14450
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14451
    }
14452
 
14453
    public void setOrderIdIsSet(boolean value) {
14454
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14455
    }
14456
 
14457
    public void setFieldValue(_Fields field, Object value) {
14458
      switch (field) {
14459
      case ORDER_ID:
14460
        if (value == null) {
14461
          unsetOrderId();
14462
        } else {
14463
          setOrderId((Long)value);
14464
        }
14465
        break;
14466
 
14467
      }
14468
    }
14469
 
14470
    public void setFieldValue(int fieldID, Object value) {
14471
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14472
    }
14473
 
14474
    public Object getFieldValue(_Fields field) {
14475
      switch (field) {
14476
      case ORDER_ID:
14477
        return new Long(getOrderId());
14478
 
14479
      }
14480
      throw new IllegalStateException();
14481
    }
14482
 
14483
    public Object getFieldValue(int fieldId) {
14484
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14485
    }
14486
 
14487
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14488
    public boolean isSet(_Fields field) {
14489
      switch (field) {
14490
      case ORDER_ID:
14491
        return isSetOrderId();
14492
      }
14493
      throw new IllegalStateException();
14494
    }
14495
 
14496
    public boolean isSet(int fieldID) {
14497
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14498
    }
14499
 
14500
    @Override
14501
    public boolean equals(Object that) {
14502
      if (that == null)
14503
        return false;
14504
      if (that instanceof acceptOrder_args)
14505
        return this.equals((acceptOrder_args)that);
14506
      return false;
14507
    }
14508
 
14509
    public boolean equals(acceptOrder_args that) {
14510
      if (that == null)
14511
        return false;
14512
 
14513
      boolean this_present_orderId = true;
14514
      boolean that_present_orderId = true;
14515
      if (this_present_orderId || that_present_orderId) {
14516
        if (!(this_present_orderId && that_present_orderId))
14517
          return false;
14518
        if (this.orderId != that.orderId)
14519
          return false;
14520
      }
14521
 
14522
      return true;
14523
    }
14524
 
14525
    @Override
14526
    public int hashCode() {
14527
      return 0;
14528
    }
14529
 
14530
    public int compareTo(acceptOrder_args other) {
14531
      if (!getClass().equals(other.getClass())) {
14532
        return getClass().getName().compareTo(other.getClass().getName());
14533
      }
14534
 
14535
      int lastComparison = 0;
14536
      acceptOrder_args typedOther = (acceptOrder_args)other;
14537
 
14538
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14539
      if (lastComparison != 0) {
14540
        return lastComparison;
14541
      }
14542
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14543
      if (lastComparison != 0) {
14544
        return lastComparison;
14545
      }
14546
      return 0;
14547
    }
14548
 
14549
    public void read(TProtocol iprot) throws TException {
14550
      TField field;
14551
      iprot.readStructBegin();
14552
      while (true)
14553
      {
14554
        field = iprot.readFieldBegin();
14555
        if (field.type == TType.STOP) { 
14556
          break;
14557
        }
14558
        _Fields fieldId = _Fields.findByThriftId(field.id);
14559
        if (fieldId == null) {
14560
          TProtocolUtil.skip(iprot, field.type);
14561
        } else {
14562
          switch (fieldId) {
14563
            case ORDER_ID:
14564
              if (field.type == TType.I64) {
14565
                this.orderId = iprot.readI64();
14566
                setOrderIdIsSet(true);
14567
              } else { 
14568
                TProtocolUtil.skip(iprot, field.type);
14569
              }
14570
              break;
14571
          }
14572
          iprot.readFieldEnd();
14573
        }
14574
      }
14575
      iprot.readStructEnd();
14576
      validate();
14577
    }
14578
 
14579
    public void write(TProtocol oprot) throws TException {
14580
      validate();
14581
 
14582
      oprot.writeStructBegin(STRUCT_DESC);
14583
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14584
      oprot.writeI64(this.orderId);
14585
      oprot.writeFieldEnd();
14586
      oprot.writeFieldStop();
14587
      oprot.writeStructEnd();
14588
    }
14589
 
14590
    @Override
14591
    public String toString() {
14592
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
14593
      boolean first = true;
14594
 
14595
      sb.append("orderId:");
14596
      sb.append(this.orderId);
14597
      first = false;
14598
      sb.append(")");
14599
      return sb.toString();
14600
    }
14601
 
14602
    public void validate() throws TException {
14603
      // check for required fields
14604
    }
14605
 
14606
  }
14607
 
14608
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
14609
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
14610
 
14611
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14612
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14613
 
14614
    private boolean success;
14615
    private TransactionServiceException ex;
14616
 
14617
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14618
    public enum _Fields implements TFieldIdEnum {
14619
      SUCCESS((short)0, "success"),
14620
      EX((short)1, "ex");
14621
 
14622
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14623
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14624
 
14625
      static {
14626
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14627
          byId.put((int)field._thriftId, field);
14628
          byName.put(field.getFieldName(), field);
14629
        }
14630
      }
14631
 
14632
      /**
14633
       * Find the _Fields constant that matches fieldId, or null if its not found.
14634
       */
14635
      public static _Fields findByThriftId(int fieldId) {
14636
        return byId.get(fieldId);
14637
      }
14638
 
14639
      /**
14640
       * Find the _Fields constant that matches fieldId, throwing an exception
14641
       * if it is not found.
14642
       */
14643
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14644
        _Fields fields = findByThriftId(fieldId);
14645
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14646
        return fields;
14647
      }
14648
 
14649
      /**
14650
       * Find the _Fields constant that matches name, or null if its not found.
14651
       */
14652
      public static _Fields findByName(String name) {
14653
        return byName.get(name);
14654
      }
14655
 
14656
      private final short _thriftId;
14657
      private final String _fieldName;
14658
 
14659
      _Fields(short thriftId, String fieldName) {
14660
        _thriftId = thriftId;
14661
        _fieldName = fieldName;
14662
      }
14663
 
14664
      public short getThriftFieldId() {
14665
        return _thriftId;
14666
      }
14667
 
14668
      public String getFieldName() {
14669
        return _fieldName;
14670
      }
14671
    }
14672
 
14673
    // isset id assignments
14674
    private static final int __SUCCESS_ISSET_ID = 0;
14675
    private BitSet __isset_bit_vector = new BitSet(1);
14676
 
14677
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14678
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14679
          new FieldValueMetaData(TType.BOOL)));
14680
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14681
          new FieldValueMetaData(TType.STRUCT)));
14682
    }});
14683
 
14684
    static {
14685
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
14686
    }
14687
 
14688
    public acceptOrder_result() {
14689
    }
14690
 
14691
    public acceptOrder_result(
14692
      boolean success,
14693
      TransactionServiceException ex)
14694
    {
14695
      this();
14696
      this.success = success;
14697
      setSuccessIsSet(true);
14698
      this.ex = ex;
14699
    }
14700
 
14701
    /**
14702
     * Performs a deep copy on <i>other</i>.
14703
     */
14704
    public acceptOrder_result(acceptOrder_result other) {
14705
      __isset_bit_vector.clear();
14706
      __isset_bit_vector.or(other.__isset_bit_vector);
14707
      this.success = other.success;
14708
      if (other.isSetEx()) {
14709
        this.ex = new TransactionServiceException(other.ex);
14710
      }
14711
    }
14712
 
14713
    public acceptOrder_result deepCopy() {
14714
      return new acceptOrder_result(this);
14715
    }
14716
 
14717
    @Deprecated
14718
    public acceptOrder_result clone() {
14719
      return new acceptOrder_result(this);
14720
    }
14721
 
14722
    public boolean isSuccess() {
14723
      return this.success;
14724
    }
14725
 
14726
    public acceptOrder_result setSuccess(boolean success) {
14727
      this.success = success;
14728
      setSuccessIsSet(true);
14729
      return this;
14730
    }
14731
 
14732
    public void unsetSuccess() {
14733
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14734
    }
14735
 
14736
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14737
    public boolean isSetSuccess() {
14738
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14739
    }
14740
 
14741
    public void setSuccessIsSet(boolean value) {
14742
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14743
    }
14744
 
14745
    public TransactionServiceException getEx() {
14746
      return this.ex;
14747
    }
14748
 
14749
    public acceptOrder_result setEx(TransactionServiceException ex) {
14750
      this.ex = ex;
14751
      return this;
14752
    }
14753
 
14754
    public void unsetEx() {
14755
      this.ex = null;
14756
    }
14757
 
14758
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14759
    public boolean isSetEx() {
14760
      return this.ex != null;
14761
    }
14762
 
14763
    public void setExIsSet(boolean value) {
14764
      if (!value) {
14765
        this.ex = null;
14766
      }
14767
    }
14768
 
14769
    public void setFieldValue(_Fields field, Object value) {
14770
      switch (field) {
14771
      case SUCCESS:
14772
        if (value == null) {
14773
          unsetSuccess();
14774
        } else {
14775
          setSuccess((Boolean)value);
14776
        }
14777
        break;
14778
 
14779
      case EX:
14780
        if (value == null) {
14781
          unsetEx();
14782
        } else {
14783
          setEx((TransactionServiceException)value);
14784
        }
14785
        break;
14786
 
14787
      }
14788
    }
14789
 
14790
    public void setFieldValue(int fieldID, Object value) {
14791
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14792
    }
14793
 
14794
    public Object getFieldValue(_Fields field) {
14795
      switch (field) {
14796
      case SUCCESS:
14797
        return new Boolean(isSuccess());
14798
 
14799
      case EX:
14800
        return getEx();
14801
 
14802
      }
14803
      throw new IllegalStateException();
14804
    }
14805
 
14806
    public Object getFieldValue(int fieldId) {
14807
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14808
    }
14809
 
14810
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14811
    public boolean isSet(_Fields field) {
14812
      switch (field) {
14813
      case SUCCESS:
14814
        return isSetSuccess();
14815
      case EX:
14816
        return isSetEx();
14817
      }
14818
      throw new IllegalStateException();
14819
    }
14820
 
14821
    public boolean isSet(int fieldID) {
14822
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14823
    }
14824
 
14825
    @Override
14826
    public boolean equals(Object that) {
14827
      if (that == null)
14828
        return false;
14829
      if (that instanceof acceptOrder_result)
14830
        return this.equals((acceptOrder_result)that);
14831
      return false;
14832
    }
14833
 
14834
    public boolean equals(acceptOrder_result that) {
14835
      if (that == null)
14836
        return false;
14837
 
14838
      boolean this_present_success = true;
14839
      boolean that_present_success = true;
14840
      if (this_present_success || that_present_success) {
14841
        if (!(this_present_success && that_present_success))
14842
          return false;
14843
        if (this.success != that.success)
14844
          return false;
14845
      }
14846
 
14847
      boolean this_present_ex = true && this.isSetEx();
14848
      boolean that_present_ex = true && that.isSetEx();
14849
      if (this_present_ex || that_present_ex) {
14850
        if (!(this_present_ex && that_present_ex))
14851
          return false;
14852
        if (!this.ex.equals(that.ex))
14853
          return false;
14854
      }
14855
 
14856
      return true;
14857
    }
14858
 
14859
    @Override
14860
    public int hashCode() {
14861
      return 0;
14862
    }
14863
 
14864
    public int compareTo(acceptOrder_result other) {
14865
      if (!getClass().equals(other.getClass())) {
14866
        return getClass().getName().compareTo(other.getClass().getName());
14867
      }
14868
 
14869
      int lastComparison = 0;
14870
      acceptOrder_result typedOther = (acceptOrder_result)other;
14871
 
14872
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14873
      if (lastComparison != 0) {
14874
        return lastComparison;
14875
      }
14876
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14877
      if (lastComparison != 0) {
14878
        return lastComparison;
14879
      }
14880
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14881
      if (lastComparison != 0) {
14882
        return lastComparison;
14883
      }
14884
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14885
      if (lastComparison != 0) {
14886
        return lastComparison;
14887
      }
14888
      return 0;
14889
    }
14890
 
14891
    public void read(TProtocol iprot) throws TException {
14892
      TField field;
14893
      iprot.readStructBegin();
14894
      while (true)
14895
      {
14896
        field = iprot.readFieldBegin();
14897
        if (field.type == TType.STOP) { 
14898
          break;
14899
        }
14900
        _Fields fieldId = _Fields.findByThriftId(field.id);
14901
        if (fieldId == null) {
14902
          TProtocolUtil.skip(iprot, field.type);
14903
        } else {
14904
          switch (fieldId) {
14905
            case SUCCESS:
14906
              if (field.type == TType.BOOL) {
14907
                this.success = iprot.readBool();
14908
                setSuccessIsSet(true);
14909
              } else { 
14910
                TProtocolUtil.skip(iprot, field.type);
14911
              }
14912
              break;
14913
            case EX:
14914
              if (field.type == TType.STRUCT) {
14915
                this.ex = new TransactionServiceException();
14916
                this.ex.read(iprot);
14917
              } else { 
14918
                TProtocolUtil.skip(iprot, field.type);
14919
              }
14920
              break;
14921
          }
14922
          iprot.readFieldEnd();
14923
        }
14924
      }
14925
      iprot.readStructEnd();
14926
      validate();
14927
    }
14928
 
14929
    public void write(TProtocol oprot) throws TException {
14930
      oprot.writeStructBegin(STRUCT_DESC);
14931
 
14932
      if (this.isSetSuccess()) {
14933
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14934
        oprot.writeBool(this.success);
14935
        oprot.writeFieldEnd();
14936
      } else if (this.isSetEx()) {
14937
        oprot.writeFieldBegin(EX_FIELD_DESC);
14938
        this.ex.write(oprot);
14939
        oprot.writeFieldEnd();
14940
      }
14941
      oprot.writeFieldStop();
14942
      oprot.writeStructEnd();
14943
    }
14944
 
14945
    @Override
14946
    public String toString() {
14947
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14948
      boolean first = true;
14949
 
14950
      sb.append("success:");
14951
      sb.append(this.success);
14952
      first = false;
14953
      if (!first) sb.append(", ");
14954
      sb.append("ex:");
14955
      if (this.ex == null) {
14956
        sb.append("null");
14957
      } else {
14958
        sb.append(this.ex);
14959
      }
14960
      first = false;
14961
      sb.append(")");
14962
      return sb.toString();
14963
    }
14964
 
14965
    public void validate() throws TException {
14966
      // check for required fields
14967
    }
14968
 
14969
  }
14970
 
14971
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14972
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14973
 
14974
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14975
 
14976
    private long orderId;
14977
 
14978
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14979
    public enum _Fields implements TFieldIdEnum {
14980
      ORDER_ID((short)1, "orderId");
14981
 
14982
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14983
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14984
 
14985
      static {
14986
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14987
          byId.put((int)field._thriftId, field);
14988
          byName.put(field.getFieldName(), field);
14989
        }
14990
      }
14991
 
14992
      /**
14993
       * Find the _Fields constant that matches fieldId, or null if its not found.
14994
       */
14995
      public static _Fields findByThriftId(int fieldId) {
14996
        return byId.get(fieldId);
14997
      }
14998
 
14999
      /**
15000
       * Find the _Fields constant that matches fieldId, throwing an exception
15001
       * if it is not found.
15002
       */
15003
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15004
        _Fields fields = findByThriftId(fieldId);
15005
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15006
        return fields;
15007
      }
15008
 
15009
      /**
15010
       * Find the _Fields constant that matches name, or null if its not found.
15011
       */
15012
      public static _Fields findByName(String name) {
15013
        return byName.get(name);
15014
      }
15015
 
15016
      private final short _thriftId;
15017
      private final String _fieldName;
15018
 
15019
      _Fields(short thriftId, String fieldName) {
15020
        _thriftId = thriftId;
15021
        _fieldName = fieldName;
15022
      }
15023
 
15024
      public short getThriftFieldId() {
15025
        return _thriftId;
15026
      }
15027
 
15028
      public String getFieldName() {
15029
        return _fieldName;
15030
      }
15031
    }
15032
 
15033
    // isset id assignments
15034
    private static final int __ORDERID_ISSET_ID = 0;
15035
    private BitSet __isset_bit_vector = new BitSet(1);
15036
 
15037
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15038
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
15039
          new FieldValueMetaData(TType.I64)));
15040
    }});
15041
 
15042
    static {
15043
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
15044
    }
15045
 
15046
    public billOrder_args() {
15047
    }
15048
 
15049
    public billOrder_args(
15050
      long orderId)
15051
    {
15052
      this();
15053
      this.orderId = orderId;
15054
      setOrderIdIsSet(true);
15055
    }
15056
 
15057
    /**
15058
     * Performs a deep copy on <i>other</i>.
15059
     */
15060
    public billOrder_args(billOrder_args other) {
15061
      __isset_bit_vector.clear();
15062
      __isset_bit_vector.or(other.__isset_bit_vector);
15063
      this.orderId = other.orderId;
15064
    }
15065
 
15066
    public billOrder_args deepCopy() {
15067
      return new billOrder_args(this);
15068
    }
15069
 
15070
    @Deprecated
15071
    public billOrder_args clone() {
15072
      return new billOrder_args(this);
15073
    }
15074
 
15075
    public long getOrderId() {
15076
      return this.orderId;
15077
    }
15078
 
15079
    public billOrder_args setOrderId(long orderId) {
15080
      this.orderId = orderId;
15081
      setOrderIdIsSet(true);
15082
      return this;
15083
    }
15084
 
15085
    public void unsetOrderId() {
15086
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
15087
    }
15088
 
15089
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15090
    public boolean isSetOrderId() {
15091
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
15092
    }
15093
 
15094
    public void setOrderIdIsSet(boolean value) {
15095
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
15096
    }
15097
 
15098
    public void setFieldValue(_Fields field, Object value) {
15099
      switch (field) {
15100
      case ORDER_ID:
15101
        if (value == null) {
15102
          unsetOrderId();
15103
        } else {
15104
          setOrderId((Long)value);
15105
        }
15106
        break;
15107
 
15108
      }
15109
    }
15110
 
15111
    public void setFieldValue(int fieldID, Object value) {
15112
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15113
    }
15114
 
15115
    public Object getFieldValue(_Fields field) {
15116
      switch (field) {
15117
      case ORDER_ID:
15118
        return new Long(getOrderId());
15119
 
15120
      }
15121
      throw new IllegalStateException();
15122
    }
15123
 
15124
    public Object getFieldValue(int fieldId) {
15125
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15126
    }
15127
 
15128
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15129
    public boolean isSet(_Fields field) {
15130
      switch (field) {
15131
      case ORDER_ID:
15132
        return isSetOrderId();
15133
      }
15134
      throw new IllegalStateException();
15135
    }
15136
 
15137
    public boolean isSet(int fieldID) {
15138
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15139
    }
15140
 
15141
    @Override
15142
    public boolean equals(Object that) {
15143
      if (that == null)
15144
        return false;
15145
      if (that instanceof billOrder_args)
15146
        return this.equals((billOrder_args)that);
15147
      return false;
15148
    }
15149
 
15150
    public boolean equals(billOrder_args that) {
15151
      if (that == null)
15152
        return false;
15153
 
15154
      boolean this_present_orderId = true;
15155
      boolean that_present_orderId = true;
15156
      if (this_present_orderId || that_present_orderId) {
15157
        if (!(this_present_orderId && that_present_orderId))
15158
          return false;
15159
        if (this.orderId != that.orderId)
15160
          return false;
15161
      }
15162
 
15163
      return true;
15164
    }
15165
 
15166
    @Override
15167
    public int hashCode() {
15168
      return 0;
15169
    }
15170
 
15171
    public int compareTo(billOrder_args other) {
15172
      if (!getClass().equals(other.getClass())) {
15173
        return getClass().getName().compareTo(other.getClass().getName());
15174
      }
15175
 
15176
      int lastComparison = 0;
15177
      billOrder_args typedOther = (billOrder_args)other;
15178
 
15179
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
15180
      if (lastComparison != 0) {
15181
        return lastComparison;
15182
      }
15183
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
15184
      if (lastComparison != 0) {
15185
        return lastComparison;
15186
      }
15187
      return 0;
15188
    }
15189
 
15190
    public void read(TProtocol iprot) throws TException {
15191
      TField field;
15192
      iprot.readStructBegin();
15193
      while (true)
15194
      {
15195
        field = iprot.readFieldBegin();
15196
        if (field.type == TType.STOP) { 
15197
          break;
15198
        }
15199
        _Fields fieldId = _Fields.findByThriftId(field.id);
15200
        if (fieldId == null) {
15201
          TProtocolUtil.skip(iprot, field.type);
15202
        } else {
15203
          switch (fieldId) {
15204
            case ORDER_ID:
15205
              if (field.type == TType.I64) {
15206
                this.orderId = iprot.readI64();
15207
                setOrderIdIsSet(true);
15208
              } else { 
15209
                TProtocolUtil.skip(iprot, field.type);
15210
              }
15211
              break;
15212
          }
15213
          iprot.readFieldEnd();
15214
        }
15215
      }
15216
      iprot.readStructEnd();
15217
      validate();
15218
    }
15219
 
15220
    public void write(TProtocol oprot) throws TException {
15221
      validate();
15222
 
15223
      oprot.writeStructBegin(STRUCT_DESC);
15224
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15225
      oprot.writeI64(this.orderId);
15226
      oprot.writeFieldEnd();
15227
      oprot.writeFieldStop();
15228
      oprot.writeStructEnd();
15229
    }
15230
 
15231
    @Override
15232
    public String toString() {
15233
      StringBuilder sb = new StringBuilder("billOrder_args(");
15234
      boolean first = true;
15235
 
15236
      sb.append("orderId:");
15237
      sb.append(this.orderId);
15238
      first = false;
15239
      sb.append(")");
15240
      return sb.toString();
15241
    }
15242
 
15243
    public void validate() throws TException {
15244
      // check for required fields
15245
    }
15246
 
15247
  }
15248
 
15249
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
15250
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
15251
 
15252
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15253
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15254
 
15255
    private boolean success;
15256
    private TransactionServiceException ex;
15257
 
15258
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15259
    public enum _Fields implements TFieldIdEnum {
15260
      SUCCESS((short)0, "success"),
15261
      EX((short)1, "ex");
15262
 
15263
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15264
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15265
 
15266
      static {
15267
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15268
          byId.put((int)field._thriftId, field);
15269
          byName.put(field.getFieldName(), field);
15270
        }
15271
      }
15272
 
15273
      /**
15274
       * Find the _Fields constant that matches fieldId, or null if its not found.
15275
       */
15276
      public static _Fields findByThriftId(int fieldId) {
15277
        return byId.get(fieldId);
15278
      }
15279
 
15280
      /**
15281
       * Find the _Fields constant that matches fieldId, throwing an exception
15282
       * if it is not found.
15283
       */
15284
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15285
        _Fields fields = findByThriftId(fieldId);
15286
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15287
        return fields;
15288
      }
15289
 
15290
      /**
15291
       * Find the _Fields constant that matches name, or null if its not found.
15292
       */
15293
      public static _Fields findByName(String name) {
15294
        return byName.get(name);
15295
      }
15296
 
15297
      private final short _thriftId;
15298
      private final String _fieldName;
15299
 
15300
      _Fields(short thriftId, String fieldName) {
15301
        _thriftId = thriftId;
15302
        _fieldName = fieldName;
15303
      }
15304
 
15305
      public short getThriftFieldId() {
15306
        return _thriftId;
15307
      }
15308
 
15309
      public String getFieldName() {
15310
        return _fieldName;
15311
      }
15312
    }
15313
 
15314
    // isset id assignments
15315
    private static final int __SUCCESS_ISSET_ID = 0;
15316
    private BitSet __isset_bit_vector = new BitSet(1);
15317
 
15318
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15319
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15320
          new FieldValueMetaData(TType.BOOL)));
15321
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15322
          new FieldValueMetaData(TType.STRUCT)));
15323
    }});
15324
 
15325
    static {
15326
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
15327
    }
15328
 
15329
    public billOrder_result() {
15330
    }
15331
 
15332
    public billOrder_result(
15333
      boolean success,
15334
      TransactionServiceException ex)
15335
    {
15336
      this();
15337
      this.success = success;
15338
      setSuccessIsSet(true);
15339
      this.ex = ex;
15340
    }
15341
 
15342
    /**
15343
     * Performs a deep copy on <i>other</i>.
15344
     */
15345
    public billOrder_result(billOrder_result other) {
15346
      __isset_bit_vector.clear();
15347
      __isset_bit_vector.or(other.__isset_bit_vector);
15348
      this.success = other.success;
15349
      if (other.isSetEx()) {
15350
        this.ex = new TransactionServiceException(other.ex);
15351
      }
15352
    }
15353
 
15354
    public billOrder_result deepCopy() {
15355
      return new billOrder_result(this);
15356
    }
15357
 
15358
    @Deprecated
15359
    public billOrder_result clone() {
15360
      return new billOrder_result(this);
15361
    }
15362
 
15363
    public boolean isSuccess() {
15364
      return this.success;
15365
    }
15366
 
15367
    public billOrder_result setSuccess(boolean success) {
15368
      this.success = success;
15369
      setSuccessIsSet(true);
15370
      return this;
15371
    }
15372
 
15373
    public void unsetSuccess() {
15374
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15375
    }
15376
 
15377
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15378
    public boolean isSetSuccess() {
15379
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15380
    }
15381
 
15382
    public void setSuccessIsSet(boolean value) {
15383
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15384
    }
15385
 
15386
    public TransactionServiceException getEx() {
15387
      return this.ex;
15388
    }
15389
 
15390
    public billOrder_result setEx(TransactionServiceException ex) {
15391
      this.ex = ex;
15392
      return this;
15393
    }
15394
 
15395
    public void unsetEx() {
15396
      this.ex = null;
15397
    }
15398
 
15399
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15400
    public boolean isSetEx() {
15401
      return this.ex != null;
15402
    }
15403
 
15404
    public void setExIsSet(boolean value) {
15405
      if (!value) {
15406
        this.ex = null;
15407
      }
15408
    }
15409
 
15410
    public void setFieldValue(_Fields field, Object value) {
15411
      switch (field) {
15412
      case SUCCESS:
15413
        if (value == null) {
15414
          unsetSuccess();
15415
        } else {
15416
          setSuccess((Boolean)value);
15417
        }
15418
        break;
15419
 
15420
      case EX:
15421
        if (value == null) {
15422
          unsetEx();
15423
        } else {
15424
          setEx((TransactionServiceException)value);
15425
        }
15426
        break;
15427
 
15428
      }
15429
    }
15430
 
15431
    public void setFieldValue(int fieldID, Object value) {
15432
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15433
    }
15434
 
15435
    public Object getFieldValue(_Fields field) {
15436
      switch (field) {
15437
      case SUCCESS:
15438
        return new Boolean(isSuccess());
15439
 
15440
      case EX:
15441
        return getEx();
15442
 
15443
      }
15444
      throw new IllegalStateException();
15445
    }
15446
 
15447
    public Object getFieldValue(int fieldId) {
15448
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15449
    }
15450
 
15451
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15452
    public boolean isSet(_Fields field) {
15453
      switch (field) {
15454
      case SUCCESS:
15455
        return isSetSuccess();
15456
      case EX:
15457
        return isSetEx();
15458
      }
15459
      throw new IllegalStateException();
15460
    }
15461
 
15462
    public boolean isSet(int fieldID) {
15463
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15464
    }
15465
 
15466
    @Override
15467
    public boolean equals(Object that) {
15468
      if (that == null)
15469
        return false;
15470
      if (that instanceof billOrder_result)
15471
        return this.equals((billOrder_result)that);
15472
      return false;
15473
    }
15474
 
15475
    public boolean equals(billOrder_result that) {
15476
      if (that == null)
15477
        return false;
15478
 
15479
      boolean this_present_success = true;
15480
      boolean that_present_success = true;
15481
      if (this_present_success || that_present_success) {
15482
        if (!(this_present_success && that_present_success))
15483
          return false;
15484
        if (this.success != that.success)
15485
          return false;
15486
      }
15487
 
15488
      boolean this_present_ex = true && this.isSetEx();
15489
      boolean that_present_ex = true && that.isSetEx();
15490
      if (this_present_ex || that_present_ex) {
15491
        if (!(this_present_ex && that_present_ex))
15492
          return false;
15493
        if (!this.ex.equals(that.ex))
15494
          return false;
15495
      }
15496
 
15497
      return true;
15498
    }
15499
 
15500
    @Override
15501
    public int hashCode() {
15502
      return 0;
15503
    }
15504
 
15505
    public int compareTo(billOrder_result other) {
15506
      if (!getClass().equals(other.getClass())) {
15507
        return getClass().getName().compareTo(other.getClass().getName());
15508
      }
15509
 
15510
      int lastComparison = 0;
15511
      billOrder_result typedOther = (billOrder_result)other;
15512
 
15513
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15514
      if (lastComparison != 0) {
15515
        return lastComparison;
15516
      }
15517
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15518
      if (lastComparison != 0) {
15519
        return lastComparison;
15520
      }
15521
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15522
      if (lastComparison != 0) {
15523
        return lastComparison;
15524
      }
15525
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15526
      if (lastComparison != 0) {
15527
        return lastComparison;
15528
      }
15529
      return 0;
15530
    }
15531
 
15532
    public void read(TProtocol iprot) throws TException {
15533
      TField field;
15534
      iprot.readStructBegin();
15535
      while (true)
15536
      {
15537
        field = iprot.readFieldBegin();
15538
        if (field.type == TType.STOP) { 
15539
          break;
15540
        }
15541
        _Fields fieldId = _Fields.findByThriftId(field.id);
15542
        if (fieldId == null) {
15543
          TProtocolUtil.skip(iprot, field.type);
15544
        } else {
15545
          switch (fieldId) {
15546
            case SUCCESS:
15547
              if (field.type == TType.BOOL) {
15548
                this.success = iprot.readBool();
15549
                setSuccessIsSet(true);
15550
              } else { 
15551
                TProtocolUtil.skip(iprot, field.type);
15552
              }
15553
              break;
15554
            case EX:
15555
              if (field.type == TType.STRUCT) {
15556
                this.ex = new TransactionServiceException();
15557
                this.ex.read(iprot);
15558
              } else { 
15559
                TProtocolUtil.skip(iprot, field.type);
15560
              }
15561
              break;
15562
          }
15563
          iprot.readFieldEnd();
15564
        }
15565
      }
15566
      iprot.readStructEnd();
15567
      validate();
15568
    }
15569
 
15570
    public void write(TProtocol oprot) throws TException {
15571
      oprot.writeStructBegin(STRUCT_DESC);
15572
 
15573
      if (this.isSetSuccess()) {
15574
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15575
        oprot.writeBool(this.success);
15576
        oprot.writeFieldEnd();
15577
      } else if (this.isSetEx()) {
15578
        oprot.writeFieldBegin(EX_FIELD_DESC);
15579
        this.ex.write(oprot);
15580
        oprot.writeFieldEnd();
15581
      }
15582
      oprot.writeFieldStop();
15583
      oprot.writeStructEnd();
15584
    }
15585
 
15586
    @Override
15587
    public String toString() {
15588
      StringBuilder sb = new StringBuilder("billOrder_result(");
15589
      boolean first = true;
15590
 
15591
      sb.append("success:");
15592
      sb.append(this.success);
15593
      first = false;
15594
      if (!first) sb.append(", ");
15595
      sb.append("ex:");
15596
      if (this.ex == null) {
15597
        sb.append("null");
15598
      } else {
15599
        sb.append(this.ex);
15600
      }
15601
      first = false;
15602
      sb.append(")");
15603
      return sb.toString();
15604
    }
15605
 
15606
    public void validate() throws TException {
15607
      // check for required fields
15608
    }
15609
 
15610
  }
15611
 
483 rajveer 15612
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
15613
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 15614
 
15615
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 15616
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 15617
 
15618
    private long transactionId;
1529 ankur.sing 15619
    private long customerId;
68 ashish 15620
 
15621
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15622
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 15623
      TRANSACTION_ID((short)1, "transactionId"),
15624
      CUSTOMER_ID((short)2, "customerId");
68 ashish 15625
 
15626
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15627
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15628
 
15629
      static {
15630
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15631
          byId.put((int)field._thriftId, field);
15632
          byName.put(field.getFieldName(), field);
15633
        }
15634
      }
15635
 
15636
      /**
15637
       * Find the _Fields constant that matches fieldId, or null if its not found.
15638
       */
15639
      public static _Fields findByThriftId(int fieldId) {
15640
        return byId.get(fieldId);
15641
      }
15642
 
15643
      /**
15644
       * Find the _Fields constant that matches fieldId, throwing an exception
15645
       * if it is not found.
15646
       */
15647
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15648
        _Fields fields = findByThriftId(fieldId);
15649
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15650
        return fields;
15651
      }
15652
 
15653
      /**
15654
       * Find the _Fields constant that matches name, or null if its not found.
15655
       */
15656
      public static _Fields findByName(String name) {
15657
        return byName.get(name);
15658
      }
15659
 
15660
      private final short _thriftId;
15661
      private final String _fieldName;
15662
 
15663
      _Fields(short thriftId, String fieldName) {
15664
        _thriftId = thriftId;
15665
        _fieldName = fieldName;
15666
      }
15667
 
15668
      public short getThriftFieldId() {
15669
        return _thriftId;
15670
      }
15671
 
15672
      public String getFieldName() {
15673
        return _fieldName;
15674
      }
15675
    }
15676
 
15677
    // isset id assignments
15678
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 15679
    private static final int __CUSTOMERID_ISSET_ID = 1;
15680
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 15681
 
15682
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15683
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15684
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 15685
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
15686
          new FieldValueMetaData(TType.I64)));
68 ashish 15687
    }});
15688
 
15689
    static {
483 rajveer 15690
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 15691
    }
15692
 
483 rajveer 15693
    public getOrdersForTransaction_args() {
68 ashish 15694
    }
15695
 
483 rajveer 15696
    public getOrdersForTransaction_args(
1529 ankur.sing 15697
      long transactionId,
15698
      long customerId)
68 ashish 15699
    {
15700
      this();
15701
      this.transactionId = transactionId;
15702
      setTransactionIdIsSet(true);
1529 ankur.sing 15703
      this.customerId = customerId;
15704
      setCustomerIdIsSet(true);
68 ashish 15705
    }
15706
 
15707
    /**
15708
     * Performs a deep copy on <i>other</i>.
15709
     */
483 rajveer 15710
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 15711
      __isset_bit_vector.clear();
15712
      __isset_bit_vector.or(other.__isset_bit_vector);
15713
      this.transactionId = other.transactionId;
1529 ankur.sing 15714
      this.customerId = other.customerId;
68 ashish 15715
    }
15716
 
483 rajveer 15717
    public getOrdersForTransaction_args deepCopy() {
15718
      return new getOrdersForTransaction_args(this);
68 ashish 15719
    }
15720
 
15721
    @Deprecated
483 rajveer 15722
    public getOrdersForTransaction_args clone() {
15723
      return new getOrdersForTransaction_args(this);
68 ashish 15724
    }
15725
 
15726
    public long getTransactionId() {
15727
      return this.transactionId;
15728
    }
15729
 
483 rajveer 15730
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 15731
      this.transactionId = transactionId;
15732
      setTransactionIdIsSet(true);
15733
      return this;
15734
    }
15735
 
15736
    public void unsetTransactionId() {
15737
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15738
    }
15739
 
15740
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15741
    public boolean isSetTransactionId() {
15742
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15743
    }
15744
 
15745
    public void setTransactionIdIsSet(boolean value) {
15746
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15747
    }
15748
 
1529 ankur.sing 15749
    public long getCustomerId() {
15750
      return this.customerId;
15751
    }
15752
 
15753
    public getOrdersForTransaction_args setCustomerId(long customerId) {
15754
      this.customerId = customerId;
15755
      setCustomerIdIsSet(true);
15756
      return this;
15757
    }
15758
 
15759
    public void unsetCustomerId() {
15760
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
15761
    }
15762
 
15763
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15764
    public boolean isSetCustomerId() {
15765
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
15766
    }
15767
 
15768
    public void setCustomerIdIsSet(boolean value) {
15769
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
15770
    }
15771
 
68 ashish 15772
    public void setFieldValue(_Fields field, Object value) {
15773
      switch (field) {
15774
      case TRANSACTION_ID:
15775
        if (value == null) {
15776
          unsetTransactionId();
15777
        } else {
15778
          setTransactionId((Long)value);
15779
        }
15780
        break;
15781
 
1529 ankur.sing 15782
      case CUSTOMER_ID:
15783
        if (value == null) {
15784
          unsetCustomerId();
15785
        } else {
15786
          setCustomerId((Long)value);
15787
        }
15788
        break;
15789
 
68 ashish 15790
      }
15791
    }
15792
 
15793
    public void setFieldValue(int fieldID, Object value) {
15794
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15795
    }
15796
 
15797
    public Object getFieldValue(_Fields field) {
15798
      switch (field) {
15799
      case TRANSACTION_ID:
15800
        return new Long(getTransactionId());
15801
 
1529 ankur.sing 15802
      case CUSTOMER_ID:
15803
        return new Long(getCustomerId());
15804
 
68 ashish 15805
      }
15806
      throw new IllegalStateException();
15807
    }
15808
 
15809
    public Object getFieldValue(int fieldId) {
15810
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15811
    }
15812
 
15813
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15814
    public boolean isSet(_Fields field) {
15815
      switch (field) {
15816
      case TRANSACTION_ID:
15817
        return isSetTransactionId();
1529 ankur.sing 15818
      case CUSTOMER_ID:
15819
        return isSetCustomerId();
68 ashish 15820
      }
15821
      throw new IllegalStateException();
15822
    }
15823
 
15824
    public boolean isSet(int fieldID) {
15825
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15826
    }
15827
 
15828
    @Override
15829
    public boolean equals(Object that) {
15830
      if (that == null)
15831
        return false;
483 rajveer 15832
      if (that instanceof getOrdersForTransaction_args)
15833
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 15834
      return false;
15835
    }
15836
 
483 rajveer 15837
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 15838
      if (that == null)
15839
        return false;
15840
 
15841
      boolean this_present_transactionId = true;
15842
      boolean that_present_transactionId = true;
15843
      if (this_present_transactionId || that_present_transactionId) {
15844
        if (!(this_present_transactionId && that_present_transactionId))
15845
          return false;
15846
        if (this.transactionId != that.transactionId)
15847
          return false;
15848
      }
15849
 
1529 ankur.sing 15850
      boolean this_present_customerId = true;
15851
      boolean that_present_customerId = true;
15852
      if (this_present_customerId || that_present_customerId) {
15853
        if (!(this_present_customerId && that_present_customerId))
15854
          return false;
15855
        if (this.customerId != that.customerId)
15856
          return false;
15857
      }
15858
 
68 ashish 15859
      return true;
15860
    }
15861
 
15862
    @Override
15863
    public int hashCode() {
15864
      return 0;
15865
    }
15866
 
483 rajveer 15867
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 15868
      if (!getClass().equals(other.getClass())) {
15869
        return getClass().getName().compareTo(other.getClass().getName());
15870
      }
15871
 
15872
      int lastComparison = 0;
483 rajveer 15873
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 15874
 
15875
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15876
      if (lastComparison != 0) {
15877
        return lastComparison;
15878
      }
15879
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15880
      if (lastComparison != 0) {
15881
        return lastComparison;
15882
      }
1529 ankur.sing 15883
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
15884
      if (lastComparison != 0) {
15885
        return lastComparison;
15886
      }
15887
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
15888
      if (lastComparison != 0) {
15889
        return lastComparison;
15890
      }
68 ashish 15891
      return 0;
15892
    }
15893
 
15894
    public void read(TProtocol iprot) throws TException {
15895
      TField field;
15896
      iprot.readStructBegin();
15897
      while (true)
15898
      {
15899
        field = iprot.readFieldBegin();
15900
        if (field.type == TType.STOP) { 
15901
          break;
15902
        }
15903
        _Fields fieldId = _Fields.findByThriftId(field.id);
15904
        if (fieldId == null) {
15905
          TProtocolUtil.skip(iprot, field.type);
15906
        } else {
15907
          switch (fieldId) {
15908
            case TRANSACTION_ID:
15909
              if (field.type == TType.I64) {
15910
                this.transactionId = iprot.readI64();
15911
                setTransactionIdIsSet(true);
15912
              } else { 
15913
                TProtocolUtil.skip(iprot, field.type);
15914
              }
15915
              break;
1529 ankur.sing 15916
            case CUSTOMER_ID:
15917
              if (field.type == TType.I64) {
15918
                this.customerId = iprot.readI64();
15919
                setCustomerIdIsSet(true);
15920
              } else { 
15921
                TProtocolUtil.skip(iprot, field.type);
15922
              }
15923
              break;
68 ashish 15924
          }
15925
          iprot.readFieldEnd();
15926
        }
15927
      }
15928
      iprot.readStructEnd();
15929
      validate();
15930
    }
15931
 
15932
    public void write(TProtocol oprot) throws TException {
15933
      validate();
15934
 
15935
      oprot.writeStructBegin(STRUCT_DESC);
15936
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15937
      oprot.writeI64(this.transactionId);
15938
      oprot.writeFieldEnd();
1529 ankur.sing 15939
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15940
      oprot.writeI64(this.customerId);
15941
      oprot.writeFieldEnd();
68 ashish 15942
      oprot.writeFieldStop();
15943
      oprot.writeStructEnd();
15944
    }
15945
 
15946
    @Override
15947
    public String toString() {
483 rajveer 15948
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15949
      boolean first = true;
15950
 
15951
      sb.append("transactionId:");
15952
      sb.append(this.transactionId);
15953
      first = false;
1529 ankur.sing 15954
      if (!first) sb.append(", ");
15955
      sb.append("customerId:");
15956
      sb.append(this.customerId);
15957
      first = false;
68 ashish 15958
      sb.append(")");
15959
      return sb.toString();
15960
    }
15961
 
15962
    public void validate() throws TException {
15963
      // check for required fields
15964
    }
15965
 
15966
  }
15967
 
483 rajveer 15968
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15969
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15970
 
483 rajveer 15971
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15972
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15973
 
483 rajveer 15974
    private List<Order> success;
68 ashish 15975
    private TransactionServiceException ex;
15976
 
15977
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15978
    public enum _Fields implements TFieldIdEnum {
15979
      SUCCESS((short)0, "success"),
15980
      EX((short)1, "ex");
15981
 
15982
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15983
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15984
 
15985
      static {
15986
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15987
          byId.put((int)field._thriftId, field);
15988
          byName.put(field.getFieldName(), field);
15989
        }
15990
      }
15991
 
15992
      /**
15993
       * Find the _Fields constant that matches fieldId, or null if its not found.
15994
       */
15995
      public static _Fields findByThriftId(int fieldId) {
15996
        return byId.get(fieldId);
15997
      }
15998
 
15999
      /**
16000
       * Find the _Fields constant that matches fieldId, throwing an exception
16001
       * if it is not found.
16002
       */
16003
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16004
        _Fields fields = findByThriftId(fieldId);
16005
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16006
        return fields;
16007
      }
16008
 
16009
      /**
16010
       * Find the _Fields constant that matches name, or null if its not found.
16011
       */
16012
      public static _Fields findByName(String name) {
16013
        return byName.get(name);
16014
      }
16015
 
16016
      private final short _thriftId;
16017
      private final String _fieldName;
16018
 
16019
      _Fields(short thriftId, String fieldName) {
16020
        _thriftId = thriftId;
16021
        _fieldName = fieldName;
16022
      }
16023
 
16024
      public short getThriftFieldId() {
16025
        return _thriftId;
16026
      }
16027
 
16028
      public String getFieldName() {
16029
        return _fieldName;
16030
      }
16031
    }
16032
 
16033
    // isset id assignments
16034
 
16035
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16036
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16037
          new ListMetaData(TType.LIST, 
16038
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16039
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16040
          new FieldValueMetaData(TType.STRUCT)));
16041
    }});
16042
 
16043
    static {
483 rajveer 16044
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 16045
    }
16046
 
483 rajveer 16047
    public getOrdersForTransaction_result() {
68 ashish 16048
    }
16049
 
483 rajveer 16050
    public getOrdersForTransaction_result(
16051
      List<Order> success,
68 ashish 16052
      TransactionServiceException ex)
16053
    {
16054
      this();
16055
      this.success = success;
16056
      this.ex = ex;
16057
    }
16058
 
16059
    /**
16060
     * Performs a deep copy on <i>other</i>.
16061
     */
483 rajveer 16062
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
16063
      if (other.isSetSuccess()) {
16064
        List<Order> __this__success = new ArrayList<Order>();
16065
        for (Order other_element : other.success) {
16066
          __this__success.add(new Order(other_element));
16067
        }
16068
        this.success = __this__success;
16069
      }
68 ashish 16070
      if (other.isSetEx()) {
16071
        this.ex = new TransactionServiceException(other.ex);
16072
      }
16073
    }
16074
 
483 rajveer 16075
    public getOrdersForTransaction_result deepCopy() {
16076
      return new getOrdersForTransaction_result(this);
68 ashish 16077
    }
16078
 
16079
    @Deprecated
483 rajveer 16080
    public getOrdersForTransaction_result clone() {
16081
      return new getOrdersForTransaction_result(this);
68 ashish 16082
    }
16083
 
483 rajveer 16084
    public int getSuccessSize() {
16085
      return (this.success == null) ? 0 : this.success.size();
16086
    }
16087
 
16088
    public java.util.Iterator<Order> getSuccessIterator() {
16089
      return (this.success == null) ? null : this.success.iterator();
16090
    }
16091
 
16092
    public void addToSuccess(Order elem) {
16093
      if (this.success == null) {
16094
        this.success = new ArrayList<Order>();
16095
      }
16096
      this.success.add(elem);
16097
    }
16098
 
16099
    public List<Order> getSuccess() {
68 ashish 16100
      return this.success;
16101
    }
16102
 
483 rajveer 16103
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 16104
      this.success = success;
16105
      return this;
16106
    }
16107
 
16108
    public void unsetSuccess() {
483 rajveer 16109
      this.success = null;
68 ashish 16110
    }
16111
 
16112
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16113
    public boolean isSetSuccess() {
483 rajveer 16114
      return this.success != null;
68 ashish 16115
    }
16116
 
16117
    public void setSuccessIsSet(boolean value) {
483 rajveer 16118
      if (!value) {
16119
        this.success = null;
16120
      }
68 ashish 16121
    }
16122
 
16123
    public TransactionServiceException getEx() {
16124
      return this.ex;
16125
    }
16126
 
483 rajveer 16127
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 16128
      this.ex = ex;
16129
      return this;
16130
    }
16131
 
16132
    public void unsetEx() {
16133
      this.ex = null;
16134
    }
16135
 
16136
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16137
    public boolean isSetEx() {
16138
      return this.ex != null;
16139
    }
16140
 
16141
    public void setExIsSet(boolean value) {
16142
      if (!value) {
16143
        this.ex = null;
16144
      }
16145
    }
16146
 
16147
    public void setFieldValue(_Fields field, Object value) {
16148
      switch (field) {
16149
      case SUCCESS:
16150
        if (value == null) {
16151
          unsetSuccess();
16152
        } else {
483 rajveer 16153
          setSuccess((List<Order>)value);
68 ashish 16154
        }
16155
        break;
16156
 
16157
      case EX:
16158
        if (value == null) {
16159
          unsetEx();
16160
        } else {
16161
          setEx((TransactionServiceException)value);
16162
        }
16163
        break;
16164
 
16165
      }
16166
    }
16167
 
16168
    public void setFieldValue(int fieldID, Object value) {
16169
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16170
    }
16171
 
16172
    public Object getFieldValue(_Fields field) {
16173
      switch (field) {
16174
      case SUCCESS:
483 rajveer 16175
        return getSuccess();
68 ashish 16176
 
16177
      case EX:
16178
        return getEx();
16179
 
16180
      }
16181
      throw new IllegalStateException();
16182
    }
16183
 
16184
    public Object getFieldValue(int fieldId) {
16185
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16186
    }
16187
 
16188
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16189
    public boolean isSet(_Fields field) {
16190
      switch (field) {
16191
      case SUCCESS:
16192
        return isSetSuccess();
16193
      case EX:
16194
        return isSetEx();
16195
      }
16196
      throw new IllegalStateException();
16197
    }
16198
 
16199
    public boolean isSet(int fieldID) {
16200
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16201
    }
16202
 
16203
    @Override
16204
    public boolean equals(Object that) {
16205
      if (that == null)
16206
        return false;
483 rajveer 16207
      if (that instanceof getOrdersForTransaction_result)
16208
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 16209
      return false;
16210
    }
16211
 
483 rajveer 16212
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 16213
      if (that == null)
16214
        return false;
16215
 
483 rajveer 16216
      boolean this_present_success = true && this.isSetSuccess();
16217
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16218
      if (this_present_success || that_present_success) {
16219
        if (!(this_present_success && that_present_success))
16220
          return false;
483 rajveer 16221
        if (!this.success.equals(that.success))
68 ashish 16222
          return false;
16223
      }
16224
 
16225
      boolean this_present_ex = true && this.isSetEx();
16226
      boolean that_present_ex = true && that.isSetEx();
16227
      if (this_present_ex || that_present_ex) {
16228
        if (!(this_present_ex && that_present_ex))
16229
          return false;
16230
        if (!this.ex.equals(that.ex))
16231
          return false;
16232
      }
16233
 
16234
      return true;
16235
    }
16236
 
16237
    @Override
16238
    public int hashCode() {
16239
      return 0;
16240
    }
16241
 
483 rajveer 16242
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 16243
      if (!getClass().equals(other.getClass())) {
16244
        return getClass().getName().compareTo(other.getClass().getName());
16245
      }
16246
 
16247
      int lastComparison = 0;
483 rajveer 16248
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 16249
 
16250
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16251
      if (lastComparison != 0) {
16252
        return lastComparison;
16253
      }
16254
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16255
      if (lastComparison != 0) {
16256
        return lastComparison;
16257
      }
16258
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16259
      if (lastComparison != 0) {
16260
        return lastComparison;
16261
      }
16262
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16263
      if (lastComparison != 0) {
16264
        return lastComparison;
16265
      }
16266
      return 0;
16267
    }
16268
 
16269
    public void read(TProtocol iprot) throws TException {
16270
      TField field;
16271
      iprot.readStructBegin();
16272
      while (true)
16273
      {
16274
        field = iprot.readFieldBegin();
16275
        if (field.type == TType.STOP) { 
16276
          break;
16277
        }
16278
        _Fields fieldId = _Fields.findByThriftId(field.id);
16279
        if (fieldId == null) {
16280
          TProtocolUtil.skip(iprot, field.type);
16281
        } else {
16282
          switch (fieldId) {
16283
            case SUCCESS:
483 rajveer 16284
              if (field.type == TType.LIST) {
16285
                {
1382 varun.gupt 16286
                  TList _list32 = iprot.readListBegin();
16287
                  this.success = new ArrayList<Order>(_list32.size);
16288
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 16289
                  {
1382 varun.gupt 16290
                    Order _elem34;
16291
                    _elem34 = new Order();
16292
                    _elem34.read(iprot);
16293
                    this.success.add(_elem34);
483 rajveer 16294
                  }
16295
                  iprot.readListEnd();
16296
                }
68 ashish 16297
              } else { 
16298
                TProtocolUtil.skip(iprot, field.type);
16299
              }
16300
              break;
16301
            case EX:
16302
              if (field.type == TType.STRUCT) {
16303
                this.ex = new TransactionServiceException();
16304
                this.ex.read(iprot);
16305
              } else { 
16306
                TProtocolUtil.skip(iprot, field.type);
16307
              }
16308
              break;
16309
          }
16310
          iprot.readFieldEnd();
16311
        }
16312
      }
16313
      iprot.readStructEnd();
16314
      validate();
16315
    }
16316
 
16317
    public void write(TProtocol oprot) throws TException {
16318
      oprot.writeStructBegin(STRUCT_DESC);
16319
 
16320
      if (this.isSetSuccess()) {
16321
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16322
        {
16323
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16324
          for (Order _iter35 : this.success)
483 rajveer 16325
          {
1382 varun.gupt 16326
            _iter35.write(oprot);
483 rajveer 16327
          }
16328
          oprot.writeListEnd();
16329
        }
68 ashish 16330
        oprot.writeFieldEnd();
16331
      } else if (this.isSetEx()) {
16332
        oprot.writeFieldBegin(EX_FIELD_DESC);
16333
        this.ex.write(oprot);
16334
        oprot.writeFieldEnd();
16335
      }
16336
      oprot.writeFieldStop();
16337
      oprot.writeStructEnd();
16338
    }
16339
 
16340
    @Override
16341
    public String toString() {
483 rajveer 16342
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 16343
      boolean first = true;
16344
 
16345
      sb.append("success:");
483 rajveer 16346
      if (this.success == null) {
16347
        sb.append("null");
16348
      } else {
16349
        sb.append(this.success);
16350
      }
68 ashish 16351
      first = false;
16352
      if (!first) sb.append(", ");
16353
      sb.append("ex:");
16354
      if (this.ex == null) {
16355
        sb.append("null");
16356
      } else {
16357
        sb.append(this.ex);
16358
      }
16359
      first = false;
16360
      sb.append(")");
16361
      return sb.toString();
16362
    }
16363
 
16364
    public void validate() throws TException {
16365
      // check for required fields
16366
    }
16367
 
16368
  }
16369
 
483 rajveer 16370
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
16371
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 16372
 
483 rajveer 16373
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
16374
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
16375
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
16376
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 16377
 
483 rajveer 16378
    private long customerId;
16379
    private long from_date;
16380
    private long to_date;
16381
    private OrderStatus status;
68 ashish 16382
 
16383
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16384
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16385
      CUSTOMER_ID((short)1, "customerId"),
16386
      FROM_DATE((short)2, "from_date"),
16387
      TO_DATE((short)3, "to_date"),
16388
      /**
16389
       * 
16390
       * @see OrderStatus
16391
       */
16392
      STATUS((short)4, "status");
68 ashish 16393
 
16394
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16395
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16396
 
16397
      static {
16398
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16399
          byId.put((int)field._thriftId, field);
16400
          byName.put(field.getFieldName(), field);
16401
        }
16402
      }
16403
 
16404
      /**
16405
       * Find the _Fields constant that matches fieldId, or null if its not found.
16406
       */
16407
      public static _Fields findByThriftId(int fieldId) {
16408
        return byId.get(fieldId);
16409
      }
16410
 
16411
      /**
16412
       * Find the _Fields constant that matches fieldId, throwing an exception
16413
       * if it is not found.
16414
       */
16415
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16416
        _Fields fields = findByThriftId(fieldId);
16417
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16418
        return fields;
16419
      }
16420
 
16421
      /**
16422
       * Find the _Fields constant that matches name, or null if its not found.
16423
       */
16424
      public static _Fields findByName(String name) {
16425
        return byName.get(name);
16426
      }
16427
 
16428
      private final short _thriftId;
16429
      private final String _fieldName;
16430
 
16431
      _Fields(short thriftId, String fieldName) {
16432
        _thriftId = thriftId;
16433
        _fieldName = fieldName;
16434
      }
16435
 
16436
      public short getThriftFieldId() {
16437
        return _thriftId;
16438
      }
16439
 
16440
      public String getFieldName() {
16441
        return _fieldName;
16442
      }
16443
    }
16444
 
16445
    // isset id assignments
483 rajveer 16446
    private static final int __CUSTOMERID_ISSET_ID = 0;
16447
    private static final int __FROM_DATE_ISSET_ID = 1;
16448
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 16449
    private BitSet __isset_bit_vector = new BitSet(3);
16450
 
16451
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16452
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 16453
          new FieldValueMetaData(TType.I64)));
483 rajveer 16454
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 16455
          new FieldValueMetaData(TType.I64)));
483 rajveer 16456
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 16457
          new FieldValueMetaData(TType.I64)));
483 rajveer 16458
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16459
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 16460
    }});
16461
 
16462
    static {
483 rajveer 16463
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 16464
    }
16465
 
483 rajveer 16466
    public getOrdersForCustomer_args() {
68 ashish 16467
    }
16468
 
483 rajveer 16469
    public getOrdersForCustomer_args(
16470
      long customerId,
16471
      long from_date,
16472
      long to_date,
16473
      OrderStatus status)
68 ashish 16474
    {
16475
      this();
483 rajveer 16476
      this.customerId = customerId;
16477
      setCustomerIdIsSet(true);
16478
      this.from_date = from_date;
16479
      setFrom_dateIsSet(true);
16480
      this.to_date = to_date;
16481
      setTo_dateIsSet(true);
16482
      this.status = status;
68 ashish 16483
    }
16484
 
16485
    /**
16486
     * Performs a deep copy on <i>other</i>.
16487
     */
483 rajveer 16488
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 16489
      __isset_bit_vector.clear();
16490
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 16491
      this.customerId = other.customerId;
16492
      this.from_date = other.from_date;
16493
      this.to_date = other.to_date;
16494
      if (other.isSetStatus()) {
16495
        this.status = other.status;
16496
      }
68 ashish 16497
    }
16498
 
483 rajveer 16499
    public getOrdersForCustomer_args deepCopy() {
16500
      return new getOrdersForCustomer_args(this);
68 ashish 16501
    }
16502
 
16503
    @Deprecated
483 rajveer 16504
    public getOrdersForCustomer_args clone() {
16505
      return new getOrdersForCustomer_args(this);
68 ashish 16506
    }
16507
 
483 rajveer 16508
    public long getCustomerId() {
16509
      return this.customerId;
68 ashish 16510
    }
16511
 
483 rajveer 16512
    public getOrdersForCustomer_args setCustomerId(long customerId) {
16513
      this.customerId = customerId;
16514
      setCustomerIdIsSet(true);
68 ashish 16515
      return this;
16516
    }
16517
 
483 rajveer 16518
    public void unsetCustomerId() {
16519
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 16520
    }
16521
 
483 rajveer 16522
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
16523
    public boolean isSetCustomerId() {
16524
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 16525
    }
16526
 
483 rajveer 16527
    public void setCustomerIdIsSet(boolean value) {
16528
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 16529
    }
16530
 
483 rajveer 16531
    public long getFrom_date() {
16532
      return this.from_date;
68 ashish 16533
    }
16534
 
483 rajveer 16535
    public getOrdersForCustomer_args setFrom_date(long from_date) {
16536
      this.from_date = from_date;
16537
      setFrom_dateIsSet(true);
68 ashish 16538
      return this;
16539
    }
16540
 
483 rajveer 16541
    public void unsetFrom_date() {
16542
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 16543
    }
16544
 
483 rajveer 16545
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
16546
    public boolean isSetFrom_date() {
16547
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 16548
    }
16549
 
483 rajveer 16550
    public void setFrom_dateIsSet(boolean value) {
16551
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 16552
    }
16553
 
483 rajveer 16554
    public long getTo_date() {
16555
      return this.to_date;
68 ashish 16556
    }
16557
 
483 rajveer 16558
    public getOrdersForCustomer_args setTo_date(long to_date) {
16559
      this.to_date = to_date;
16560
      setTo_dateIsSet(true);
68 ashish 16561
      return this;
16562
    }
16563
 
483 rajveer 16564
    public void unsetTo_date() {
16565
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 16566
    }
16567
 
483 rajveer 16568
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
16569
    public boolean isSetTo_date() {
16570
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 16571
    }
16572
 
483 rajveer 16573
    public void setTo_dateIsSet(boolean value) {
16574
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 16575
    }
16576
 
483 rajveer 16577
    /**
16578
     * 
16579
     * @see OrderStatus
16580
     */
16581
    public OrderStatus getStatus() {
16582
      return this.status;
16583
    }
16584
 
16585
    /**
16586
     * 
16587
     * @see OrderStatus
16588
     */
16589
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
16590
      this.status = status;
16591
      return this;
16592
    }
16593
 
16594
    public void unsetStatus() {
16595
      this.status = null;
16596
    }
16597
 
16598
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16599
    public boolean isSetStatus() {
16600
      return this.status != null;
16601
    }
16602
 
16603
    public void setStatusIsSet(boolean value) {
16604
      if (!value) {
16605
        this.status = null;
16606
      }
16607
    }
16608
 
68 ashish 16609
    public void setFieldValue(_Fields field, Object value) {
16610
      switch (field) {
483 rajveer 16611
      case CUSTOMER_ID:
68 ashish 16612
        if (value == null) {
483 rajveer 16613
          unsetCustomerId();
68 ashish 16614
        } else {
483 rajveer 16615
          setCustomerId((Long)value);
68 ashish 16616
        }
16617
        break;
16618
 
483 rajveer 16619
      case FROM_DATE:
68 ashish 16620
        if (value == null) {
483 rajveer 16621
          unsetFrom_date();
68 ashish 16622
        } else {
483 rajveer 16623
          setFrom_date((Long)value);
68 ashish 16624
        }
16625
        break;
16626
 
483 rajveer 16627
      case TO_DATE:
68 ashish 16628
        if (value == null) {
483 rajveer 16629
          unsetTo_date();
68 ashish 16630
        } else {
483 rajveer 16631
          setTo_date((Long)value);
68 ashish 16632
        }
16633
        break;
16634
 
483 rajveer 16635
      case STATUS:
16636
        if (value == null) {
16637
          unsetStatus();
16638
        } else {
16639
          setStatus((OrderStatus)value);
16640
        }
16641
        break;
16642
 
68 ashish 16643
      }
16644
    }
16645
 
16646
    public void setFieldValue(int fieldID, Object value) {
16647
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16648
    }
16649
 
16650
    public Object getFieldValue(_Fields field) {
16651
      switch (field) {
483 rajveer 16652
      case CUSTOMER_ID:
16653
        return new Long(getCustomerId());
68 ashish 16654
 
483 rajveer 16655
      case FROM_DATE:
16656
        return new Long(getFrom_date());
68 ashish 16657
 
483 rajveer 16658
      case TO_DATE:
16659
        return new Long(getTo_date());
68 ashish 16660
 
483 rajveer 16661
      case STATUS:
16662
        return getStatus();
16663
 
68 ashish 16664
      }
16665
      throw new IllegalStateException();
16666
    }
16667
 
16668
    public Object getFieldValue(int fieldId) {
16669
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16670
    }
16671
 
16672
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16673
    public boolean isSet(_Fields field) {
16674
      switch (field) {
483 rajveer 16675
      case CUSTOMER_ID:
16676
        return isSetCustomerId();
16677
      case FROM_DATE:
16678
        return isSetFrom_date();
16679
      case TO_DATE:
16680
        return isSetTo_date();
16681
      case STATUS:
16682
        return isSetStatus();
68 ashish 16683
      }
16684
      throw new IllegalStateException();
16685
    }
16686
 
16687
    public boolean isSet(int fieldID) {
16688
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16689
    }
16690
 
16691
    @Override
16692
    public boolean equals(Object that) {
16693
      if (that == null)
16694
        return false;
483 rajveer 16695
      if (that instanceof getOrdersForCustomer_args)
16696
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 16697
      return false;
16698
    }
16699
 
483 rajveer 16700
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 16701
      if (that == null)
16702
        return false;
16703
 
483 rajveer 16704
      boolean this_present_customerId = true;
16705
      boolean that_present_customerId = true;
16706
      if (this_present_customerId || that_present_customerId) {
16707
        if (!(this_present_customerId && that_present_customerId))
68 ashish 16708
          return false;
483 rajveer 16709
        if (this.customerId != that.customerId)
68 ashish 16710
          return false;
16711
      }
16712
 
483 rajveer 16713
      boolean this_present_from_date = true;
16714
      boolean that_present_from_date = true;
16715
      if (this_present_from_date || that_present_from_date) {
16716
        if (!(this_present_from_date && that_present_from_date))
68 ashish 16717
          return false;
483 rajveer 16718
        if (this.from_date != that.from_date)
68 ashish 16719
          return false;
16720
      }
16721
 
483 rajveer 16722
      boolean this_present_to_date = true;
16723
      boolean that_present_to_date = true;
16724
      if (this_present_to_date || that_present_to_date) {
16725
        if (!(this_present_to_date && that_present_to_date))
68 ashish 16726
          return false;
483 rajveer 16727
        if (this.to_date != that.to_date)
68 ashish 16728
          return false;
16729
      }
16730
 
483 rajveer 16731
      boolean this_present_status = true && this.isSetStatus();
16732
      boolean that_present_status = true && that.isSetStatus();
16733
      if (this_present_status || that_present_status) {
16734
        if (!(this_present_status && that_present_status))
16735
          return false;
16736
        if (!this.status.equals(that.status))
16737
          return false;
16738
      }
16739
 
68 ashish 16740
      return true;
16741
    }
16742
 
16743
    @Override
16744
    public int hashCode() {
16745
      return 0;
16746
    }
16747
 
483 rajveer 16748
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 16749
      if (!getClass().equals(other.getClass())) {
16750
        return getClass().getName().compareTo(other.getClass().getName());
16751
      }
16752
 
16753
      int lastComparison = 0;
483 rajveer 16754
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 16755
 
483 rajveer 16756
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 16757
      if (lastComparison != 0) {
16758
        return lastComparison;
16759
      }
483 rajveer 16760
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 16761
      if (lastComparison != 0) {
16762
        return lastComparison;
16763
      }
483 rajveer 16764
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 16765
      if (lastComparison != 0) {
16766
        return lastComparison;
16767
      }
483 rajveer 16768
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 16769
      if (lastComparison != 0) {
16770
        return lastComparison;
16771
      }
483 rajveer 16772
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 16773
      if (lastComparison != 0) {
16774
        return lastComparison;
16775
      }
483 rajveer 16776
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 16777
      if (lastComparison != 0) {
16778
        return lastComparison;
16779
      }
483 rajveer 16780
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16781
      if (lastComparison != 0) {
16782
        return lastComparison;
16783
      }
16784
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16785
      if (lastComparison != 0) {
16786
        return lastComparison;
16787
      }
68 ashish 16788
      return 0;
16789
    }
16790
 
16791
    public void read(TProtocol iprot) throws TException {
16792
      TField field;
16793
      iprot.readStructBegin();
16794
      while (true)
16795
      {
16796
        field = iprot.readFieldBegin();
16797
        if (field.type == TType.STOP) { 
16798
          break;
16799
        }
16800
        _Fields fieldId = _Fields.findByThriftId(field.id);
16801
        if (fieldId == null) {
16802
          TProtocolUtil.skip(iprot, field.type);
16803
        } else {
16804
          switch (fieldId) {
483 rajveer 16805
            case CUSTOMER_ID:
68 ashish 16806
              if (field.type == TType.I64) {
483 rajveer 16807
                this.customerId = iprot.readI64();
16808
                setCustomerIdIsSet(true);
68 ashish 16809
              } else { 
16810
                TProtocolUtil.skip(iprot, field.type);
16811
              }
16812
              break;
483 rajveer 16813
            case FROM_DATE:
68 ashish 16814
              if (field.type == TType.I64) {
483 rajveer 16815
                this.from_date = iprot.readI64();
16816
                setFrom_dateIsSet(true);
68 ashish 16817
              } else { 
16818
                TProtocolUtil.skip(iprot, field.type);
16819
              }
16820
              break;
483 rajveer 16821
            case TO_DATE:
68 ashish 16822
              if (field.type == TType.I64) {
483 rajveer 16823
                this.to_date = iprot.readI64();
16824
                setTo_dateIsSet(true);
68 ashish 16825
              } else { 
16826
                TProtocolUtil.skip(iprot, field.type);
16827
              }
16828
              break;
483 rajveer 16829
            case STATUS:
16830
              if (field.type == TType.I32) {
16831
                this.status = OrderStatus.findByValue(iprot.readI32());
16832
              } else { 
16833
                TProtocolUtil.skip(iprot, field.type);
16834
              }
16835
              break;
68 ashish 16836
          }
16837
          iprot.readFieldEnd();
16838
        }
16839
      }
16840
      iprot.readStructEnd();
16841
      validate();
16842
    }
16843
 
16844
    public void write(TProtocol oprot) throws TException {
16845
      validate();
16846
 
16847
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16848
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16849
      oprot.writeI64(this.customerId);
68 ashish 16850
      oprot.writeFieldEnd();
483 rajveer 16851
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
16852
      oprot.writeI64(this.from_date);
68 ashish 16853
      oprot.writeFieldEnd();
483 rajveer 16854
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
16855
      oprot.writeI64(this.to_date);
68 ashish 16856
      oprot.writeFieldEnd();
483 rajveer 16857
      if (this.status != null) {
16858
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16859
        oprot.writeI32(this.status.getValue());
16860
        oprot.writeFieldEnd();
16861
      }
68 ashish 16862
      oprot.writeFieldStop();
16863
      oprot.writeStructEnd();
16864
    }
16865
 
16866
    @Override
16867
    public String toString() {
483 rajveer 16868
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 16869
      boolean first = true;
16870
 
483 rajveer 16871
      sb.append("customerId:");
16872
      sb.append(this.customerId);
68 ashish 16873
      first = false;
16874
      if (!first) sb.append(", ");
483 rajveer 16875
      sb.append("from_date:");
16876
      sb.append(this.from_date);
68 ashish 16877
      first = false;
16878
      if (!first) sb.append(", ");
483 rajveer 16879
      sb.append("to_date:");
16880
      sb.append(this.to_date);
68 ashish 16881
      first = false;
483 rajveer 16882
      if (!first) sb.append(", ");
16883
      sb.append("status:");
16884
      if (this.status == null) {
16885
        sb.append("null");
16886
      } else {
16887
        String status_name = status.name();
16888
        if (status_name != null) {
16889
          sb.append(status_name);
16890
          sb.append(" (");
16891
        }
16892
        sb.append(this.status);
16893
        if (status_name != null) {
16894
          sb.append(")");
16895
        }
16896
      }
16897
      first = false;
68 ashish 16898
      sb.append(")");
16899
      return sb.toString();
16900
    }
16901
 
16902
    public void validate() throws TException {
16903
      // check for required fields
16904
    }
16905
 
16906
  }
16907
 
483 rajveer 16908
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
16909
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 16910
 
483 rajveer 16911
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16912
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16913
 
483 rajveer 16914
    private List<Order> success;
68 ashish 16915
    private TransactionServiceException ex;
16916
 
16917
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16918
    public enum _Fields implements TFieldIdEnum {
16919
      SUCCESS((short)0, "success"),
16920
      EX((short)1, "ex");
16921
 
16922
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16923
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16924
 
16925
      static {
16926
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16927
          byId.put((int)field._thriftId, field);
16928
          byName.put(field.getFieldName(), field);
16929
        }
16930
      }
16931
 
16932
      /**
16933
       * Find the _Fields constant that matches fieldId, or null if its not found.
16934
       */
16935
      public static _Fields findByThriftId(int fieldId) {
16936
        return byId.get(fieldId);
16937
      }
16938
 
16939
      /**
16940
       * Find the _Fields constant that matches fieldId, throwing an exception
16941
       * if it is not found.
16942
       */
16943
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16944
        _Fields fields = findByThriftId(fieldId);
16945
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16946
        return fields;
16947
      }
16948
 
16949
      /**
16950
       * Find the _Fields constant that matches name, or null if its not found.
16951
       */
16952
      public static _Fields findByName(String name) {
16953
        return byName.get(name);
16954
      }
16955
 
16956
      private final short _thriftId;
16957
      private final String _fieldName;
16958
 
16959
      _Fields(short thriftId, String fieldName) {
16960
        _thriftId = thriftId;
16961
        _fieldName = fieldName;
16962
      }
16963
 
16964
      public short getThriftFieldId() {
16965
        return _thriftId;
16966
      }
16967
 
16968
      public String getFieldName() {
16969
        return _fieldName;
16970
      }
16971
    }
16972
 
16973
    // isset id assignments
16974
 
16975
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16976
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16977
          new ListMetaData(TType.LIST, 
16978
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16979
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16980
          new FieldValueMetaData(TType.STRUCT)));
16981
    }});
16982
 
16983
    static {
483 rajveer 16984
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16985
    }
16986
 
483 rajveer 16987
    public getOrdersForCustomer_result() {
68 ashish 16988
    }
16989
 
483 rajveer 16990
    public getOrdersForCustomer_result(
16991
      List<Order> success,
68 ashish 16992
      TransactionServiceException ex)
16993
    {
16994
      this();
16995
      this.success = success;
16996
      this.ex = ex;
16997
    }
16998
 
16999
    /**
17000
     * Performs a deep copy on <i>other</i>.
17001
     */
483 rajveer 17002
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
17003
      if (other.isSetSuccess()) {
17004
        List<Order> __this__success = new ArrayList<Order>();
17005
        for (Order other_element : other.success) {
17006
          __this__success.add(new Order(other_element));
17007
        }
17008
        this.success = __this__success;
17009
      }
68 ashish 17010
      if (other.isSetEx()) {
17011
        this.ex = new TransactionServiceException(other.ex);
17012
      }
17013
    }
17014
 
483 rajveer 17015
    public getOrdersForCustomer_result deepCopy() {
17016
      return new getOrdersForCustomer_result(this);
68 ashish 17017
    }
17018
 
17019
    @Deprecated
483 rajveer 17020
    public getOrdersForCustomer_result clone() {
17021
      return new getOrdersForCustomer_result(this);
68 ashish 17022
    }
17023
 
483 rajveer 17024
    public int getSuccessSize() {
17025
      return (this.success == null) ? 0 : this.success.size();
17026
    }
17027
 
17028
    public java.util.Iterator<Order> getSuccessIterator() {
17029
      return (this.success == null) ? null : this.success.iterator();
17030
    }
17031
 
17032
    public void addToSuccess(Order elem) {
17033
      if (this.success == null) {
17034
        this.success = new ArrayList<Order>();
17035
      }
17036
      this.success.add(elem);
17037
    }
17038
 
17039
    public List<Order> getSuccess() {
68 ashish 17040
      return this.success;
17041
    }
17042
 
483 rajveer 17043
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 17044
      this.success = success;
17045
      return this;
17046
    }
17047
 
17048
    public void unsetSuccess() {
483 rajveer 17049
      this.success = null;
68 ashish 17050
    }
17051
 
17052
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17053
    public boolean isSetSuccess() {
483 rajveer 17054
      return this.success != null;
68 ashish 17055
    }
17056
 
17057
    public void setSuccessIsSet(boolean value) {
483 rajveer 17058
      if (!value) {
17059
        this.success = null;
17060
      }
68 ashish 17061
    }
17062
 
17063
    public TransactionServiceException getEx() {
17064
      return this.ex;
17065
    }
17066
 
483 rajveer 17067
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 17068
      this.ex = ex;
17069
      return this;
17070
    }
17071
 
17072
    public void unsetEx() {
17073
      this.ex = null;
17074
    }
17075
 
17076
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17077
    public boolean isSetEx() {
17078
      return this.ex != null;
17079
    }
17080
 
17081
    public void setExIsSet(boolean value) {
17082
      if (!value) {
17083
        this.ex = null;
17084
      }
17085
    }
17086
 
17087
    public void setFieldValue(_Fields field, Object value) {
17088
      switch (field) {
17089
      case SUCCESS:
17090
        if (value == null) {
17091
          unsetSuccess();
17092
        } else {
483 rajveer 17093
          setSuccess((List<Order>)value);
68 ashish 17094
        }
17095
        break;
17096
 
17097
      case EX:
17098
        if (value == null) {
17099
          unsetEx();
17100
        } else {
17101
          setEx((TransactionServiceException)value);
17102
        }
17103
        break;
17104
 
17105
      }
17106
    }
17107
 
17108
    public void setFieldValue(int fieldID, Object value) {
17109
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17110
    }
17111
 
17112
    public Object getFieldValue(_Fields field) {
17113
      switch (field) {
17114
      case SUCCESS:
483 rajveer 17115
        return getSuccess();
68 ashish 17116
 
17117
      case EX:
17118
        return getEx();
17119
 
17120
      }
17121
      throw new IllegalStateException();
17122
    }
17123
 
17124
    public Object getFieldValue(int fieldId) {
17125
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17126
    }
17127
 
17128
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17129
    public boolean isSet(_Fields field) {
17130
      switch (field) {
17131
      case SUCCESS:
17132
        return isSetSuccess();
17133
      case EX:
17134
        return isSetEx();
17135
      }
17136
      throw new IllegalStateException();
17137
    }
17138
 
17139
    public boolean isSet(int fieldID) {
17140
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17141
    }
17142
 
17143
    @Override
17144
    public boolean equals(Object that) {
17145
      if (that == null)
17146
        return false;
483 rajveer 17147
      if (that instanceof getOrdersForCustomer_result)
17148
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 17149
      return false;
17150
    }
17151
 
483 rajveer 17152
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 17153
      if (that == null)
17154
        return false;
17155
 
483 rajveer 17156
      boolean this_present_success = true && this.isSetSuccess();
17157
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17158
      if (this_present_success || that_present_success) {
17159
        if (!(this_present_success && that_present_success))
17160
          return false;
483 rajveer 17161
        if (!this.success.equals(that.success))
68 ashish 17162
          return false;
17163
      }
17164
 
17165
      boolean this_present_ex = true && this.isSetEx();
17166
      boolean that_present_ex = true && that.isSetEx();
17167
      if (this_present_ex || that_present_ex) {
17168
        if (!(this_present_ex && that_present_ex))
17169
          return false;
17170
        if (!this.ex.equals(that.ex))
17171
          return false;
17172
      }
17173
 
17174
      return true;
17175
    }
17176
 
17177
    @Override
17178
    public int hashCode() {
17179
      return 0;
17180
    }
17181
 
483 rajveer 17182
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 17183
      if (!getClass().equals(other.getClass())) {
17184
        return getClass().getName().compareTo(other.getClass().getName());
17185
      }
17186
 
17187
      int lastComparison = 0;
483 rajveer 17188
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 17189
 
17190
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17191
      if (lastComparison != 0) {
17192
        return lastComparison;
17193
      }
17194
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17195
      if (lastComparison != 0) {
17196
        return lastComparison;
17197
      }
17198
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17199
      if (lastComparison != 0) {
17200
        return lastComparison;
17201
      }
17202
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17203
      if (lastComparison != 0) {
17204
        return lastComparison;
17205
      }
17206
      return 0;
17207
    }
17208
 
17209
    public void read(TProtocol iprot) throws TException {
17210
      TField field;
17211
      iprot.readStructBegin();
17212
      while (true)
17213
      {
17214
        field = iprot.readFieldBegin();
17215
        if (field.type == TType.STOP) { 
17216
          break;
17217
        }
17218
        _Fields fieldId = _Fields.findByThriftId(field.id);
17219
        if (fieldId == null) {
17220
          TProtocolUtil.skip(iprot, field.type);
17221
        } else {
17222
          switch (fieldId) {
17223
            case SUCCESS:
483 rajveer 17224
              if (field.type == TType.LIST) {
17225
                {
1382 varun.gupt 17226
                  TList _list36 = iprot.readListBegin();
17227
                  this.success = new ArrayList<Order>(_list36.size);
17228
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 17229
                  {
1382 varun.gupt 17230
                    Order _elem38;
17231
                    _elem38 = new Order();
17232
                    _elem38.read(iprot);
17233
                    this.success.add(_elem38);
483 rajveer 17234
                  }
17235
                  iprot.readListEnd();
17236
                }
68 ashish 17237
              } else { 
17238
                TProtocolUtil.skip(iprot, field.type);
17239
              }
17240
              break;
17241
            case EX:
17242
              if (field.type == TType.STRUCT) {
17243
                this.ex = new TransactionServiceException();
17244
                this.ex.read(iprot);
17245
              } else { 
17246
                TProtocolUtil.skip(iprot, field.type);
17247
              }
17248
              break;
17249
          }
17250
          iprot.readFieldEnd();
17251
        }
17252
      }
17253
      iprot.readStructEnd();
17254
      validate();
17255
    }
17256
 
17257
    public void write(TProtocol oprot) throws TException {
17258
      oprot.writeStructBegin(STRUCT_DESC);
17259
 
17260
      if (this.isSetSuccess()) {
17261
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17262
        {
17263
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 17264
          for (Order _iter39 : this.success)
483 rajveer 17265
          {
1382 varun.gupt 17266
            _iter39.write(oprot);
483 rajveer 17267
          }
17268
          oprot.writeListEnd();
17269
        }
68 ashish 17270
        oprot.writeFieldEnd();
17271
      } else if (this.isSetEx()) {
17272
        oprot.writeFieldBegin(EX_FIELD_DESC);
17273
        this.ex.write(oprot);
17274
        oprot.writeFieldEnd();
17275
      }
17276
      oprot.writeFieldStop();
17277
      oprot.writeStructEnd();
17278
    }
17279
 
17280
    @Override
17281
    public String toString() {
483 rajveer 17282
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 17283
      boolean first = true;
17284
 
17285
      sb.append("success:");
483 rajveer 17286
      if (this.success == null) {
17287
        sb.append("null");
17288
      } else {
17289
        sb.append(this.success);
17290
      }
68 ashish 17291
      first = false;
17292
      if (!first) sb.append(", ");
17293
      sb.append("ex:");
17294
      if (this.ex == null) {
17295
        sb.append("null");
17296
      } else {
17297
        sb.append(this.ex);
17298
      }
17299
      first = false;
17300
      sb.append(")");
17301
      return sb.toString();
17302
    }
17303
 
17304
    public void validate() throws TException {
17305
      // check for required fields
17306
    }
17307
 
17308
  }
17309
 
483 rajveer 17310
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
17311
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 17312
 
483 rajveer 17313
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 17314
 
483 rajveer 17315
    private Order order;
68 ashish 17316
 
17317
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17318
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17319
      ORDER((short)1, "order");
68 ashish 17320
 
17321
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17322
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17323
 
17324
      static {
17325
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17326
          byId.put((int)field._thriftId, field);
17327
          byName.put(field.getFieldName(), field);
17328
        }
17329
      }
17330
 
17331
      /**
17332
       * Find the _Fields constant that matches fieldId, or null if its not found.
17333
       */
17334
      public static _Fields findByThriftId(int fieldId) {
17335
        return byId.get(fieldId);
17336
      }
17337
 
17338
      /**
17339
       * Find the _Fields constant that matches fieldId, throwing an exception
17340
       * if it is not found.
17341
       */
17342
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17343
        _Fields fields = findByThriftId(fieldId);
17344
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17345
        return fields;
17346
      }
17347
 
17348
      /**
17349
       * Find the _Fields constant that matches name, or null if its not found.
17350
       */
17351
      public static _Fields findByName(String name) {
17352
        return byName.get(name);
17353
      }
17354
 
17355
      private final short _thriftId;
17356
      private final String _fieldName;
17357
 
17358
      _Fields(short thriftId, String fieldName) {
17359
        _thriftId = thriftId;
17360
        _fieldName = fieldName;
17361
      }
17362
 
17363
      public short getThriftFieldId() {
17364
        return _thriftId;
17365
      }
17366
 
17367
      public String getFieldName() {
17368
        return _fieldName;
17369
      }
17370
    }
17371
 
17372
    // isset id assignments
17373
 
17374
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17375
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
17376
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17377
    }});
17378
 
17379
    static {
483 rajveer 17380
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 17381
    }
17382
 
483 rajveer 17383
    public createOrder_args() {
68 ashish 17384
    }
17385
 
483 rajveer 17386
    public createOrder_args(
17387
      Order order)
68 ashish 17388
    {
17389
      this();
483 rajveer 17390
      this.order = order;
68 ashish 17391
    }
17392
 
17393
    /**
17394
     * Performs a deep copy on <i>other</i>.
17395
     */
483 rajveer 17396
    public createOrder_args(createOrder_args other) {
17397
      if (other.isSetOrder()) {
17398
        this.order = new Order(other.order);
17399
      }
68 ashish 17400
    }
17401
 
483 rajveer 17402
    public createOrder_args deepCopy() {
17403
      return new createOrder_args(this);
68 ashish 17404
    }
17405
 
17406
    @Deprecated
483 rajveer 17407
    public createOrder_args clone() {
17408
      return new createOrder_args(this);
68 ashish 17409
    }
17410
 
483 rajveer 17411
    public Order getOrder() {
17412
      return this.order;
68 ashish 17413
    }
17414
 
483 rajveer 17415
    public createOrder_args setOrder(Order order) {
17416
      this.order = order;
68 ashish 17417
      return this;
17418
    }
17419
 
483 rajveer 17420
    public void unsetOrder() {
17421
      this.order = null;
68 ashish 17422
    }
17423
 
483 rajveer 17424
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
17425
    public boolean isSetOrder() {
17426
      return this.order != null;
68 ashish 17427
    }
17428
 
483 rajveer 17429
    public void setOrderIsSet(boolean value) {
17430
      if (!value) {
17431
        this.order = null;
17432
      }
68 ashish 17433
    }
17434
 
17435
    public void setFieldValue(_Fields field, Object value) {
17436
      switch (field) {
483 rajveer 17437
      case ORDER:
68 ashish 17438
        if (value == null) {
483 rajveer 17439
          unsetOrder();
68 ashish 17440
        } else {
483 rajveer 17441
          setOrder((Order)value);
68 ashish 17442
        }
17443
        break;
17444
 
17445
      }
17446
    }
17447
 
17448
    public void setFieldValue(int fieldID, Object value) {
17449
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17450
    }
17451
 
17452
    public Object getFieldValue(_Fields field) {
17453
      switch (field) {
483 rajveer 17454
      case ORDER:
17455
        return getOrder();
68 ashish 17456
 
17457
      }
17458
      throw new IllegalStateException();
17459
    }
17460
 
17461
    public Object getFieldValue(int fieldId) {
17462
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17463
    }
17464
 
17465
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17466
    public boolean isSet(_Fields field) {
17467
      switch (field) {
483 rajveer 17468
      case ORDER:
17469
        return isSetOrder();
68 ashish 17470
      }
17471
      throw new IllegalStateException();
17472
    }
17473
 
17474
    public boolean isSet(int fieldID) {
17475
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17476
    }
17477
 
17478
    @Override
17479
    public boolean equals(Object that) {
17480
      if (that == null)
17481
        return false;
483 rajveer 17482
      if (that instanceof createOrder_args)
17483
        return this.equals((createOrder_args)that);
68 ashish 17484
      return false;
17485
    }
17486
 
483 rajveer 17487
    public boolean equals(createOrder_args that) {
68 ashish 17488
      if (that == null)
17489
        return false;
17490
 
483 rajveer 17491
      boolean this_present_order = true && this.isSetOrder();
17492
      boolean that_present_order = true && that.isSetOrder();
17493
      if (this_present_order || that_present_order) {
17494
        if (!(this_present_order && that_present_order))
68 ashish 17495
          return false;
483 rajveer 17496
        if (!this.order.equals(that.order))
68 ashish 17497
          return false;
17498
      }
17499
 
17500
      return true;
17501
    }
17502
 
17503
    @Override
17504
    public int hashCode() {
17505
      return 0;
17506
    }
17507
 
483 rajveer 17508
    public int compareTo(createOrder_args other) {
68 ashish 17509
      if (!getClass().equals(other.getClass())) {
17510
        return getClass().getName().compareTo(other.getClass().getName());
17511
      }
17512
 
17513
      int lastComparison = 0;
483 rajveer 17514
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 17515
 
483 rajveer 17516
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 17517
      if (lastComparison != 0) {
17518
        return lastComparison;
17519
      }
483 rajveer 17520
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 17521
      if (lastComparison != 0) {
17522
        return lastComparison;
17523
      }
17524
      return 0;
17525
    }
17526
 
17527
    public void read(TProtocol iprot) throws TException {
17528
      TField field;
17529
      iprot.readStructBegin();
17530
      while (true)
17531
      {
17532
        field = iprot.readFieldBegin();
17533
        if (field.type == TType.STOP) { 
17534
          break;
17535
        }
17536
        _Fields fieldId = _Fields.findByThriftId(field.id);
17537
        if (fieldId == null) {
17538
          TProtocolUtil.skip(iprot, field.type);
17539
        } else {
17540
          switch (fieldId) {
483 rajveer 17541
            case ORDER:
17542
              if (field.type == TType.STRUCT) {
17543
                this.order = new Order();
17544
                this.order.read(iprot);
68 ashish 17545
              } else { 
17546
                TProtocolUtil.skip(iprot, field.type);
17547
              }
17548
              break;
17549
          }
17550
          iprot.readFieldEnd();
17551
        }
17552
      }
17553
      iprot.readStructEnd();
17554
      validate();
17555
    }
17556
 
17557
    public void write(TProtocol oprot) throws TException {
17558
      validate();
17559
 
17560
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17561
      if (this.order != null) {
17562
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
17563
        this.order.write(oprot);
17564
        oprot.writeFieldEnd();
17565
      }
68 ashish 17566
      oprot.writeFieldStop();
17567
      oprot.writeStructEnd();
17568
    }
17569
 
17570
    @Override
17571
    public String toString() {
483 rajveer 17572
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 17573
      boolean first = true;
17574
 
483 rajveer 17575
      sb.append("order:");
17576
      if (this.order == null) {
17577
        sb.append("null");
17578
      } else {
17579
        sb.append(this.order);
17580
      }
68 ashish 17581
      first = false;
17582
      sb.append(")");
17583
      return sb.toString();
17584
    }
17585
 
17586
    public void validate() throws TException {
17587
      // check for required fields
17588
    }
17589
 
17590
  }
17591
 
483 rajveer 17592
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
17593
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 17594
 
483 rajveer 17595
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 17596
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17597
 
483 rajveer 17598
    private long success;
68 ashish 17599
    private TransactionServiceException ex;
17600
 
17601
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17602
    public enum _Fields implements TFieldIdEnum {
17603
      SUCCESS((short)0, "success"),
17604
      EX((short)1, "ex");
17605
 
17606
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17607
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17608
 
17609
      static {
17610
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17611
          byId.put((int)field._thriftId, field);
17612
          byName.put(field.getFieldName(), field);
17613
        }
17614
      }
17615
 
17616
      /**
17617
       * Find the _Fields constant that matches fieldId, or null if its not found.
17618
       */
17619
      public static _Fields findByThriftId(int fieldId) {
17620
        return byId.get(fieldId);
17621
      }
17622
 
17623
      /**
17624
       * Find the _Fields constant that matches fieldId, throwing an exception
17625
       * if it is not found.
17626
       */
17627
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17628
        _Fields fields = findByThriftId(fieldId);
17629
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17630
        return fields;
17631
      }
17632
 
17633
      /**
17634
       * Find the _Fields constant that matches name, or null if its not found.
17635
       */
17636
      public static _Fields findByName(String name) {
17637
        return byName.get(name);
17638
      }
17639
 
17640
      private final short _thriftId;
17641
      private final String _fieldName;
17642
 
17643
      _Fields(short thriftId, String fieldName) {
17644
        _thriftId = thriftId;
17645
        _fieldName = fieldName;
17646
      }
17647
 
17648
      public short getThriftFieldId() {
17649
        return _thriftId;
17650
      }
17651
 
17652
      public String getFieldName() {
17653
        return _fieldName;
17654
      }
17655
    }
17656
 
17657
    // isset id assignments
17658
    private static final int __SUCCESS_ISSET_ID = 0;
17659
    private BitSet __isset_bit_vector = new BitSet(1);
17660
 
17661
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17662
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17663
          new FieldValueMetaData(TType.I64)));
68 ashish 17664
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17665
          new FieldValueMetaData(TType.STRUCT)));
17666
    }});
17667
 
17668
    static {
483 rajveer 17669
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 17670
    }
17671
 
483 rajveer 17672
    public createOrder_result() {
68 ashish 17673
    }
17674
 
483 rajveer 17675
    public createOrder_result(
17676
      long success,
68 ashish 17677
      TransactionServiceException ex)
17678
    {
17679
      this();
17680
      this.success = success;
17681
      setSuccessIsSet(true);
17682
      this.ex = ex;
17683
    }
17684
 
17685
    /**
17686
     * Performs a deep copy on <i>other</i>.
17687
     */
483 rajveer 17688
    public createOrder_result(createOrder_result other) {
68 ashish 17689
      __isset_bit_vector.clear();
17690
      __isset_bit_vector.or(other.__isset_bit_vector);
17691
      this.success = other.success;
17692
      if (other.isSetEx()) {
17693
        this.ex = new TransactionServiceException(other.ex);
17694
      }
17695
    }
17696
 
483 rajveer 17697
    public createOrder_result deepCopy() {
17698
      return new createOrder_result(this);
68 ashish 17699
    }
17700
 
17701
    @Deprecated
483 rajveer 17702
    public createOrder_result clone() {
17703
      return new createOrder_result(this);
68 ashish 17704
    }
17705
 
483 rajveer 17706
    public long getSuccess() {
68 ashish 17707
      return this.success;
17708
    }
17709
 
483 rajveer 17710
    public createOrder_result setSuccess(long success) {
68 ashish 17711
      this.success = success;
17712
      setSuccessIsSet(true);
17713
      return this;
17714
    }
17715
 
17716
    public void unsetSuccess() {
17717
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17718
    }
17719
 
17720
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17721
    public boolean isSetSuccess() {
17722
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17723
    }
17724
 
17725
    public void setSuccessIsSet(boolean value) {
17726
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17727
    }
17728
 
17729
    public TransactionServiceException getEx() {
17730
      return this.ex;
17731
    }
17732
 
483 rajveer 17733
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 17734
      this.ex = ex;
17735
      return this;
17736
    }
17737
 
17738
    public void unsetEx() {
17739
      this.ex = null;
17740
    }
17741
 
17742
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17743
    public boolean isSetEx() {
17744
      return this.ex != null;
17745
    }
17746
 
17747
    public void setExIsSet(boolean value) {
17748
      if (!value) {
17749
        this.ex = null;
17750
      }
17751
    }
17752
 
17753
    public void setFieldValue(_Fields field, Object value) {
17754
      switch (field) {
17755
      case SUCCESS:
17756
        if (value == null) {
17757
          unsetSuccess();
17758
        } else {
483 rajveer 17759
          setSuccess((Long)value);
68 ashish 17760
        }
17761
        break;
17762
 
17763
      case EX:
17764
        if (value == null) {
17765
          unsetEx();
17766
        } else {
17767
          setEx((TransactionServiceException)value);
17768
        }
17769
        break;
17770
 
17771
      }
17772
    }
17773
 
17774
    public void setFieldValue(int fieldID, Object value) {
17775
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17776
    }
17777
 
17778
    public Object getFieldValue(_Fields field) {
17779
      switch (field) {
17780
      case SUCCESS:
483 rajveer 17781
        return new Long(getSuccess());
68 ashish 17782
 
17783
      case EX:
17784
        return getEx();
17785
 
17786
      }
17787
      throw new IllegalStateException();
17788
    }
17789
 
17790
    public Object getFieldValue(int fieldId) {
17791
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17792
    }
17793
 
17794
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17795
    public boolean isSet(_Fields field) {
17796
      switch (field) {
17797
      case SUCCESS:
17798
        return isSetSuccess();
17799
      case EX:
17800
        return isSetEx();
17801
      }
17802
      throw new IllegalStateException();
17803
    }
17804
 
17805
    public boolean isSet(int fieldID) {
17806
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17807
    }
17808
 
17809
    @Override
17810
    public boolean equals(Object that) {
17811
      if (that == null)
17812
        return false;
483 rajveer 17813
      if (that instanceof createOrder_result)
17814
        return this.equals((createOrder_result)that);
68 ashish 17815
      return false;
17816
    }
17817
 
483 rajveer 17818
    public boolean equals(createOrder_result that) {
68 ashish 17819
      if (that == null)
17820
        return false;
17821
 
17822
      boolean this_present_success = true;
17823
      boolean that_present_success = true;
17824
      if (this_present_success || that_present_success) {
17825
        if (!(this_present_success && that_present_success))
17826
          return false;
17827
        if (this.success != that.success)
17828
          return false;
17829
      }
17830
 
17831
      boolean this_present_ex = true && this.isSetEx();
17832
      boolean that_present_ex = true && that.isSetEx();
17833
      if (this_present_ex || that_present_ex) {
17834
        if (!(this_present_ex && that_present_ex))
17835
          return false;
17836
        if (!this.ex.equals(that.ex))
17837
          return false;
17838
      }
17839
 
17840
      return true;
17841
    }
17842
 
17843
    @Override
17844
    public int hashCode() {
17845
      return 0;
17846
    }
17847
 
483 rajveer 17848
    public int compareTo(createOrder_result other) {
68 ashish 17849
      if (!getClass().equals(other.getClass())) {
17850
        return getClass().getName().compareTo(other.getClass().getName());
17851
      }
17852
 
17853
      int lastComparison = 0;
483 rajveer 17854
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 17855
 
17856
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17857
      if (lastComparison != 0) {
17858
        return lastComparison;
17859
      }
17860
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17861
      if (lastComparison != 0) {
17862
        return lastComparison;
17863
      }
17864
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17865
      if (lastComparison != 0) {
17866
        return lastComparison;
17867
      }
17868
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17869
      if (lastComparison != 0) {
17870
        return lastComparison;
17871
      }
17872
      return 0;
17873
    }
17874
 
17875
    public void read(TProtocol iprot) throws TException {
17876
      TField field;
17877
      iprot.readStructBegin();
17878
      while (true)
17879
      {
17880
        field = iprot.readFieldBegin();
17881
        if (field.type == TType.STOP) { 
17882
          break;
17883
        }
17884
        _Fields fieldId = _Fields.findByThriftId(field.id);
17885
        if (fieldId == null) {
17886
          TProtocolUtil.skip(iprot, field.type);
17887
        } else {
17888
          switch (fieldId) {
17889
            case SUCCESS:
483 rajveer 17890
              if (field.type == TType.I64) {
17891
                this.success = iprot.readI64();
68 ashish 17892
                setSuccessIsSet(true);
17893
              } else { 
17894
                TProtocolUtil.skip(iprot, field.type);
17895
              }
17896
              break;
17897
            case EX:
17898
              if (field.type == TType.STRUCT) {
17899
                this.ex = new TransactionServiceException();
17900
                this.ex.read(iprot);
17901
              } else { 
17902
                TProtocolUtil.skip(iprot, field.type);
17903
              }
17904
              break;
17905
          }
17906
          iprot.readFieldEnd();
17907
        }
17908
      }
17909
      iprot.readStructEnd();
17910
      validate();
17911
    }
17912
 
17913
    public void write(TProtocol oprot) throws TException {
17914
      oprot.writeStructBegin(STRUCT_DESC);
17915
 
17916
      if (this.isSetSuccess()) {
17917
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17918
        oprot.writeI64(this.success);
68 ashish 17919
        oprot.writeFieldEnd();
17920
      } else if (this.isSetEx()) {
17921
        oprot.writeFieldBegin(EX_FIELD_DESC);
17922
        this.ex.write(oprot);
17923
        oprot.writeFieldEnd();
17924
      }
17925
      oprot.writeFieldStop();
17926
      oprot.writeStructEnd();
17927
    }
17928
 
17929
    @Override
17930
    public String toString() {
483 rajveer 17931
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 17932
      boolean first = true;
17933
 
17934
      sb.append("success:");
17935
      sb.append(this.success);
17936
      first = false;
17937
      if (!first) sb.append(", ");
17938
      sb.append("ex:");
17939
      if (this.ex == null) {
17940
        sb.append("null");
17941
      } else {
17942
        sb.append(this.ex);
17943
      }
17944
      first = false;
17945
      sb.append(")");
17946
      return sb.toString();
17947
    }
17948
 
17949
    public void validate() throws TException {
17950
      // check for required fields
17951
    }
17952
 
17953
  }
17954
 
483 rajveer 17955
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17956
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17957
 
483 rajveer 17958
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17959
 
483 rajveer 17960
    private long id;
68 ashish 17961
 
17962
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17963
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17964
      ID((short)1, "id");
68 ashish 17965
 
17966
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17967
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17968
 
17969
      static {
17970
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17971
          byId.put((int)field._thriftId, field);
17972
          byName.put(field.getFieldName(), field);
17973
        }
17974
      }
17975
 
17976
      /**
17977
       * Find the _Fields constant that matches fieldId, or null if its not found.
17978
       */
17979
      public static _Fields findByThriftId(int fieldId) {
17980
        return byId.get(fieldId);
17981
      }
17982
 
17983
      /**
17984
       * Find the _Fields constant that matches fieldId, throwing an exception
17985
       * if it is not found.
17986
       */
17987
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17988
        _Fields fields = findByThriftId(fieldId);
17989
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17990
        return fields;
17991
      }
17992
 
17993
      /**
17994
       * Find the _Fields constant that matches name, or null if its not found.
17995
       */
17996
      public static _Fields findByName(String name) {
17997
        return byName.get(name);
17998
      }
17999
 
18000
      private final short _thriftId;
18001
      private final String _fieldName;
18002
 
18003
      _Fields(short thriftId, String fieldName) {
18004
        _thriftId = thriftId;
18005
        _fieldName = fieldName;
18006
      }
18007
 
18008
      public short getThriftFieldId() {
18009
        return _thriftId;
18010
      }
18011
 
18012
      public String getFieldName() {
18013
        return _fieldName;
18014
      }
18015
    }
18016
 
18017
    // isset id assignments
483 rajveer 18018
    private static final int __ID_ISSET_ID = 0;
18019
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 18020
 
18021
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18022
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 18023
          new FieldValueMetaData(TType.I64)));
18024
    }});
18025
 
18026
    static {
483 rajveer 18027
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 18028
    }
18029
 
483 rajveer 18030
    public getOrder_args() {
68 ashish 18031
    }
18032
 
483 rajveer 18033
    public getOrder_args(
18034
      long id)
68 ashish 18035
    {
18036
      this();
483 rajveer 18037
      this.id = id;
18038
      setIdIsSet(true);
68 ashish 18039
    }
18040
 
18041
    /**
18042
     * Performs a deep copy on <i>other</i>.
18043
     */
483 rajveer 18044
    public getOrder_args(getOrder_args other) {
68 ashish 18045
      __isset_bit_vector.clear();
18046
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18047
      this.id = other.id;
68 ashish 18048
    }
18049
 
483 rajveer 18050
    public getOrder_args deepCopy() {
18051
      return new getOrder_args(this);
68 ashish 18052
    }
18053
 
18054
    @Deprecated
483 rajveer 18055
    public getOrder_args clone() {
18056
      return new getOrder_args(this);
68 ashish 18057
    }
18058
 
483 rajveer 18059
    public long getId() {
18060
      return this.id;
68 ashish 18061
    }
18062
 
483 rajveer 18063
    public getOrder_args setId(long id) {
18064
      this.id = id;
18065
      setIdIsSet(true);
68 ashish 18066
      return this;
18067
    }
18068
 
483 rajveer 18069
    public void unsetId() {
18070
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 18071
    }
18072
 
483 rajveer 18073
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
18074
    public boolean isSetId() {
18075
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 18076
    }
18077
 
483 rajveer 18078
    public void setIdIsSet(boolean value) {
18079
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 18080
    }
18081
 
18082
    public void setFieldValue(_Fields field, Object value) {
18083
      switch (field) {
483 rajveer 18084
      case ID:
68 ashish 18085
        if (value == null) {
483 rajveer 18086
          unsetId();
68 ashish 18087
        } else {
483 rajveer 18088
          setId((Long)value);
68 ashish 18089
        }
18090
        break;
18091
 
18092
      }
18093
    }
18094
 
18095
    public void setFieldValue(int fieldID, Object value) {
18096
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18097
    }
18098
 
18099
    public Object getFieldValue(_Fields field) {
18100
      switch (field) {
483 rajveer 18101
      case ID:
18102
        return new Long(getId());
68 ashish 18103
 
18104
      }
18105
      throw new IllegalStateException();
18106
    }
18107
 
18108
    public Object getFieldValue(int fieldId) {
18109
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18110
    }
18111
 
18112
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18113
    public boolean isSet(_Fields field) {
18114
      switch (field) {
483 rajveer 18115
      case ID:
18116
        return isSetId();
68 ashish 18117
      }
18118
      throw new IllegalStateException();
18119
    }
18120
 
18121
    public boolean isSet(int fieldID) {
18122
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18123
    }
18124
 
18125
    @Override
18126
    public boolean equals(Object that) {
18127
      if (that == null)
18128
        return false;
483 rajveer 18129
      if (that instanceof getOrder_args)
18130
        return this.equals((getOrder_args)that);
68 ashish 18131
      return false;
18132
    }
18133
 
483 rajveer 18134
    public boolean equals(getOrder_args that) {
68 ashish 18135
      if (that == null)
18136
        return false;
18137
 
483 rajveer 18138
      boolean this_present_id = true;
18139
      boolean that_present_id = true;
18140
      if (this_present_id || that_present_id) {
18141
        if (!(this_present_id && that_present_id))
68 ashish 18142
          return false;
483 rajveer 18143
        if (this.id != that.id)
68 ashish 18144
          return false;
18145
      }
18146
 
18147
      return true;
18148
    }
18149
 
18150
    @Override
18151
    public int hashCode() {
18152
      return 0;
18153
    }
18154
 
483 rajveer 18155
    public int compareTo(getOrder_args other) {
68 ashish 18156
      if (!getClass().equals(other.getClass())) {
18157
        return getClass().getName().compareTo(other.getClass().getName());
18158
      }
18159
 
18160
      int lastComparison = 0;
483 rajveer 18161
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 18162
 
483 rajveer 18163
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 18164
      if (lastComparison != 0) {
18165
        return lastComparison;
18166
      }
483 rajveer 18167
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 18168
      if (lastComparison != 0) {
18169
        return lastComparison;
18170
      }
18171
      return 0;
18172
    }
18173
 
18174
    public void read(TProtocol iprot) throws TException {
18175
      TField field;
18176
      iprot.readStructBegin();
18177
      while (true)
18178
      {
18179
        field = iprot.readFieldBegin();
18180
        if (field.type == TType.STOP) { 
18181
          break;
18182
        }
18183
        _Fields fieldId = _Fields.findByThriftId(field.id);
18184
        if (fieldId == null) {
18185
          TProtocolUtil.skip(iprot, field.type);
18186
        } else {
18187
          switch (fieldId) {
483 rajveer 18188
            case ID:
68 ashish 18189
              if (field.type == TType.I64) {
483 rajveer 18190
                this.id = iprot.readI64();
18191
                setIdIsSet(true);
68 ashish 18192
              } else { 
18193
                TProtocolUtil.skip(iprot, field.type);
18194
              }
18195
              break;
18196
          }
18197
          iprot.readFieldEnd();
18198
        }
18199
      }
18200
      iprot.readStructEnd();
18201
      validate();
18202
    }
18203
 
18204
    public void write(TProtocol oprot) throws TException {
18205
      validate();
18206
 
18207
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18208
      oprot.writeFieldBegin(ID_FIELD_DESC);
18209
      oprot.writeI64(this.id);
68 ashish 18210
      oprot.writeFieldEnd();
18211
      oprot.writeFieldStop();
18212
      oprot.writeStructEnd();
18213
    }
18214
 
18215
    @Override
18216
    public String toString() {
483 rajveer 18217
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 18218
      boolean first = true;
18219
 
483 rajveer 18220
      sb.append("id:");
18221
      sb.append(this.id);
68 ashish 18222
      first = false;
18223
      sb.append(")");
18224
      return sb.toString();
18225
    }
18226
 
18227
    public void validate() throws TException {
18228
      // check for required fields
18229
    }
18230
 
18231
  }
18232
 
483 rajveer 18233
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
18234
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 18235
 
483 rajveer 18236
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 18237
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18238
 
483 rajveer 18239
    private Order success;
68 ashish 18240
    private TransactionServiceException ex;
18241
 
18242
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18243
    public enum _Fields implements TFieldIdEnum {
18244
      SUCCESS((short)0, "success"),
18245
      EX((short)1, "ex");
18246
 
18247
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18248
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18249
 
18250
      static {
18251
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18252
          byId.put((int)field._thriftId, field);
18253
          byName.put(field.getFieldName(), field);
18254
        }
18255
      }
18256
 
18257
      /**
18258
       * Find the _Fields constant that matches fieldId, or null if its not found.
18259
       */
18260
      public static _Fields findByThriftId(int fieldId) {
18261
        return byId.get(fieldId);
18262
      }
18263
 
18264
      /**
18265
       * Find the _Fields constant that matches fieldId, throwing an exception
18266
       * if it is not found.
18267
       */
18268
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18269
        _Fields fields = findByThriftId(fieldId);
18270
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18271
        return fields;
18272
      }
18273
 
18274
      /**
18275
       * Find the _Fields constant that matches name, or null if its not found.
18276
       */
18277
      public static _Fields findByName(String name) {
18278
        return byName.get(name);
18279
      }
18280
 
18281
      private final short _thriftId;
18282
      private final String _fieldName;
18283
 
18284
      _Fields(short thriftId, String fieldName) {
18285
        _thriftId = thriftId;
18286
        _fieldName = fieldName;
18287
      }
18288
 
18289
      public short getThriftFieldId() {
18290
        return _thriftId;
18291
      }
18292
 
18293
      public String getFieldName() {
18294
        return _fieldName;
18295
      }
18296
    }
18297
 
18298
    // isset id assignments
18299
 
18300
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18301
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18302
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 18303
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18304
          new FieldValueMetaData(TType.STRUCT)));
18305
    }});
18306
 
18307
    static {
483 rajveer 18308
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 18309
    }
18310
 
483 rajveer 18311
    public getOrder_result() {
68 ashish 18312
    }
18313
 
483 rajveer 18314
    public getOrder_result(
18315
      Order success,
68 ashish 18316
      TransactionServiceException ex)
18317
    {
18318
      this();
18319
      this.success = success;
18320
      this.ex = ex;
18321
    }
18322
 
18323
    /**
18324
     * Performs a deep copy on <i>other</i>.
18325
     */
483 rajveer 18326
    public getOrder_result(getOrder_result other) {
18327
      if (other.isSetSuccess()) {
18328
        this.success = new Order(other.success);
18329
      }
68 ashish 18330
      if (other.isSetEx()) {
18331
        this.ex = new TransactionServiceException(other.ex);
18332
      }
18333
    }
18334
 
483 rajveer 18335
    public getOrder_result deepCopy() {
18336
      return new getOrder_result(this);
68 ashish 18337
    }
18338
 
18339
    @Deprecated
483 rajveer 18340
    public getOrder_result clone() {
18341
      return new getOrder_result(this);
68 ashish 18342
    }
18343
 
483 rajveer 18344
    public Order getSuccess() {
68 ashish 18345
      return this.success;
18346
    }
18347
 
483 rajveer 18348
    public getOrder_result setSuccess(Order success) {
68 ashish 18349
      this.success = success;
18350
      return this;
18351
    }
18352
 
18353
    public void unsetSuccess() {
483 rajveer 18354
      this.success = null;
68 ashish 18355
    }
18356
 
18357
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18358
    public boolean isSetSuccess() {
483 rajveer 18359
      return this.success != null;
68 ashish 18360
    }
18361
 
18362
    public void setSuccessIsSet(boolean value) {
483 rajveer 18363
      if (!value) {
18364
        this.success = null;
18365
      }
68 ashish 18366
    }
18367
 
18368
    public TransactionServiceException getEx() {
18369
      return this.ex;
18370
    }
18371
 
483 rajveer 18372
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 18373
      this.ex = ex;
18374
      return this;
18375
    }
18376
 
18377
    public void unsetEx() {
18378
      this.ex = null;
18379
    }
18380
 
18381
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18382
    public boolean isSetEx() {
18383
      return this.ex != null;
18384
    }
18385
 
18386
    public void setExIsSet(boolean value) {
18387
      if (!value) {
18388
        this.ex = null;
18389
      }
18390
    }
18391
 
18392
    public void setFieldValue(_Fields field, Object value) {
18393
      switch (field) {
18394
      case SUCCESS:
18395
        if (value == null) {
18396
          unsetSuccess();
18397
        } else {
483 rajveer 18398
          setSuccess((Order)value);
68 ashish 18399
        }
18400
        break;
18401
 
18402
      case EX:
18403
        if (value == null) {
18404
          unsetEx();
18405
        } else {
18406
          setEx((TransactionServiceException)value);
18407
        }
18408
        break;
18409
 
18410
      }
18411
    }
18412
 
18413
    public void setFieldValue(int fieldID, Object value) {
18414
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18415
    }
18416
 
18417
    public Object getFieldValue(_Fields field) {
18418
      switch (field) {
18419
      case SUCCESS:
483 rajveer 18420
        return getSuccess();
68 ashish 18421
 
18422
      case EX:
18423
        return getEx();
18424
 
18425
      }
18426
      throw new IllegalStateException();
18427
    }
18428
 
18429
    public Object getFieldValue(int fieldId) {
18430
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18431
    }
18432
 
18433
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18434
    public boolean isSet(_Fields field) {
18435
      switch (field) {
18436
      case SUCCESS:
18437
        return isSetSuccess();
18438
      case EX:
18439
        return isSetEx();
18440
      }
18441
      throw new IllegalStateException();
18442
    }
18443
 
18444
    public boolean isSet(int fieldID) {
18445
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18446
    }
18447
 
18448
    @Override
18449
    public boolean equals(Object that) {
18450
      if (that == null)
18451
        return false;
483 rajveer 18452
      if (that instanceof getOrder_result)
18453
        return this.equals((getOrder_result)that);
68 ashish 18454
      return false;
18455
    }
18456
 
483 rajveer 18457
    public boolean equals(getOrder_result that) {
68 ashish 18458
      if (that == null)
18459
        return false;
18460
 
483 rajveer 18461
      boolean this_present_success = true && this.isSetSuccess();
18462
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18463
      if (this_present_success || that_present_success) {
18464
        if (!(this_present_success && that_present_success))
18465
          return false;
483 rajveer 18466
        if (!this.success.equals(that.success))
68 ashish 18467
          return false;
18468
      }
18469
 
18470
      boolean this_present_ex = true && this.isSetEx();
18471
      boolean that_present_ex = true && that.isSetEx();
18472
      if (this_present_ex || that_present_ex) {
18473
        if (!(this_present_ex && that_present_ex))
18474
          return false;
18475
        if (!this.ex.equals(that.ex))
18476
          return false;
18477
      }
18478
 
18479
      return true;
18480
    }
18481
 
18482
    @Override
18483
    public int hashCode() {
18484
      return 0;
18485
    }
18486
 
483 rajveer 18487
    public int compareTo(getOrder_result other) {
68 ashish 18488
      if (!getClass().equals(other.getClass())) {
18489
        return getClass().getName().compareTo(other.getClass().getName());
18490
      }
18491
 
18492
      int lastComparison = 0;
483 rajveer 18493
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 18494
 
18495
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18496
      if (lastComparison != 0) {
18497
        return lastComparison;
18498
      }
18499
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18500
      if (lastComparison != 0) {
18501
        return lastComparison;
18502
      }
18503
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18504
      if (lastComparison != 0) {
18505
        return lastComparison;
18506
      }
18507
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18508
      if (lastComparison != 0) {
18509
        return lastComparison;
18510
      }
18511
      return 0;
18512
    }
18513
 
18514
    public void read(TProtocol iprot) throws TException {
18515
      TField field;
18516
      iprot.readStructBegin();
18517
      while (true)
18518
      {
18519
        field = iprot.readFieldBegin();
18520
        if (field.type == TType.STOP) { 
18521
          break;
18522
        }
18523
        _Fields fieldId = _Fields.findByThriftId(field.id);
18524
        if (fieldId == null) {
18525
          TProtocolUtil.skip(iprot, field.type);
18526
        } else {
18527
          switch (fieldId) {
18528
            case SUCCESS:
483 rajveer 18529
              if (field.type == TType.STRUCT) {
18530
                this.success = new Order();
18531
                this.success.read(iprot);
68 ashish 18532
              } else { 
18533
                TProtocolUtil.skip(iprot, field.type);
18534
              }
18535
              break;
18536
            case EX:
18537
              if (field.type == TType.STRUCT) {
18538
                this.ex = new TransactionServiceException();
18539
                this.ex.read(iprot);
18540
              } else { 
18541
                TProtocolUtil.skip(iprot, field.type);
18542
              }
18543
              break;
18544
          }
18545
          iprot.readFieldEnd();
18546
        }
18547
      }
18548
      iprot.readStructEnd();
18549
      validate();
18550
    }
18551
 
18552
    public void write(TProtocol oprot) throws TException {
18553
      oprot.writeStructBegin(STRUCT_DESC);
18554
 
18555
      if (this.isSetSuccess()) {
18556
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18557
        this.success.write(oprot);
68 ashish 18558
        oprot.writeFieldEnd();
18559
      } else if (this.isSetEx()) {
18560
        oprot.writeFieldBegin(EX_FIELD_DESC);
18561
        this.ex.write(oprot);
18562
        oprot.writeFieldEnd();
18563
      }
18564
      oprot.writeFieldStop();
18565
      oprot.writeStructEnd();
18566
    }
18567
 
18568
    @Override
18569
    public String toString() {
483 rajveer 18570
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 18571
      boolean first = true;
18572
 
18573
      sb.append("success:");
483 rajveer 18574
      if (this.success == null) {
18575
        sb.append("null");
18576
      } else {
18577
        sb.append(this.success);
18578
      }
68 ashish 18579
      first = false;
18580
      if (!first) sb.append(", ");
18581
      sb.append("ex:");
18582
      if (this.ex == null) {
18583
        sb.append("null");
18584
      } else {
18585
        sb.append(this.ex);
18586
      }
18587
      first = false;
18588
      sb.append(")");
18589
      return sb.toString();
18590
    }
18591
 
18592
    public void validate() throws TException {
18593
      // check for required fields
18594
    }
18595
 
18596
  }
18597
 
483 rajveer 18598
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
18599
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 18600
 
483 rajveer 18601
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 18602
 
483 rajveer 18603
    private long orderId;
68 ashish 18604
 
18605
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18606
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18607
      ORDER_ID((short)1, "orderId");
68 ashish 18608
 
18609
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18610
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18611
 
18612
      static {
18613
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18614
          byId.put((int)field._thriftId, field);
18615
          byName.put(field.getFieldName(), field);
18616
        }
18617
      }
18618
 
18619
      /**
18620
       * Find the _Fields constant that matches fieldId, or null if its not found.
18621
       */
18622
      public static _Fields findByThriftId(int fieldId) {
18623
        return byId.get(fieldId);
18624
      }
18625
 
18626
      /**
18627
       * Find the _Fields constant that matches fieldId, throwing an exception
18628
       * if it is not found.
18629
       */
18630
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18631
        _Fields fields = findByThriftId(fieldId);
18632
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18633
        return fields;
18634
      }
18635
 
18636
      /**
18637
       * Find the _Fields constant that matches name, or null if its not found.
18638
       */
18639
      public static _Fields findByName(String name) {
18640
        return byName.get(name);
18641
      }
18642
 
18643
      private final short _thriftId;
18644
      private final String _fieldName;
18645
 
18646
      _Fields(short thriftId, String fieldName) {
18647
        _thriftId = thriftId;
18648
        _fieldName = fieldName;
18649
      }
18650
 
18651
      public short getThriftFieldId() {
18652
        return _thriftId;
18653
      }
18654
 
18655
      public String getFieldName() {
18656
        return _fieldName;
18657
      }
18658
    }
18659
 
18660
    // isset id assignments
483 rajveer 18661
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 18662
    private BitSet __isset_bit_vector = new BitSet(1);
18663
 
18664
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18665
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 18666
          new FieldValueMetaData(TType.I64)));
18667
    }});
18668
 
18669
    static {
483 rajveer 18670
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 18671
    }
18672
 
483 rajveer 18673
    public getLineItemsForOrder_args() {
68 ashish 18674
    }
18675
 
483 rajveer 18676
    public getLineItemsForOrder_args(
18677
      long orderId)
68 ashish 18678
    {
18679
      this();
483 rajveer 18680
      this.orderId = orderId;
18681
      setOrderIdIsSet(true);
68 ashish 18682
    }
18683
 
18684
    /**
18685
     * Performs a deep copy on <i>other</i>.
18686
     */
483 rajveer 18687
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 18688
      __isset_bit_vector.clear();
18689
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18690
      this.orderId = other.orderId;
68 ashish 18691
    }
18692
 
483 rajveer 18693
    public getLineItemsForOrder_args deepCopy() {
18694
      return new getLineItemsForOrder_args(this);
68 ashish 18695
    }
18696
 
18697
    @Deprecated
483 rajveer 18698
    public getLineItemsForOrder_args clone() {
18699
      return new getLineItemsForOrder_args(this);
68 ashish 18700
    }
18701
 
483 rajveer 18702
    public long getOrderId() {
18703
      return this.orderId;
68 ashish 18704
    }
18705
 
483 rajveer 18706
    public getLineItemsForOrder_args setOrderId(long orderId) {
18707
      this.orderId = orderId;
18708
      setOrderIdIsSet(true);
68 ashish 18709
      return this;
18710
    }
18711
 
483 rajveer 18712
    public void unsetOrderId() {
18713
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 18714
    }
18715
 
483 rajveer 18716
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18717
    public boolean isSetOrderId() {
18718
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 18719
    }
18720
 
483 rajveer 18721
    public void setOrderIdIsSet(boolean value) {
18722
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 18723
    }
18724
 
18725
    public void setFieldValue(_Fields field, Object value) {
18726
      switch (field) {
483 rajveer 18727
      case ORDER_ID:
68 ashish 18728
        if (value == null) {
483 rajveer 18729
          unsetOrderId();
68 ashish 18730
        } else {
483 rajveer 18731
          setOrderId((Long)value);
68 ashish 18732
        }
18733
        break;
18734
 
18735
      }
18736
    }
18737
 
18738
    public void setFieldValue(int fieldID, Object value) {
18739
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18740
    }
18741
 
18742
    public Object getFieldValue(_Fields field) {
18743
      switch (field) {
483 rajveer 18744
      case ORDER_ID:
18745
        return new Long(getOrderId());
68 ashish 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) {
483 rajveer 18758
      case ORDER_ID:
18759
        return isSetOrderId();
68 ashish 18760
      }
18761
      throw new IllegalStateException();
18762
    }
18763
 
18764
    public boolean isSet(int fieldID) {
18765
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18766
    }
18767
 
18768
    @Override
18769
    public boolean equals(Object that) {
18770
      if (that == null)
18771
        return false;
483 rajveer 18772
      if (that instanceof getLineItemsForOrder_args)
18773
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 18774
      return false;
18775
    }
18776
 
483 rajveer 18777
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 18778
      if (that == null)
18779
        return false;
18780
 
483 rajveer 18781
      boolean this_present_orderId = true;
18782
      boolean that_present_orderId = true;
18783
      if (this_present_orderId || that_present_orderId) {
18784
        if (!(this_present_orderId && that_present_orderId))
68 ashish 18785
          return false;
483 rajveer 18786
        if (this.orderId != that.orderId)
68 ashish 18787
          return false;
18788
      }
18789
 
18790
      return true;
18791
    }
18792
 
18793
    @Override
18794
    public int hashCode() {
18795
      return 0;
18796
    }
18797
 
483 rajveer 18798
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 18799
      if (!getClass().equals(other.getClass())) {
18800
        return getClass().getName().compareTo(other.getClass().getName());
18801
      }
18802
 
18803
      int lastComparison = 0;
483 rajveer 18804
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 18805
 
483 rajveer 18806
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 18807
      if (lastComparison != 0) {
18808
        return lastComparison;
18809
      }
483 rajveer 18810
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 18811
      if (lastComparison != 0) {
18812
        return lastComparison;
18813
      }
18814
      return 0;
18815
    }
18816
 
18817
    public void read(TProtocol iprot) throws TException {
18818
      TField field;
18819
      iprot.readStructBegin();
18820
      while (true)
18821
      {
18822
        field = iprot.readFieldBegin();
18823
        if (field.type == TType.STOP) { 
18824
          break;
18825
        }
18826
        _Fields fieldId = _Fields.findByThriftId(field.id);
18827
        if (fieldId == null) {
18828
          TProtocolUtil.skip(iprot, field.type);
18829
        } else {
18830
          switch (fieldId) {
483 rajveer 18831
            case ORDER_ID:
68 ashish 18832
              if (field.type == TType.I64) {
483 rajveer 18833
                this.orderId = iprot.readI64();
18834
                setOrderIdIsSet(true);
68 ashish 18835
              } else { 
18836
                TProtocolUtil.skip(iprot, field.type);
18837
              }
18838
              break;
18839
          }
18840
          iprot.readFieldEnd();
18841
        }
18842
      }
18843
      iprot.readStructEnd();
18844
      validate();
18845
    }
18846
 
18847
    public void write(TProtocol oprot) throws TException {
18848
      validate();
18849
 
18850
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18851
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18852
      oprot.writeI64(this.orderId);
68 ashish 18853
      oprot.writeFieldEnd();
18854
      oprot.writeFieldStop();
18855
      oprot.writeStructEnd();
18856
    }
18857
 
18858
    @Override
18859
    public String toString() {
483 rajveer 18860
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 18861
      boolean first = true;
18862
 
483 rajveer 18863
      sb.append("orderId:");
18864
      sb.append(this.orderId);
68 ashish 18865
      first = false;
18866
      sb.append(")");
18867
      return sb.toString();
18868
    }
18869
 
18870
    public void validate() throws TException {
18871
      // check for required fields
18872
    }
18873
 
18874
  }
18875
 
483 rajveer 18876
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
18877
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 18878
 
483 rajveer 18879
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 18880
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18881
 
483 rajveer 18882
    private List<LineItem> success;
68 ashish 18883
    private TransactionServiceException ex;
18884
 
18885
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18886
    public enum _Fields implements TFieldIdEnum {
18887
      SUCCESS((short)0, "success"),
18888
      EX((short)1, "ex");
18889
 
18890
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18891
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18892
 
18893
      static {
18894
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18895
          byId.put((int)field._thriftId, field);
18896
          byName.put(field.getFieldName(), field);
18897
        }
18898
      }
18899
 
18900
      /**
18901
       * Find the _Fields constant that matches fieldId, or null if its not found.
18902
       */
18903
      public static _Fields findByThriftId(int fieldId) {
18904
        return byId.get(fieldId);
18905
      }
18906
 
18907
      /**
18908
       * Find the _Fields constant that matches fieldId, throwing an exception
18909
       * if it is not found.
18910
       */
18911
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18912
        _Fields fields = findByThriftId(fieldId);
18913
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18914
        return fields;
18915
      }
18916
 
18917
      /**
18918
       * Find the _Fields constant that matches name, or null if its not found.
18919
       */
18920
      public static _Fields findByName(String name) {
18921
        return byName.get(name);
18922
      }
18923
 
18924
      private final short _thriftId;
18925
      private final String _fieldName;
18926
 
18927
      _Fields(short thriftId, String fieldName) {
18928
        _thriftId = thriftId;
18929
        _fieldName = fieldName;
18930
      }
18931
 
18932
      public short getThriftFieldId() {
18933
        return _thriftId;
18934
      }
18935
 
18936
      public String getFieldName() {
18937
        return _fieldName;
18938
      }
18939
    }
18940
 
18941
    // isset id assignments
18942
 
18943
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18944
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18945
          new ListMetaData(TType.LIST, 
18946
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18947
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18948
          new FieldValueMetaData(TType.STRUCT)));
18949
    }});
18950
 
18951
    static {
483 rajveer 18952
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18953
    }
18954
 
483 rajveer 18955
    public getLineItemsForOrder_result() {
68 ashish 18956
    }
18957
 
483 rajveer 18958
    public getLineItemsForOrder_result(
18959
      List<LineItem> success,
68 ashish 18960
      TransactionServiceException ex)
18961
    {
18962
      this();
18963
      this.success = success;
18964
      this.ex = ex;
18965
    }
18966
 
18967
    /**
18968
     * Performs a deep copy on <i>other</i>.
18969
     */
483 rajveer 18970
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18971
      if (other.isSetSuccess()) {
18972
        List<LineItem> __this__success = new ArrayList<LineItem>();
18973
        for (LineItem other_element : other.success) {
18974
          __this__success.add(new LineItem(other_element));
18975
        }
18976
        this.success = __this__success;
18977
      }
68 ashish 18978
      if (other.isSetEx()) {
18979
        this.ex = new TransactionServiceException(other.ex);
18980
      }
18981
    }
18982
 
483 rajveer 18983
    public getLineItemsForOrder_result deepCopy() {
18984
      return new getLineItemsForOrder_result(this);
68 ashish 18985
    }
18986
 
18987
    @Deprecated
483 rajveer 18988
    public getLineItemsForOrder_result clone() {
18989
      return new getLineItemsForOrder_result(this);
68 ashish 18990
    }
18991
 
483 rajveer 18992
    public int getSuccessSize() {
18993
      return (this.success == null) ? 0 : this.success.size();
18994
    }
18995
 
18996
    public java.util.Iterator<LineItem> getSuccessIterator() {
18997
      return (this.success == null) ? null : this.success.iterator();
18998
    }
18999
 
19000
    public void addToSuccess(LineItem elem) {
19001
      if (this.success == null) {
19002
        this.success = new ArrayList<LineItem>();
19003
      }
19004
      this.success.add(elem);
19005
    }
19006
 
19007
    public List<LineItem> getSuccess() {
68 ashish 19008
      return this.success;
19009
    }
19010
 
483 rajveer 19011
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 19012
      this.success = success;
19013
      return this;
19014
    }
19015
 
19016
    public void unsetSuccess() {
483 rajveer 19017
      this.success = null;
68 ashish 19018
    }
19019
 
19020
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19021
    public boolean isSetSuccess() {
483 rajveer 19022
      return this.success != null;
68 ashish 19023
    }
19024
 
19025
    public void setSuccessIsSet(boolean value) {
483 rajveer 19026
      if (!value) {
19027
        this.success = null;
19028
      }
68 ashish 19029
    }
19030
 
19031
    public TransactionServiceException getEx() {
19032
      return this.ex;
19033
    }
19034
 
483 rajveer 19035
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 19036
      this.ex = ex;
19037
      return this;
19038
    }
19039
 
19040
    public void unsetEx() {
19041
      this.ex = null;
19042
    }
19043
 
19044
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19045
    public boolean isSetEx() {
19046
      return this.ex != null;
19047
    }
19048
 
19049
    public void setExIsSet(boolean value) {
19050
      if (!value) {
19051
        this.ex = null;
19052
      }
19053
    }
19054
 
19055
    public void setFieldValue(_Fields field, Object value) {
19056
      switch (field) {
19057
      case SUCCESS:
19058
        if (value == null) {
19059
          unsetSuccess();
19060
        } else {
483 rajveer 19061
          setSuccess((List<LineItem>)value);
68 ashish 19062
        }
19063
        break;
19064
 
19065
      case EX:
19066
        if (value == null) {
19067
          unsetEx();
19068
        } else {
19069
          setEx((TransactionServiceException)value);
19070
        }
19071
        break;
19072
 
19073
      }
19074
    }
19075
 
19076
    public void setFieldValue(int fieldID, Object value) {
19077
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19078
    }
19079
 
19080
    public Object getFieldValue(_Fields field) {
19081
      switch (field) {
19082
      case SUCCESS:
483 rajveer 19083
        return getSuccess();
68 ashish 19084
 
19085
      case EX:
19086
        return getEx();
19087
 
19088
      }
19089
      throw new IllegalStateException();
19090
    }
19091
 
19092
    public Object getFieldValue(int fieldId) {
19093
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19094
    }
19095
 
19096
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19097
    public boolean isSet(_Fields field) {
19098
      switch (field) {
19099
      case SUCCESS:
19100
        return isSetSuccess();
19101
      case EX:
19102
        return isSetEx();
19103
      }
19104
      throw new IllegalStateException();
19105
    }
19106
 
19107
    public boolean isSet(int fieldID) {
19108
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19109
    }
19110
 
19111
    @Override
19112
    public boolean equals(Object that) {
19113
      if (that == null)
19114
        return false;
483 rajveer 19115
      if (that instanceof getLineItemsForOrder_result)
19116
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 19117
      return false;
19118
    }
19119
 
483 rajveer 19120
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 19121
      if (that == null)
19122
        return false;
19123
 
483 rajveer 19124
      boolean this_present_success = true && this.isSetSuccess();
19125
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 19126
      if (this_present_success || that_present_success) {
19127
        if (!(this_present_success && that_present_success))
19128
          return false;
483 rajveer 19129
        if (!this.success.equals(that.success))
68 ashish 19130
          return false;
19131
      }
19132
 
19133
      boolean this_present_ex = true && this.isSetEx();
19134
      boolean that_present_ex = true && that.isSetEx();
19135
      if (this_present_ex || that_present_ex) {
19136
        if (!(this_present_ex && that_present_ex))
19137
          return false;
19138
        if (!this.ex.equals(that.ex))
19139
          return false;
19140
      }
19141
 
19142
      return true;
19143
    }
19144
 
19145
    @Override
19146
    public int hashCode() {
19147
      return 0;
19148
    }
19149
 
483 rajveer 19150
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 19151
      if (!getClass().equals(other.getClass())) {
19152
        return getClass().getName().compareTo(other.getClass().getName());
19153
      }
19154
 
19155
      int lastComparison = 0;
483 rajveer 19156
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 19157
 
19158
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19159
      if (lastComparison != 0) {
19160
        return lastComparison;
19161
      }
19162
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19163
      if (lastComparison != 0) {
19164
        return lastComparison;
19165
      }
19166
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19167
      if (lastComparison != 0) {
19168
        return lastComparison;
19169
      }
19170
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19171
      if (lastComparison != 0) {
19172
        return lastComparison;
19173
      }
19174
      return 0;
19175
    }
19176
 
19177
    public void read(TProtocol iprot) throws TException {
19178
      TField field;
19179
      iprot.readStructBegin();
19180
      while (true)
19181
      {
19182
        field = iprot.readFieldBegin();
19183
        if (field.type == TType.STOP) { 
19184
          break;
19185
        }
19186
        _Fields fieldId = _Fields.findByThriftId(field.id);
19187
        if (fieldId == null) {
19188
          TProtocolUtil.skip(iprot, field.type);
19189
        } else {
19190
          switch (fieldId) {
19191
            case SUCCESS:
483 rajveer 19192
              if (field.type == TType.LIST) {
19193
                {
1382 varun.gupt 19194
                  TList _list40 = iprot.readListBegin();
19195
                  this.success = new ArrayList<LineItem>(_list40.size);
19196
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 19197
                  {
1382 varun.gupt 19198
                    LineItem _elem42;
19199
                    _elem42 = new LineItem();
19200
                    _elem42.read(iprot);
19201
                    this.success.add(_elem42);
483 rajveer 19202
                  }
19203
                  iprot.readListEnd();
19204
                }
68 ashish 19205
              } else { 
19206
                TProtocolUtil.skip(iprot, field.type);
19207
              }
19208
              break;
19209
            case EX:
19210
              if (field.type == TType.STRUCT) {
19211
                this.ex = new TransactionServiceException();
19212
                this.ex.read(iprot);
19213
              } else { 
19214
                TProtocolUtil.skip(iprot, field.type);
19215
              }
19216
              break;
19217
          }
19218
          iprot.readFieldEnd();
19219
        }
19220
      }
19221
      iprot.readStructEnd();
19222
      validate();
19223
    }
19224
 
19225
    public void write(TProtocol oprot) throws TException {
19226
      oprot.writeStructBegin(STRUCT_DESC);
19227
 
19228
      if (this.isSetSuccess()) {
19229
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 19230
        {
19231
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 19232
          for (LineItem _iter43 : this.success)
483 rajveer 19233
          {
1382 varun.gupt 19234
            _iter43.write(oprot);
483 rajveer 19235
          }
19236
          oprot.writeListEnd();
19237
        }
68 ashish 19238
        oprot.writeFieldEnd();
19239
      } else if (this.isSetEx()) {
19240
        oprot.writeFieldBegin(EX_FIELD_DESC);
19241
        this.ex.write(oprot);
19242
        oprot.writeFieldEnd();
19243
      }
19244
      oprot.writeFieldStop();
19245
      oprot.writeStructEnd();
19246
    }
19247
 
19248
    @Override
19249
    public String toString() {
483 rajveer 19250
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 19251
      boolean first = true;
19252
 
19253
      sb.append("success:");
483 rajveer 19254
      if (this.success == null) {
19255
        sb.append("null");
19256
      } else {
19257
        sb.append(this.success);
19258
      }
68 ashish 19259
      first = false;
19260
      if (!first) sb.append(", ");
19261
      sb.append("ex:");
19262
      if (this.ex == null) {
19263
        sb.append("null");
19264
      } else {
19265
        sb.append(this.ex);
19266
      }
19267
      first = false;
19268
      sb.append(")");
19269
      return sb.toString();
19270
    }
19271
 
19272
    public void validate() throws TException {
19273
      // check for required fields
19274
    }
19275
 
19276
  }
19277
 
1529 ankur.sing 19278
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
19279
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
19280
 
19281
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
19282
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
19283
 
19284
    private long orderId;
19285
    private long customerId;
19286
 
19287
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19288
    public enum _Fields implements TFieldIdEnum {
19289
      ORDER_ID((short)1, "orderId"),
19290
      CUSTOMER_ID((short)2, "customerId");
19291
 
19292
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19293
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19294
 
19295
      static {
19296
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19297
          byId.put((int)field._thriftId, field);
19298
          byName.put(field.getFieldName(), field);
19299
        }
19300
      }
19301
 
19302
      /**
19303
       * Find the _Fields constant that matches fieldId, or null if its not found.
19304
       */
19305
      public static _Fields findByThriftId(int fieldId) {
19306
        return byId.get(fieldId);
19307
      }
19308
 
19309
      /**
19310
       * Find the _Fields constant that matches fieldId, throwing an exception
19311
       * if it is not found.
19312
       */
19313
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19314
        _Fields fields = findByThriftId(fieldId);
19315
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19316
        return fields;
19317
      }
19318
 
19319
      /**
19320
       * Find the _Fields constant that matches name, or null if its not found.
19321
       */
19322
      public static _Fields findByName(String name) {
19323
        return byName.get(name);
19324
      }
19325
 
19326
      private final short _thriftId;
19327
      private final String _fieldName;
19328
 
19329
      _Fields(short thriftId, String fieldName) {
19330
        _thriftId = thriftId;
19331
        _fieldName = fieldName;
19332
      }
19333
 
19334
      public short getThriftFieldId() {
19335
        return _thriftId;
19336
      }
19337
 
19338
      public String getFieldName() {
19339
        return _fieldName;
19340
      }
19341
    }
19342
 
19343
    // isset id assignments
19344
    private static final int __ORDERID_ISSET_ID = 0;
19345
    private static final int __CUSTOMERID_ISSET_ID = 1;
19346
    private BitSet __isset_bit_vector = new BitSet(2);
19347
 
19348
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19349
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
19350
          new FieldValueMetaData(TType.I64)));
19351
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
19352
          new FieldValueMetaData(TType.I64)));
19353
    }});
19354
 
19355
    static {
19356
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
19357
    }
19358
 
19359
    public getOrderForCustomer_args() {
19360
    }
19361
 
19362
    public getOrderForCustomer_args(
19363
      long orderId,
19364
      long customerId)
19365
    {
19366
      this();
19367
      this.orderId = orderId;
19368
      setOrderIdIsSet(true);
19369
      this.customerId = customerId;
19370
      setCustomerIdIsSet(true);
19371
    }
19372
 
19373
    /**
19374
     * Performs a deep copy on <i>other</i>.
19375
     */
19376
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
19377
      __isset_bit_vector.clear();
19378
      __isset_bit_vector.or(other.__isset_bit_vector);
19379
      this.orderId = other.orderId;
19380
      this.customerId = other.customerId;
19381
    }
19382
 
19383
    public getOrderForCustomer_args deepCopy() {
19384
      return new getOrderForCustomer_args(this);
19385
    }
19386
 
19387
    @Deprecated
19388
    public getOrderForCustomer_args clone() {
19389
      return new getOrderForCustomer_args(this);
19390
    }
19391
 
19392
    public long getOrderId() {
19393
      return this.orderId;
19394
    }
19395
 
19396
    public getOrderForCustomer_args setOrderId(long orderId) {
19397
      this.orderId = orderId;
19398
      setOrderIdIsSet(true);
19399
      return this;
19400
    }
19401
 
19402
    public void unsetOrderId() {
19403
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19404
    }
19405
 
19406
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19407
    public boolean isSetOrderId() {
19408
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19409
    }
19410
 
19411
    public void setOrderIdIsSet(boolean value) {
19412
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19413
    }
19414
 
19415
    public long getCustomerId() {
19416
      return this.customerId;
19417
    }
19418
 
19419
    public getOrderForCustomer_args setCustomerId(long customerId) {
19420
      this.customerId = customerId;
19421
      setCustomerIdIsSet(true);
19422
      return this;
19423
    }
19424
 
19425
    public void unsetCustomerId() {
19426
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
19427
    }
19428
 
19429
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
19430
    public boolean isSetCustomerId() {
19431
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
19432
    }
19433
 
19434
    public void setCustomerIdIsSet(boolean value) {
19435
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
19436
    }
19437
 
19438
    public void setFieldValue(_Fields field, Object value) {
19439
      switch (field) {
19440
      case ORDER_ID:
19441
        if (value == null) {
19442
          unsetOrderId();
19443
        } else {
19444
          setOrderId((Long)value);
19445
        }
19446
        break;
19447
 
19448
      case CUSTOMER_ID:
19449
        if (value == null) {
19450
          unsetCustomerId();
19451
        } else {
19452
          setCustomerId((Long)value);
19453
        }
19454
        break;
19455
 
19456
      }
19457
    }
19458
 
19459
    public void setFieldValue(int fieldID, Object value) {
19460
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19461
    }
19462
 
19463
    public Object getFieldValue(_Fields field) {
19464
      switch (field) {
19465
      case ORDER_ID:
19466
        return new Long(getOrderId());
19467
 
19468
      case CUSTOMER_ID:
19469
        return new Long(getCustomerId());
19470
 
19471
      }
19472
      throw new IllegalStateException();
19473
    }
19474
 
19475
    public Object getFieldValue(int fieldId) {
19476
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19477
    }
19478
 
19479
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19480
    public boolean isSet(_Fields field) {
19481
      switch (field) {
19482
      case ORDER_ID:
19483
        return isSetOrderId();
19484
      case CUSTOMER_ID:
19485
        return isSetCustomerId();
19486
      }
19487
      throw new IllegalStateException();
19488
    }
19489
 
19490
    public boolean isSet(int fieldID) {
19491
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19492
    }
19493
 
19494
    @Override
19495
    public boolean equals(Object that) {
19496
      if (that == null)
19497
        return false;
19498
      if (that instanceof getOrderForCustomer_args)
19499
        return this.equals((getOrderForCustomer_args)that);
19500
      return false;
19501
    }
19502
 
19503
    public boolean equals(getOrderForCustomer_args that) {
19504
      if (that == null)
19505
        return false;
19506
 
19507
      boolean this_present_orderId = true;
19508
      boolean that_present_orderId = true;
19509
      if (this_present_orderId || that_present_orderId) {
19510
        if (!(this_present_orderId && that_present_orderId))
19511
          return false;
19512
        if (this.orderId != that.orderId)
19513
          return false;
19514
      }
19515
 
19516
      boolean this_present_customerId = true;
19517
      boolean that_present_customerId = true;
19518
      if (this_present_customerId || that_present_customerId) {
19519
        if (!(this_present_customerId && that_present_customerId))
19520
          return false;
19521
        if (this.customerId != that.customerId)
19522
          return false;
19523
      }
19524
 
19525
      return true;
19526
    }
19527
 
19528
    @Override
19529
    public int hashCode() {
19530
      return 0;
19531
    }
19532
 
19533
    public int compareTo(getOrderForCustomer_args other) {
19534
      if (!getClass().equals(other.getClass())) {
19535
        return getClass().getName().compareTo(other.getClass().getName());
19536
      }
19537
 
19538
      int lastComparison = 0;
19539
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
19540
 
19541
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
19542
      if (lastComparison != 0) {
19543
        return lastComparison;
19544
      }
19545
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
19546
      if (lastComparison != 0) {
19547
        return lastComparison;
19548
      }
19549
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
19550
      if (lastComparison != 0) {
19551
        return lastComparison;
19552
      }
19553
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
19554
      if (lastComparison != 0) {
19555
        return lastComparison;
19556
      }
19557
      return 0;
19558
    }
19559
 
19560
    public void read(TProtocol iprot) throws TException {
19561
      TField field;
19562
      iprot.readStructBegin();
19563
      while (true)
19564
      {
19565
        field = iprot.readFieldBegin();
19566
        if (field.type == TType.STOP) { 
19567
          break;
19568
        }
19569
        _Fields fieldId = _Fields.findByThriftId(field.id);
19570
        if (fieldId == null) {
19571
          TProtocolUtil.skip(iprot, field.type);
19572
        } else {
19573
          switch (fieldId) {
19574
            case ORDER_ID:
19575
              if (field.type == TType.I64) {
19576
                this.orderId = iprot.readI64();
19577
                setOrderIdIsSet(true);
19578
              } else { 
19579
                TProtocolUtil.skip(iprot, field.type);
19580
              }
19581
              break;
19582
            case CUSTOMER_ID:
19583
              if (field.type == TType.I64) {
19584
                this.customerId = iprot.readI64();
19585
                setCustomerIdIsSet(true);
19586
              } else { 
19587
                TProtocolUtil.skip(iprot, field.type);
19588
              }
19589
              break;
19590
          }
19591
          iprot.readFieldEnd();
19592
        }
19593
      }
19594
      iprot.readStructEnd();
19595
      validate();
19596
    }
19597
 
19598
    public void write(TProtocol oprot) throws TException {
19599
      validate();
19600
 
19601
      oprot.writeStructBegin(STRUCT_DESC);
19602
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19603
      oprot.writeI64(this.orderId);
19604
      oprot.writeFieldEnd();
19605
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
19606
      oprot.writeI64(this.customerId);
19607
      oprot.writeFieldEnd();
19608
      oprot.writeFieldStop();
19609
      oprot.writeStructEnd();
19610
    }
19611
 
19612
    @Override
19613
    public String toString() {
19614
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
19615
      boolean first = true;
19616
 
19617
      sb.append("orderId:");
19618
      sb.append(this.orderId);
19619
      first = false;
19620
      if (!first) sb.append(", ");
19621
      sb.append("customerId:");
19622
      sb.append(this.customerId);
19623
      first = false;
19624
      sb.append(")");
19625
      return sb.toString();
19626
    }
19627
 
19628
    public void validate() throws TException {
19629
      // check for required fields
19630
    }
19631
 
19632
  }
19633
 
19634
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
19635
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
19636
 
19637
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
19638
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19639
 
19640
    private Order success;
19641
    private TransactionServiceException ex;
19642
 
19643
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19644
    public enum _Fields implements TFieldIdEnum {
19645
      SUCCESS((short)0, "success"),
19646
      EX((short)1, "ex");
19647
 
19648
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19649
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19650
 
19651
      static {
19652
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19653
          byId.put((int)field._thriftId, field);
19654
          byName.put(field.getFieldName(), field);
19655
        }
19656
      }
19657
 
19658
      /**
19659
       * Find the _Fields constant that matches fieldId, or null if its not found.
19660
       */
19661
      public static _Fields findByThriftId(int fieldId) {
19662
        return byId.get(fieldId);
19663
      }
19664
 
19665
      /**
19666
       * Find the _Fields constant that matches fieldId, throwing an exception
19667
       * if it is not found.
19668
       */
19669
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19670
        _Fields fields = findByThriftId(fieldId);
19671
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19672
        return fields;
19673
      }
19674
 
19675
      /**
19676
       * Find the _Fields constant that matches name, or null if its not found.
19677
       */
19678
      public static _Fields findByName(String name) {
19679
        return byName.get(name);
19680
      }
19681
 
19682
      private final short _thriftId;
19683
      private final String _fieldName;
19684
 
19685
      _Fields(short thriftId, String fieldName) {
19686
        _thriftId = thriftId;
19687
        _fieldName = fieldName;
19688
      }
19689
 
19690
      public short getThriftFieldId() {
19691
        return _thriftId;
19692
      }
19693
 
19694
      public String getFieldName() {
19695
        return _fieldName;
19696
      }
19697
    }
19698
 
19699
    // isset id assignments
19700
 
19701
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19702
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19703
          new StructMetaData(TType.STRUCT, Order.class)));
19704
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19705
          new FieldValueMetaData(TType.STRUCT)));
19706
    }});
19707
 
19708
    static {
19709
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
19710
    }
19711
 
19712
    public getOrderForCustomer_result() {
19713
    }
19714
 
19715
    public getOrderForCustomer_result(
19716
      Order success,
19717
      TransactionServiceException ex)
19718
    {
19719
      this();
19720
      this.success = success;
19721
      this.ex = ex;
19722
    }
19723
 
19724
    /**
19725
     * Performs a deep copy on <i>other</i>.
19726
     */
19727
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
19728
      if (other.isSetSuccess()) {
19729
        this.success = new Order(other.success);
19730
      }
19731
      if (other.isSetEx()) {
19732
        this.ex = new TransactionServiceException(other.ex);
19733
      }
19734
    }
19735
 
19736
    public getOrderForCustomer_result deepCopy() {
19737
      return new getOrderForCustomer_result(this);
19738
    }
19739
 
19740
    @Deprecated
19741
    public getOrderForCustomer_result clone() {
19742
      return new getOrderForCustomer_result(this);
19743
    }
19744
 
19745
    public Order getSuccess() {
19746
      return this.success;
19747
    }
19748
 
19749
    public getOrderForCustomer_result setSuccess(Order success) {
19750
      this.success = success;
19751
      return this;
19752
    }
19753
 
19754
    public void unsetSuccess() {
19755
      this.success = null;
19756
    }
19757
 
19758
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19759
    public boolean isSetSuccess() {
19760
      return this.success != null;
19761
    }
19762
 
19763
    public void setSuccessIsSet(boolean value) {
19764
      if (!value) {
19765
        this.success = null;
19766
      }
19767
    }
19768
 
19769
    public TransactionServiceException getEx() {
19770
      return this.ex;
19771
    }
19772
 
19773
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
19774
      this.ex = ex;
19775
      return this;
19776
    }
19777
 
19778
    public void unsetEx() {
19779
      this.ex = null;
19780
    }
19781
 
19782
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19783
    public boolean isSetEx() {
19784
      return this.ex != null;
19785
    }
19786
 
19787
    public void setExIsSet(boolean value) {
19788
      if (!value) {
19789
        this.ex = null;
19790
      }
19791
    }
19792
 
19793
    public void setFieldValue(_Fields field, Object value) {
19794
      switch (field) {
19795
      case SUCCESS:
19796
        if (value == null) {
19797
          unsetSuccess();
19798
        } else {
19799
          setSuccess((Order)value);
19800
        }
19801
        break;
19802
 
19803
      case EX:
19804
        if (value == null) {
19805
          unsetEx();
19806
        } else {
19807
          setEx((TransactionServiceException)value);
19808
        }
19809
        break;
19810
 
19811
      }
19812
    }
19813
 
19814
    public void setFieldValue(int fieldID, Object value) {
19815
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19816
    }
19817
 
19818
    public Object getFieldValue(_Fields field) {
19819
      switch (field) {
19820
      case SUCCESS:
19821
        return getSuccess();
19822
 
19823
      case EX:
19824
        return getEx();
19825
 
19826
      }
19827
      throw new IllegalStateException();
19828
    }
19829
 
19830
    public Object getFieldValue(int fieldId) {
19831
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19832
    }
19833
 
19834
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19835
    public boolean isSet(_Fields field) {
19836
      switch (field) {
19837
      case SUCCESS:
19838
        return isSetSuccess();
19839
      case EX:
19840
        return isSetEx();
19841
      }
19842
      throw new IllegalStateException();
19843
    }
19844
 
19845
    public boolean isSet(int fieldID) {
19846
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19847
    }
19848
 
19849
    @Override
19850
    public boolean equals(Object that) {
19851
      if (that == null)
19852
        return false;
19853
      if (that instanceof getOrderForCustomer_result)
19854
        return this.equals((getOrderForCustomer_result)that);
19855
      return false;
19856
    }
19857
 
19858
    public boolean equals(getOrderForCustomer_result that) {
19859
      if (that == null)
19860
        return false;
19861
 
19862
      boolean this_present_success = true && this.isSetSuccess();
19863
      boolean that_present_success = true && that.isSetSuccess();
19864
      if (this_present_success || that_present_success) {
19865
        if (!(this_present_success && that_present_success))
19866
          return false;
19867
        if (!this.success.equals(that.success))
19868
          return false;
19869
      }
19870
 
19871
      boolean this_present_ex = true && this.isSetEx();
19872
      boolean that_present_ex = true && that.isSetEx();
19873
      if (this_present_ex || that_present_ex) {
19874
        if (!(this_present_ex && that_present_ex))
19875
          return false;
19876
        if (!this.ex.equals(that.ex))
19877
          return false;
19878
      }
19879
 
19880
      return true;
19881
    }
19882
 
19883
    @Override
19884
    public int hashCode() {
19885
      return 0;
19886
    }
19887
 
19888
    public int compareTo(getOrderForCustomer_result other) {
19889
      if (!getClass().equals(other.getClass())) {
19890
        return getClass().getName().compareTo(other.getClass().getName());
19891
      }
19892
 
19893
      int lastComparison = 0;
19894
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
19895
 
19896
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19897
      if (lastComparison != 0) {
19898
        return lastComparison;
19899
      }
19900
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19901
      if (lastComparison != 0) {
19902
        return lastComparison;
19903
      }
19904
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19905
      if (lastComparison != 0) {
19906
        return lastComparison;
19907
      }
19908
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19909
      if (lastComparison != 0) {
19910
        return lastComparison;
19911
      }
19912
      return 0;
19913
    }
19914
 
19915
    public void read(TProtocol iprot) throws TException {
19916
      TField field;
19917
      iprot.readStructBegin();
19918
      while (true)
19919
      {
19920
        field = iprot.readFieldBegin();
19921
        if (field.type == TType.STOP) { 
19922
          break;
19923
        }
19924
        _Fields fieldId = _Fields.findByThriftId(field.id);
19925
        if (fieldId == null) {
19926
          TProtocolUtil.skip(iprot, field.type);
19927
        } else {
19928
          switch (fieldId) {
19929
            case SUCCESS:
19930
              if (field.type == TType.STRUCT) {
19931
                this.success = new Order();
19932
                this.success.read(iprot);
19933
              } else { 
19934
                TProtocolUtil.skip(iprot, field.type);
19935
              }
19936
              break;
19937
            case EX:
19938
              if (field.type == TType.STRUCT) {
19939
                this.ex = new TransactionServiceException();
19940
                this.ex.read(iprot);
19941
              } else { 
19942
                TProtocolUtil.skip(iprot, field.type);
19943
              }
19944
              break;
19945
          }
19946
          iprot.readFieldEnd();
19947
        }
19948
      }
19949
      iprot.readStructEnd();
19950
      validate();
19951
    }
19952
 
19953
    public void write(TProtocol oprot) throws TException {
19954
      oprot.writeStructBegin(STRUCT_DESC);
19955
 
19956
      if (this.isSetSuccess()) {
19957
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19958
        this.success.write(oprot);
19959
        oprot.writeFieldEnd();
19960
      } else if (this.isSetEx()) {
19961
        oprot.writeFieldBegin(EX_FIELD_DESC);
19962
        this.ex.write(oprot);
19963
        oprot.writeFieldEnd();
19964
      }
19965
      oprot.writeFieldStop();
19966
      oprot.writeStructEnd();
19967
    }
19968
 
19969
    @Override
19970
    public String toString() {
19971
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
19972
      boolean first = true;
19973
 
19974
      sb.append("success:");
19975
      if (this.success == null) {
19976
        sb.append("null");
19977
      } else {
19978
        sb.append(this.success);
19979
      }
19980
      first = false;
19981
      if (!first) sb.append(", ");
19982
      sb.append("ex:");
19983
      if (this.ex == null) {
19984
        sb.append("null");
19985
      } else {
19986
        sb.append(this.ex);
19987
      }
19988
      first = false;
19989
      sb.append(")");
19990
      return sb.toString();
19991
    }
19992
 
19993
    public void validate() throws TException {
19994
      // check for required fields
19995
    }
19996
 
19997
  }
19998
 
1221 chandransh 19999
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
20000
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
20001
 
20002
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
20003
 
20004
    private long warehouseId;
20005
 
20006
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20007
    public enum _Fields implements TFieldIdEnum {
20008
      WAREHOUSE_ID((short)1, "warehouseId");
20009
 
20010
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20011
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20012
 
20013
      static {
20014
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20015
          byId.put((int)field._thriftId, field);
20016
          byName.put(field.getFieldName(), field);
20017
        }
20018
      }
20019
 
20020
      /**
20021
       * Find the _Fields constant that matches fieldId, or null if its not found.
20022
       */
20023
      public static _Fields findByThriftId(int fieldId) {
20024
        return byId.get(fieldId);
20025
      }
20026
 
20027
      /**
20028
       * Find the _Fields constant that matches fieldId, throwing an exception
20029
       * if it is not found.
20030
       */
20031
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20032
        _Fields fields = findByThriftId(fieldId);
20033
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20034
        return fields;
20035
      }
20036
 
20037
      /**
20038
       * Find the _Fields constant that matches name, or null if its not found.
20039
       */
20040
      public static _Fields findByName(String name) {
20041
        return byName.get(name);
20042
      }
20043
 
20044
      private final short _thriftId;
20045
      private final String _fieldName;
20046
 
20047
      _Fields(short thriftId, String fieldName) {
20048
        _thriftId = thriftId;
20049
        _fieldName = fieldName;
20050
      }
20051
 
20052
      public short getThriftFieldId() {
20053
        return _thriftId;
20054
      }
20055
 
20056
      public String getFieldName() {
20057
        return _fieldName;
20058
      }
20059
    }
20060
 
20061
    // isset id assignments
20062
    private static final int __WAREHOUSEID_ISSET_ID = 0;
20063
    private BitSet __isset_bit_vector = new BitSet(1);
20064
 
20065
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20066
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
20067
          new FieldValueMetaData(TType.I64)));
20068
    }});
20069
 
20070
    static {
20071
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
20072
    }
20073
 
20074
    public batchOrders_args() {
20075
    }
20076
 
20077
    public batchOrders_args(
20078
      long warehouseId)
20079
    {
20080
      this();
20081
      this.warehouseId = warehouseId;
20082
      setWarehouseIdIsSet(true);
20083
    }
20084
 
20085
    /**
20086
     * Performs a deep copy on <i>other</i>.
20087
     */
20088
    public batchOrders_args(batchOrders_args other) {
20089
      __isset_bit_vector.clear();
20090
      __isset_bit_vector.or(other.__isset_bit_vector);
20091
      this.warehouseId = other.warehouseId;
20092
    }
20093
 
20094
    public batchOrders_args deepCopy() {
20095
      return new batchOrders_args(this);
20096
    }
20097
 
20098
    @Deprecated
20099
    public batchOrders_args clone() {
20100
      return new batchOrders_args(this);
20101
    }
20102
 
20103
    public long getWarehouseId() {
20104
      return this.warehouseId;
20105
    }
20106
 
20107
    public batchOrders_args setWarehouseId(long warehouseId) {
20108
      this.warehouseId = warehouseId;
20109
      setWarehouseIdIsSet(true);
20110
      return this;
20111
    }
20112
 
20113
    public void unsetWarehouseId() {
20114
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20115
    }
20116
 
20117
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
20118
    public boolean isSetWarehouseId() {
20119
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20120
    }
20121
 
20122
    public void setWarehouseIdIsSet(boolean value) {
20123
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20124
    }
20125
 
20126
    public void setFieldValue(_Fields field, Object value) {
20127
      switch (field) {
20128
      case WAREHOUSE_ID:
20129
        if (value == null) {
20130
          unsetWarehouseId();
20131
        } else {
20132
          setWarehouseId((Long)value);
20133
        }
20134
        break;
20135
 
20136
      }
20137
    }
20138
 
20139
    public void setFieldValue(int fieldID, Object value) {
20140
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20141
    }
20142
 
20143
    public Object getFieldValue(_Fields field) {
20144
      switch (field) {
20145
      case WAREHOUSE_ID:
20146
        return new Long(getWarehouseId());
20147
 
20148
      }
20149
      throw new IllegalStateException();
20150
    }
20151
 
20152
    public Object getFieldValue(int fieldId) {
20153
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20154
    }
20155
 
20156
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20157
    public boolean isSet(_Fields field) {
20158
      switch (field) {
20159
      case WAREHOUSE_ID:
20160
        return isSetWarehouseId();
20161
      }
20162
      throw new IllegalStateException();
20163
    }
20164
 
20165
    public boolean isSet(int fieldID) {
20166
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20167
    }
20168
 
20169
    @Override
20170
    public boolean equals(Object that) {
20171
      if (that == null)
20172
        return false;
20173
      if (that instanceof batchOrders_args)
20174
        return this.equals((batchOrders_args)that);
20175
      return false;
20176
    }
20177
 
20178
    public boolean equals(batchOrders_args that) {
20179
      if (that == null)
20180
        return false;
20181
 
20182
      boolean this_present_warehouseId = true;
20183
      boolean that_present_warehouseId = true;
20184
      if (this_present_warehouseId || that_present_warehouseId) {
20185
        if (!(this_present_warehouseId && that_present_warehouseId))
20186
          return false;
20187
        if (this.warehouseId != that.warehouseId)
20188
          return false;
20189
      }
20190
 
20191
      return true;
20192
    }
20193
 
20194
    @Override
20195
    public int hashCode() {
20196
      return 0;
20197
    }
20198
 
20199
    public int compareTo(batchOrders_args other) {
20200
      if (!getClass().equals(other.getClass())) {
20201
        return getClass().getName().compareTo(other.getClass().getName());
20202
      }
20203
 
20204
      int lastComparison = 0;
20205
      batchOrders_args typedOther = (batchOrders_args)other;
20206
 
20207
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
20208
      if (lastComparison != 0) {
20209
        return lastComparison;
20210
      }
20211
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
20212
      if (lastComparison != 0) {
20213
        return lastComparison;
20214
      }
20215
      return 0;
20216
    }
20217
 
20218
    public void read(TProtocol iprot) throws TException {
20219
      TField field;
20220
      iprot.readStructBegin();
20221
      while (true)
20222
      {
20223
        field = iprot.readFieldBegin();
20224
        if (field.type == TType.STOP) { 
20225
          break;
20226
        }
20227
        _Fields fieldId = _Fields.findByThriftId(field.id);
20228
        if (fieldId == null) {
20229
          TProtocolUtil.skip(iprot, field.type);
20230
        } else {
20231
          switch (fieldId) {
20232
            case WAREHOUSE_ID:
20233
              if (field.type == TType.I64) {
20234
                this.warehouseId = iprot.readI64();
20235
                setWarehouseIdIsSet(true);
20236
              } else { 
20237
                TProtocolUtil.skip(iprot, field.type);
20238
              }
20239
              break;
20240
          }
20241
          iprot.readFieldEnd();
20242
        }
20243
      }
20244
      iprot.readStructEnd();
20245
      validate();
20246
    }
20247
 
20248
    public void write(TProtocol oprot) throws TException {
20249
      validate();
20250
 
20251
      oprot.writeStructBegin(STRUCT_DESC);
20252
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20253
      oprot.writeI64(this.warehouseId);
20254
      oprot.writeFieldEnd();
20255
      oprot.writeFieldStop();
20256
      oprot.writeStructEnd();
20257
    }
20258
 
20259
    @Override
20260
    public String toString() {
20261
      StringBuilder sb = new StringBuilder("batchOrders_args(");
20262
      boolean first = true;
20263
 
20264
      sb.append("warehouseId:");
20265
      sb.append(this.warehouseId);
20266
      first = false;
20267
      sb.append(")");
20268
      return sb.toString();
20269
    }
20270
 
20271
    public void validate() throws TException {
20272
      // check for required fields
20273
    }
20274
 
20275
  }
20276
 
20277
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
20278
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
20279
 
20280
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20281
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20282
 
20283
    private List<Order> success;
20284
    private TransactionServiceException ex;
20285
 
20286
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20287
    public enum _Fields implements TFieldIdEnum {
20288
      SUCCESS((short)0, "success"),
20289
      EX((short)1, "ex");
20290
 
20291
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20292
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20293
 
20294
      static {
20295
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20296
          byId.put((int)field._thriftId, field);
20297
          byName.put(field.getFieldName(), field);
20298
        }
20299
      }
20300
 
20301
      /**
20302
       * Find the _Fields constant that matches fieldId, or null if its not found.
20303
       */
20304
      public static _Fields findByThriftId(int fieldId) {
20305
        return byId.get(fieldId);
20306
      }
20307
 
20308
      /**
20309
       * Find the _Fields constant that matches fieldId, throwing an exception
20310
       * if it is not found.
20311
       */
20312
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20313
        _Fields fields = findByThriftId(fieldId);
20314
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20315
        return fields;
20316
      }
20317
 
20318
      /**
20319
       * Find the _Fields constant that matches name, or null if its not found.
20320
       */
20321
      public static _Fields findByName(String name) {
20322
        return byName.get(name);
20323
      }
20324
 
20325
      private final short _thriftId;
20326
      private final String _fieldName;
20327
 
20328
      _Fields(short thriftId, String fieldName) {
20329
        _thriftId = thriftId;
20330
        _fieldName = fieldName;
20331
      }
20332
 
20333
      public short getThriftFieldId() {
20334
        return _thriftId;
20335
      }
20336
 
20337
      public String getFieldName() {
20338
        return _fieldName;
20339
      }
20340
    }
20341
 
20342
    // isset id assignments
20343
 
20344
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20345
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20346
          new ListMetaData(TType.LIST, 
20347
              new StructMetaData(TType.STRUCT, Order.class))));
20348
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20349
          new FieldValueMetaData(TType.STRUCT)));
20350
    }});
20351
 
20352
    static {
20353
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
20354
    }
20355
 
20356
    public batchOrders_result() {
20357
    }
20358
 
20359
    public batchOrders_result(
20360
      List<Order> success,
20361
      TransactionServiceException ex)
20362
    {
20363
      this();
20364
      this.success = success;
20365
      this.ex = ex;
20366
    }
20367
 
20368
    /**
20369
     * Performs a deep copy on <i>other</i>.
20370
     */
20371
    public batchOrders_result(batchOrders_result other) {
20372
      if (other.isSetSuccess()) {
20373
        List<Order> __this__success = new ArrayList<Order>();
20374
        for (Order other_element : other.success) {
20375
          __this__success.add(new Order(other_element));
20376
        }
20377
        this.success = __this__success;
20378
      }
20379
      if (other.isSetEx()) {
20380
        this.ex = new TransactionServiceException(other.ex);
20381
      }
20382
    }
20383
 
20384
    public batchOrders_result deepCopy() {
20385
      return new batchOrders_result(this);
20386
    }
20387
 
20388
    @Deprecated
20389
    public batchOrders_result clone() {
20390
      return new batchOrders_result(this);
20391
    }
20392
 
20393
    public int getSuccessSize() {
20394
      return (this.success == null) ? 0 : this.success.size();
20395
    }
20396
 
20397
    public java.util.Iterator<Order> getSuccessIterator() {
20398
      return (this.success == null) ? null : this.success.iterator();
20399
    }
20400
 
20401
    public void addToSuccess(Order elem) {
20402
      if (this.success == null) {
20403
        this.success = new ArrayList<Order>();
20404
      }
20405
      this.success.add(elem);
20406
    }
20407
 
20408
    public List<Order> getSuccess() {
20409
      return this.success;
20410
    }
20411
 
20412
    public batchOrders_result setSuccess(List<Order> success) {
20413
      this.success = success;
20414
      return this;
20415
    }
20416
 
20417
    public void unsetSuccess() {
20418
      this.success = null;
20419
    }
20420
 
20421
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20422
    public boolean isSetSuccess() {
20423
      return this.success != null;
20424
    }
20425
 
20426
    public void setSuccessIsSet(boolean value) {
20427
      if (!value) {
20428
        this.success = null;
20429
      }
20430
    }
20431
 
20432
    public TransactionServiceException getEx() {
20433
      return this.ex;
20434
    }
20435
 
20436
    public batchOrders_result setEx(TransactionServiceException ex) {
20437
      this.ex = ex;
20438
      return this;
20439
    }
20440
 
20441
    public void unsetEx() {
20442
      this.ex = null;
20443
    }
20444
 
20445
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20446
    public boolean isSetEx() {
20447
      return this.ex != null;
20448
    }
20449
 
20450
    public void setExIsSet(boolean value) {
20451
      if (!value) {
20452
        this.ex = null;
20453
      }
20454
    }
20455
 
20456
    public void setFieldValue(_Fields field, Object value) {
20457
      switch (field) {
20458
      case SUCCESS:
20459
        if (value == null) {
20460
          unsetSuccess();
20461
        } else {
20462
          setSuccess((List<Order>)value);
20463
        }
20464
        break;
20465
 
20466
      case EX:
20467
        if (value == null) {
20468
          unsetEx();
20469
        } else {
20470
          setEx((TransactionServiceException)value);
20471
        }
20472
        break;
20473
 
20474
      }
20475
    }
20476
 
20477
    public void setFieldValue(int fieldID, Object value) {
20478
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20479
    }
20480
 
20481
    public Object getFieldValue(_Fields field) {
20482
      switch (field) {
20483
      case SUCCESS:
20484
        return getSuccess();
20485
 
20486
      case EX:
20487
        return getEx();
20488
 
20489
      }
20490
      throw new IllegalStateException();
20491
    }
20492
 
20493
    public Object getFieldValue(int fieldId) {
20494
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20495
    }
20496
 
20497
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20498
    public boolean isSet(_Fields field) {
20499
      switch (field) {
20500
      case SUCCESS:
20501
        return isSetSuccess();
20502
      case EX:
20503
        return isSetEx();
20504
      }
20505
      throw new IllegalStateException();
20506
    }
20507
 
20508
    public boolean isSet(int fieldID) {
20509
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20510
    }
20511
 
20512
    @Override
20513
    public boolean equals(Object that) {
20514
      if (that == null)
20515
        return false;
20516
      if (that instanceof batchOrders_result)
20517
        return this.equals((batchOrders_result)that);
20518
      return false;
20519
    }
20520
 
20521
    public boolean equals(batchOrders_result that) {
20522
      if (that == null)
20523
        return false;
20524
 
20525
      boolean this_present_success = true && this.isSetSuccess();
20526
      boolean that_present_success = true && that.isSetSuccess();
20527
      if (this_present_success || that_present_success) {
20528
        if (!(this_present_success && that_present_success))
20529
          return false;
20530
        if (!this.success.equals(that.success))
20531
          return false;
20532
      }
20533
 
20534
      boolean this_present_ex = true && this.isSetEx();
20535
      boolean that_present_ex = true && that.isSetEx();
20536
      if (this_present_ex || that_present_ex) {
20537
        if (!(this_present_ex && that_present_ex))
20538
          return false;
20539
        if (!this.ex.equals(that.ex))
20540
          return false;
20541
      }
20542
 
20543
      return true;
20544
    }
20545
 
20546
    @Override
20547
    public int hashCode() {
20548
      return 0;
20549
    }
20550
 
20551
    public int compareTo(batchOrders_result other) {
20552
      if (!getClass().equals(other.getClass())) {
20553
        return getClass().getName().compareTo(other.getClass().getName());
20554
      }
20555
 
20556
      int lastComparison = 0;
20557
      batchOrders_result typedOther = (batchOrders_result)other;
20558
 
20559
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20560
      if (lastComparison != 0) {
20561
        return lastComparison;
20562
      }
20563
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20564
      if (lastComparison != 0) {
20565
        return lastComparison;
20566
      }
20567
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20568
      if (lastComparison != 0) {
20569
        return lastComparison;
20570
      }
20571
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20572
      if (lastComparison != 0) {
20573
        return lastComparison;
20574
      }
20575
      return 0;
20576
    }
20577
 
20578
    public void read(TProtocol iprot) throws TException {
20579
      TField field;
20580
      iprot.readStructBegin();
20581
      while (true)
20582
      {
20583
        field = iprot.readFieldBegin();
20584
        if (field.type == TType.STOP) { 
20585
          break;
20586
        }
20587
        _Fields fieldId = _Fields.findByThriftId(field.id);
20588
        if (fieldId == null) {
20589
          TProtocolUtil.skip(iprot, field.type);
20590
        } else {
20591
          switch (fieldId) {
20592
            case SUCCESS:
20593
              if (field.type == TType.LIST) {
20594
                {
1382 varun.gupt 20595
                  TList _list44 = iprot.readListBegin();
20596
                  this.success = new ArrayList<Order>(_list44.size);
20597
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 20598
                  {
1382 varun.gupt 20599
                    Order _elem46;
20600
                    _elem46 = new Order();
20601
                    _elem46.read(iprot);
20602
                    this.success.add(_elem46);
1221 chandransh 20603
                  }
20604
                  iprot.readListEnd();
20605
                }
20606
              } else { 
20607
                TProtocolUtil.skip(iprot, field.type);
20608
              }
20609
              break;
20610
            case EX:
20611
              if (field.type == TType.STRUCT) {
20612
                this.ex = new TransactionServiceException();
20613
                this.ex.read(iprot);
20614
              } else { 
20615
                TProtocolUtil.skip(iprot, field.type);
20616
              }
20617
              break;
20618
          }
20619
          iprot.readFieldEnd();
20620
        }
20621
      }
20622
      iprot.readStructEnd();
20623
      validate();
20624
    }
20625
 
20626
    public void write(TProtocol oprot) throws TException {
20627
      oprot.writeStructBegin(STRUCT_DESC);
20628
 
20629
      if (this.isSetSuccess()) {
20630
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20631
        {
20632
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 20633
          for (Order _iter47 : this.success)
1221 chandransh 20634
          {
1382 varun.gupt 20635
            _iter47.write(oprot);
1221 chandransh 20636
          }
20637
          oprot.writeListEnd();
20638
        }
20639
        oprot.writeFieldEnd();
20640
      } else if (this.isSetEx()) {
20641
        oprot.writeFieldBegin(EX_FIELD_DESC);
20642
        this.ex.write(oprot);
20643
        oprot.writeFieldEnd();
20644
      }
20645
      oprot.writeFieldStop();
20646
      oprot.writeStructEnd();
20647
    }
20648
 
20649
    @Override
20650
    public String toString() {
20651
      StringBuilder sb = new StringBuilder("batchOrders_result(");
20652
      boolean first = true;
20653
 
20654
      sb.append("success:");
20655
      if (this.success == null) {
20656
        sb.append("null");
20657
      } else {
20658
        sb.append(this.success);
20659
      }
20660
      first = false;
20661
      if (!first) sb.append(", ");
20662
      sb.append("ex:");
20663
      if (this.ex == null) {
20664
        sb.append("null");
20665
      } else {
20666
        sb.append(this.ex);
20667
      }
20668
      first = false;
20669
      sb.append(")");
20670
      return sb.toString();
20671
    }
20672
 
20673
    public void validate() throws TException {
20674
      // check for required fields
20675
    }
20676
 
20677
  }
20678
 
1209 chandransh 20679
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
20680
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
20681
 
20682
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
20683
 
20684
    private long orderId;
20685
 
20686
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20687
    public enum _Fields implements TFieldIdEnum {
20688
      ORDER_ID((short)1, "orderId");
20689
 
20690
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20691
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20692
 
20693
      static {
20694
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20695
          byId.put((int)field._thriftId, field);
20696
          byName.put(field.getFieldName(), field);
20697
        }
20698
      }
20699
 
20700
      /**
20701
       * Find the _Fields constant that matches fieldId, or null if its not found.
20702
       */
20703
      public static _Fields findByThriftId(int fieldId) {
20704
        return byId.get(fieldId);
20705
      }
20706
 
20707
      /**
20708
       * Find the _Fields constant that matches fieldId, throwing an exception
20709
       * if it is not found.
20710
       */
20711
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20712
        _Fields fields = findByThriftId(fieldId);
20713
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20714
        return fields;
20715
      }
20716
 
20717
      /**
20718
       * Find the _Fields constant that matches name, or null if its not found.
20719
       */
20720
      public static _Fields findByName(String name) {
20721
        return byName.get(name);
20722
      }
20723
 
20724
      private final short _thriftId;
20725
      private final String _fieldName;
20726
 
20727
      _Fields(short thriftId, String fieldName) {
20728
        _thriftId = thriftId;
20729
        _fieldName = fieldName;
20730
      }
20731
 
20732
      public short getThriftFieldId() {
20733
        return _thriftId;
20734
      }
20735
 
20736
      public String getFieldName() {
20737
        return _fieldName;
20738
      }
20739
    }
20740
 
20741
    // isset id assignments
20742
    private static final int __ORDERID_ISSET_ID = 0;
20743
    private BitSet __isset_bit_vector = new BitSet(1);
20744
 
20745
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20746
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
20747
          new FieldValueMetaData(TType.I64)));
20748
    }});
20749
 
20750
    static {
20751
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
20752
    }
20753
 
20754
    public markOrderAsOutOfStock_args() {
20755
    }
20756
 
20757
    public markOrderAsOutOfStock_args(
20758
      long orderId)
20759
    {
20760
      this();
20761
      this.orderId = orderId;
20762
      setOrderIdIsSet(true);
20763
    }
20764
 
20765
    /**
20766
     * Performs a deep copy on <i>other</i>.
20767
     */
20768
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
20769
      __isset_bit_vector.clear();
20770
      __isset_bit_vector.or(other.__isset_bit_vector);
20771
      this.orderId = other.orderId;
20772
    }
20773
 
20774
    public markOrderAsOutOfStock_args deepCopy() {
20775
      return new markOrderAsOutOfStock_args(this);
20776
    }
20777
 
20778
    @Deprecated
20779
    public markOrderAsOutOfStock_args clone() {
20780
      return new markOrderAsOutOfStock_args(this);
20781
    }
20782
 
20783
    public long getOrderId() {
20784
      return this.orderId;
20785
    }
20786
 
20787
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
20788
      this.orderId = orderId;
20789
      setOrderIdIsSet(true);
20790
      return this;
20791
    }
20792
 
20793
    public void unsetOrderId() {
20794
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20795
    }
20796
 
20797
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20798
    public boolean isSetOrderId() {
20799
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20800
    }
20801
 
20802
    public void setOrderIdIsSet(boolean value) {
20803
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20804
    }
20805
 
20806
    public void setFieldValue(_Fields field, Object value) {
20807
      switch (field) {
20808
      case ORDER_ID:
20809
        if (value == null) {
20810
          unsetOrderId();
20811
        } else {
20812
          setOrderId((Long)value);
20813
        }
20814
        break;
20815
 
20816
      }
20817
    }
20818
 
20819
    public void setFieldValue(int fieldID, Object value) {
20820
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20821
    }
20822
 
20823
    public Object getFieldValue(_Fields field) {
20824
      switch (field) {
20825
      case ORDER_ID:
20826
        return new Long(getOrderId());
20827
 
20828
      }
20829
      throw new IllegalStateException();
20830
    }
20831
 
20832
    public Object getFieldValue(int fieldId) {
20833
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20834
    }
20835
 
20836
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20837
    public boolean isSet(_Fields field) {
20838
      switch (field) {
20839
      case ORDER_ID:
20840
        return isSetOrderId();
20841
      }
20842
      throw new IllegalStateException();
20843
    }
20844
 
20845
    public boolean isSet(int fieldID) {
20846
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20847
    }
20848
 
20849
    @Override
20850
    public boolean equals(Object that) {
20851
      if (that == null)
20852
        return false;
20853
      if (that instanceof markOrderAsOutOfStock_args)
20854
        return this.equals((markOrderAsOutOfStock_args)that);
20855
      return false;
20856
    }
20857
 
20858
    public boolean equals(markOrderAsOutOfStock_args that) {
20859
      if (that == null)
20860
        return false;
20861
 
20862
      boolean this_present_orderId = true;
20863
      boolean that_present_orderId = true;
20864
      if (this_present_orderId || that_present_orderId) {
20865
        if (!(this_present_orderId && that_present_orderId))
20866
          return false;
20867
        if (this.orderId != that.orderId)
20868
          return false;
20869
      }
20870
 
20871
      return true;
20872
    }
20873
 
20874
    @Override
20875
    public int hashCode() {
20876
      return 0;
20877
    }
20878
 
20879
    public int compareTo(markOrderAsOutOfStock_args other) {
20880
      if (!getClass().equals(other.getClass())) {
20881
        return getClass().getName().compareTo(other.getClass().getName());
20882
      }
20883
 
20884
      int lastComparison = 0;
20885
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
20886
 
20887
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20888
      if (lastComparison != 0) {
20889
        return lastComparison;
20890
      }
20891
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20892
      if (lastComparison != 0) {
20893
        return lastComparison;
20894
      }
20895
      return 0;
20896
    }
20897
 
20898
    public void read(TProtocol iprot) throws TException {
20899
      TField field;
20900
      iprot.readStructBegin();
20901
      while (true)
20902
      {
20903
        field = iprot.readFieldBegin();
20904
        if (field.type == TType.STOP) { 
20905
          break;
20906
        }
20907
        _Fields fieldId = _Fields.findByThriftId(field.id);
20908
        if (fieldId == null) {
20909
          TProtocolUtil.skip(iprot, field.type);
20910
        } else {
20911
          switch (fieldId) {
20912
            case ORDER_ID:
20913
              if (field.type == TType.I64) {
20914
                this.orderId = iprot.readI64();
20915
                setOrderIdIsSet(true);
20916
              } else { 
20917
                TProtocolUtil.skip(iprot, field.type);
20918
              }
20919
              break;
20920
          }
20921
          iprot.readFieldEnd();
20922
        }
20923
      }
20924
      iprot.readStructEnd();
20925
      validate();
20926
    }
20927
 
20928
    public void write(TProtocol oprot) throws TException {
20929
      validate();
20930
 
20931
      oprot.writeStructBegin(STRUCT_DESC);
20932
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20933
      oprot.writeI64(this.orderId);
20934
      oprot.writeFieldEnd();
20935
      oprot.writeFieldStop();
20936
      oprot.writeStructEnd();
20937
    }
20938
 
20939
    @Override
20940
    public String toString() {
20941
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
20942
      boolean first = true;
20943
 
20944
      sb.append("orderId:");
20945
      sb.append(this.orderId);
20946
      first = false;
20947
      sb.append(")");
20948
      return sb.toString();
20949
    }
20950
 
20951
    public void validate() throws TException {
20952
      // check for required fields
20953
    }
20954
 
20955
  }
20956
 
20957
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
20958
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
20959
 
20960
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20961
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20962
 
20963
    private boolean success;
20964
    private TransactionServiceException ex;
20965
 
20966
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20967
    public enum _Fields implements TFieldIdEnum {
20968
      SUCCESS((short)0, "success"),
20969
      EX((short)1, "ex");
20970
 
20971
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20972
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20973
 
20974
      static {
20975
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20976
          byId.put((int)field._thriftId, field);
20977
          byName.put(field.getFieldName(), field);
20978
        }
20979
      }
20980
 
20981
      /**
20982
       * Find the _Fields constant that matches fieldId, or null if its not found.
20983
       */
20984
      public static _Fields findByThriftId(int fieldId) {
20985
        return byId.get(fieldId);
20986
      }
20987
 
20988
      /**
20989
       * Find the _Fields constant that matches fieldId, throwing an exception
20990
       * if it is not found.
20991
       */
20992
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20993
        _Fields fields = findByThriftId(fieldId);
20994
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20995
        return fields;
20996
      }
20997
 
20998
      /**
20999
       * Find the _Fields constant that matches name, or null if its not found.
21000
       */
21001
      public static _Fields findByName(String name) {
21002
        return byName.get(name);
21003
      }
21004
 
21005
      private final short _thriftId;
21006
      private final String _fieldName;
21007
 
21008
      _Fields(short thriftId, String fieldName) {
21009
        _thriftId = thriftId;
21010
        _fieldName = fieldName;
21011
      }
21012
 
21013
      public short getThriftFieldId() {
21014
        return _thriftId;
21015
      }
21016
 
21017
      public String getFieldName() {
21018
        return _fieldName;
21019
      }
21020
    }
21021
 
21022
    // isset id assignments
21023
    private static final int __SUCCESS_ISSET_ID = 0;
21024
    private BitSet __isset_bit_vector = new BitSet(1);
21025
 
21026
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21027
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21028
          new FieldValueMetaData(TType.BOOL)));
21029
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21030
          new FieldValueMetaData(TType.STRUCT)));
21031
    }});
21032
 
21033
    static {
21034
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
21035
    }
21036
 
21037
    public markOrderAsOutOfStock_result() {
21038
    }
21039
 
21040
    public markOrderAsOutOfStock_result(
21041
      boolean success,
21042
      TransactionServiceException ex)
21043
    {
21044
      this();
21045
      this.success = success;
21046
      setSuccessIsSet(true);
21047
      this.ex = ex;
21048
    }
21049
 
21050
    /**
21051
     * Performs a deep copy on <i>other</i>.
21052
     */
21053
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
21054
      __isset_bit_vector.clear();
21055
      __isset_bit_vector.or(other.__isset_bit_vector);
21056
      this.success = other.success;
21057
      if (other.isSetEx()) {
21058
        this.ex = new TransactionServiceException(other.ex);
21059
      }
21060
    }
21061
 
21062
    public markOrderAsOutOfStock_result deepCopy() {
21063
      return new markOrderAsOutOfStock_result(this);
21064
    }
21065
 
21066
    @Deprecated
21067
    public markOrderAsOutOfStock_result clone() {
21068
      return new markOrderAsOutOfStock_result(this);
21069
    }
21070
 
21071
    public boolean isSuccess() {
21072
      return this.success;
21073
    }
21074
 
21075
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
21076
      this.success = success;
21077
      setSuccessIsSet(true);
21078
      return this;
21079
    }
21080
 
21081
    public void unsetSuccess() {
21082
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21083
    }
21084
 
21085
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21086
    public boolean isSetSuccess() {
21087
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21088
    }
21089
 
21090
    public void setSuccessIsSet(boolean value) {
21091
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21092
    }
21093
 
21094
    public TransactionServiceException getEx() {
21095
      return this.ex;
21096
    }
21097
 
21098
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
21099
      this.ex = ex;
21100
      return this;
21101
    }
21102
 
21103
    public void unsetEx() {
21104
      this.ex = null;
21105
    }
21106
 
21107
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21108
    public boolean isSetEx() {
21109
      return this.ex != null;
21110
    }
21111
 
21112
    public void setExIsSet(boolean value) {
21113
      if (!value) {
21114
        this.ex = null;
21115
      }
21116
    }
21117
 
21118
    public void setFieldValue(_Fields field, Object value) {
21119
      switch (field) {
21120
      case SUCCESS:
21121
        if (value == null) {
21122
          unsetSuccess();
21123
        } else {
21124
          setSuccess((Boolean)value);
21125
        }
21126
        break;
21127
 
21128
      case EX:
21129
        if (value == null) {
21130
          unsetEx();
21131
        } else {
21132
          setEx((TransactionServiceException)value);
21133
        }
21134
        break;
21135
 
21136
      }
21137
    }
21138
 
21139
    public void setFieldValue(int fieldID, Object value) {
21140
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21141
    }
21142
 
21143
    public Object getFieldValue(_Fields field) {
21144
      switch (field) {
21145
      case SUCCESS:
21146
        return new Boolean(isSuccess());
21147
 
21148
      case EX:
21149
        return getEx();
21150
 
21151
      }
21152
      throw new IllegalStateException();
21153
    }
21154
 
21155
    public Object getFieldValue(int fieldId) {
21156
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21157
    }
21158
 
21159
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21160
    public boolean isSet(_Fields field) {
21161
      switch (field) {
21162
      case SUCCESS:
21163
        return isSetSuccess();
21164
      case EX:
21165
        return isSetEx();
21166
      }
21167
      throw new IllegalStateException();
21168
    }
21169
 
21170
    public boolean isSet(int fieldID) {
21171
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21172
    }
21173
 
21174
    @Override
21175
    public boolean equals(Object that) {
21176
      if (that == null)
21177
        return false;
21178
      if (that instanceof markOrderAsOutOfStock_result)
21179
        return this.equals((markOrderAsOutOfStock_result)that);
21180
      return false;
21181
    }
21182
 
21183
    public boolean equals(markOrderAsOutOfStock_result that) {
21184
      if (that == null)
21185
        return false;
21186
 
21187
      boolean this_present_success = true;
21188
      boolean that_present_success = true;
21189
      if (this_present_success || that_present_success) {
21190
        if (!(this_present_success && that_present_success))
21191
          return false;
21192
        if (this.success != that.success)
21193
          return false;
21194
      }
21195
 
21196
      boolean this_present_ex = true && this.isSetEx();
21197
      boolean that_present_ex = true && that.isSetEx();
21198
      if (this_present_ex || that_present_ex) {
21199
        if (!(this_present_ex && that_present_ex))
21200
          return false;
21201
        if (!this.ex.equals(that.ex))
21202
          return false;
21203
      }
21204
 
21205
      return true;
21206
    }
21207
 
21208
    @Override
21209
    public int hashCode() {
21210
      return 0;
21211
    }
21212
 
21213
    public int compareTo(markOrderAsOutOfStock_result other) {
21214
      if (!getClass().equals(other.getClass())) {
21215
        return getClass().getName().compareTo(other.getClass().getName());
21216
      }
21217
 
21218
      int lastComparison = 0;
21219
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
21220
 
21221
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21222
      if (lastComparison != 0) {
21223
        return lastComparison;
21224
      }
21225
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21226
      if (lastComparison != 0) {
21227
        return lastComparison;
21228
      }
21229
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21230
      if (lastComparison != 0) {
21231
        return lastComparison;
21232
      }
21233
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21234
      if (lastComparison != 0) {
21235
        return lastComparison;
21236
      }
21237
      return 0;
21238
    }
21239
 
21240
    public void read(TProtocol iprot) throws TException {
21241
      TField field;
21242
      iprot.readStructBegin();
21243
      while (true)
21244
      {
21245
        field = iprot.readFieldBegin();
21246
        if (field.type == TType.STOP) { 
21247
          break;
21248
        }
21249
        _Fields fieldId = _Fields.findByThriftId(field.id);
21250
        if (fieldId == null) {
21251
          TProtocolUtil.skip(iprot, field.type);
21252
        } else {
21253
          switch (fieldId) {
21254
            case SUCCESS:
21255
              if (field.type == TType.BOOL) {
21256
                this.success = iprot.readBool();
21257
                setSuccessIsSet(true);
21258
              } else { 
21259
                TProtocolUtil.skip(iprot, field.type);
21260
              }
21261
              break;
21262
            case EX:
21263
              if (field.type == TType.STRUCT) {
21264
                this.ex = new TransactionServiceException();
21265
                this.ex.read(iprot);
21266
              } else { 
21267
                TProtocolUtil.skip(iprot, field.type);
21268
              }
21269
              break;
21270
          }
21271
          iprot.readFieldEnd();
21272
        }
21273
      }
21274
      iprot.readStructEnd();
21275
      validate();
21276
    }
21277
 
21278
    public void write(TProtocol oprot) throws TException {
21279
      oprot.writeStructBegin(STRUCT_DESC);
21280
 
21281
      if (this.isSetSuccess()) {
21282
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21283
        oprot.writeBool(this.success);
21284
        oprot.writeFieldEnd();
21285
      } else if (this.isSetEx()) {
21286
        oprot.writeFieldBegin(EX_FIELD_DESC);
21287
        this.ex.write(oprot);
21288
        oprot.writeFieldEnd();
21289
      }
21290
      oprot.writeFieldStop();
21291
      oprot.writeStructEnd();
21292
    }
21293
 
21294
    @Override
21295
    public String toString() {
21296
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
21297
      boolean first = true;
21298
 
21299
      sb.append("success:");
21300
      sb.append(this.success);
21301
      first = false;
21302
      if (!first) sb.append(", ");
21303
      sb.append("ex:");
21304
      if (this.ex == null) {
21305
        sb.append("null");
21306
      } else {
21307
        sb.append(this.ex);
21308
      }
21309
      first = false;
21310
      sb.append(")");
21311
      return sb.toString();
21312
    }
21313
 
21314
    public void validate() throws TException {
21315
      // check for required fields
21316
    }
21317
 
21318
  }
21319
 
758 chandransh 21320
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
21321
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
21322
 
21323
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
21324
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
21325
 
21326
    private long warehouseId;
21327
    private long providerId;
21328
 
21329
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21330
    public enum _Fields implements TFieldIdEnum {
21331
      WAREHOUSE_ID((short)1, "warehouseId"),
21332
      PROVIDER_ID((short)2, "providerId");
21333
 
21334
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21335
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21336
 
21337
      static {
21338
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21339
          byId.put((int)field._thriftId, field);
21340
          byName.put(field.getFieldName(), field);
21341
        }
21342
      }
21343
 
21344
      /**
21345
       * Find the _Fields constant that matches fieldId, or null if its not found.
21346
       */
21347
      public static _Fields findByThriftId(int fieldId) {
21348
        return byId.get(fieldId);
21349
      }
21350
 
21351
      /**
21352
       * Find the _Fields constant that matches fieldId, throwing an exception
21353
       * if it is not found.
21354
       */
21355
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21356
        _Fields fields = findByThriftId(fieldId);
21357
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21358
        return fields;
21359
      }
21360
 
21361
      /**
21362
       * Find the _Fields constant that matches name, or null if its not found.
21363
       */
21364
      public static _Fields findByName(String name) {
21365
        return byName.get(name);
21366
      }
21367
 
21368
      private final short _thriftId;
21369
      private final String _fieldName;
21370
 
21371
      _Fields(short thriftId, String fieldName) {
21372
        _thriftId = thriftId;
21373
        _fieldName = fieldName;
21374
      }
21375
 
21376
      public short getThriftFieldId() {
21377
        return _thriftId;
21378
      }
21379
 
21380
      public String getFieldName() {
21381
        return _fieldName;
21382
      }
21383
    }
21384
 
21385
    // isset id assignments
21386
    private static final int __WAREHOUSEID_ISSET_ID = 0;
21387
    private static final int __PROVIDERID_ISSET_ID = 1;
21388
    private BitSet __isset_bit_vector = new BitSet(2);
21389
 
21390
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21391
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
21392
          new FieldValueMetaData(TType.I64)));
21393
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21394
          new FieldValueMetaData(TType.I64)));
21395
    }});
21396
 
21397
    static {
21398
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
21399
    }
21400
 
21401
    public markOrdersAsManifested_args() {
21402
    }
21403
 
21404
    public markOrdersAsManifested_args(
21405
      long warehouseId,
21406
      long providerId)
21407
    {
21408
      this();
21409
      this.warehouseId = warehouseId;
21410
      setWarehouseIdIsSet(true);
21411
      this.providerId = providerId;
21412
      setProviderIdIsSet(true);
21413
    }
21414
 
21415
    /**
21416
     * Performs a deep copy on <i>other</i>.
21417
     */
21418
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
21419
      __isset_bit_vector.clear();
21420
      __isset_bit_vector.or(other.__isset_bit_vector);
21421
      this.warehouseId = other.warehouseId;
21422
      this.providerId = other.providerId;
21423
    }
21424
 
21425
    public markOrdersAsManifested_args deepCopy() {
21426
      return new markOrdersAsManifested_args(this);
21427
    }
21428
 
21429
    @Deprecated
21430
    public markOrdersAsManifested_args clone() {
21431
      return new markOrdersAsManifested_args(this);
21432
    }
21433
 
21434
    public long getWarehouseId() {
21435
      return this.warehouseId;
21436
    }
21437
 
21438
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
21439
      this.warehouseId = warehouseId;
21440
      setWarehouseIdIsSet(true);
21441
      return this;
21442
    }
21443
 
21444
    public void unsetWarehouseId() {
21445
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
21446
    }
21447
 
21448
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
21449
    public boolean isSetWarehouseId() {
21450
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
21451
    }
21452
 
21453
    public void setWarehouseIdIsSet(boolean value) {
21454
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
21455
    }
21456
 
21457
    public long getProviderId() {
21458
      return this.providerId;
21459
    }
21460
 
21461
    public markOrdersAsManifested_args setProviderId(long providerId) {
21462
      this.providerId = providerId;
21463
      setProviderIdIsSet(true);
21464
      return this;
21465
    }
21466
 
21467
    public void unsetProviderId() {
21468
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21469
    }
21470
 
21471
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21472
    public boolean isSetProviderId() {
21473
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21474
    }
21475
 
21476
    public void setProviderIdIsSet(boolean value) {
21477
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21478
    }
21479
 
21480
    public void setFieldValue(_Fields field, Object value) {
21481
      switch (field) {
21482
      case WAREHOUSE_ID:
21483
        if (value == null) {
21484
          unsetWarehouseId();
21485
        } else {
21486
          setWarehouseId((Long)value);
21487
        }
21488
        break;
21489
 
21490
      case PROVIDER_ID:
21491
        if (value == null) {
21492
          unsetProviderId();
21493
        } else {
21494
          setProviderId((Long)value);
21495
        }
21496
        break;
21497
 
21498
      }
21499
    }
21500
 
21501
    public void setFieldValue(int fieldID, Object value) {
21502
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21503
    }
21504
 
21505
    public Object getFieldValue(_Fields field) {
21506
      switch (field) {
21507
      case WAREHOUSE_ID:
21508
        return new Long(getWarehouseId());
21509
 
21510
      case PROVIDER_ID:
21511
        return new Long(getProviderId());
21512
 
21513
      }
21514
      throw new IllegalStateException();
21515
    }
21516
 
21517
    public Object getFieldValue(int fieldId) {
21518
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21519
    }
21520
 
21521
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21522
    public boolean isSet(_Fields field) {
21523
      switch (field) {
21524
      case WAREHOUSE_ID:
21525
        return isSetWarehouseId();
21526
      case PROVIDER_ID:
21527
        return isSetProviderId();
21528
      }
21529
      throw new IllegalStateException();
21530
    }
21531
 
21532
    public boolean isSet(int fieldID) {
21533
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21534
    }
21535
 
21536
    @Override
21537
    public boolean equals(Object that) {
21538
      if (that == null)
21539
        return false;
21540
      if (that instanceof markOrdersAsManifested_args)
21541
        return this.equals((markOrdersAsManifested_args)that);
21542
      return false;
21543
    }
21544
 
21545
    public boolean equals(markOrdersAsManifested_args that) {
21546
      if (that == null)
21547
        return false;
21548
 
21549
      boolean this_present_warehouseId = true;
21550
      boolean that_present_warehouseId = true;
21551
      if (this_present_warehouseId || that_present_warehouseId) {
21552
        if (!(this_present_warehouseId && that_present_warehouseId))
21553
          return false;
21554
        if (this.warehouseId != that.warehouseId)
21555
          return false;
21556
      }
21557
 
21558
      boolean this_present_providerId = true;
21559
      boolean that_present_providerId = true;
21560
      if (this_present_providerId || that_present_providerId) {
21561
        if (!(this_present_providerId && that_present_providerId))
21562
          return false;
21563
        if (this.providerId != that.providerId)
21564
          return false;
21565
      }
21566
 
21567
      return true;
21568
    }
21569
 
21570
    @Override
21571
    public int hashCode() {
21572
      return 0;
21573
    }
21574
 
21575
    public int compareTo(markOrdersAsManifested_args other) {
21576
      if (!getClass().equals(other.getClass())) {
21577
        return getClass().getName().compareTo(other.getClass().getName());
21578
      }
21579
 
21580
      int lastComparison = 0;
21581
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
21582
 
21583
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
21584
      if (lastComparison != 0) {
21585
        return lastComparison;
21586
      }
21587
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
21588
      if (lastComparison != 0) {
21589
        return lastComparison;
21590
      }
21591
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
21592
      if (lastComparison != 0) {
21593
        return lastComparison;
21594
      }
21595
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
21596
      if (lastComparison != 0) {
21597
        return lastComparison;
21598
      }
21599
      return 0;
21600
    }
21601
 
21602
    public void read(TProtocol iprot) throws TException {
21603
      TField field;
21604
      iprot.readStructBegin();
21605
      while (true)
21606
      {
21607
        field = iprot.readFieldBegin();
21608
        if (field.type == TType.STOP) { 
21609
          break;
21610
        }
21611
        _Fields fieldId = _Fields.findByThriftId(field.id);
21612
        if (fieldId == null) {
21613
          TProtocolUtil.skip(iprot, field.type);
21614
        } else {
21615
          switch (fieldId) {
21616
            case WAREHOUSE_ID:
21617
              if (field.type == TType.I64) {
21618
                this.warehouseId = iprot.readI64();
21619
                setWarehouseIdIsSet(true);
21620
              } else { 
21621
                TProtocolUtil.skip(iprot, field.type);
21622
              }
21623
              break;
21624
            case PROVIDER_ID:
21625
              if (field.type == TType.I64) {
21626
                this.providerId = iprot.readI64();
21627
                setProviderIdIsSet(true);
21628
              } else { 
21629
                TProtocolUtil.skip(iprot, field.type);
21630
              }
21631
              break;
21632
          }
21633
          iprot.readFieldEnd();
21634
        }
21635
      }
21636
      iprot.readStructEnd();
21637
      validate();
21638
    }
21639
 
21640
    public void write(TProtocol oprot) throws TException {
21641
      validate();
21642
 
21643
      oprot.writeStructBegin(STRUCT_DESC);
21644
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21645
      oprot.writeI64(this.warehouseId);
21646
      oprot.writeFieldEnd();
21647
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21648
      oprot.writeI64(this.providerId);
21649
      oprot.writeFieldEnd();
21650
      oprot.writeFieldStop();
21651
      oprot.writeStructEnd();
21652
    }
21653
 
21654
    @Override
21655
    public String toString() {
21656
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
21657
      boolean first = true;
21658
 
21659
      sb.append("warehouseId:");
21660
      sb.append(this.warehouseId);
21661
      first = false;
21662
      if (!first) sb.append(", ");
21663
      sb.append("providerId:");
21664
      sb.append(this.providerId);
21665
      first = false;
21666
      sb.append(")");
21667
      return sb.toString();
21668
    }
21669
 
21670
    public void validate() throws TException {
21671
      // check for required fields
21672
    }
21673
 
21674
  }
21675
 
21676
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
21677
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
21678
 
21679
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21680
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21681
 
21682
    private boolean success;
21683
    private TransactionServiceException ex;
21684
 
21685
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21686
    public enum _Fields implements TFieldIdEnum {
21687
      SUCCESS((short)0, "success"),
21688
      EX((short)1, "ex");
21689
 
21690
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21691
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21692
 
21693
      static {
21694
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21695
          byId.put((int)field._thriftId, field);
21696
          byName.put(field.getFieldName(), field);
21697
        }
21698
      }
21699
 
21700
      /**
21701
       * Find the _Fields constant that matches fieldId, or null if its not found.
21702
       */
21703
      public static _Fields findByThriftId(int fieldId) {
21704
        return byId.get(fieldId);
21705
      }
21706
 
21707
      /**
21708
       * Find the _Fields constant that matches fieldId, throwing an exception
21709
       * if it is not found.
21710
       */
21711
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21712
        _Fields fields = findByThriftId(fieldId);
21713
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21714
        return fields;
21715
      }
21716
 
21717
      /**
21718
       * Find the _Fields constant that matches name, or null if its not found.
21719
       */
21720
      public static _Fields findByName(String name) {
21721
        return byName.get(name);
21722
      }
21723
 
21724
      private final short _thriftId;
21725
      private final String _fieldName;
21726
 
21727
      _Fields(short thriftId, String fieldName) {
21728
        _thriftId = thriftId;
21729
        _fieldName = fieldName;
21730
      }
21731
 
21732
      public short getThriftFieldId() {
21733
        return _thriftId;
21734
      }
21735
 
21736
      public String getFieldName() {
21737
        return _fieldName;
21738
      }
21739
    }
21740
 
21741
    // isset id assignments
21742
    private static final int __SUCCESS_ISSET_ID = 0;
21743
    private BitSet __isset_bit_vector = new BitSet(1);
21744
 
21745
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21746
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21747
          new FieldValueMetaData(TType.BOOL)));
21748
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21749
          new FieldValueMetaData(TType.STRUCT)));
21750
    }});
21751
 
21752
    static {
21753
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
21754
    }
21755
 
21756
    public markOrdersAsManifested_result() {
21757
    }
21758
 
21759
    public markOrdersAsManifested_result(
21760
      boolean success,
21761
      TransactionServiceException ex)
21762
    {
21763
      this();
21764
      this.success = success;
21765
      setSuccessIsSet(true);
21766
      this.ex = ex;
21767
    }
21768
 
21769
    /**
21770
     * Performs a deep copy on <i>other</i>.
21771
     */
21772
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
21773
      __isset_bit_vector.clear();
21774
      __isset_bit_vector.or(other.__isset_bit_vector);
21775
      this.success = other.success;
21776
      if (other.isSetEx()) {
21777
        this.ex = new TransactionServiceException(other.ex);
21778
      }
21779
    }
21780
 
21781
    public markOrdersAsManifested_result deepCopy() {
21782
      return new markOrdersAsManifested_result(this);
21783
    }
21784
 
21785
    @Deprecated
21786
    public markOrdersAsManifested_result clone() {
21787
      return new markOrdersAsManifested_result(this);
21788
    }
21789
 
21790
    public boolean isSuccess() {
21791
      return this.success;
21792
    }
21793
 
21794
    public markOrdersAsManifested_result setSuccess(boolean success) {
21795
      this.success = success;
21796
      setSuccessIsSet(true);
21797
      return this;
21798
    }
21799
 
21800
    public void unsetSuccess() {
21801
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21802
    }
21803
 
21804
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21805
    public boolean isSetSuccess() {
21806
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21807
    }
21808
 
21809
    public void setSuccessIsSet(boolean value) {
21810
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21811
    }
21812
 
21813
    public TransactionServiceException getEx() {
21814
      return this.ex;
21815
    }
21816
 
21817
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
21818
      this.ex = ex;
21819
      return this;
21820
    }
21821
 
21822
    public void unsetEx() {
21823
      this.ex = null;
21824
    }
21825
 
21826
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21827
    public boolean isSetEx() {
21828
      return this.ex != null;
21829
    }
21830
 
21831
    public void setExIsSet(boolean value) {
21832
      if (!value) {
21833
        this.ex = null;
21834
      }
21835
    }
21836
 
21837
    public void setFieldValue(_Fields field, Object value) {
21838
      switch (field) {
21839
      case SUCCESS:
21840
        if (value == null) {
21841
          unsetSuccess();
21842
        } else {
21843
          setSuccess((Boolean)value);
21844
        }
21845
        break;
21846
 
21847
      case EX:
21848
        if (value == null) {
21849
          unsetEx();
21850
        } else {
21851
          setEx((TransactionServiceException)value);
21852
        }
21853
        break;
21854
 
21855
      }
21856
    }
21857
 
21858
    public void setFieldValue(int fieldID, Object value) {
21859
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21860
    }
21861
 
21862
    public Object getFieldValue(_Fields field) {
21863
      switch (field) {
21864
      case SUCCESS:
21865
        return new Boolean(isSuccess());
21866
 
21867
      case EX:
21868
        return getEx();
21869
 
21870
      }
21871
      throw new IllegalStateException();
21872
    }
21873
 
21874
    public Object getFieldValue(int fieldId) {
21875
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21876
    }
21877
 
21878
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21879
    public boolean isSet(_Fields field) {
21880
      switch (field) {
21881
      case SUCCESS:
21882
        return isSetSuccess();
21883
      case EX:
21884
        return isSetEx();
21885
      }
21886
      throw new IllegalStateException();
21887
    }
21888
 
21889
    public boolean isSet(int fieldID) {
21890
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21891
    }
21892
 
21893
    @Override
21894
    public boolean equals(Object that) {
21895
      if (that == null)
21896
        return false;
21897
      if (that instanceof markOrdersAsManifested_result)
21898
        return this.equals((markOrdersAsManifested_result)that);
21899
      return false;
21900
    }
21901
 
21902
    public boolean equals(markOrdersAsManifested_result that) {
21903
      if (that == null)
21904
        return false;
21905
 
21906
      boolean this_present_success = true;
21907
      boolean that_present_success = true;
21908
      if (this_present_success || that_present_success) {
21909
        if (!(this_present_success && that_present_success))
21910
          return false;
21911
        if (this.success != that.success)
21912
          return false;
21913
      }
21914
 
21915
      boolean this_present_ex = true && this.isSetEx();
21916
      boolean that_present_ex = true && that.isSetEx();
21917
      if (this_present_ex || that_present_ex) {
21918
        if (!(this_present_ex && that_present_ex))
21919
          return false;
21920
        if (!this.ex.equals(that.ex))
21921
          return false;
21922
      }
21923
 
21924
      return true;
21925
    }
21926
 
21927
    @Override
21928
    public int hashCode() {
21929
      return 0;
21930
    }
21931
 
21932
    public int compareTo(markOrdersAsManifested_result other) {
21933
      if (!getClass().equals(other.getClass())) {
21934
        return getClass().getName().compareTo(other.getClass().getName());
21935
      }
21936
 
21937
      int lastComparison = 0;
21938
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
21939
 
21940
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21941
      if (lastComparison != 0) {
21942
        return lastComparison;
21943
      }
21944
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21945
      if (lastComparison != 0) {
21946
        return lastComparison;
21947
      }
21948
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21949
      if (lastComparison != 0) {
21950
        return lastComparison;
21951
      }
21952
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21953
      if (lastComparison != 0) {
21954
        return lastComparison;
21955
      }
21956
      return 0;
21957
    }
21958
 
21959
    public void read(TProtocol iprot) throws TException {
21960
      TField field;
21961
      iprot.readStructBegin();
21962
      while (true)
21963
      {
21964
        field = iprot.readFieldBegin();
21965
        if (field.type == TType.STOP) { 
21966
          break;
21967
        }
21968
        _Fields fieldId = _Fields.findByThriftId(field.id);
21969
        if (fieldId == null) {
21970
          TProtocolUtil.skip(iprot, field.type);
21971
        } else {
21972
          switch (fieldId) {
21973
            case SUCCESS:
21974
              if (field.type == TType.BOOL) {
21975
                this.success = iprot.readBool();
21976
                setSuccessIsSet(true);
21977
              } else { 
21978
                TProtocolUtil.skip(iprot, field.type);
21979
              }
21980
              break;
21981
            case EX:
21982
              if (field.type == TType.STRUCT) {
21983
                this.ex = new TransactionServiceException();
21984
                this.ex.read(iprot);
21985
              } else { 
21986
                TProtocolUtil.skip(iprot, field.type);
21987
              }
21988
              break;
21989
          }
21990
          iprot.readFieldEnd();
21991
        }
21992
      }
21993
      iprot.readStructEnd();
21994
      validate();
21995
    }
21996
 
21997
    public void write(TProtocol oprot) throws TException {
21998
      oprot.writeStructBegin(STRUCT_DESC);
21999
 
22000
      if (this.isSetSuccess()) {
22001
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22002
        oprot.writeBool(this.success);
22003
        oprot.writeFieldEnd();
22004
      } else if (this.isSetEx()) {
22005
        oprot.writeFieldBegin(EX_FIELD_DESC);
22006
        this.ex.write(oprot);
22007
        oprot.writeFieldEnd();
22008
      }
22009
      oprot.writeFieldStop();
22010
      oprot.writeStructEnd();
22011
    }
22012
 
22013
    @Override
22014
    public String toString() {
22015
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
22016
      boolean first = true;
22017
 
22018
      sb.append("success:");
22019
      sb.append(this.success);
22020
      first = false;
22021
      if (!first) sb.append(", ");
22022
      sb.append("ex:");
22023
      if (this.ex == null) {
22024
        sb.append("null");
22025
      } else {
22026
        sb.append(this.ex);
22027
      }
22028
      first = false;
22029
      sb.append(")");
22030
      return sb.toString();
22031
    }
22032
 
22033
    public void validate() throws TException {
22034
      // check for required fields
22035
    }
22036
 
22037
  }
22038
 
1114 chandransh 22039
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
22040
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
22041
 
22042
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22043
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
22044
 
22045
    private long providerId;
1245 chandransh 22046
    private Map<String,String> pickupDetails;
1114 chandransh 22047
 
22048
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22049
    public enum _Fields implements TFieldIdEnum {
22050
      PROVIDER_ID((short)1, "providerId"),
22051
      PICKUP_DETAILS((short)2, "pickupDetails");
22052
 
22053
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22054
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22055
 
22056
      static {
22057
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22058
          byId.put((int)field._thriftId, field);
22059
          byName.put(field.getFieldName(), field);
22060
        }
22061
      }
22062
 
22063
      /**
22064
       * Find the _Fields constant that matches fieldId, or null if its not found.
22065
       */
22066
      public static _Fields findByThriftId(int fieldId) {
22067
        return byId.get(fieldId);
22068
      }
22069
 
22070
      /**
22071
       * Find the _Fields constant that matches fieldId, throwing an exception
22072
       * if it is not found.
22073
       */
22074
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22075
        _Fields fields = findByThriftId(fieldId);
22076
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22077
        return fields;
22078
      }
22079
 
22080
      /**
22081
       * Find the _Fields constant that matches name, or null if its not found.
22082
       */
22083
      public static _Fields findByName(String name) {
22084
        return byName.get(name);
22085
      }
22086
 
22087
      private final short _thriftId;
22088
      private final String _fieldName;
22089
 
22090
      _Fields(short thriftId, String fieldName) {
22091
        _thriftId = thriftId;
22092
        _fieldName = fieldName;
22093
      }
22094
 
22095
      public short getThriftFieldId() {
22096
        return _thriftId;
22097
      }
22098
 
22099
      public String getFieldName() {
22100
        return _fieldName;
22101
      }
22102
    }
22103
 
22104
    // isset id assignments
22105
    private static final int __PROVIDERID_ISSET_ID = 0;
22106
    private BitSet __isset_bit_vector = new BitSet(1);
22107
 
22108
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22109
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22110
          new FieldValueMetaData(TType.I64)));
22111
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
22112
          new MapMetaData(TType.MAP, 
22113
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 22114
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 22115
    }});
22116
 
22117
    static {
22118
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
22119
    }
22120
 
22121
    public markOrdersAsPickedUp_args() {
22122
    }
22123
 
22124
    public markOrdersAsPickedUp_args(
22125
      long providerId,
1245 chandransh 22126
      Map<String,String> pickupDetails)
1114 chandransh 22127
    {
22128
      this();
22129
      this.providerId = providerId;
22130
      setProviderIdIsSet(true);
22131
      this.pickupDetails = pickupDetails;
22132
    }
22133
 
22134
    /**
22135
     * Performs a deep copy on <i>other</i>.
22136
     */
22137
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
22138
      __isset_bit_vector.clear();
22139
      __isset_bit_vector.or(other.__isset_bit_vector);
22140
      this.providerId = other.providerId;
22141
      if (other.isSetPickupDetails()) {
1245 chandransh 22142
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
22143
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 22144
 
22145
          String other_element_key = other_element.getKey();
1245 chandransh 22146
          String other_element_value = other_element.getValue();
1114 chandransh 22147
 
22148
          String __this__pickupDetails_copy_key = other_element_key;
22149
 
1245 chandransh 22150
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 22151
 
22152
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
22153
        }
22154
        this.pickupDetails = __this__pickupDetails;
22155
      }
22156
    }
22157
 
22158
    public markOrdersAsPickedUp_args deepCopy() {
22159
      return new markOrdersAsPickedUp_args(this);
22160
    }
22161
 
22162
    @Deprecated
22163
    public markOrdersAsPickedUp_args clone() {
22164
      return new markOrdersAsPickedUp_args(this);
22165
    }
22166
 
22167
    public long getProviderId() {
22168
      return this.providerId;
22169
    }
22170
 
22171
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
22172
      this.providerId = providerId;
22173
      setProviderIdIsSet(true);
22174
      return this;
22175
    }
22176
 
22177
    public void unsetProviderId() {
22178
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22179
    }
22180
 
22181
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22182
    public boolean isSetProviderId() {
22183
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22184
    }
22185
 
22186
    public void setProviderIdIsSet(boolean value) {
22187
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22188
    }
22189
 
22190
    public int getPickupDetailsSize() {
22191
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
22192
    }
22193
 
1245 chandransh 22194
    public void putToPickupDetails(String key, String val) {
1114 chandransh 22195
      if (this.pickupDetails == null) {
1245 chandransh 22196
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 22197
      }
22198
      this.pickupDetails.put(key, val);
22199
    }
22200
 
1245 chandransh 22201
    public Map<String,String> getPickupDetails() {
1114 chandransh 22202
      return this.pickupDetails;
22203
    }
22204
 
1245 chandransh 22205
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 22206
      this.pickupDetails = pickupDetails;
22207
      return this;
22208
    }
22209
 
22210
    public void unsetPickupDetails() {
22211
      this.pickupDetails = null;
22212
    }
22213
 
22214
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
22215
    public boolean isSetPickupDetails() {
22216
      return this.pickupDetails != null;
22217
    }
22218
 
22219
    public void setPickupDetailsIsSet(boolean value) {
22220
      if (!value) {
22221
        this.pickupDetails = null;
22222
      }
22223
    }
22224
 
22225
    public void setFieldValue(_Fields field, Object value) {
22226
      switch (field) {
22227
      case PROVIDER_ID:
22228
        if (value == null) {
22229
          unsetProviderId();
22230
        } else {
22231
          setProviderId((Long)value);
22232
        }
22233
        break;
22234
 
22235
      case PICKUP_DETAILS:
22236
        if (value == null) {
22237
          unsetPickupDetails();
22238
        } else {
1245 chandransh 22239
          setPickupDetails((Map<String,String>)value);
1114 chandransh 22240
        }
22241
        break;
22242
 
22243
      }
22244
    }
22245
 
22246
    public void setFieldValue(int fieldID, Object value) {
22247
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22248
    }
22249
 
22250
    public Object getFieldValue(_Fields field) {
22251
      switch (field) {
22252
      case PROVIDER_ID:
22253
        return new Long(getProviderId());
22254
 
22255
      case PICKUP_DETAILS:
22256
        return getPickupDetails();
22257
 
22258
      }
22259
      throw new IllegalStateException();
22260
    }
22261
 
22262
    public Object getFieldValue(int fieldId) {
22263
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22264
    }
22265
 
22266
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22267
    public boolean isSet(_Fields field) {
22268
      switch (field) {
22269
      case PROVIDER_ID:
22270
        return isSetProviderId();
22271
      case PICKUP_DETAILS:
22272
        return isSetPickupDetails();
22273
      }
22274
      throw new IllegalStateException();
22275
    }
22276
 
22277
    public boolean isSet(int fieldID) {
22278
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22279
    }
22280
 
22281
    @Override
22282
    public boolean equals(Object that) {
22283
      if (that == null)
22284
        return false;
22285
      if (that instanceof markOrdersAsPickedUp_args)
22286
        return this.equals((markOrdersAsPickedUp_args)that);
22287
      return false;
22288
    }
22289
 
22290
    public boolean equals(markOrdersAsPickedUp_args that) {
22291
      if (that == null)
22292
        return false;
22293
 
22294
      boolean this_present_providerId = true;
22295
      boolean that_present_providerId = true;
22296
      if (this_present_providerId || that_present_providerId) {
22297
        if (!(this_present_providerId && that_present_providerId))
22298
          return false;
22299
        if (this.providerId != that.providerId)
22300
          return false;
22301
      }
22302
 
22303
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
22304
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
22305
      if (this_present_pickupDetails || that_present_pickupDetails) {
22306
        if (!(this_present_pickupDetails && that_present_pickupDetails))
22307
          return false;
22308
        if (!this.pickupDetails.equals(that.pickupDetails))
22309
          return false;
22310
      }
22311
 
22312
      return true;
22313
    }
22314
 
22315
    @Override
22316
    public int hashCode() {
22317
      return 0;
22318
    }
22319
 
22320
    public void read(TProtocol iprot) throws TException {
22321
      TField field;
22322
      iprot.readStructBegin();
22323
      while (true)
22324
      {
22325
        field = iprot.readFieldBegin();
22326
        if (field.type == TType.STOP) { 
22327
          break;
22328
        }
22329
        _Fields fieldId = _Fields.findByThriftId(field.id);
22330
        if (fieldId == null) {
22331
          TProtocolUtil.skip(iprot, field.type);
22332
        } else {
22333
          switch (fieldId) {
22334
            case PROVIDER_ID:
22335
              if (field.type == TType.I64) {
22336
                this.providerId = iprot.readI64();
22337
                setProviderIdIsSet(true);
22338
              } else { 
22339
                TProtocolUtil.skip(iprot, field.type);
22340
              }
22341
              break;
22342
            case PICKUP_DETAILS:
22343
              if (field.type == TType.MAP) {
22344
                {
1382 varun.gupt 22345
                  TMap _map48 = iprot.readMapBegin();
22346
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
22347
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 22348
                  {
1382 varun.gupt 22349
                    String _key50;
22350
                    String _val51;
22351
                    _key50 = iprot.readString();
22352
                    _val51 = iprot.readString();
22353
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 22354
                  }
22355
                  iprot.readMapEnd();
22356
                }
22357
              } else { 
22358
                TProtocolUtil.skip(iprot, field.type);
22359
              }
22360
              break;
22361
          }
22362
          iprot.readFieldEnd();
22363
        }
22364
      }
22365
      iprot.readStructEnd();
22366
      validate();
22367
    }
22368
 
22369
    public void write(TProtocol oprot) throws TException {
22370
      validate();
22371
 
22372
      oprot.writeStructBegin(STRUCT_DESC);
22373
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22374
      oprot.writeI64(this.providerId);
22375
      oprot.writeFieldEnd();
22376
      if (this.pickupDetails != null) {
22377
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
22378
        {
1245 chandransh 22379
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 22380
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 22381
          {
1382 varun.gupt 22382
            oprot.writeString(_iter52.getKey());
22383
            oprot.writeString(_iter52.getValue());
1114 chandransh 22384
          }
22385
          oprot.writeMapEnd();
22386
        }
22387
        oprot.writeFieldEnd();
22388
      }
22389
      oprot.writeFieldStop();
22390
      oprot.writeStructEnd();
22391
    }
22392
 
22393
    @Override
22394
    public String toString() {
22395
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
22396
      boolean first = true;
22397
 
22398
      sb.append("providerId:");
22399
      sb.append(this.providerId);
22400
      first = false;
22401
      if (!first) sb.append(", ");
22402
      sb.append("pickupDetails:");
22403
      if (this.pickupDetails == null) {
22404
        sb.append("null");
22405
      } else {
22406
        sb.append(this.pickupDetails);
22407
      }
22408
      first = false;
22409
      sb.append(")");
22410
      return sb.toString();
22411
    }
22412
 
22413
    public void validate() throws TException {
22414
      // check for required fields
22415
    }
22416
 
22417
  }
22418
 
22419
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
22420
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
22421
 
22422
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
22423
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22424
 
22425
    private List<Order> success;
22426
    private TransactionServiceException ex;
22427
 
22428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22429
    public enum _Fields implements TFieldIdEnum {
22430
      SUCCESS((short)0, "success"),
22431
      EX((short)1, "ex");
22432
 
22433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22435
 
22436
      static {
22437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22438
          byId.put((int)field._thriftId, field);
22439
          byName.put(field.getFieldName(), field);
22440
        }
22441
      }
22442
 
22443
      /**
22444
       * Find the _Fields constant that matches fieldId, or null if its not found.
22445
       */
22446
      public static _Fields findByThriftId(int fieldId) {
22447
        return byId.get(fieldId);
22448
      }
22449
 
22450
      /**
22451
       * Find the _Fields constant that matches fieldId, throwing an exception
22452
       * if it is not found.
22453
       */
22454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22455
        _Fields fields = findByThriftId(fieldId);
22456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22457
        return fields;
22458
      }
22459
 
22460
      /**
22461
       * Find the _Fields constant that matches name, or null if its not found.
22462
       */
22463
      public static _Fields findByName(String name) {
22464
        return byName.get(name);
22465
      }
22466
 
22467
      private final short _thriftId;
22468
      private final String _fieldName;
22469
 
22470
      _Fields(short thriftId, String fieldName) {
22471
        _thriftId = thriftId;
22472
        _fieldName = fieldName;
22473
      }
22474
 
22475
      public short getThriftFieldId() {
22476
        return _thriftId;
22477
      }
22478
 
22479
      public String getFieldName() {
22480
        return _fieldName;
22481
      }
22482
    }
22483
 
22484
    // isset id assignments
22485
 
22486
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22487
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
22488
          new ListMetaData(TType.LIST, 
22489
              new StructMetaData(TType.STRUCT, Order.class))));
22490
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22491
          new FieldValueMetaData(TType.STRUCT)));
22492
    }});
22493
 
22494
    static {
22495
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
22496
    }
22497
 
22498
    public markOrdersAsPickedUp_result() {
22499
    }
22500
 
22501
    public markOrdersAsPickedUp_result(
22502
      List<Order> success,
22503
      TransactionServiceException ex)
22504
    {
22505
      this();
22506
      this.success = success;
22507
      this.ex = ex;
22508
    }
22509
 
22510
    /**
22511
     * Performs a deep copy on <i>other</i>.
22512
     */
22513
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
22514
      if (other.isSetSuccess()) {
22515
        List<Order> __this__success = new ArrayList<Order>();
22516
        for (Order other_element : other.success) {
22517
          __this__success.add(new Order(other_element));
22518
        }
22519
        this.success = __this__success;
22520
      }
22521
      if (other.isSetEx()) {
22522
        this.ex = new TransactionServiceException(other.ex);
22523
      }
22524
    }
22525
 
22526
    public markOrdersAsPickedUp_result deepCopy() {
22527
      return new markOrdersAsPickedUp_result(this);
22528
    }
22529
 
22530
    @Deprecated
22531
    public markOrdersAsPickedUp_result clone() {
22532
      return new markOrdersAsPickedUp_result(this);
22533
    }
22534
 
22535
    public int getSuccessSize() {
22536
      return (this.success == null) ? 0 : this.success.size();
22537
    }
22538
 
22539
    public java.util.Iterator<Order> getSuccessIterator() {
22540
      return (this.success == null) ? null : this.success.iterator();
22541
    }
22542
 
22543
    public void addToSuccess(Order elem) {
22544
      if (this.success == null) {
22545
        this.success = new ArrayList<Order>();
22546
      }
22547
      this.success.add(elem);
22548
    }
22549
 
22550
    public List<Order> getSuccess() {
22551
      return this.success;
22552
    }
22553
 
22554
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
22555
      this.success = success;
22556
      return this;
22557
    }
22558
 
22559
    public void unsetSuccess() {
22560
      this.success = null;
22561
    }
22562
 
22563
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22564
    public boolean isSetSuccess() {
22565
      return this.success != null;
22566
    }
22567
 
22568
    public void setSuccessIsSet(boolean value) {
22569
      if (!value) {
22570
        this.success = null;
22571
      }
22572
    }
22573
 
22574
    public TransactionServiceException getEx() {
22575
      return this.ex;
22576
    }
22577
 
22578
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
22579
      this.ex = ex;
22580
      return this;
22581
    }
22582
 
22583
    public void unsetEx() {
22584
      this.ex = null;
22585
    }
22586
 
22587
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22588
    public boolean isSetEx() {
22589
      return this.ex != null;
22590
    }
22591
 
22592
    public void setExIsSet(boolean value) {
22593
      if (!value) {
22594
        this.ex = null;
22595
      }
22596
    }
22597
 
22598
    public void setFieldValue(_Fields field, Object value) {
22599
      switch (field) {
22600
      case SUCCESS:
22601
        if (value == null) {
22602
          unsetSuccess();
22603
        } else {
22604
          setSuccess((List<Order>)value);
22605
        }
22606
        break;
22607
 
22608
      case EX:
22609
        if (value == null) {
22610
          unsetEx();
22611
        } else {
22612
          setEx((TransactionServiceException)value);
22613
        }
22614
        break;
22615
 
22616
      }
22617
    }
22618
 
22619
    public void setFieldValue(int fieldID, Object value) {
22620
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22621
    }
22622
 
22623
    public Object getFieldValue(_Fields field) {
22624
      switch (field) {
22625
      case SUCCESS:
22626
        return getSuccess();
22627
 
22628
      case EX:
22629
        return getEx();
22630
 
22631
      }
22632
      throw new IllegalStateException();
22633
    }
22634
 
22635
    public Object getFieldValue(int fieldId) {
22636
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22637
    }
22638
 
22639
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22640
    public boolean isSet(_Fields field) {
22641
      switch (field) {
22642
      case SUCCESS:
22643
        return isSetSuccess();
22644
      case EX:
22645
        return isSetEx();
22646
      }
22647
      throw new IllegalStateException();
22648
    }
22649
 
22650
    public boolean isSet(int fieldID) {
22651
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22652
    }
22653
 
22654
    @Override
22655
    public boolean equals(Object that) {
22656
      if (that == null)
22657
        return false;
22658
      if (that instanceof markOrdersAsPickedUp_result)
22659
        return this.equals((markOrdersAsPickedUp_result)that);
22660
      return false;
22661
    }
22662
 
22663
    public boolean equals(markOrdersAsPickedUp_result that) {
22664
      if (that == null)
22665
        return false;
22666
 
22667
      boolean this_present_success = true && this.isSetSuccess();
22668
      boolean that_present_success = true && that.isSetSuccess();
22669
      if (this_present_success || that_present_success) {
22670
        if (!(this_present_success && that_present_success))
22671
          return false;
22672
        if (!this.success.equals(that.success))
22673
          return false;
22674
      }
22675
 
22676
      boolean this_present_ex = true && this.isSetEx();
22677
      boolean that_present_ex = true && that.isSetEx();
22678
      if (this_present_ex || that_present_ex) {
22679
        if (!(this_present_ex && that_present_ex))
22680
          return false;
22681
        if (!this.ex.equals(that.ex))
22682
          return false;
22683
      }
22684
 
22685
      return true;
22686
    }
22687
 
22688
    @Override
22689
    public int hashCode() {
22690
      return 0;
22691
    }
22692
 
22693
    public int compareTo(markOrdersAsPickedUp_result other) {
22694
      if (!getClass().equals(other.getClass())) {
22695
        return getClass().getName().compareTo(other.getClass().getName());
22696
      }
22697
 
22698
      int lastComparison = 0;
22699
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
22700
 
22701
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22702
      if (lastComparison != 0) {
22703
        return lastComparison;
22704
      }
22705
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22706
      if (lastComparison != 0) {
22707
        return lastComparison;
22708
      }
22709
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22710
      if (lastComparison != 0) {
22711
        return lastComparison;
22712
      }
22713
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22714
      if (lastComparison != 0) {
22715
        return lastComparison;
22716
      }
22717
      return 0;
22718
    }
22719
 
22720
    public void read(TProtocol iprot) throws TException {
22721
      TField field;
22722
      iprot.readStructBegin();
22723
      while (true)
22724
      {
22725
        field = iprot.readFieldBegin();
22726
        if (field.type == TType.STOP) { 
22727
          break;
22728
        }
22729
        _Fields fieldId = _Fields.findByThriftId(field.id);
22730
        if (fieldId == null) {
22731
          TProtocolUtil.skip(iprot, field.type);
22732
        } else {
22733
          switch (fieldId) {
22734
            case SUCCESS:
22735
              if (field.type == TType.LIST) {
22736
                {
1382 varun.gupt 22737
                  TList _list53 = iprot.readListBegin();
22738
                  this.success = new ArrayList<Order>(_list53.size);
22739
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 22740
                  {
1382 varun.gupt 22741
                    Order _elem55;
22742
                    _elem55 = new Order();
22743
                    _elem55.read(iprot);
22744
                    this.success.add(_elem55);
1114 chandransh 22745
                  }
22746
                  iprot.readListEnd();
22747
                }
22748
              } else { 
22749
                TProtocolUtil.skip(iprot, field.type);
22750
              }
22751
              break;
22752
            case EX:
22753
              if (field.type == TType.STRUCT) {
22754
                this.ex = new TransactionServiceException();
22755
                this.ex.read(iprot);
22756
              } else { 
22757
                TProtocolUtil.skip(iprot, field.type);
22758
              }
22759
              break;
22760
          }
22761
          iprot.readFieldEnd();
22762
        }
22763
      }
22764
      iprot.readStructEnd();
22765
      validate();
22766
    }
22767
 
22768
    public void write(TProtocol oprot) throws TException {
22769
      oprot.writeStructBegin(STRUCT_DESC);
22770
 
22771
      if (this.isSetSuccess()) {
22772
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22773
        {
22774
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 22775
          for (Order _iter56 : this.success)
1114 chandransh 22776
          {
1382 varun.gupt 22777
            _iter56.write(oprot);
1114 chandransh 22778
          }
22779
          oprot.writeListEnd();
22780
        }
22781
        oprot.writeFieldEnd();
22782
      } else if (this.isSetEx()) {
22783
        oprot.writeFieldBegin(EX_FIELD_DESC);
22784
        this.ex.write(oprot);
22785
        oprot.writeFieldEnd();
22786
      }
22787
      oprot.writeFieldStop();
22788
      oprot.writeStructEnd();
22789
    }
22790
 
22791
    @Override
22792
    public String toString() {
22793
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
22794
      boolean first = true;
22795
 
22796
      sb.append("success:");
22797
      if (this.success == null) {
22798
        sb.append("null");
22799
      } else {
22800
        sb.append(this.success);
22801
      }
22802
      first = false;
22803
      if (!first) sb.append(", ");
22804
      sb.append("ex:");
22805
      if (this.ex == null) {
22806
        sb.append("null");
22807
      } else {
22808
        sb.append(this.ex);
22809
      }
22810
      first = false;
22811
      sb.append(")");
22812
      return sb.toString();
22813
    }
22814
 
22815
    public void validate() throws TException {
22816
      // check for required fields
22817
    }
22818
 
22819
  }
22820
 
1133 chandransh 22821
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
22822
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
22823
 
22824
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22825
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
22826
 
22827
    private long providerId;
22828
    private Map<String,String> deliveredOrders;
22829
 
22830
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22831
    public enum _Fields implements TFieldIdEnum {
22832
      PROVIDER_ID((short)1, "providerId"),
22833
      DELIVERED_ORDERS((short)2, "deliveredOrders");
22834
 
22835
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22836
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22837
 
22838
      static {
22839
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22840
          byId.put((int)field._thriftId, field);
22841
          byName.put(field.getFieldName(), field);
22842
        }
22843
      }
22844
 
22845
      /**
22846
       * Find the _Fields constant that matches fieldId, or null if its not found.
22847
       */
22848
      public static _Fields findByThriftId(int fieldId) {
22849
        return byId.get(fieldId);
22850
      }
22851
 
22852
      /**
22853
       * Find the _Fields constant that matches fieldId, throwing an exception
22854
       * if it is not found.
22855
       */
22856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22857
        _Fields fields = findByThriftId(fieldId);
22858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22859
        return fields;
22860
      }
22861
 
22862
      /**
22863
       * Find the _Fields constant that matches name, or null if its not found.
22864
       */
22865
      public static _Fields findByName(String name) {
22866
        return byName.get(name);
22867
      }
22868
 
22869
      private final short _thriftId;
22870
      private final String _fieldName;
22871
 
22872
      _Fields(short thriftId, String fieldName) {
22873
        _thriftId = thriftId;
22874
        _fieldName = fieldName;
22875
      }
22876
 
22877
      public short getThriftFieldId() {
22878
        return _thriftId;
22879
      }
22880
 
22881
      public String getFieldName() {
22882
        return _fieldName;
22883
      }
22884
    }
22885
 
22886
    // isset id assignments
22887
    private static final int __PROVIDERID_ISSET_ID = 0;
22888
    private BitSet __isset_bit_vector = new BitSet(1);
22889
 
22890
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22891
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22892
          new FieldValueMetaData(TType.I64)));
22893
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
22894
          new MapMetaData(TType.MAP, 
22895
              new FieldValueMetaData(TType.STRING), 
22896
              new FieldValueMetaData(TType.STRING))));
22897
    }});
22898
 
22899
    static {
22900
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
22901
    }
22902
 
22903
    public markOrdersAsDelivered_args() {
22904
    }
22905
 
22906
    public markOrdersAsDelivered_args(
22907
      long providerId,
22908
      Map<String,String> deliveredOrders)
22909
    {
22910
      this();
22911
      this.providerId = providerId;
22912
      setProviderIdIsSet(true);
22913
      this.deliveredOrders = deliveredOrders;
22914
    }
22915
 
22916
    /**
22917
     * Performs a deep copy on <i>other</i>.
22918
     */
22919
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
22920
      __isset_bit_vector.clear();
22921
      __isset_bit_vector.or(other.__isset_bit_vector);
22922
      this.providerId = other.providerId;
22923
      if (other.isSetDeliveredOrders()) {
22924
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
22925
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
22926
 
22927
          String other_element_key = other_element.getKey();
22928
          String other_element_value = other_element.getValue();
22929
 
22930
          String __this__deliveredOrders_copy_key = other_element_key;
22931
 
22932
          String __this__deliveredOrders_copy_value = other_element_value;
22933
 
22934
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
22935
        }
22936
        this.deliveredOrders = __this__deliveredOrders;
22937
      }
22938
    }
22939
 
22940
    public markOrdersAsDelivered_args deepCopy() {
22941
      return new markOrdersAsDelivered_args(this);
22942
    }
22943
 
22944
    @Deprecated
22945
    public markOrdersAsDelivered_args clone() {
22946
      return new markOrdersAsDelivered_args(this);
22947
    }
22948
 
22949
    public long getProviderId() {
22950
      return this.providerId;
22951
    }
22952
 
22953
    public markOrdersAsDelivered_args setProviderId(long providerId) {
22954
      this.providerId = providerId;
22955
      setProviderIdIsSet(true);
22956
      return this;
22957
    }
22958
 
22959
    public void unsetProviderId() {
22960
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22961
    }
22962
 
22963
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22964
    public boolean isSetProviderId() {
22965
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22966
    }
22967
 
22968
    public void setProviderIdIsSet(boolean value) {
22969
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22970
    }
22971
 
22972
    public int getDeliveredOrdersSize() {
22973
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
22974
    }
22975
 
22976
    public void putToDeliveredOrders(String key, String val) {
22977
      if (this.deliveredOrders == null) {
22978
        this.deliveredOrders = new HashMap<String,String>();
22979
      }
22980
      this.deliveredOrders.put(key, val);
22981
    }
22982
 
22983
    public Map<String,String> getDeliveredOrders() {
22984
      return this.deliveredOrders;
22985
    }
22986
 
22987
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
22988
      this.deliveredOrders = deliveredOrders;
22989
      return this;
22990
    }
22991
 
22992
    public void unsetDeliveredOrders() {
22993
      this.deliveredOrders = null;
22994
    }
22995
 
22996
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
22997
    public boolean isSetDeliveredOrders() {
22998
      return this.deliveredOrders != null;
22999
    }
23000
 
23001
    public void setDeliveredOrdersIsSet(boolean value) {
23002
      if (!value) {
23003
        this.deliveredOrders = null;
23004
      }
23005
    }
23006
 
23007
    public void setFieldValue(_Fields field, Object value) {
23008
      switch (field) {
23009
      case PROVIDER_ID:
23010
        if (value == null) {
23011
          unsetProviderId();
23012
        } else {
23013
          setProviderId((Long)value);
23014
        }
23015
        break;
23016
 
23017
      case DELIVERED_ORDERS:
23018
        if (value == null) {
23019
          unsetDeliveredOrders();
23020
        } else {
23021
          setDeliveredOrders((Map<String,String>)value);
23022
        }
23023
        break;
23024
 
23025
      }
23026
    }
23027
 
23028
    public void setFieldValue(int fieldID, Object value) {
23029
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23030
    }
23031
 
23032
    public Object getFieldValue(_Fields field) {
23033
      switch (field) {
23034
      case PROVIDER_ID:
23035
        return new Long(getProviderId());
23036
 
23037
      case DELIVERED_ORDERS:
23038
        return getDeliveredOrders();
23039
 
23040
      }
23041
      throw new IllegalStateException();
23042
    }
23043
 
23044
    public Object getFieldValue(int fieldId) {
23045
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23046
    }
23047
 
23048
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23049
    public boolean isSet(_Fields field) {
23050
      switch (field) {
23051
      case PROVIDER_ID:
23052
        return isSetProviderId();
23053
      case DELIVERED_ORDERS:
23054
        return isSetDeliveredOrders();
23055
      }
23056
      throw new IllegalStateException();
23057
    }
23058
 
23059
    public boolean isSet(int fieldID) {
23060
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23061
    }
23062
 
23063
    @Override
23064
    public boolean equals(Object that) {
23065
      if (that == null)
23066
        return false;
23067
      if (that instanceof markOrdersAsDelivered_args)
23068
        return this.equals((markOrdersAsDelivered_args)that);
23069
      return false;
23070
    }
23071
 
23072
    public boolean equals(markOrdersAsDelivered_args that) {
23073
      if (that == null)
23074
        return false;
23075
 
23076
      boolean this_present_providerId = true;
23077
      boolean that_present_providerId = true;
23078
      if (this_present_providerId || that_present_providerId) {
23079
        if (!(this_present_providerId && that_present_providerId))
23080
          return false;
23081
        if (this.providerId != that.providerId)
23082
          return false;
23083
      }
23084
 
23085
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
23086
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
23087
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
23088
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
23089
          return false;
23090
        if (!this.deliveredOrders.equals(that.deliveredOrders))
23091
          return false;
23092
      }
23093
 
23094
      return true;
23095
    }
23096
 
23097
    @Override
23098
    public int hashCode() {
23099
      return 0;
23100
    }
23101
 
23102
    public void read(TProtocol iprot) throws TException {
23103
      TField field;
23104
      iprot.readStructBegin();
23105
      while (true)
23106
      {
23107
        field = iprot.readFieldBegin();
23108
        if (field.type == TType.STOP) { 
23109
          break;
23110
        }
23111
        _Fields fieldId = _Fields.findByThriftId(field.id);
23112
        if (fieldId == null) {
23113
          TProtocolUtil.skip(iprot, field.type);
23114
        } else {
23115
          switch (fieldId) {
23116
            case PROVIDER_ID:
23117
              if (field.type == TType.I64) {
23118
                this.providerId = iprot.readI64();
23119
                setProviderIdIsSet(true);
23120
              } else { 
23121
                TProtocolUtil.skip(iprot, field.type);
23122
              }
23123
              break;
23124
            case DELIVERED_ORDERS:
23125
              if (field.type == TType.MAP) {
23126
                {
1382 varun.gupt 23127
                  TMap _map57 = iprot.readMapBegin();
23128
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
23129
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 23130
                  {
1382 varun.gupt 23131
                    String _key59;
23132
                    String _val60;
23133
                    _key59 = iprot.readString();
23134
                    _val60 = iprot.readString();
23135
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 23136
                  }
23137
                  iprot.readMapEnd();
23138
                }
23139
              } else { 
23140
                TProtocolUtil.skip(iprot, field.type);
23141
              }
23142
              break;
23143
          }
23144
          iprot.readFieldEnd();
23145
        }
23146
      }
23147
      iprot.readStructEnd();
23148
      validate();
23149
    }
23150
 
23151
    public void write(TProtocol oprot) throws TException {
23152
      validate();
23153
 
23154
      oprot.writeStructBegin(STRUCT_DESC);
23155
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23156
      oprot.writeI64(this.providerId);
23157
      oprot.writeFieldEnd();
23158
      if (this.deliveredOrders != null) {
23159
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
23160
        {
23161
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 23162
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 23163
          {
1382 varun.gupt 23164
            oprot.writeString(_iter61.getKey());
23165
            oprot.writeString(_iter61.getValue());
1133 chandransh 23166
          }
23167
          oprot.writeMapEnd();
23168
        }
23169
        oprot.writeFieldEnd();
23170
      }
23171
      oprot.writeFieldStop();
23172
      oprot.writeStructEnd();
23173
    }
23174
 
23175
    @Override
23176
    public String toString() {
23177
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
23178
      boolean first = true;
23179
 
23180
      sb.append("providerId:");
23181
      sb.append(this.providerId);
23182
      first = false;
23183
      if (!first) sb.append(", ");
23184
      sb.append("deliveredOrders:");
23185
      if (this.deliveredOrders == null) {
23186
        sb.append("null");
23187
      } else {
23188
        sb.append(this.deliveredOrders);
23189
      }
23190
      first = false;
23191
      sb.append(")");
23192
      return sb.toString();
23193
    }
23194
 
23195
    public void validate() throws TException {
23196
      // check for required fields
23197
    }
23198
 
23199
  }
23200
 
23201
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
23202
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
23203
 
23204
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23205
 
23206
    private TransactionServiceException ex;
23207
 
23208
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23209
    public enum _Fields implements TFieldIdEnum {
23210
      EX((short)1, "ex");
23211
 
23212
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23213
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23214
 
23215
      static {
23216
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23217
          byId.put((int)field._thriftId, field);
23218
          byName.put(field.getFieldName(), field);
23219
        }
23220
      }
23221
 
23222
      /**
23223
       * Find the _Fields constant that matches fieldId, or null if its not found.
23224
       */
23225
      public static _Fields findByThriftId(int fieldId) {
23226
        return byId.get(fieldId);
23227
      }
23228
 
23229
      /**
23230
       * Find the _Fields constant that matches fieldId, throwing an exception
23231
       * if it is not found.
23232
       */
23233
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23234
        _Fields fields = findByThriftId(fieldId);
23235
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23236
        return fields;
23237
      }
23238
 
23239
      /**
23240
       * Find the _Fields constant that matches name, or null if its not found.
23241
       */
23242
      public static _Fields findByName(String name) {
23243
        return byName.get(name);
23244
      }
23245
 
23246
      private final short _thriftId;
23247
      private final String _fieldName;
23248
 
23249
      _Fields(short thriftId, String fieldName) {
23250
        _thriftId = thriftId;
23251
        _fieldName = fieldName;
23252
      }
23253
 
23254
      public short getThriftFieldId() {
23255
        return _thriftId;
23256
      }
23257
 
23258
      public String getFieldName() {
23259
        return _fieldName;
23260
      }
23261
    }
23262
 
23263
    // isset id assignments
23264
 
23265
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23266
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23267
          new FieldValueMetaData(TType.STRUCT)));
23268
    }});
23269
 
23270
    static {
23271
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
23272
    }
23273
 
23274
    public markOrdersAsDelivered_result() {
23275
    }
23276
 
23277
    public markOrdersAsDelivered_result(
23278
      TransactionServiceException ex)
23279
    {
23280
      this();
23281
      this.ex = ex;
23282
    }
23283
 
23284
    /**
23285
     * Performs a deep copy on <i>other</i>.
23286
     */
23287
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
23288
      if (other.isSetEx()) {
23289
        this.ex = new TransactionServiceException(other.ex);
23290
      }
23291
    }
23292
 
23293
    public markOrdersAsDelivered_result deepCopy() {
23294
      return new markOrdersAsDelivered_result(this);
23295
    }
23296
 
23297
    @Deprecated
23298
    public markOrdersAsDelivered_result clone() {
23299
      return new markOrdersAsDelivered_result(this);
23300
    }
23301
 
23302
    public TransactionServiceException getEx() {
23303
      return this.ex;
23304
    }
23305
 
23306
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
23307
      this.ex = ex;
23308
      return this;
23309
    }
23310
 
23311
    public void unsetEx() {
23312
      this.ex = null;
23313
    }
23314
 
23315
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23316
    public boolean isSetEx() {
23317
      return this.ex != null;
23318
    }
23319
 
23320
    public void setExIsSet(boolean value) {
23321
      if (!value) {
23322
        this.ex = null;
23323
      }
23324
    }
23325
 
23326
    public void setFieldValue(_Fields field, Object value) {
23327
      switch (field) {
23328
      case EX:
23329
        if (value == null) {
23330
          unsetEx();
23331
        } else {
23332
          setEx((TransactionServiceException)value);
23333
        }
23334
        break;
23335
 
23336
      }
23337
    }
23338
 
23339
    public void setFieldValue(int fieldID, Object value) {
23340
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23341
    }
23342
 
23343
    public Object getFieldValue(_Fields field) {
23344
      switch (field) {
23345
      case EX:
23346
        return getEx();
23347
 
23348
      }
23349
      throw new IllegalStateException();
23350
    }
23351
 
23352
    public Object getFieldValue(int fieldId) {
23353
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23354
    }
23355
 
23356
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23357
    public boolean isSet(_Fields field) {
23358
      switch (field) {
23359
      case EX:
23360
        return isSetEx();
23361
      }
23362
      throw new IllegalStateException();
23363
    }
23364
 
23365
    public boolean isSet(int fieldID) {
23366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23367
    }
23368
 
23369
    @Override
23370
    public boolean equals(Object that) {
23371
      if (that == null)
23372
        return false;
23373
      if (that instanceof markOrdersAsDelivered_result)
23374
        return this.equals((markOrdersAsDelivered_result)that);
23375
      return false;
23376
    }
23377
 
23378
    public boolean equals(markOrdersAsDelivered_result that) {
23379
      if (that == null)
23380
        return false;
23381
 
23382
      boolean this_present_ex = true && this.isSetEx();
23383
      boolean that_present_ex = true && that.isSetEx();
23384
      if (this_present_ex || that_present_ex) {
23385
        if (!(this_present_ex && that_present_ex))
23386
          return false;
23387
        if (!this.ex.equals(that.ex))
23388
          return false;
23389
      }
23390
 
23391
      return true;
23392
    }
23393
 
23394
    @Override
23395
    public int hashCode() {
23396
      return 0;
23397
    }
23398
 
23399
    public int compareTo(markOrdersAsDelivered_result other) {
23400
      if (!getClass().equals(other.getClass())) {
23401
        return getClass().getName().compareTo(other.getClass().getName());
23402
      }
23403
 
23404
      int lastComparison = 0;
23405
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
23406
 
23407
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23408
      if (lastComparison != 0) {
23409
        return lastComparison;
23410
      }
23411
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23412
      if (lastComparison != 0) {
23413
        return lastComparison;
23414
      }
23415
      return 0;
23416
    }
23417
 
23418
    public void read(TProtocol iprot) throws TException {
23419
      TField field;
23420
      iprot.readStructBegin();
23421
      while (true)
23422
      {
23423
        field = iprot.readFieldBegin();
23424
        if (field.type == TType.STOP) { 
23425
          break;
23426
        }
23427
        _Fields fieldId = _Fields.findByThriftId(field.id);
23428
        if (fieldId == null) {
23429
          TProtocolUtil.skip(iprot, field.type);
23430
        } else {
23431
          switch (fieldId) {
23432
            case EX:
23433
              if (field.type == TType.STRUCT) {
23434
                this.ex = new TransactionServiceException();
23435
                this.ex.read(iprot);
23436
              } else { 
23437
                TProtocolUtil.skip(iprot, field.type);
23438
              }
23439
              break;
23440
          }
23441
          iprot.readFieldEnd();
23442
        }
23443
      }
23444
      iprot.readStructEnd();
23445
      validate();
23446
    }
23447
 
23448
    public void write(TProtocol oprot) throws TException {
23449
      oprot.writeStructBegin(STRUCT_DESC);
23450
 
23451
      if (this.isSetEx()) {
23452
        oprot.writeFieldBegin(EX_FIELD_DESC);
23453
        this.ex.write(oprot);
23454
        oprot.writeFieldEnd();
23455
      }
23456
      oprot.writeFieldStop();
23457
      oprot.writeStructEnd();
23458
    }
23459
 
23460
    @Override
23461
    public String toString() {
23462
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
23463
      boolean first = true;
23464
 
23465
      sb.append("ex:");
23466
      if (this.ex == null) {
23467
        sb.append("null");
23468
      } else {
23469
        sb.append(this.ex);
23470
      }
23471
      first = false;
23472
      sb.append(")");
23473
      return sb.toString();
23474
    }
23475
 
23476
    public void validate() throws TException {
23477
      // check for required fields
23478
    }
23479
 
23480
  }
23481
 
23482
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
23483
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
23484
 
23485
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23486
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
23487
 
23488
    private long providerId;
23489
    private Map<String,String> returnedOrders;
23490
 
23491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23492
    public enum _Fields implements TFieldIdEnum {
23493
      PROVIDER_ID((short)1, "providerId"),
23494
      RETURNED_ORDERS((short)2, "returnedOrders");
23495
 
23496
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23498
 
23499
      static {
23500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23501
          byId.put((int)field._thriftId, field);
23502
          byName.put(field.getFieldName(), field);
23503
        }
23504
      }
23505
 
23506
      /**
23507
       * Find the _Fields constant that matches fieldId, or null if its not found.
23508
       */
23509
      public static _Fields findByThriftId(int fieldId) {
23510
        return byId.get(fieldId);
23511
      }
23512
 
23513
      /**
23514
       * Find the _Fields constant that matches fieldId, throwing an exception
23515
       * if it is not found.
23516
       */
23517
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23518
        _Fields fields = findByThriftId(fieldId);
23519
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23520
        return fields;
23521
      }
23522
 
23523
      /**
23524
       * Find the _Fields constant that matches name, or null if its not found.
23525
       */
23526
      public static _Fields findByName(String name) {
23527
        return byName.get(name);
23528
      }
23529
 
23530
      private final short _thriftId;
23531
      private final String _fieldName;
23532
 
23533
      _Fields(short thriftId, String fieldName) {
23534
        _thriftId = thriftId;
23535
        _fieldName = fieldName;
23536
      }
23537
 
23538
      public short getThriftFieldId() {
23539
        return _thriftId;
23540
      }
23541
 
23542
      public String getFieldName() {
23543
        return _fieldName;
23544
      }
23545
    }
23546
 
23547
    // isset id assignments
23548
    private static final int __PROVIDERID_ISSET_ID = 0;
23549
    private BitSet __isset_bit_vector = new BitSet(1);
23550
 
23551
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23552
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23553
          new FieldValueMetaData(TType.I64)));
23554
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
23555
          new MapMetaData(TType.MAP, 
23556
              new FieldValueMetaData(TType.STRING), 
23557
              new FieldValueMetaData(TType.STRING))));
23558
    }});
23559
 
23560
    static {
23561
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
23562
    }
23563
 
23564
    public markOrdersAsFailed_args() {
23565
    }
23566
 
23567
    public markOrdersAsFailed_args(
23568
      long providerId,
23569
      Map<String,String> returnedOrders)
23570
    {
23571
      this();
23572
      this.providerId = providerId;
23573
      setProviderIdIsSet(true);
23574
      this.returnedOrders = returnedOrders;
23575
    }
23576
 
23577
    /**
23578
     * Performs a deep copy on <i>other</i>.
23579
     */
23580
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
23581
      __isset_bit_vector.clear();
23582
      __isset_bit_vector.or(other.__isset_bit_vector);
23583
      this.providerId = other.providerId;
23584
      if (other.isSetReturnedOrders()) {
23585
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
23586
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
23587
 
23588
          String other_element_key = other_element.getKey();
23589
          String other_element_value = other_element.getValue();
23590
 
23591
          String __this__returnedOrders_copy_key = other_element_key;
23592
 
23593
          String __this__returnedOrders_copy_value = other_element_value;
23594
 
23595
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
23596
        }
23597
        this.returnedOrders = __this__returnedOrders;
23598
      }
23599
    }
23600
 
23601
    public markOrdersAsFailed_args deepCopy() {
23602
      return new markOrdersAsFailed_args(this);
23603
    }
23604
 
23605
    @Deprecated
23606
    public markOrdersAsFailed_args clone() {
23607
      return new markOrdersAsFailed_args(this);
23608
    }
23609
 
23610
    public long getProviderId() {
23611
      return this.providerId;
23612
    }
23613
 
23614
    public markOrdersAsFailed_args setProviderId(long providerId) {
23615
      this.providerId = providerId;
23616
      setProviderIdIsSet(true);
23617
      return this;
23618
    }
23619
 
23620
    public void unsetProviderId() {
23621
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23622
    }
23623
 
23624
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23625
    public boolean isSetProviderId() {
23626
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23627
    }
23628
 
23629
    public void setProviderIdIsSet(boolean value) {
23630
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23631
    }
23632
 
23633
    public int getReturnedOrdersSize() {
23634
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
23635
    }
23636
 
23637
    public void putToReturnedOrders(String key, String val) {
23638
      if (this.returnedOrders == null) {
23639
        this.returnedOrders = new HashMap<String,String>();
23640
      }
23641
      this.returnedOrders.put(key, val);
23642
    }
23643
 
23644
    public Map<String,String> getReturnedOrders() {
23645
      return this.returnedOrders;
23646
    }
23647
 
23648
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
23649
      this.returnedOrders = returnedOrders;
23650
      return this;
23651
    }
23652
 
23653
    public void unsetReturnedOrders() {
23654
      this.returnedOrders = null;
23655
    }
23656
 
23657
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
23658
    public boolean isSetReturnedOrders() {
23659
      return this.returnedOrders != null;
23660
    }
23661
 
23662
    public void setReturnedOrdersIsSet(boolean value) {
23663
      if (!value) {
23664
        this.returnedOrders = null;
23665
      }
23666
    }
23667
 
23668
    public void setFieldValue(_Fields field, Object value) {
23669
      switch (field) {
23670
      case PROVIDER_ID:
23671
        if (value == null) {
23672
          unsetProviderId();
23673
        } else {
23674
          setProviderId((Long)value);
23675
        }
23676
        break;
23677
 
23678
      case RETURNED_ORDERS:
23679
        if (value == null) {
23680
          unsetReturnedOrders();
23681
        } else {
23682
          setReturnedOrders((Map<String,String>)value);
23683
        }
23684
        break;
23685
 
23686
      }
23687
    }
23688
 
23689
    public void setFieldValue(int fieldID, Object value) {
23690
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23691
    }
23692
 
23693
    public Object getFieldValue(_Fields field) {
23694
      switch (field) {
23695
      case PROVIDER_ID:
23696
        return new Long(getProviderId());
23697
 
23698
      case RETURNED_ORDERS:
23699
        return getReturnedOrders();
23700
 
23701
      }
23702
      throw new IllegalStateException();
23703
    }
23704
 
23705
    public Object getFieldValue(int fieldId) {
23706
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23707
    }
23708
 
23709
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23710
    public boolean isSet(_Fields field) {
23711
      switch (field) {
23712
      case PROVIDER_ID:
23713
        return isSetProviderId();
23714
      case RETURNED_ORDERS:
23715
        return isSetReturnedOrders();
23716
      }
23717
      throw new IllegalStateException();
23718
    }
23719
 
23720
    public boolean isSet(int fieldID) {
23721
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23722
    }
23723
 
23724
    @Override
23725
    public boolean equals(Object that) {
23726
      if (that == null)
23727
        return false;
23728
      if (that instanceof markOrdersAsFailed_args)
23729
        return this.equals((markOrdersAsFailed_args)that);
23730
      return false;
23731
    }
23732
 
23733
    public boolean equals(markOrdersAsFailed_args that) {
23734
      if (that == null)
23735
        return false;
23736
 
23737
      boolean this_present_providerId = true;
23738
      boolean that_present_providerId = true;
23739
      if (this_present_providerId || that_present_providerId) {
23740
        if (!(this_present_providerId && that_present_providerId))
23741
          return false;
23742
        if (this.providerId != that.providerId)
23743
          return false;
23744
      }
23745
 
23746
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
23747
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
23748
      if (this_present_returnedOrders || that_present_returnedOrders) {
23749
        if (!(this_present_returnedOrders && that_present_returnedOrders))
23750
          return false;
23751
        if (!this.returnedOrders.equals(that.returnedOrders))
23752
          return false;
23753
      }
23754
 
23755
      return true;
23756
    }
23757
 
23758
    @Override
23759
    public int hashCode() {
23760
      return 0;
23761
    }
23762
 
23763
    public void read(TProtocol iprot) throws TException {
23764
      TField field;
23765
      iprot.readStructBegin();
23766
      while (true)
23767
      {
23768
        field = iprot.readFieldBegin();
23769
        if (field.type == TType.STOP) { 
23770
          break;
23771
        }
23772
        _Fields fieldId = _Fields.findByThriftId(field.id);
23773
        if (fieldId == null) {
23774
          TProtocolUtil.skip(iprot, field.type);
23775
        } else {
23776
          switch (fieldId) {
23777
            case PROVIDER_ID:
23778
              if (field.type == TType.I64) {
23779
                this.providerId = iprot.readI64();
23780
                setProviderIdIsSet(true);
23781
              } else { 
23782
                TProtocolUtil.skip(iprot, field.type);
23783
              }
23784
              break;
23785
            case RETURNED_ORDERS:
23786
              if (field.type == TType.MAP) {
23787
                {
1382 varun.gupt 23788
                  TMap _map62 = iprot.readMapBegin();
23789
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
23790
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 23791
                  {
1382 varun.gupt 23792
                    String _key64;
23793
                    String _val65;
23794
                    _key64 = iprot.readString();
23795
                    _val65 = iprot.readString();
23796
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 23797
                  }
23798
                  iprot.readMapEnd();
23799
                }
23800
              } else { 
23801
                TProtocolUtil.skip(iprot, field.type);
23802
              }
23803
              break;
23804
          }
23805
          iprot.readFieldEnd();
23806
        }
23807
      }
23808
      iprot.readStructEnd();
23809
      validate();
23810
    }
23811
 
23812
    public void write(TProtocol oprot) throws TException {
23813
      validate();
23814
 
23815
      oprot.writeStructBegin(STRUCT_DESC);
23816
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23817
      oprot.writeI64(this.providerId);
23818
      oprot.writeFieldEnd();
23819
      if (this.returnedOrders != null) {
23820
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
23821
        {
23822
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 23823
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 23824
          {
1382 varun.gupt 23825
            oprot.writeString(_iter66.getKey());
23826
            oprot.writeString(_iter66.getValue());
1133 chandransh 23827
          }
23828
          oprot.writeMapEnd();
23829
        }
23830
        oprot.writeFieldEnd();
23831
      }
23832
      oprot.writeFieldStop();
23833
      oprot.writeStructEnd();
23834
    }
23835
 
23836
    @Override
23837
    public String toString() {
23838
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
23839
      boolean first = true;
23840
 
23841
      sb.append("providerId:");
23842
      sb.append(this.providerId);
23843
      first = false;
23844
      if (!first) sb.append(", ");
23845
      sb.append("returnedOrders:");
23846
      if (this.returnedOrders == null) {
23847
        sb.append("null");
23848
      } else {
23849
        sb.append(this.returnedOrders);
23850
      }
23851
      first = false;
23852
      sb.append(")");
23853
      return sb.toString();
23854
    }
23855
 
23856
    public void validate() throws TException {
23857
      // check for required fields
23858
    }
23859
 
23860
  }
23861
 
23862
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
23863
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
23864
 
23865
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23866
 
23867
    private TransactionServiceException ex;
23868
 
23869
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23870
    public enum _Fields implements TFieldIdEnum {
23871
      EX((short)1, "ex");
23872
 
23873
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23874
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23875
 
23876
      static {
23877
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23878
          byId.put((int)field._thriftId, field);
23879
          byName.put(field.getFieldName(), field);
23880
        }
23881
      }
23882
 
23883
      /**
23884
       * Find the _Fields constant that matches fieldId, or null if its not found.
23885
       */
23886
      public static _Fields findByThriftId(int fieldId) {
23887
        return byId.get(fieldId);
23888
      }
23889
 
23890
      /**
23891
       * Find the _Fields constant that matches fieldId, throwing an exception
23892
       * if it is not found.
23893
       */
23894
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23895
        _Fields fields = findByThriftId(fieldId);
23896
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23897
        return fields;
23898
      }
23899
 
23900
      /**
23901
       * Find the _Fields constant that matches name, or null if its not found.
23902
       */
23903
      public static _Fields findByName(String name) {
23904
        return byName.get(name);
23905
      }
23906
 
23907
      private final short _thriftId;
23908
      private final String _fieldName;
23909
 
23910
      _Fields(short thriftId, String fieldName) {
23911
        _thriftId = thriftId;
23912
        _fieldName = fieldName;
23913
      }
23914
 
23915
      public short getThriftFieldId() {
23916
        return _thriftId;
23917
      }
23918
 
23919
      public String getFieldName() {
23920
        return _fieldName;
23921
      }
23922
    }
23923
 
23924
    // isset id assignments
23925
 
23926
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23927
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23928
          new FieldValueMetaData(TType.STRUCT)));
23929
    }});
23930
 
23931
    static {
23932
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
23933
    }
23934
 
23935
    public markOrdersAsFailed_result() {
23936
    }
23937
 
23938
    public markOrdersAsFailed_result(
23939
      TransactionServiceException ex)
23940
    {
23941
      this();
23942
      this.ex = ex;
23943
    }
23944
 
23945
    /**
23946
     * Performs a deep copy on <i>other</i>.
23947
     */
23948
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
23949
      if (other.isSetEx()) {
23950
        this.ex = new TransactionServiceException(other.ex);
23951
      }
23952
    }
23953
 
23954
    public markOrdersAsFailed_result deepCopy() {
23955
      return new markOrdersAsFailed_result(this);
23956
    }
23957
 
23958
    @Deprecated
23959
    public markOrdersAsFailed_result clone() {
23960
      return new markOrdersAsFailed_result(this);
23961
    }
23962
 
23963
    public TransactionServiceException getEx() {
23964
      return this.ex;
23965
    }
23966
 
23967
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
23968
      this.ex = ex;
23969
      return this;
23970
    }
23971
 
23972
    public void unsetEx() {
23973
      this.ex = null;
23974
    }
23975
 
23976
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23977
    public boolean isSetEx() {
23978
      return this.ex != null;
23979
    }
23980
 
23981
    public void setExIsSet(boolean value) {
23982
      if (!value) {
23983
        this.ex = null;
23984
      }
23985
    }
23986
 
23987
    public void setFieldValue(_Fields field, Object value) {
23988
      switch (field) {
23989
      case EX:
23990
        if (value == null) {
23991
          unsetEx();
23992
        } else {
23993
          setEx((TransactionServiceException)value);
23994
        }
23995
        break;
23996
 
23997
      }
23998
    }
23999
 
24000
    public void setFieldValue(int fieldID, Object value) {
24001
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24002
    }
24003
 
24004
    public Object getFieldValue(_Fields field) {
24005
      switch (field) {
24006
      case EX:
24007
        return getEx();
24008
 
24009
      }
24010
      throw new IllegalStateException();
24011
    }
24012
 
24013
    public Object getFieldValue(int fieldId) {
24014
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24015
    }
24016
 
24017
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24018
    public boolean isSet(_Fields field) {
24019
      switch (field) {
24020
      case EX:
24021
        return isSetEx();
24022
      }
24023
      throw new IllegalStateException();
24024
    }
24025
 
24026
    public boolean isSet(int fieldID) {
24027
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24028
    }
24029
 
24030
    @Override
24031
    public boolean equals(Object that) {
24032
      if (that == null)
24033
        return false;
24034
      if (that instanceof markOrdersAsFailed_result)
24035
        return this.equals((markOrdersAsFailed_result)that);
24036
      return false;
24037
    }
24038
 
24039
    public boolean equals(markOrdersAsFailed_result that) {
24040
      if (that == null)
24041
        return false;
24042
 
24043
      boolean this_present_ex = true && this.isSetEx();
24044
      boolean that_present_ex = true && that.isSetEx();
24045
      if (this_present_ex || that_present_ex) {
24046
        if (!(this_present_ex && that_present_ex))
24047
          return false;
24048
        if (!this.ex.equals(that.ex))
24049
          return false;
24050
      }
24051
 
24052
      return true;
24053
    }
24054
 
24055
    @Override
24056
    public int hashCode() {
24057
      return 0;
24058
    }
24059
 
24060
    public int compareTo(markOrdersAsFailed_result other) {
24061
      if (!getClass().equals(other.getClass())) {
24062
        return getClass().getName().compareTo(other.getClass().getName());
24063
      }
24064
 
24065
      int lastComparison = 0;
24066
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
24067
 
24068
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24069
      if (lastComparison != 0) {
24070
        return lastComparison;
24071
      }
24072
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24073
      if (lastComparison != 0) {
24074
        return lastComparison;
24075
      }
24076
      return 0;
24077
    }
24078
 
24079
    public void read(TProtocol iprot) throws TException {
24080
      TField field;
24081
      iprot.readStructBegin();
24082
      while (true)
24083
      {
24084
        field = iprot.readFieldBegin();
24085
        if (field.type == TType.STOP) { 
24086
          break;
24087
        }
24088
        _Fields fieldId = _Fields.findByThriftId(field.id);
24089
        if (fieldId == null) {
24090
          TProtocolUtil.skip(iprot, field.type);
24091
        } else {
24092
          switch (fieldId) {
24093
            case EX:
24094
              if (field.type == TType.STRUCT) {
24095
                this.ex = new TransactionServiceException();
24096
                this.ex.read(iprot);
24097
              } else { 
24098
                TProtocolUtil.skip(iprot, field.type);
24099
              }
24100
              break;
24101
          }
24102
          iprot.readFieldEnd();
24103
        }
24104
      }
24105
      iprot.readStructEnd();
24106
      validate();
24107
    }
24108
 
24109
    public void write(TProtocol oprot) throws TException {
24110
      oprot.writeStructBegin(STRUCT_DESC);
24111
 
24112
      if (this.isSetEx()) {
24113
        oprot.writeFieldBegin(EX_FIELD_DESC);
24114
        this.ex.write(oprot);
24115
        oprot.writeFieldEnd();
24116
      }
24117
      oprot.writeFieldStop();
24118
      oprot.writeStructEnd();
24119
    }
24120
 
24121
    @Override
24122
    public String toString() {
24123
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
24124
      boolean first = true;
24125
 
24126
      sb.append("ex:");
24127
      if (this.ex == null) {
24128
        sb.append("null");
24129
      } else {
24130
        sb.append(this.ex);
24131
      }
24132
      first = false;
24133
      sb.append(")");
24134
      return sb.toString();
24135
    }
24136
 
24137
    public void validate() throws TException {
24138
      // check for required fields
24139
    }
24140
 
24141
  }
24142
 
1245 chandransh 24143
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
24144
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
24145
 
24146
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24147
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
24148
 
24149
    private long providerId;
24150
    private Map<String,String> undeliveredOrders;
24151
 
24152
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24153
    public enum _Fields implements TFieldIdEnum {
24154
      PROVIDER_ID((short)1, "providerId"),
24155
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
24156
 
24157
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24158
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24159
 
24160
      static {
24161
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24162
          byId.put((int)field._thriftId, field);
24163
          byName.put(field.getFieldName(), field);
24164
        }
24165
      }
24166
 
24167
      /**
24168
       * Find the _Fields constant that matches fieldId, or null if its not found.
24169
       */
24170
      public static _Fields findByThriftId(int fieldId) {
24171
        return byId.get(fieldId);
24172
      }
24173
 
24174
      /**
24175
       * Find the _Fields constant that matches fieldId, throwing an exception
24176
       * if it is not found.
24177
       */
24178
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24179
        _Fields fields = findByThriftId(fieldId);
24180
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24181
        return fields;
24182
      }
24183
 
24184
      /**
24185
       * Find the _Fields constant that matches name, or null if its not found.
24186
       */
24187
      public static _Fields findByName(String name) {
24188
        return byName.get(name);
24189
      }
24190
 
24191
      private final short _thriftId;
24192
      private final String _fieldName;
24193
 
24194
      _Fields(short thriftId, String fieldName) {
24195
        _thriftId = thriftId;
24196
        _fieldName = fieldName;
24197
      }
24198
 
24199
      public short getThriftFieldId() {
24200
        return _thriftId;
24201
      }
24202
 
24203
      public String getFieldName() {
24204
        return _fieldName;
24205
      }
24206
    }
24207
 
24208
    // isset id assignments
24209
    private static final int __PROVIDERID_ISSET_ID = 0;
24210
    private BitSet __isset_bit_vector = new BitSet(1);
24211
 
24212
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24213
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24214
          new FieldValueMetaData(TType.I64)));
24215
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
24216
          new MapMetaData(TType.MAP, 
24217
              new FieldValueMetaData(TType.STRING), 
24218
              new FieldValueMetaData(TType.STRING))));
24219
    }});
24220
 
24221
    static {
24222
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
24223
    }
24224
 
24225
    public updateNonDeliveryReason_args() {
24226
    }
24227
 
24228
    public updateNonDeliveryReason_args(
24229
      long providerId,
24230
      Map<String,String> undeliveredOrders)
24231
    {
24232
      this();
24233
      this.providerId = providerId;
24234
      setProviderIdIsSet(true);
24235
      this.undeliveredOrders = undeliveredOrders;
24236
    }
24237
 
24238
    /**
24239
     * Performs a deep copy on <i>other</i>.
24240
     */
24241
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
24242
      __isset_bit_vector.clear();
24243
      __isset_bit_vector.or(other.__isset_bit_vector);
24244
      this.providerId = other.providerId;
24245
      if (other.isSetUndeliveredOrders()) {
24246
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
24247
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
24248
 
24249
          String other_element_key = other_element.getKey();
24250
          String other_element_value = other_element.getValue();
24251
 
24252
          String __this__undeliveredOrders_copy_key = other_element_key;
24253
 
24254
          String __this__undeliveredOrders_copy_value = other_element_value;
24255
 
24256
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
24257
        }
24258
        this.undeliveredOrders = __this__undeliveredOrders;
24259
      }
24260
    }
24261
 
24262
    public updateNonDeliveryReason_args deepCopy() {
24263
      return new updateNonDeliveryReason_args(this);
24264
    }
24265
 
24266
    @Deprecated
24267
    public updateNonDeliveryReason_args clone() {
24268
      return new updateNonDeliveryReason_args(this);
24269
    }
24270
 
24271
    public long getProviderId() {
24272
      return this.providerId;
24273
    }
24274
 
24275
    public updateNonDeliveryReason_args setProviderId(long providerId) {
24276
      this.providerId = providerId;
24277
      setProviderIdIsSet(true);
24278
      return this;
24279
    }
24280
 
24281
    public void unsetProviderId() {
24282
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24283
    }
24284
 
24285
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24286
    public boolean isSetProviderId() {
24287
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24288
    }
24289
 
24290
    public void setProviderIdIsSet(boolean value) {
24291
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24292
    }
24293
 
24294
    public int getUndeliveredOrdersSize() {
24295
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
24296
    }
24297
 
24298
    public void putToUndeliveredOrders(String key, String val) {
24299
      if (this.undeliveredOrders == null) {
24300
        this.undeliveredOrders = new HashMap<String,String>();
24301
      }
24302
      this.undeliveredOrders.put(key, val);
24303
    }
24304
 
24305
    public Map<String,String> getUndeliveredOrders() {
24306
      return this.undeliveredOrders;
24307
    }
24308
 
24309
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
24310
      this.undeliveredOrders = undeliveredOrders;
24311
      return this;
24312
    }
24313
 
24314
    public void unsetUndeliveredOrders() {
24315
      this.undeliveredOrders = null;
24316
    }
24317
 
24318
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
24319
    public boolean isSetUndeliveredOrders() {
24320
      return this.undeliveredOrders != null;
24321
    }
24322
 
24323
    public void setUndeliveredOrdersIsSet(boolean value) {
24324
      if (!value) {
24325
        this.undeliveredOrders = null;
24326
      }
24327
    }
24328
 
24329
    public void setFieldValue(_Fields field, Object value) {
24330
      switch (field) {
24331
      case PROVIDER_ID:
24332
        if (value == null) {
24333
          unsetProviderId();
24334
        } else {
24335
          setProviderId((Long)value);
24336
        }
24337
        break;
24338
 
24339
      case UNDELIVERED_ORDERS:
24340
        if (value == null) {
24341
          unsetUndeliveredOrders();
24342
        } else {
24343
          setUndeliveredOrders((Map<String,String>)value);
24344
        }
24345
        break;
24346
 
24347
      }
24348
    }
24349
 
24350
    public void setFieldValue(int fieldID, Object value) {
24351
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24352
    }
24353
 
24354
    public Object getFieldValue(_Fields field) {
24355
      switch (field) {
24356
      case PROVIDER_ID:
24357
        return new Long(getProviderId());
24358
 
24359
      case UNDELIVERED_ORDERS:
24360
        return getUndeliveredOrders();
24361
 
24362
      }
24363
      throw new IllegalStateException();
24364
    }
24365
 
24366
    public Object getFieldValue(int fieldId) {
24367
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24368
    }
24369
 
24370
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24371
    public boolean isSet(_Fields field) {
24372
      switch (field) {
24373
      case PROVIDER_ID:
24374
        return isSetProviderId();
24375
      case UNDELIVERED_ORDERS:
24376
        return isSetUndeliveredOrders();
24377
      }
24378
      throw new IllegalStateException();
24379
    }
24380
 
24381
    public boolean isSet(int fieldID) {
24382
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24383
    }
24384
 
24385
    @Override
24386
    public boolean equals(Object that) {
24387
      if (that == null)
24388
        return false;
24389
      if (that instanceof updateNonDeliveryReason_args)
24390
        return this.equals((updateNonDeliveryReason_args)that);
24391
      return false;
24392
    }
24393
 
24394
    public boolean equals(updateNonDeliveryReason_args that) {
24395
      if (that == null)
24396
        return false;
24397
 
24398
      boolean this_present_providerId = true;
24399
      boolean that_present_providerId = true;
24400
      if (this_present_providerId || that_present_providerId) {
24401
        if (!(this_present_providerId && that_present_providerId))
24402
          return false;
24403
        if (this.providerId != that.providerId)
24404
          return false;
24405
      }
24406
 
24407
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
24408
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
24409
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
24410
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
24411
          return false;
24412
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
24413
          return false;
24414
      }
24415
 
24416
      return true;
24417
    }
24418
 
24419
    @Override
24420
    public int hashCode() {
24421
      return 0;
24422
    }
24423
 
24424
    public void read(TProtocol iprot) throws TException {
24425
      TField field;
24426
      iprot.readStructBegin();
24427
      while (true)
24428
      {
24429
        field = iprot.readFieldBegin();
24430
        if (field.type == TType.STOP) { 
24431
          break;
24432
        }
24433
        _Fields fieldId = _Fields.findByThriftId(field.id);
24434
        if (fieldId == null) {
24435
          TProtocolUtil.skip(iprot, field.type);
24436
        } else {
24437
          switch (fieldId) {
24438
            case PROVIDER_ID:
24439
              if (field.type == TType.I64) {
24440
                this.providerId = iprot.readI64();
24441
                setProviderIdIsSet(true);
24442
              } else { 
24443
                TProtocolUtil.skip(iprot, field.type);
24444
              }
24445
              break;
24446
            case UNDELIVERED_ORDERS:
24447
              if (field.type == TType.MAP) {
24448
                {
1382 varun.gupt 24449
                  TMap _map67 = iprot.readMapBegin();
24450
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
24451
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 24452
                  {
1382 varun.gupt 24453
                    String _key69;
24454
                    String _val70;
24455
                    _key69 = iprot.readString();
24456
                    _val70 = iprot.readString();
24457
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 24458
                  }
24459
                  iprot.readMapEnd();
24460
                }
24461
              } else { 
24462
                TProtocolUtil.skip(iprot, field.type);
24463
              }
24464
              break;
24465
          }
24466
          iprot.readFieldEnd();
24467
        }
24468
      }
24469
      iprot.readStructEnd();
24470
      validate();
24471
    }
24472
 
24473
    public void write(TProtocol oprot) throws TException {
24474
      validate();
24475
 
24476
      oprot.writeStructBegin(STRUCT_DESC);
24477
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24478
      oprot.writeI64(this.providerId);
24479
      oprot.writeFieldEnd();
24480
      if (this.undeliveredOrders != null) {
24481
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
24482
        {
24483
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 24484
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 24485
          {
1382 varun.gupt 24486
            oprot.writeString(_iter71.getKey());
24487
            oprot.writeString(_iter71.getValue());
1245 chandransh 24488
          }
24489
          oprot.writeMapEnd();
24490
        }
24491
        oprot.writeFieldEnd();
24492
      }
24493
      oprot.writeFieldStop();
24494
      oprot.writeStructEnd();
24495
    }
24496
 
24497
    @Override
24498
    public String toString() {
24499
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
24500
      boolean first = true;
24501
 
24502
      sb.append("providerId:");
24503
      sb.append(this.providerId);
24504
      first = false;
24505
      if (!first) sb.append(", ");
24506
      sb.append("undeliveredOrders:");
24507
      if (this.undeliveredOrders == null) {
24508
        sb.append("null");
24509
      } else {
24510
        sb.append(this.undeliveredOrders);
24511
      }
24512
      first = false;
24513
      sb.append(")");
24514
      return sb.toString();
24515
    }
24516
 
24517
    public void validate() throws TException {
24518
      // check for required fields
24519
    }
24520
 
24521
  }
24522
 
24523
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
24524
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
24525
 
24526
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
24527
 
24528
    private TransactionServiceException ex;
24529
 
24530
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24531
    public enum _Fields implements TFieldIdEnum {
24532
      EX((short)1, "ex");
24533
 
24534
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24535
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24536
 
24537
      static {
24538
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24539
          byId.put((int)field._thriftId, field);
24540
          byName.put(field.getFieldName(), field);
24541
        }
24542
      }
24543
 
24544
      /**
24545
       * Find the _Fields constant that matches fieldId, or null if its not found.
24546
       */
24547
      public static _Fields findByThriftId(int fieldId) {
24548
        return byId.get(fieldId);
24549
      }
24550
 
24551
      /**
24552
       * Find the _Fields constant that matches fieldId, throwing an exception
24553
       * if it is not found.
24554
       */
24555
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24556
        _Fields fields = findByThriftId(fieldId);
24557
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24558
        return fields;
24559
      }
24560
 
24561
      /**
24562
       * Find the _Fields constant that matches name, or null if its not found.
24563
       */
24564
      public static _Fields findByName(String name) {
24565
        return byName.get(name);
24566
      }
24567
 
24568
      private final short _thriftId;
24569
      private final String _fieldName;
24570
 
24571
      _Fields(short thriftId, String fieldName) {
24572
        _thriftId = thriftId;
24573
        _fieldName = fieldName;
24574
      }
24575
 
24576
      public short getThriftFieldId() {
24577
        return _thriftId;
24578
      }
24579
 
24580
      public String getFieldName() {
24581
        return _fieldName;
24582
      }
24583
    }
24584
 
24585
    // isset id assignments
24586
 
24587
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24588
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
24589
          new FieldValueMetaData(TType.STRUCT)));
24590
    }});
24591
 
24592
    static {
24593
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
24594
    }
24595
 
24596
    public updateNonDeliveryReason_result() {
24597
    }
24598
 
24599
    public updateNonDeliveryReason_result(
24600
      TransactionServiceException ex)
24601
    {
24602
      this();
24603
      this.ex = ex;
24604
    }
24605
 
24606
    /**
24607
     * Performs a deep copy on <i>other</i>.
24608
     */
24609
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
24610
      if (other.isSetEx()) {
24611
        this.ex = new TransactionServiceException(other.ex);
24612
      }
24613
    }
24614
 
24615
    public updateNonDeliveryReason_result deepCopy() {
24616
      return new updateNonDeliveryReason_result(this);
24617
    }
24618
 
24619
    @Deprecated
24620
    public updateNonDeliveryReason_result clone() {
24621
      return new updateNonDeliveryReason_result(this);
24622
    }
24623
 
24624
    public TransactionServiceException getEx() {
24625
      return this.ex;
24626
    }
24627
 
24628
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
24629
      this.ex = ex;
24630
      return this;
24631
    }
24632
 
24633
    public void unsetEx() {
24634
      this.ex = null;
24635
    }
24636
 
24637
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
24638
    public boolean isSetEx() {
24639
      return this.ex != null;
24640
    }
24641
 
24642
    public void setExIsSet(boolean value) {
24643
      if (!value) {
24644
        this.ex = null;
24645
      }
24646
    }
24647
 
24648
    public void setFieldValue(_Fields field, Object value) {
24649
      switch (field) {
24650
      case EX:
24651
        if (value == null) {
24652
          unsetEx();
24653
        } else {
24654
          setEx((TransactionServiceException)value);
24655
        }
24656
        break;
24657
 
24658
      }
24659
    }
24660
 
24661
    public void setFieldValue(int fieldID, Object value) {
24662
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24663
    }
24664
 
24665
    public Object getFieldValue(_Fields field) {
24666
      switch (field) {
24667
      case EX:
24668
        return getEx();
24669
 
24670
      }
24671
      throw new IllegalStateException();
24672
    }
24673
 
24674
    public Object getFieldValue(int fieldId) {
24675
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24676
    }
24677
 
24678
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24679
    public boolean isSet(_Fields field) {
24680
      switch (field) {
24681
      case EX:
24682
        return isSetEx();
24683
      }
24684
      throw new IllegalStateException();
24685
    }
24686
 
24687
    public boolean isSet(int fieldID) {
24688
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24689
    }
24690
 
24691
    @Override
24692
    public boolean equals(Object that) {
24693
      if (that == null)
24694
        return false;
24695
      if (that instanceof updateNonDeliveryReason_result)
24696
        return this.equals((updateNonDeliveryReason_result)that);
24697
      return false;
24698
    }
24699
 
24700
    public boolean equals(updateNonDeliveryReason_result that) {
24701
      if (that == null)
24702
        return false;
24703
 
24704
      boolean this_present_ex = true && this.isSetEx();
24705
      boolean that_present_ex = true && that.isSetEx();
24706
      if (this_present_ex || that_present_ex) {
24707
        if (!(this_present_ex && that_present_ex))
24708
          return false;
24709
        if (!this.ex.equals(that.ex))
24710
          return false;
24711
      }
24712
 
24713
      return true;
24714
    }
24715
 
24716
    @Override
24717
    public int hashCode() {
24718
      return 0;
24719
    }
24720
 
24721
    public int compareTo(updateNonDeliveryReason_result other) {
24722
      if (!getClass().equals(other.getClass())) {
24723
        return getClass().getName().compareTo(other.getClass().getName());
24724
      }
24725
 
24726
      int lastComparison = 0;
24727
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
24728
 
24729
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24730
      if (lastComparison != 0) {
24731
        return lastComparison;
24732
      }
24733
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24734
      if (lastComparison != 0) {
24735
        return lastComparison;
24736
      }
24737
      return 0;
24738
    }
24739
 
24740
    public void read(TProtocol iprot) throws TException {
24741
      TField field;
24742
      iprot.readStructBegin();
24743
      while (true)
24744
      {
24745
        field = iprot.readFieldBegin();
24746
        if (field.type == TType.STOP) { 
24747
          break;
24748
        }
24749
        _Fields fieldId = _Fields.findByThriftId(field.id);
24750
        if (fieldId == null) {
24751
          TProtocolUtil.skip(iprot, field.type);
24752
        } else {
24753
          switch (fieldId) {
24754
            case EX:
24755
              if (field.type == TType.STRUCT) {
24756
                this.ex = new TransactionServiceException();
24757
                this.ex.read(iprot);
24758
              } else { 
24759
                TProtocolUtil.skip(iprot, field.type);
24760
              }
24761
              break;
24762
          }
24763
          iprot.readFieldEnd();
24764
        }
24765
      }
24766
      iprot.readStructEnd();
24767
      validate();
24768
    }
24769
 
24770
    public void write(TProtocol oprot) throws TException {
24771
      oprot.writeStructBegin(STRUCT_DESC);
24772
 
24773
      if (this.isSetEx()) {
24774
        oprot.writeFieldBegin(EX_FIELD_DESC);
24775
        this.ex.write(oprot);
24776
        oprot.writeFieldEnd();
24777
      }
24778
      oprot.writeFieldStop();
24779
      oprot.writeStructEnd();
24780
    }
24781
 
24782
    @Override
24783
    public String toString() {
24784
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
24785
      boolean first = true;
24786
 
24787
      sb.append("ex:");
24788
      if (this.ex == null) {
24789
        sb.append("null");
24790
      } else {
24791
        sb.append(this.ex);
24792
      }
24793
      first = false;
24794
      sb.append(")");
24795
      return sb.toString();
24796
    }
24797
 
24798
    public void validate() throws TException {
24799
      // check for required fields
24800
    }
24801
 
24802
  }
24803
 
1406 ankur.sing 24804
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
24805
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
24806
 
24807
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24808
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
24809
 
24810
    private long providerId;
24811
    private long warehouseId;
24812
 
24813
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24814
    public enum _Fields implements TFieldIdEnum {
24815
      PROVIDER_ID((short)1, "providerId"),
24816
      WAREHOUSE_ID((short)2, "warehouseId");
24817
 
24818
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24819
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24820
 
24821
      static {
24822
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24823
          byId.put((int)field._thriftId, field);
24824
          byName.put(field.getFieldName(), field);
24825
        }
24826
      }
24827
 
24828
      /**
24829
       * Find the _Fields constant that matches fieldId, or null if its not found.
24830
       */
24831
      public static _Fields findByThriftId(int fieldId) {
24832
        return byId.get(fieldId);
24833
      }
24834
 
24835
      /**
24836
       * Find the _Fields constant that matches fieldId, throwing an exception
24837
       * if it is not found.
24838
       */
24839
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24840
        _Fields fields = findByThriftId(fieldId);
24841
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24842
        return fields;
24843
      }
24844
 
24845
      /**
24846
       * Find the _Fields constant that matches name, or null if its not found.
24847
       */
24848
      public static _Fields findByName(String name) {
24849
        return byName.get(name);
24850
      }
24851
 
24852
      private final short _thriftId;
24853
      private final String _fieldName;
24854
 
24855
      _Fields(short thriftId, String fieldName) {
24856
        _thriftId = thriftId;
24857
        _fieldName = fieldName;
24858
      }
24859
 
24860
      public short getThriftFieldId() {
24861
        return _thriftId;
24862
      }
24863
 
24864
      public String getFieldName() {
24865
        return _fieldName;
24866
      }
24867
    }
24868
 
24869
    // isset id assignments
24870
    private static final int __PROVIDERID_ISSET_ID = 0;
24871
    private static final int __WAREHOUSEID_ISSET_ID = 1;
24872
    private BitSet __isset_bit_vector = new BitSet(2);
24873
 
24874
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24875
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24876
          new FieldValueMetaData(TType.I64)));
24877
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
24878
          new FieldValueMetaData(TType.I64)));
24879
    }});
24880
 
24881
    static {
24882
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
24883
    }
24884
 
24885
    public getUndeliveredOrders_args() {
24886
    }
24887
 
24888
    public getUndeliveredOrders_args(
24889
      long providerId,
24890
      long warehouseId)
24891
    {
24892
      this();
24893
      this.providerId = providerId;
24894
      setProviderIdIsSet(true);
24895
      this.warehouseId = warehouseId;
24896
      setWarehouseIdIsSet(true);
24897
    }
24898
 
24899
    /**
24900
     * Performs a deep copy on <i>other</i>.
24901
     */
24902
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
24903
      __isset_bit_vector.clear();
24904
      __isset_bit_vector.or(other.__isset_bit_vector);
24905
      this.providerId = other.providerId;
24906
      this.warehouseId = other.warehouseId;
24907
    }
24908
 
24909
    public getUndeliveredOrders_args deepCopy() {
24910
      return new getUndeliveredOrders_args(this);
24911
    }
24912
 
24913
    @Deprecated
24914
    public getUndeliveredOrders_args clone() {
24915
      return new getUndeliveredOrders_args(this);
24916
    }
24917
 
24918
    public long getProviderId() {
24919
      return this.providerId;
24920
    }
24921
 
24922
    public getUndeliveredOrders_args setProviderId(long providerId) {
24923
      this.providerId = providerId;
24924
      setProviderIdIsSet(true);
24925
      return this;
24926
    }
24927
 
24928
    public void unsetProviderId() {
24929
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24930
    }
24931
 
24932
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24933
    public boolean isSetProviderId() {
24934
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24935
    }
24936
 
24937
    public void setProviderIdIsSet(boolean value) {
24938
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24939
    }
24940
 
24941
    public long getWarehouseId() {
24942
      return this.warehouseId;
24943
    }
24944
 
24945
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
24946
      this.warehouseId = warehouseId;
24947
      setWarehouseIdIsSet(true);
24948
      return this;
24949
    }
24950
 
24951
    public void unsetWarehouseId() {
24952
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
24953
    }
24954
 
24955
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
24956
    public boolean isSetWarehouseId() {
24957
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
24958
    }
24959
 
24960
    public void setWarehouseIdIsSet(boolean value) {
24961
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
24962
    }
24963
 
24964
    public void setFieldValue(_Fields field, Object value) {
24965
      switch (field) {
24966
      case PROVIDER_ID:
24967
        if (value == null) {
24968
          unsetProviderId();
24969
        } else {
24970
          setProviderId((Long)value);
24971
        }
24972
        break;
24973
 
24974
      case WAREHOUSE_ID:
24975
        if (value == null) {
24976
          unsetWarehouseId();
24977
        } else {
24978
          setWarehouseId((Long)value);
24979
        }
24980
        break;
24981
 
24982
      }
24983
    }
24984
 
24985
    public void setFieldValue(int fieldID, Object value) {
24986
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24987
    }
24988
 
24989
    public Object getFieldValue(_Fields field) {
24990
      switch (field) {
24991
      case PROVIDER_ID:
24992
        return new Long(getProviderId());
24993
 
24994
      case WAREHOUSE_ID:
24995
        return new Long(getWarehouseId());
24996
 
24997
      }
24998
      throw new IllegalStateException();
24999
    }
25000
 
25001
    public Object getFieldValue(int fieldId) {
25002
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25003
    }
25004
 
25005
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25006
    public boolean isSet(_Fields field) {
25007
      switch (field) {
25008
      case PROVIDER_ID:
25009
        return isSetProviderId();
25010
      case WAREHOUSE_ID:
25011
        return isSetWarehouseId();
25012
      }
25013
      throw new IllegalStateException();
25014
    }
25015
 
25016
    public boolean isSet(int fieldID) {
25017
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25018
    }
25019
 
25020
    @Override
25021
    public boolean equals(Object that) {
25022
      if (that == null)
25023
        return false;
25024
      if (that instanceof getUndeliveredOrders_args)
25025
        return this.equals((getUndeliveredOrders_args)that);
25026
      return false;
25027
    }
25028
 
25029
    public boolean equals(getUndeliveredOrders_args that) {
25030
      if (that == null)
25031
        return false;
25032
 
25033
      boolean this_present_providerId = true;
25034
      boolean that_present_providerId = true;
25035
      if (this_present_providerId || that_present_providerId) {
25036
        if (!(this_present_providerId && that_present_providerId))
25037
          return false;
25038
        if (this.providerId != that.providerId)
25039
          return false;
25040
      }
25041
 
25042
      boolean this_present_warehouseId = true;
25043
      boolean that_present_warehouseId = true;
25044
      if (this_present_warehouseId || that_present_warehouseId) {
25045
        if (!(this_present_warehouseId && that_present_warehouseId))
25046
          return false;
25047
        if (this.warehouseId != that.warehouseId)
25048
          return false;
25049
      }
25050
 
25051
      return true;
25052
    }
25053
 
25054
    @Override
25055
    public int hashCode() {
25056
      return 0;
25057
    }
25058
 
25059
    public int compareTo(getUndeliveredOrders_args other) {
25060
      if (!getClass().equals(other.getClass())) {
25061
        return getClass().getName().compareTo(other.getClass().getName());
25062
      }
25063
 
25064
      int lastComparison = 0;
25065
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
25066
 
25067
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
25068
      if (lastComparison != 0) {
25069
        return lastComparison;
25070
      }
25071
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
25072
      if (lastComparison != 0) {
25073
        return lastComparison;
25074
      }
25075
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
25076
      if (lastComparison != 0) {
25077
        return lastComparison;
25078
      }
25079
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
25080
      if (lastComparison != 0) {
25081
        return lastComparison;
25082
      }
25083
      return 0;
25084
    }
25085
 
25086
    public void read(TProtocol iprot) throws TException {
25087
      TField field;
25088
      iprot.readStructBegin();
25089
      while (true)
25090
      {
25091
        field = iprot.readFieldBegin();
25092
        if (field.type == TType.STOP) { 
25093
          break;
25094
        }
25095
        _Fields fieldId = _Fields.findByThriftId(field.id);
25096
        if (fieldId == null) {
25097
          TProtocolUtil.skip(iprot, field.type);
25098
        } else {
25099
          switch (fieldId) {
25100
            case PROVIDER_ID:
25101
              if (field.type == TType.I64) {
25102
                this.providerId = iprot.readI64();
25103
                setProviderIdIsSet(true);
25104
              } else { 
25105
                TProtocolUtil.skip(iprot, field.type);
25106
              }
25107
              break;
25108
            case WAREHOUSE_ID:
25109
              if (field.type == TType.I64) {
25110
                this.warehouseId = iprot.readI64();
25111
                setWarehouseIdIsSet(true);
25112
              } else { 
25113
                TProtocolUtil.skip(iprot, field.type);
25114
              }
25115
              break;
25116
          }
25117
          iprot.readFieldEnd();
25118
        }
25119
      }
25120
      iprot.readStructEnd();
25121
      validate();
25122
    }
25123
 
25124
    public void write(TProtocol oprot) throws TException {
25125
      validate();
25126
 
25127
      oprot.writeStructBegin(STRUCT_DESC);
25128
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
25129
      oprot.writeI64(this.providerId);
25130
      oprot.writeFieldEnd();
25131
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
25132
      oprot.writeI64(this.warehouseId);
25133
      oprot.writeFieldEnd();
25134
      oprot.writeFieldStop();
25135
      oprot.writeStructEnd();
25136
    }
25137
 
25138
    @Override
25139
    public String toString() {
25140
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
25141
      boolean first = true;
25142
 
25143
      sb.append("providerId:");
25144
      sb.append(this.providerId);
25145
      first = false;
25146
      if (!first) sb.append(", ");
25147
      sb.append("warehouseId:");
25148
      sb.append(this.warehouseId);
25149
      first = false;
25150
      sb.append(")");
25151
      return sb.toString();
25152
    }
25153
 
25154
    public void validate() throws TException {
25155
      // check for required fields
25156
    }
25157
 
25158
  }
25159
 
25160
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
25161
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
25162
 
25163
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25164
 
25165
    private List<Order> success;
25166
 
25167
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25168
    public enum _Fields implements TFieldIdEnum {
25169
      SUCCESS((short)0, "success");
25170
 
25171
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25172
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25173
 
25174
      static {
25175
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25176
          byId.put((int)field._thriftId, field);
25177
          byName.put(field.getFieldName(), field);
25178
        }
25179
      }
25180
 
25181
      /**
25182
       * Find the _Fields constant that matches fieldId, or null if its not found.
25183
       */
25184
      public static _Fields findByThriftId(int fieldId) {
25185
        return byId.get(fieldId);
25186
      }
25187
 
25188
      /**
25189
       * Find the _Fields constant that matches fieldId, throwing an exception
25190
       * if it is not found.
25191
       */
25192
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25193
        _Fields fields = findByThriftId(fieldId);
25194
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25195
        return fields;
25196
      }
25197
 
25198
      /**
25199
       * Find the _Fields constant that matches name, or null if its not found.
25200
       */
25201
      public static _Fields findByName(String name) {
25202
        return byName.get(name);
25203
      }
25204
 
25205
      private final short _thriftId;
25206
      private final String _fieldName;
25207
 
25208
      _Fields(short thriftId, String fieldName) {
25209
        _thriftId = thriftId;
25210
        _fieldName = fieldName;
25211
      }
25212
 
25213
      public short getThriftFieldId() {
25214
        return _thriftId;
25215
      }
25216
 
25217
      public String getFieldName() {
25218
        return _fieldName;
25219
      }
25220
    }
25221
 
25222
    // isset id assignments
25223
 
25224
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25225
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25226
          new ListMetaData(TType.LIST, 
25227
              new StructMetaData(TType.STRUCT, Order.class))));
25228
    }});
25229
 
25230
    static {
25231
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
25232
    }
25233
 
25234
    public getUndeliveredOrders_result() {
25235
    }
25236
 
25237
    public getUndeliveredOrders_result(
25238
      List<Order> success)
25239
    {
25240
      this();
25241
      this.success = success;
25242
    }
25243
 
25244
    /**
25245
     * Performs a deep copy on <i>other</i>.
25246
     */
25247
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
25248
      if (other.isSetSuccess()) {
25249
        List<Order> __this__success = new ArrayList<Order>();
25250
        for (Order other_element : other.success) {
25251
          __this__success.add(new Order(other_element));
25252
        }
25253
        this.success = __this__success;
25254
      }
25255
    }
25256
 
25257
    public getUndeliveredOrders_result deepCopy() {
25258
      return new getUndeliveredOrders_result(this);
25259
    }
25260
 
25261
    @Deprecated
25262
    public getUndeliveredOrders_result clone() {
25263
      return new getUndeliveredOrders_result(this);
25264
    }
25265
 
25266
    public int getSuccessSize() {
25267
      return (this.success == null) ? 0 : this.success.size();
25268
    }
25269
 
25270
    public java.util.Iterator<Order> getSuccessIterator() {
25271
      return (this.success == null) ? null : this.success.iterator();
25272
    }
25273
 
25274
    public void addToSuccess(Order elem) {
25275
      if (this.success == null) {
25276
        this.success = new ArrayList<Order>();
25277
      }
25278
      this.success.add(elem);
25279
    }
25280
 
25281
    public List<Order> getSuccess() {
25282
      return this.success;
25283
    }
25284
 
25285
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
25286
      this.success = success;
25287
      return this;
25288
    }
25289
 
25290
    public void unsetSuccess() {
25291
      this.success = null;
25292
    }
25293
 
25294
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25295
    public boolean isSetSuccess() {
25296
      return this.success != null;
25297
    }
25298
 
25299
    public void setSuccessIsSet(boolean value) {
25300
      if (!value) {
25301
        this.success = null;
25302
      }
25303
    }
25304
 
25305
    public void setFieldValue(_Fields field, Object value) {
25306
      switch (field) {
25307
      case SUCCESS:
25308
        if (value == null) {
25309
          unsetSuccess();
25310
        } else {
25311
          setSuccess((List<Order>)value);
25312
        }
25313
        break;
25314
 
25315
      }
25316
    }
25317
 
25318
    public void setFieldValue(int fieldID, Object value) {
25319
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25320
    }
25321
 
25322
    public Object getFieldValue(_Fields field) {
25323
      switch (field) {
25324
      case SUCCESS:
25325
        return getSuccess();
25326
 
25327
      }
25328
      throw new IllegalStateException();
25329
    }
25330
 
25331
    public Object getFieldValue(int fieldId) {
25332
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25333
    }
25334
 
25335
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25336
    public boolean isSet(_Fields field) {
25337
      switch (field) {
25338
      case SUCCESS:
25339
        return isSetSuccess();
25340
      }
25341
      throw new IllegalStateException();
25342
    }
25343
 
25344
    public boolean isSet(int fieldID) {
25345
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25346
    }
25347
 
25348
    @Override
25349
    public boolean equals(Object that) {
25350
      if (that == null)
25351
        return false;
25352
      if (that instanceof getUndeliveredOrders_result)
25353
        return this.equals((getUndeliveredOrders_result)that);
25354
      return false;
25355
    }
25356
 
25357
    public boolean equals(getUndeliveredOrders_result that) {
25358
      if (that == null)
25359
        return false;
25360
 
25361
      boolean this_present_success = true && this.isSetSuccess();
25362
      boolean that_present_success = true && that.isSetSuccess();
25363
      if (this_present_success || that_present_success) {
25364
        if (!(this_present_success && that_present_success))
25365
          return false;
25366
        if (!this.success.equals(that.success))
25367
          return false;
25368
      }
25369
 
25370
      return true;
25371
    }
25372
 
25373
    @Override
25374
    public int hashCode() {
25375
      return 0;
25376
    }
25377
 
25378
    public int compareTo(getUndeliveredOrders_result other) {
25379
      if (!getClass().equals(other.getClass())) {
25380
        return getClass().getName().compareTo(other.getClass().getName());
25381
      }
25382
 
25383
      int lastComparison = 0;
25384
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
25385
 
25386
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25387
      if (lastComparison != 0) {
25388
        return lastComparison;
25389
      }
25390
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25391
      if (lastComparison != 0) {
25392
        return lastComparison;
25393
      }
25394
      return 0;
25395
    }
25396
 
25397
    public void read(TProtocol iprot) throws TException {
25398
      TField field;
25399
      iprot.readStructBegin();
25400
      while (true)
25401
      {
25402
        field = iprot.readFieldBegin();
25403
        if (field.type == TType.STOP) { 
25404
          break;
25405
        }
25406
        _Fields fieldId = _Fields.findByThriftId(field.id);
25407
        if (fieldId == null) {
25408
          TProtocolUtil.skip(iprot, field.type);
25409
        } else {
25410
          switch (fieldId) {
25411
            case SUCCESS:
25412
              if (field.type == TType.LIST) {
25413
                {
25414
                  TList _list72 = iprot.readListBegin();
25415
                  this.success = new ArrayList<Order>(_list72.size);
25416
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
25417
                  {
25418
                    Order _elem74;
25419
                    _elem74 = new Order();
25420
                    _elem74.read(iprot);
25421
                    this.success.add(_elem74);
25422
                  }
25423
                  iprot.readListEnd();
25424
                }
25425
              } else { 
25426
                TProtocolUtil.skip(iprot, field.type);
25427
              }
25428
              break;
25429
          }
25430
          iprot.readFieldEnd();
25431
        }
25432
      }
25433
      iprot.readStructEnd();
25434
      validate();
25435
    }
25436
 
25437
    public void write(TProtocol oprot) throws TException {
25438
      oprot.writeStructBegin(STRUCT_DESC);
25439
 
25440
      if (this.isSetSuccess()) {
25441
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25442
        {
25443
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
25444
          for (Order _iter75 : this.success)
25445
          {
25446
            _iter75.write(oprot);
25447
          }
25448
          oprot.writeListEnd();
25449
        }
25450
        oprot.writeFieldEnd();
25451
      }
25452
      oprot.writeFieldStop();
25453
      oprot.writeStructEnd();
25454
    }
25455
 
25456
    @Override
25457
    public String toString() {
25458
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
25459
      boolean first = true;
25460
 
25461
      sb.append("success:");
25462
      if (this.success == null) {
25463
        sb.append("null");
25464
      } else {
25465
        sb.append(this.success);
25466
      }
25467
      first = false;
25468
      sb.append(")");
25469
      return sb.toString();
25470
    }
25471
 
25472
    public void validate() throws TException {
25473
      // check for required fields
25474
    }
25475
 
25476
  }
25477
 
305 ashish 25478
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
25479
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
25480
 
483 rajveer 25481
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25482
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
25483
 
483 rajveer 25484
    private long orderId;
305 ashish 25485
    private boolean valid;
25486
 
25487
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25488
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25489
      ORDER_ID((short)1, "orderId"),
305 ashish 25490
      VALID((short)2, "valid");
25491
 
25492
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25493
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25494
 
25495
      static {
25496
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25497
          byId.put((int)field._thriftId, field);
25498
          byName.put(field.getFieldName(), field);
25499
        }
25500
      }
25501
 
25502
      /**
25503
       * Find the _Fields constant that matches fieldId, or null if its not found.
25504
       */
25505
      public static _Fields findByThriftId(int fieldId) {
25506
        return byId.get(fieldId);
25507
      }
25508
 
25509
      /**
25510
       * Find the _Fields constant that matches fieldId, throwing an exception
25511
       * if it is not found.
25512
       */
25513
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25514
        _Fields fields = findByThriftId(fieldId);
25515
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25516
        return fields;
25517
      }
25518
 
25519
      /**
25520
       * Find the _Fields constant that matches name, or null if its not found.
25521
       */
25522
      public static _Fields findByName(String name) {
25523
        return byName.get(name);
25524
      }
25525
 
25526
      private final short _thriftId;
25527
      private final String _fieldName;
25528
 
25529
      _Fields(short thriftId, String fieldName) {
25530
        _thriftId = thriftId;
25531
        _fieldName = fieldName;
25532
      }
25533
 
25534
      public short getThriftFieldId() {
25535
        return _thriftId;
25536
      }
25537
 
25538
      public String getFieldName() {
25539
        return _fieldName;
25540
      }
25541
    }
25542
 
25543
    // isset id assignments
483 rajveer 25544
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25545
    private static final int __VALID_ISSET_ID = 1;
25546
    private BitSet __isset_bit_vector = new BitSet(2);
25547
 
25548
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25549
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25550
          new FieldValueMetaData(TType.I64)));
25551
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
25552
          new FieldValueMetaData(TType.BOOL)));
25553
    }});
25554
 
25555
    static {
25556
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
25557
    }
25558
 
25559
    public getAlerts_args() {
25560
    }
25561
 
25562
    public getAlerts_args(
483 rajveer 25563
      long orderId,
305 ashish 25564
      boolean valid)
25565
    {
25566
      this();
483 rajveer 25567
      this.orderId = orderId;
25568
      setOrderIdIsSet(true);
305 ashish 25569
      this.valid = valid;
25570
      setValidIsSet(true);
25571
    }
25572
 
25573
    /**
25574
     * Performs a deep copy on <i>other</i>.
25575
     */
25576
    public getAlerts_args(getAlerts_args other) {
25577
      __isset_bit_vector.clear();
25578
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25579
      this.orderId = other.orderId;
305 ashish 25580
      this.valid = other.valid;
25581
    }
25582
 
25583
    public getAlerts_args deepCopy() {
25584
      return new getAlerts_args(this);
25585
    }
25586
 
25587
    @Deprecated
25588
    public getAlerts_args clone() {
25589
      return new getAlerts_args(this);
25590
    }
25591
 
483 rajveer 25592
    public long getOrderId() {
25593
      return this.orderId;
305 ashish 25594
    }
25595
 
483 rajveer 25596
    public getAlerts_args setOrderId(long orderId) {
25597
      this.orderId = orderId;
25598
      setOrderIdIsSet(true);
305 ashish 25599
      return this;
25600
    }
25601
 
483 rajveer 25602
    public void unsetOrderId() {
25603
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25604
    }
25605
 
483 rajveer 25606
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25607
    public boolean isSetOrderId() {
25608
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25609
    }
25610
 
483 rajveer 25611
    public void setOrderIdIsSet(boolean value) {
25612
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25613
    }
25614
 
25615
    public boolean isValid() {
25616
      return this.valid;
25617
    }
25618
 
25619
    public getAlerts_args setValid(boolean valid) {
25620
      this.valid = valid;
25621
      setValidIsSet(true);
25622
      return this;
25623
    }
25624
 
25625
    public void unsetValid() {
25626
      __isset_bit_vector.clear(__VALID_ISSET_ID);
25627
    }
25628
 
25629
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
25630
    public boolean isSetValid() {
25631
      return __isset_bit_vector.get(__VALID_ISSET_ID);
25632
    }
25633
 
25634
    public void setValidIsSet(boolean value) {
25635
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
25636
    }
25637
 
25638
    public void setFieldValue(_Fields field, Object value) {
25639
      switch (field) {
483 rajveer 25640
      case ORDER_ID:
305 ashish 25641
        if (value == null) {
483 rajveer 25642
          unsetOrderId();
305 ashish 25643
        } else {
483 rajveer 25644
          setOrderId((Long)value);
305 ashish 25645
        }
25646
        break;
25647
 
25648
      case VALID:
25649
        if (value == null) {
25650
          unsetValid();
25651
        } else {
25652
          setValid((Boolean)value);
25653
        }
25654
        break;
25655
 
25656
      }
25657
    }
25658
 
25659
    public void setFieldValue(int fieldID, Object value) {
25660
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25661
    }
25662
 
25663
    public Object getFieldValue(_Fields field) {
25664
      switch (field) {
483 rajveer 25665
      case ORDER_ID:
25666
        return new Long(getOrderId());
305 ashish 25667
 
25668
      case VALID:
25669
        return new Boolean(isValid());
25670
 
25671
      }
25672
      throw new IllegalStateException();
25673
    }
25674
 
25675
    public Object getFieldValue(int fieldId) {
25676
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25677
    }
25678
 
25679
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25680
    public boolean isSet(_Fields field) {
25681
      switch (field) {
483 rajveer 25682
      case ORDER_ID:
25683
        return isSetOrderId();
305 ashish 25684
      case VALID:
25685
        return isSetValid();
25686
      }
25687
      throw new IllegalStateException();
25688
    }
25689
 
25690
    public boolean isSet(int fieldID) {
25691
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25692
    }
25693
 
25694
    @Override
25695
    public boolean equals(Object that) {
25696
      if (that == null)
25697
        return false;
25698
      if (that instanceof getAlerts_args)
25699
        return this.equals((getAlerts_args)that);
25700
      return false;
25701
    }
25702
 
25703
    public boolean equals(getAlerts_args that) {
25704
      if (that == null)
25705
        return false;
25706
 
483 rajveer 25707
      boolean this_present_orderId = true;
25708
      boolean that_present_orderId = true;
25709
      if (this_present_orderId || that_present_orderId) {
25710
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25711
          return false;
483 rajveer 25712
        if (this.orderId != that.orderId)
305 ashish 25713
          return false;
25714
      }
25715
 
25716
      boolean this_present_valid = true;
25717
      boolean that_present_valid = true;
25718
      if (this_present_valid || that_present_valid) {
25719
        if (!(this_present_valid && that_present_valid))
25720
          return false;
25721
        if (this.valid != that.valid)
25722
          return false;
25723
      }
25724
 
25725
      return true;
25726
    }
25727
 
25728
    @Override
25729
    public int hashCode() {
25730
      return 0;
25731
    }
25732
 
25733
    public int compareTo(getAlerts_args other) {
25734
      if (!getClass().equals(other.getClass())) {
25735
        return getClass().getName().compareTo(other.getClass().getName());
25736
      }
25737
 
25738
      int lastComparison = 0;
25739
      getAlerts_args typedOther = (getAlerts_args)other;
25740
 
483 rajveer 25741
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25742
      if (lastComparison != 0) {
25743
        return lastComparison;
25744
      }
483 rajveer 25745
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25746
      if (lastComparison != 0) {
25747
        return lastComparison;
25748
      }
25749
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
25750
      if (lastComparison != 0) {
25751
        return lastComparison;
25752
      }
25753
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
25754
      if (lastComparison != 0) {
25755
        return lastComparison;
25756
      }
25757
      return 0;
25758
    }
25759
 
25760
    public void read(TProtocol iprot) throws TException {
25761
      TField field;
25762
      iprot.readStructBegin();
25763
      while (true)
25764
      {
25765
        field = iprot.readFieldBegin();
25766
        if (field.type == TType.STOP) { 
25767
          break;
25768
        }
25769
        _Fields fieldId = _Fields.findByThriftId(field.id);
25770
        if (fieldId == null) {
25771
          TProtocolUtil.skip(iprot, field.type);
25772
        } else {
25773
          switch (fieldId) {
483 rajveer 25774
            case ORDER_ID:
305 ashish 25775
              if (field.type == TType.I64) {
483 rajveer 25776
                this.orderId = iprot.readI64();
25777
                setOrderIdIsSet(true);
305 ashish 25778
              } else { 
25779
                TProtocolUtil.skip(iprot, field.type);
25780
              }
25781
              break;
25782
            case VALID:
25783
              if (field.type == TType.BOOL) {
25784
                this.valid = iprot.readBool();
25785
                setValidIsSet(true);
25786
              } else { 
25787
                TProtocolUtil.skip(iprot, field.type);
25788
              }
25789
              break;
25790
          }
25791
          iprot.readFieldEnd();
25792
        }
25793
      }
25794
      iprot.readStructEnd();
25795
      validate();
25796
    }
25797
 
25798
    public void write(TProtocol oprot) throws TException {
25799
      validate();
25800
 
25801
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25802
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25803
      oprot.writeI64(this.orderId);
305 ashish 25804
      oprot.writeFieldEnd();
25805
      oprot.writeFieldBegin(VALID_FIELD_DESC);
25806
      oprot.writeBool(this.valid);
25807
      oprot.writeFieldEnd();
25808
      oprot.writeFieldStop();
25809
      oprot.writeStructEnd();
25810
    }
25811
 
25812
    @Override
25813
    public String toString() {
25814
      StringBuilder sb = new StringBuilder("getAlerts_args(");
25815
      boolean first = true;
25816
 
483 rajveer 25817
      sb.append("orderId:");
25818
      sb.append(this.orderId);
305 ashish 25819
      first = false;
25820
      if (!first) sb.append(", ");
25821
      sb.append("valid:");
25822
      sb.append(this.valid);
25823
      first = false;
25824
      sb.append(")");
25825
      return sb.toString();
25826
    }
25827
 
25828
    public void validate() throws TException {
25829
      // check for required fields
25830
    }
25831
 
25832
  }
25833
 
25834
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
25835
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
25836
 
25837
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25838
 
25839
    private List<Alert> success;
25840
 
25841
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25842
    public enum _Fields implements TFieldIdEnum {
25843
      SUCCESS((short)0, "success");
25844
 
25845
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25846
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25847
 
25848
      static {
25849
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25850
          byId.put((int)field._thriftId, field);
25851
          byName.put(field.getFieldName(), field);
25852
        }
25853
      }
25854
 
25855
      /**
25856
       * Find the _Fields constant that matches fieldId, or null if its not found.
25857
       */
25858
      public static _Fields findByThriftId(int fieldId) {
25859
        return byId.get(fieldId);
25860
      }
25861
 
25862
      /**
25863
       * Find the _Fields constant that matches fieldId, throwing an exception
25864
       * if it is not found.
25865
       */
25866
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25867
        _Fields fields = findByThriftId(fieldId);
25868
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25869
        return fields;
25870
      }
25871
 
25872
      /**
25873
       * Find the _Fields constant that matches name, or null if its not found.
25874
       */
25875
      public static _Fields findByName(String name) {
25876
        return byName.get(name);
25877
      }
25878
 
25879
      private final short _thriftId;
25880
      private final String _fieldName;
25881
 
25882
      _Fields(short thriftId, String fieldName) {
25883
        _thriftId = thriftId;
25884
        _fieldName = fieldName;
25885
      }
25886
 
25887
      public short getThriftFieldId() {
25888
        return _thriftId;
25889
      }
25890
 
25891
      public String getFieldName() {
25892
        return _fieldName;
25893
      }
25894
    }
25895
 
25896
    // isset id assignments
25897
 
25898
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25899
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25900
          new ListMetaData(TType.LIST, 
25901
              new StructMetaData(TType.STRUCT, Alert.class))));
25902
    }});
25903
 
25904
    static {
25905
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
25906
    }
25907
 
25908
    public getAlerts_result() {
25909
    }
25910
 
25911
    public getAlerts_result(
25912
      List<Alert> success)
25913
    {
25914
      this();
25915
      this.success = success;
25916
    }
25917
 
25918
    /**
25919
     * Performs a deep copy on <i>other</i>.
25920
     */
25921
    public getAlerts_result(getAlerts_result other) {
25922
      if (other.isSetSuccess()) {
25923
        List<Alert> __this__success = new ArrayList<Alert>();
25924
        for (Alert other_element : other.success) {
25925
          __this__success.add(new Alert(other_element));
25926
        }
25927
        this.success = __this__success;
25928
      }
25929
    }
25930
 
25931
    public getAlerts_result deepCopy() {
25932
      return new getAlerts_result(this);
25933
    }
25934
 
25935
    @Deprecated
25936
    public getAlerts_result clone() {
25937
      return new getAlerts_result(this);
25938
    }
25939
 
25940
    public int getSuccessSize() {
25941
      return (this.success == null) ? 0 : this.success.size();
25942
    }
25943
 
25944
    public java.util.Iterator<Alert> getSuccessIterator() {
25945
      return (this.success == null) ? null : this.success.iterator();
25946
    }
25947
 
25948
    public void addToSuccess(Alert elem) {
25949
      if (this.success == null) {
25950
        this.success = new ArrayList<Alert>();
25951
      }
25952
      this.success.add(elem);
25953
    }
25954
 
25955
    public List<Alert> getSuccess() {
25956
      return this.success;
25957
    }
25958
 
25959
    public getAlerts_result setSuccess(List<Alert> success) {
25960
      this.success = success;
25961
      return this;
25962
    }
25963
 
25964
    public void unsetSuccess() {
25965
      this.success = null;
25966
    }
25967
 
25968
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25969
    public boolean isSetSuccess() {
25970
      return this.success != null;
25971
    }
25972
 
25973
    public void setSuccessIsSet(boolean value) {
25974
      if (!value) {
25975
        this.success = null;
25976
      }
25977
    }
25978
 
25979
    public void setFieldValue(_Fields field, Object value) {
25980
      switch (field) {
25981
      case SUCCESS:
25982
        if (value == null) {
25983
          unsetSuccess();
25984
        } else {
25985
          setSuccess((List<Alert>)value);
25986
        }
25987
        break;
25988
 
25989
      }
25990
    }
25991
 
25992
    public void setFieldValue(int fieldID, Object value) {
25993
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25994
    }
25995
 
25996
    public Object getFieldValue(_Fields field) {
25997
      switch (field) {
25998
      case SUCCESS:
25999
        return getSuccess();
26000
 
26001
      }
26002
      throw new IllegalStateException();
26003
    }
26004
 
26005
    public Object getFieldValue(int fieldId) {
26006
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26007
    }
26008
 
26009
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26010
    public boolean isSet(_Fields field) {
26011
      switch (field) {
26012
      case SUCCESS:
26013
        return isSetSuccess();
26014
      }
26015
      throw new IllegalStateException();
26016
    }
26017
 
26018
    public boolean isSet(int fieldID) {
26019
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26020
    }
26021
 
26022
    @Override
26023
    public boolean equals(Object that) {
26024
      if (that == null)
26025
        return false;
26026
      if (that instanceof getAlerts_result)
26027
        return this.equals((getAlerts_result)that);
26028
      return false;
26029
    }
26030
 
26031
    public boolean equals(getAlerts_result that) {
26032
      if (that == null)
26033
        return false;
26034
 
26035
      boolean this_present_success = true && this.isSetSuccess();
26036
      boolean that_present_success = true && that.isSetSuccess();
26037
      if (this_present_success || that_present_success) {
26038
        if (!(this_present_success && that_present_success))
26039
          return false;
26040
        if (!this.success.equals(that.success))
26041
          return false;
26042
      }
26043
 
26044
      return true;
26045
    }
26046
 
26047
    @Override
26048
    public int hashCode() {
26049
      return 0;
26050
    }
26051
 
26052
    public int compareTo(getAlerts_result other) {
26053
      if (!getClass().equals(other.getClass())) {
26054
        return getClass().getName().compareTo(other.getClass().getName());
26055
      }
26056
 
26057
      int lastComparison = 0;
26058
      getAlerts_result typedOther = (getAlerts_result)other;
26059
 
26060
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26061
      if (lastComparison != 0) {
26062
        return lastComparison;
26063
      }
26064
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26065
      if (lastComparison != 0) {
26066
        return lastComparison;
26067
      }
26068
      return 0;
26069
    }
26070
 
26071
    public void read(TProtocol iprot) throws TException {
26072
      TField field;
26073
      iprot.readStructBegin();
26074
      while (true)
26075
      {
26076
        field = iprot.readFieldBegin();
26077
        if (field.type == TType.STOP) { 
26078
          break;
26079
        }
26080
        _Fields fieldId = _Fields.findByThriftId(field.id);
26081
        if (fieldId == null) {
26082
          TProtocolUtil.skip(iprot, field.type);
26083
        } else {
26084
          switch (fieldId) {
26085
            case SUCCESS:
26086
              if (field.type == TType.LIST) {
26087
                {
1406 ankur.sing 26088
                  TList _list76 = iprot.readListBegin();
26089
                  this.success = new ArrayList<Alert>(_list76.size);
26090
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 26091
                  {
1406 ankur.sing 26092
                    Alert _elem78;
26093
                    _elem78 = new Alert();
26094
                    _elem78.read(iprot);
26095
                    this.success.add(_elem78);
305 ashish 26096
                  }
26097
                  iprot.readListEnd();
26098
                }
26099
              } else { 
26100
                TProtocolUtil.skip(iprot, field.type);
26101
              }
26102
              break;
26103
          }
26104
          iprot.readFieldEnd();
26105
        }
26106
      }
26107
      iprot.readStructEnd();
26108
      validate();
26109
    }
26110
 
26111
    public void write(TProtocol oprot) throws TException {
26112
      oprot.writeStructBegin(STRUCT_DESC);
26113
 
26114
      if (this.isSetSuccess()) {
26115
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26116
        {
26117
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 26118
          for (Alert _iter79 : this.success)
305 ashish 26119
          {
1406 ankur.sing 26120
            _iter79.write(oprot);
305 ashish 26121
          }
26122
          oprot.writeListEnd();
26123
        }
26124
        oprot.writeFieldEnd();
26125
      }
26126
      oprot.writeFieldStop();
26127
      oprot.writeStructEnd();
26128
    }
26129
 
26130
    @Override
26131
    public String toString() {
26132
      StringBuilder sb = new StringBuilder("getAlerts_result(");
26133
      boolean first = true;
26134
 
26135
      sb.append("success:");
26136
      if (this.success == null) {
26137
        sb.append("null");
26138
      } else {
26139
        sb.append(this.success);
26140
      }
26141
      first = false;
26142
      sb.append(")");
26143
      return sb.toString();
26144
    }
26145
 
26146
    public void validate() throws TException {
26147
      // check for required fields
26148
    }
26149
 
26150
  }
26151
 
26152
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
26153
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
26154
 
483 rajveer 26155
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 26156
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
26157
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
26158
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
26159
 
483 rajveer 26160
    private long orderId;
305 ashish 26161
    private boolean unset;
26162
    private long type;
26163
    private String comment;
26164
 
26165
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26166
    public enum _Fields implements TFieldIdEnum {
483 rajveer 26167
      ORDER_ID((short)1, "orderId"),
305 ashish 26168
      UNSET((short)2, "unset"),
26169
      TYPE((short)3, "type"),
26170
      COMMENT((short)4, "comment");
26171
 
26172
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26173
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26174
 
26175
      static {
26176
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26177
          byId.put((int)field._thriftId, field);
26178
          byName.put(field.getFieldName(), field);
26179
        }
26180
      }
26181
 
26182
      /**
26183
       * Find the _Fields constant that matches fieldId, or null if its not found.
26184
       */
26185
      public static _Fields findByThriftId(int fieldId) {
26186
        return byId.get(fieldId);
26187
      }
26188
 
26189
      /**
26190
       * Find the _Fields constant that matches fieldId, throwing an exception
26191
       * if it is not found.
26192
       */
26193
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26194
        _Fields fields = findByThriftId(fieldId);
26195
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26196
        return fields;
26197
      }
26198
 
26199
      /**
26200
       * Find the _Fields constant that matches name, or null if its not found.
26201
       */
26202
      public static _Fields findByName(String name) {
26203
        return byName.get(name);
26204
      }
26205
 
26206
      private final short _thriftId;
26207
      private final String _fieldName;
26208
 
26209
      _Fields(short thriftId, String fieldName) {
26210
        _thriftId = thriftId;
26211
        _fieldName = fieldName;
26212
      }
26213
 
26214
      public short getThriftFieldId() {
26215
        return _thriftId;
26216
      }
26217
 
26218
      public String getFieldName() {
26219
        return _fieldName;
26220
      }
26221
    }
26222
 
26223
    // isset id assignments
483 rajveer 26224
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 26225
    private static final int __UNSET_ISSET_ID = 1;
26226
    private static final int __TYPE_ISSET_ID = 2;
26227
    private BitSet __isset_bit_vector = new BitSet(3);
26228
 
26229
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 26230
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 26231
          new FieldValueMetaData(TType.I64)));
26232
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
26233
          new FieldValueMetaData(TType.BOOL)));
26234
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
26235
          new FieldValueMetaData(TType.I64)));
26236
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
26237
          new FieldValueMetaData(TType.STRING)));
26238
    }});
26239
 
26240
    static {
26241
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
26242
    }
26243
 
26244
    public setAlert_args() {
26245
    }
26246
 
26247
    public setAlert_args(
483 rajveer 26248
      long orderId,
305 ashish 26249
      boolean unset,
26250
      long type,
26251
      String comment)
26252
    {
26253
      this();
483 rajveer 26254
      this.orderId = orderId;
26255
      setOrderIdIsSet(true);
305 ashish 26256
      this.unset = unset;
26257
      setUnsetIsSet(true);
26258
      this.type = type;
26259
      setTypeIsSet(true);
26260
      this.comment = comment;
26261
    }
26262
 
26263
    /**
26264
     * Performs a deep copy on <i>other</i>.
26265
     */
26266
    public setAlert_args(setAlert_args other) {
26267
      __isset_bit_vector.clear();
26268
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 26269
      this.orderId = other.orderId;
305 ashish 26270
      this.unset = other.unset;
26271
      this.type = other.type;
26272
      if (other.isSetComment()) {
26273
        this.comment = other.comment;
26274
      }
26275
    }
26276
 
26277
    public setAlert_args deepCopy() {
26278
      return new setAlert_args(this);
26279
    }
26280
 
26281
    @Deprecated
26282
    public setAlert_args clone() {
26283
      return new setAlert_args(this);
26284
    }
26285
 
483 rajveer 26286
    public long getOrderId() {
26287
      return this.orderId;
305 ashish 26288
    }
26289
 
483 rajveer 26290
    public setAlert_args setOrderId(long orderId) {
26291
      this.orderId = orderId;
26292
      setOrderIdIsSet(true);
305 ashish 26293
      return this;
26294
    }
26295
 
483 rajveer 26296
    public void unsetOrderId() {
26297
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 26298
    }
26299
 
483 rajveer 26300
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
26301
    public boolean isSetOrderId() {
26302
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 26303
    }
26304
 
483 rajveer 26305
    public void setOrderIdIsSet(boolean value) {
26306
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 26307
    }
26308
 
26309
    public boolean isUnset() {
26310
      return this.unset;
26311
    }
26312
 
26313
    public setAlert_args setUnset(boolean unset) {
26314
      this.unset = unset;
26315
      setUnsetIsSet(true);
26316
      return this;
26317
    }
26318
 
26319
    public void unsetUnset() {
26320
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
26321
    }
26322
 
26323
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
26324
    public boolean isSetUnset() {
26325
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
26326
    }
26327
 
26328
    public void setUnsetIsSet(boolean value) {
26329
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
26330
    }
26331
 
26332
    public long getType() {
26333
      return this.type;
26334
    }
26335
 
26336
    public setAlert_args setType(long type) {
26337
      this.type = type;
26338
      setTypeIsSet(true);
26339
      return this;
26340
    }
26341
 
26342
    public void unsetType() {
26343
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
26344
    }
26345
 
26346
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
26347
    public boolean isSetType() {
26348
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
26349
    }
26350
 
26351
    public void setTypeIsSet(boolean value) {
26352
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
26353
    }
26354
 
26355
    public String getComment() {
26356
      return this.comment;
26357
    }
26358
 
26359
    public setAlert_args setComment(String comment) {
26360
      this.comment = comment;
26361
      return this;
26362
    }
26363
 
26364
    public void unsetComment() {
26365
      this.comment = null;
26366
    }
26367
 
26368
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
26369
    public boolean isSetComment() {
26370
      return this.comment != null;
26371
    }
26372
 
26373
    public void setCommentIsSet(boolean value) {
26374
      if (!value) {
26375
        this.comment = null;
26376
      }
26377
    }
26378
 
26379
    public void setFieldValue(_Fields field, Object value) {
26380
      switch (field) {
483 rajveer 26381
      case ORDER_ID:
305 ashish 26382
        if (value == null) {
483 rajveer 26383
          unsetOrderId();
305 ashish 26384
        } else {
483 rajveer 26385
          setOrderId((Long)value);
305 ashish 26386
        }
26387
        break;
26388
 
26389
      case UNSET:
26390
        if (value == null) {
26391
          unsetUnset();
26392
        } else {
26393
          setUnset((Boolean)value);
26394
        }
26395
        break;
26396
 
26397
      case TYPE:
26398
        if (value == null) {
26399
          unsetType();
26400
        } else {
26401
          setType((Long)value);
26402
        }
26403
        break;
26404
 
26405
      case COMMENT:
26406
        if (value == null) {
26407
          unsetComment();
26408
        } else {
26409
          setComment((String)value);
26410
        }
26411
        break;
26412
 
26413
      }
26414
    }
26415
 
26416
    public void setFieldValue(int fieldID, Object value) {
26417
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26418
    }
26419
 
26420
    public Object getFieldValue(_Fields field) {
26421
      switch (field) {
483 rajveer 26422
      case ORDER_ID:
26423
        return new Long(getOrderId());
305 ashish 26424
 
26425
      case UNSET:
26426
        return new Boolean(isUnset());
26427
 
26428
      case TYPE:
26429
        return new Long(getType());
26430
 
26431
      case COMMENT:
26432
        return getComment();
26433
 
26434
      }
26435
      throw new IllegalStateException();
26436
    }
26437
 
26438
    public Object getFieldValue(int fieldId) {
26439
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26440
    }
26441
 
26442
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26443
    public boolean isSet(_Fields field) {
26444
      switch (field) {
483 rajveer 26445
      case ORDER_ID:
26446
        return isSetOrderId();
305 ashish 26447
      case UNSET:
26448
        return isSetUnset();
26449
      case TYPE:
26450
        return isSetType();
26451
      case COMMENT:
26452
        return isSetComment();
26453
      }
26454
      throw new IllegalStateException();
26455
    }
26456
 
26457
    public boolean isSet(int fieldID) {
26458
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26459
    }
26460
 
26461
    @Override
26462
    public boolean equals(Object that) {
26463
      if (that == null)
26464
        return false;
26465
      if (that instanceof setAlert_args)
26466
        return this.equals((setAlert_args)that);
26467
      return false;
26468
    }
26469
 
26470
    public boolean equals(setAlert_args that) {
26471
      if (that == null)
26472
        return false;
26473
 
483 rajveer 26474
      boolean this_present_orderId = true;
26475
      boolean that_present_orderId = true;
26476
      if (this_present_orderId || that_present_orderId) {
26477
        if (!(this_present_orderId && that_present_orderId))
305 ashish 26478
          return false;
483 rajveer 26479
        if (this.orderId != that.orderId)
305 ashish 26480
          return false;
26481
      }
26482
 
26483
      boolean this_present_unset = true;
26484
      boolean that_present_unset = true;
26485
      if (this_present_unset || that_present_unset) {
26486
        if (!(this_present_unset && that_present_unset))
26487
          return false;
26488
        if (this.unset != that.unset)
26489
          return false;
26490
      }
26491
 
26492
      boolean this_present_type = true;
26493
      boolean that_present_type = true;
26494
      if (this_present_type || that_present_type) {
26495
        if (!(this_present_type && that_present_type))
26496
          return false;
26497
        if (this.type != that.type)
26498
          return false;
26499
      }
26500
 
26501
      boolean this_present_comment = true && this.isSetComment();
26502
      boolean that_present_comment = true && that.isSetComment();
26503
      if (this_present_comment || that_present_comment) {
26504
        if (!(this_present_comment && that_present_comment))
26505
          return false;
26506
        if (!this.comment.equals(that.comment))
26507
          return false;
26508
      }
26509
 
26510
      return true;
26511
    }
26512
 
26513
    @Override
26514
    public int hashCode() {
26515
      return 0;
26516
    }
26517
 
26518
    public int compareTo(setAlert_args other) {
26519
      if (!getClass().equals(other.getClass())) {
26520
        return getClass().getName().compareTo(other.getClass().getName());
26521
      }
26522
 
26523
      int lastComparison = 0;
26524
      setAlert_args typedOther = (setAlert_args)other;
26525
 
483 rajveer 26526
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 26527
      if (lastComparison != 0) {
26528
        return lastComparison;
26529
      }
483 rajveer 26530
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 26531
      if (lastComparison != 0) {
26532
        return lastComparison;
26533
      }
26534
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
26535
      if (lastComparison != 0) {
26536
        return lastComparison;
26537
      }
26538
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
26539
      if (lastComparison != 0) {
26540
        return lastComparison;
26541
      }
26542
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
26543
      if (lastComparison != 0) {
26544
        return lastComparison;
26545
      }
26546
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
26547
      if (lastComparison != 0) {
26548
        return lastComparison;
26549
      }
26550
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
26551
      if (lastComparison != 0) {
26552
        return lastComparison;
26553
      }
26554
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
26555
      if (lastComparison != 0) {
26556
        return lastComparison;
26557
      }
26558
      return 0;
26559
    }
26560
 
26561
    public void read(TProtocol iprot) throws TException {
26562
      TField field;
26563
      iprot.readStructBegin();
26564
      while (true)
26565
      {
26566
        field = iprot.readFieldBegin();
26567
        if (field.type == TType.STOP) { 
26568
          break;
26569
        }
26570
        _Fields fieldId = _Fields.findByThriftId(field.id);
26571
        if (fieldId == null) {
26572
          TProtocolUtil.skip(iprot, field.type);
26573
        } else {
26574
          switch (fieldId) {
483 rajveer 26575
            case ORDER_ID:
305 ashish 26576
              if (field.type == TType.I64) {
483 rajveer 26577
                this.orderId = iprot.readI64();
26578
                setOrderIdIsSet(true);
305 ashish 26579
              } else { 
26580
                TProtocolUtil.skip(iprot, field.type);
26581
              }
26582
              break;
26583
            case UNSET:
26584
              if (field.type == TType.BOOL) {
26585
                this.unset = iprot.readBool();
26586
                setUnsetIsSet(true);
26587
              } else { 
26588
                TProtocolUtil.skip(iprot, field.type);
26589
              }
26590
              break;
26591
            case TYPE:
26592
              if (field.type == TType.I64) {
26593
                this.type = iprot.readI64();
26594
                setTypeIsSet(true);
26595
              } else { 
26596
                TProtocolUtil.skip(iprot, field.type);
26597
              }
26598
              break;
26599
            case COMMENT:
26600
              if (field.type == TType.STRING) {
26601
                this.comment = iprot.readString();
26602
              } else { 
26603
                TProtocolUtil.skip(iprot, field.type);
26604
              }
26605
              break;
26606
          }
26607
          iprot.readFieldEnd();
26608
        }
26609
      }
26610
      iprot.readStructEnd();
26611
      validate();
26612
    }
26613
 
26614
    public void write(TProtocol oprot) throws TException {
26615
      validate();
26616
 
26617
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 26618
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
26619
      oprot.writeI64(this.orderId);
305 ashish 26620
      oprot.writeFieldEnd();
26621
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
26622
      oprot.writeBool(this.unset);
26623
      oprot.writeFieldEnd();
26624
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
26625
      oprot.writeI64(this.type);
26626
      oprot.writeFieldEnd();
26627
      if (this.comment != null) {
26628
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
26629
        oprot.writeString(this.comment);
26630
        oprot.writeFieldEnd();
26631
      }
26632
      oprot.writeFieldStop();
26633
      oprot.writeStructEnd();
26634
    }
26635
 
26636
    @Override
26637
    public String toString() {
26638
      StringBuilder sb = new StringBuilder("setAlert_args(");
26639
      boolean first = true;
26640
 
483 rajveer 26641
      sb.append("orderId:");
26642
      sb.append(this.orderId);
305 ashish 26643
      first = false;
26644
      if (!first) sb.append(", ");
26645
      sb.append("unset:");
26646
      sb.append(this.unset);
26647
      first = false;
26648
      if (!first) sb.append(", ");
26649
      sb.append("type:");
26650
      sb.append(this.type);
26651
      first = false;
26652
      if (!first) sb.append(", ");
26653
      sb.append("comment:");
26654
      if (this.comment == null) {
26655
        sb.append("null");
26656
      } else {
26657
        sb.append(this.comment);
26658
      }
26659
      first = false;
26660
      sb.append(")");
26661
      return sb.toString();
26662
    }
26663
 
26664
    public void validate() throws TException {
26665
      // check for required fields
26666
    }
26667
 
26668
  }
26669
 
26670
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
26671
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
26672
 
26673
 
26674
 
26675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26676
    public enum _Fields implements TFieldIdEnum {
26677
;
26678
 
26679
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26681
 
26682
      static {
26683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26684
          byId.put((int)field._thriftId, field);
26685
          byName.put(field.getFieldName(), field);
26686
        }
26687
      }
26688
 
26689
      /**
26690
       * Find the _Fields constant that matches fieldId, or null if its not found.
26691
       */
26692
      public static _Fields findByThriftId(int fieldId) {
26693
        return byId.get(fieldId);
26694
      }
26695
 
26696
      /**
26697
       * Find the _Fields constant that matches fieldId, throwing an exception
26698
       * if it is not found.
26699
       */
26700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26701
        _Fields fields = findByThriftId(fieldId);
26702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26703
        return fields;
26704
      }
26705
 
26706
      /**
26707
       * Find the _Fields constant that matches name, or null if its not found.
26708
       */
26709
      public static _Fields findByName(String name) {
26710
        return byName.get(name);
26711
      }
26712
 
26713
      private final short _thriftId;
26714
      private final String _fieldName;
26715
 
26716
      _Fields(short thriftId, String fieldName) {
26717
        _thriftId = thriftId;
26718
        _fieldName = fieldName;
26719
      }
26720
 
26721
      public short getThriftFieldId() {
26722
        return _thriftId;
26723
      }
26724
 
26725
      public String getFieldName() {
26726
        return _fieldName;
26727
      }
26728
    }
26729
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26730
    }});
26731
 
26732
    static {
26733
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
26734
    }
26735
 
26736
    public setAlert_result() {
26737
    }
26738
 
26739
    /**
26740
     * Performs a deep copy on <i>other</i>.
26741
     */
26742
    public setAlert_result(setAlert_result other) {
26743
    }
26744
 
26745
    public setAlert_result deepCopy() {
26746
      return new setAlert_result(this);
26747
    }
26748
 
26749
    @Deprecated
26750
    public setAlert_result clone() {
26751
      return new setAlert_result(this);
26752
    }
26753
 
26754
    public void setFieldValue(_Fields field, Object value) {
26755
      switch (field) {
26756
      }
26757
    }
26758
 
26759
    public void setFieldValue(int fieldID, Object value) {
26760
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26761
    }
26762
 
26763
    public Object getFieldValue(_Fields field) {
26764
      switch (field) {
26765
      }
26766
      throw new IllegalStateException();
26767
    }
26768
 
26769
    public Object getFieldValue(int fieldId) {
26770
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26771
    }
26772
 
26773
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26774
    public boolean isSet(_Fields field) {
26775
      switch (field) {
26776
      }
26777
      throw new IllegalStateException();
26778
    }
26779
 
26780
    public boolean isSet(int fieldID) {
26781
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26782
    }
26783
 
26784
    @Override
26785
    public boolean equals(Object that) {
26786
      if (that == null)
26787
        return false;
26788
      if (that instanceof setAlert_result)
26789
        return this.equals((setAlert_result)that);
26790
      return false;
26791
    }
26792
 
26793
    public boolean equals(setAlert_result that) {
26794
      if (that == null)
26795
        return false;
26796
 
26797
      return true;
26798
    }
26799
 
26800
    @Override
26801
    public int hashCode() {
26802
      return 0;
26803
    }
26804
 
26805
    public int compareTo(setAlert_result other) {
26806
      if (!getClass().equals(other.getClass())) {
26807
        return getClass().getName().compareTo(other.getClass().getName());
26808
      }
26809
 
26810
      int lastComparison = 0;
26811
      setAlert_result typedOther = (setAlert_result)other;
26812
 
26813
      return 0;
26814
    }
26815
 
26816
    public void read(TProtocol iprot) throws TException {
26817
      TField field;
26818
      iprot.readStructBegin();
26819
      while (true)
26820
      {
26821
        field = iprot.readFieldBegin();
26822
        if (field.type == TType.STOP) { 
26823
          break;
26824
        }
26825
        _Fields fieldId = _Fields.findByThriftId(field.id);
26826
        if (fieldId == null) {
26827
          TProtocolUtil.skip(iprot, field.type);
26828
        } else {
26829
          switch (fieldId) {
26830
          }
26831
          iprot.readFieldEnd();
26832
        }
26833
      }
26834
      iprot.readStructEnd();
26835
      validate();
26836
    }
26837
 
26838
    public void write(TProtocol oprot) throws TException {
26839
      oprot.writeStructBegin(STRUCT_DESC);
26840
 
26841
      oprot.writeFieldStop();
26842
      oprot.writeStructEnd();
26843
    }
26844
 
26845
    @Override
26846
    public String toString() {
26847
      StringBuilder sb = new StringBuilder("setAlert_result(");
26848
      boolean first = true;
26849
 
26850
      sb.append(")");
26851
      return sb.toString();
26852
    }
26853
 
26854
    public void validate() throws TException {
26855
      // check for required fields
26856
    }
26857
 
26858
  }
26859
 
1598 ankur.sing 26860
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
26861
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
26862
 
26863
 
26864
 
26865
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26866
    public enum _Fields implements TFieldIdEnum {
26867
;
26868
 
26869
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26870
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26871
 
26872
      static {
26873
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26874
          byId.put((int)field._thriftId, field);
26875
          byName.put(field.getFieldName(), field);
26876
        }
26877
      }
26878
 
26879
      /**
26880
       * Find the _Fields constant that matches fieldId, or null if its not found.
26881
       */
26882
      public static _Fields findByThriftId(int fieldId) {
26883
        return byId.get(fieldId);
26884
      }
26885
 
26886
      /**
26887
       * Find the _Fields constant that matches fieldId, throwing an exception
26888
       * if it is not found.
26889
       */
26890
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26891
        _Fields fields = findByThriftId(fieldId);
26892
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26893
        return fields;
26894
      }
26895
 
26896
      /**
26897
       * Find the _Fields constant that matches name, or null if its not found.
26898
       */
26899
      public static _Fields findByName(String name) {
26900
        return byName.get(name);
26901
      }
26902
 
26903
      private final short _thriftId;
26904
      private final String _fieldName;
26905
 
26906
      _Fields(short thriftId, String fieldName) {
26907
        _thriftId = thriftId;
26908
        _fieldName = fieldName;
26909
      }
26910
 
26911
      public short getThriftFieldId() {
26912
        return _thriftId;
26913
      }
26914
 
26915
      public String getFieldName() {
26916
        return _fieldName;
26917
      }
26918
    }
26919
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26920
    }});
26921
 
26922
    static {
26923
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
26924
    }
26925
 
26926
    public getValidOrderCount_args() {
26927
    }
26928
 
26929
    /**
26930
     * Performs a deep copy on <i>other</i>.
26931
     */
26932
    public getValidOrderCount_args(getValidOrderCount_args other) {
26933
    }
26934
 
26935
    public getValidOrderCount_args deepCopy() {
26936
      return new getValidOrderCount_args(this);
26937
    }
26938
 
26939
    @Deprecated
26940
    public getValidOrderCount_args clone() {
26941
      return new getValidOrderCount_args(this);
26942
    }
26943
 
26944
    public void setFieldValue(_Fields field, Object value) {
26945
      switch (field) {
26946
      }
26947
    }
26948
 
26949
    public void setFieldValue(int fieldID, Object value) {
26950
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26951
    }
26952
 
26953
    public Object getFieldValue(_Fields field) {
26954
      switch (field) {
26955
      }
26956
      throw new IllegalStateException();
26957
    }
26958
 
26959
    public Object getFieldValue(int fieldId) {
26960
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26961
    }
26962
 
26963
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26964
    public boolean isSet(_Fields field) {
26965
      switch (field) {
26966
      }
26967
      throw new IllegalStateException();
26968
    }
26969
 
26970
    public boolean isSet(int fieldID) {
26971
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26972
    }
26973
 
26974
    @Override
26975
    public boolean equals(Object that) {
26976
      if (that == null)
26977
        return false;
26978
      if (that instanceof getValidOrderCount_args)
26979
        return this.equals((getValidOrderCount_args)that);
26980
      return false;
26981
    }
26982
 
26983
    public boolean equals(getValidOrderCount_args that) {
26984
      if (that == null)
26985
        return false;
26986
 
26987
      return true;
26988
    }
26989
 
26990
    @Override
26991
    public int hashCode() {
26992
      return 0;
26993
    }
26994
 
26995
    public int compareTo(getValidOrderCount_args other) {
26996
      if (!getClass().equals(other.getClass())) {
26997
        return getClass().getName().compareTo(other.getClass().getName());
26998
      }
26999
 
27000
      int lastComparison = 0;
27001
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
27002
 
27003
      return 0;
27004
    }
27005
 
27006
    public void read(TProtocol iprot) throws TException {
27007
      TField field;
27008
      iprot.readStructBegin();
27009
      while (true)
27010
      {
27011
        field = iprot.readFieldBegin();
27012
        if (field.type == TType.STOP) { 
27013
          break;
27014
        }
27015
        _Fields fieldId = _Fields.findByThriftId(field.id);
27016
        if (fieldId == null) {
27017
          TProtocolUtil.skip(iprot, field.type);
27018
        } else {
27019
          switch (fieldId) {
27020
          }
27021
          iprot.readFieldEnd();
27022
        }
27023
      }
27024
      iprot.readStructEnd();
27025
      validate();
27026
    }
27027
 
27028
    public void write(TProtocol oprot) throws TException {
27029
      validate();
27030
 
27031
      oprot.writeStructBegin(STRUCT_DESC);
27032
      oprot.writeFieldStop();
27033
      oprot.writeStructEnd();
27034
    }
27035
 
27036
    @Override
27037
    public String toString() {
27038
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
27039
      boolean first = true;
27040
 
27041
      sb.append(")");
27042
      return sb.toString();
27043
    }
27044
 
27045
    public void validate() throws TException {
27046
      // check for required fields
27047
    }
27048
 
27049
  }
27050
 
27051
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
27052
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
27053
 
27054
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
27055
 
27056
    private long success;
27057
 
27058
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27059
    public enum _Fields implements TFieldIdEnum {
27060
      SUCCESS((short)0, "success");
27061
 
27062
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27063
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27064
 
27065
      static {
27066
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27067
          byId.put((int)field._thriftId, field);
27068
          byName.put(field.getFieldName(), field);
27069
        }
27070
      }
27071
 
27072
      /**
27073
       * Find the _Fields constant that matches fieldId, or null if its not found.
27074
       */
27075
      public static _Fields findByThriftId(int fieldId) {
27076
        return byId.get(fieldId);
27077
      }
27078
 
27079
      /**
27080
       * Find the _Fields constant that matches fieldId, throwing an exception
27081
       * if it is not found.
27082
       */
27083
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27084
        _Fields fields = findByThriftId(fieldId);
27085
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27086
        return fields;
27087
      }
27088
 
27089
      /**
27090
       * Find the _Fields constant that matches name, or null if its not found.
27091
       */
27092
      public static _Fields findByName(String name) {
27093
        return byName.get(name);
27094
      }
27095
 
27096
      private final short _thriftId;
27097
      private final String _fieldName;
27098
 
27099
      _Fields(short thriftId, String fieldName) {
27100
        _thriftId = thriftId;
27101
        _fieldName = fieldName;
27102
      }
27103
 
27104
      public short getThriftFieldId() {
27105
        return _thriftId;
27106
      }
27107
 
27108
      public String getFieldName() {
27109
        return _fieldName;
27110
      }
27111
    }
27112
 
27113
    // isset id assignments
27114
    private static final int __SUCCESS_ISSET_ID = 0;
27115
    private BitSet __isset_bit_vector = new BitSet(1);
27116
 
27117
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27118
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27119
          new FieldValueMetaData(TType.I64)));
27120
    }});
27121
 
27122
    static {
27123
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
27124
    }
27125
 
27126
    public getValidOrderCount_result() {
27127
    }
27128
 
27129
    public getValidOrderCount_result(
27130
      long success)
27131
    {
27132
      this();
27133
      this.success = success;
27134
      setSuccessIsSet(true);
27135
    }
27136
 
27137
    /**
27138
     * Performs a deep copy on <i>other</i>.
27139
     */
27140
    public getValidOrderCount_result(getValidOrderCount_result other) {
27141
      __isset_bit_vector.clear();
27142
      __isset_bit_vector.or(other.__isset_bit_vector);
27143
      this.success = other.success;
27144
    }
27145
 
27146
    public getValidOrderCount_result deepCopy() {
27147
      return new getValidOrderCount_result(this);
27148
    }
27149
 
27150
    @Deprecated
27151
    public getValidOrderCount_result clone() {
27152
      return new getValidOrderCount_result(this);
27153
    }
27154
 
27155
    public long getSuccess() {
27156
      return this.success;
27157
    }
27158
 
27159
    public getValidOrderCount_result setSuccess(long success) {
27160
      this.success = success;
27161
      setSuccessIsSet(true);
27162
      return this;
27163
    }
27164
 
27165
    public void unsetSuccess() {
27166
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27167
    }
27168
 
27169
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27170
    public boolean isSetSuccess() {
27171
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27172
    }
27173
 
27174
    public void setSuccessIsSet(boolean value) {
27175
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27176
    }
27177
 
27178
    public void setFieldValue(_Fields field, Object value) {
27179
      switch (field) {
27180
      case SUCCESS:
27181
        if (value == null) {
27182
          unsetSuccess();
27183
        } else {
27184
          setSuccess((Long)value);
27185
        }
27186
        break;
27187
 
27188
      }
27189
    }
27190
 
27191
    public void setFieldValue(int fieldID, Object value) {
27192
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27193
    }
27194
 
27195
    public Object getFieldValue(_Fields field) {
27196
      switch (field) {
27197
      case SUCCESS:
27198
        return new Long(getSuccess());
27199
 
27200
      }
27201
      throw new IllegalStateException();
27202
    }
27203
 
27204
    public Object getFieldValue(int fieldId) {
27205
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27206
    }
27207
 
27208
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27209
    public boolean isSet(_Fields field) {
27210
      switch (field) {
27211
      case SUCCESS:
27212
        return isSetSuccess();
27213
      }
27214
      throw new IllegalStateException();
27215
    }
27216
 
27217
    public boolean isSet(int fieldID) {
27218
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27219
    }
27220
 
27221
    @Override
27222
    public boolean equals(Object that) {
27223
      if (that == null)
27224
        return false;
27225
      if (that instanceof getValidOrderCount_result)
27226
        return this.equals((getValidOrderCount_result)that);
27227
      return false;
27228
    }
27229
 
27230
    public boolean equals(getValidOrderCount_result that) {
27231
      if (that == null)
27232
        return false;
27233
 
27234
      boolean this_present_success = true;
27235
      boolean that_present_success = true;
27236
      if (this_present_success || that_present_success) {
27237
        if (!(this_present_success && that_present_success))
27238
          return false;
27239
        if (this.success != that.success)
27240
          return false;
27241
      }
27242
 
27243
      return true;
27244
    }
27245
 
27246
    @Override
27247
    public int hashCode() {
27248
      return 0;
27249
    }
27250
 
27251
    public int compareTo(getValidOrderCount_result other) {
27252
      if (!getClass().equals(other.getClass())) {
27253
        return getClass().getName().compareTo(other.getClass().getName());
27254
      }
27255
 
27256
      int lastComparison = 0;
27257
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
27258
 
27259
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27260
      if (lastComparison != 0) {
27261
        return lastComparison;
27262
      }
27263
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27264
      if (lastComparison != 0) {
27265
        return lastComparison;
27266
      }
27267
      return 0;
27268
    }
27269
 
27270
    public void read(TProtocol iprot) throws TException {
27271
      TField field;
27272
      iprot.readStructBegin();
27273
      while (true)
27274
      {
27275
        field = iprot.readFieldBegin();
27276
        if (field.type == TType.STOP) { 
27277
          break;
27278
        }
27279
        _Fields fieldId = _Fields.findByThriftId(field.id);
27280
        if (fieldId == null) {
27281
          TProtocolUtil.skip(iprot, field.type);
27282
        } else {
27283
          switch (fieldId) {
27284
            case SUCCESS:
27285
              if (field.type == TType.I64) {
27286
                this.success = iprot.readI64();
27287
                setSuccessIsSet(true);
27288
              } else { 
27289
                TProtocolUtil.skip(iprot, field.type);
27290
              }
27291
              break;
27292
          }
27293
          iprot.readFieldEnd();
27294
        }
27295
      }
27296
      iprot.readStructEnd();
27297
      validate();
27298
    }
27299
 
27300
    public void write(TProtocol oprot) throws TException {
27301
      oprot.writeStructBegin(STRUCT_DESC);
27302
 
27303
      if (this.isSetSuccess()) {
27304
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27305
        oprot.writeI64(this.success);
27306
        oprot.writeFieldEnd();
27307
      }
27308
      oprot.writeFieldStop();
27309
      oprot.writeStructEnd();
27310
    }
27311
 
27312
    @Override
27313
    public String toString() {
27314
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
27315
      boolean first = true;
27316
 
27317
      sb.append("success:");
27318
      sb.append(this.success);
27319
      first = false;
27320
      sb.append(")");
27321
      return sb.toString();
27322
    }
27323
 
27324
    public void validate() throws TException {
27325
      // check for required fields
27326
    }
27327
 
27328
  }
27329
 
1629 ankur.sing 27330
  public static class getNoOfCustomersWithSuccessfulTransaction_args implements TBase<getNoOfCustomersWithSuccessfulTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_args>   {
27331
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_args");
27332
 
27333
 
27334
 
27335
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27336
    public enum _Fields implements TFieldIdEnum {
27337
;
27338
 
27339
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27340
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27341
 
27342
      static {
27343
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27344
          byId.put((int)field._thriftId, field);
27345
          byName.put(field.getFieldName(), field);
27346
        }
27347
      }
27348
 
27349
      /**
27350
       * Find the _Fields constant that matches fieldId, or null if its not found.
27351
       */
27352
      public static _Fields findByThriftId(int fieldId) {
27353
        return byId.get(fieldId);
27354
      }
27355
 
27356
      /**
27357
       * Find the _Fields constant that matches fieldId, throwing an exception
27358
       * if it is not found.
27359
       */
27360
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27361
        _Fields fields = findByThriftId(fieldId);
27362
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27363
        return fields;
27364
      }
27365
 
27366
      /**
27367
       * Find the _Fields constant that matches name, or null if its not found.
27368
       */
27369
      public static _Fields findByName(String name) {
27370
        return byName.get(name);
27371
      }
27372
 
27373
      private final short _thriftId;
27374
      private final String _fieldName;
27375
 
27376
      _Fields(short thriftId, String fieldName) {
27377
        _thriftId = thriftId;
27378
        _fieldName = fieldName;
27379
      }
27380
 
27381
      public short getThriftFieldId() {
27382
        return _thriftId;
27383
      }
27384
 
27385
      public String getFieldName() {
27386
        return _fieldName;
27387
      }
27388
    }
27389
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27390
    }});
27391
 
27392
    static {
27393
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_args.class, metaDataMap);
27394
    }
27395
 
27396
    public getNoOfCustomersWithSuccessfulTransaction_args() {
27397
    }
27398
 
27399
    /**
27400
     * Performs a deep copy on <i>other</i>.
27401
     */
27402
    public getNoOfCustomersWithSuccessfulTransaction_args(getNoOfCustomersWithSuccessfulTransaction_args other) {
27403
    }
27404
 
27405
    public getNoOfCustomersWithSuccessfulTransaction_args deepCopy() {
27406
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27407
    }
27408
 
27409
    @Deprecated
27410
    public getNoOfCustomersWithSuccessfulTransaction_args clone() {
27411
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27412
    }
27413
 
27414
    public void setFieldValue(_Fields field, Object value) {
27415
      switch (field) {
27416
      }
27417
    }
27418
 
27419
    public void setFieldValue(int fieldID, Object value) {
27420
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27421
    }
27422
 
27423
    public Object getFieldValue(_Fields field) {
27424
      switch (field) {
27425
      }
27426
      throw new IllegalStateException();
27427
    }
27428
 
27429
    public Object getFieldValue(int fieldId) {
27430
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27431
    }
27432
 
27433
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27434
    public boolean isSet(_Fields field) {
27435
      switch (field) {
27436
      }
27437
      throw new IllegalStateException();
27438
    }
27439
 
27440
    public boolean isSet(int fieldID) {
27441
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27442
    }
27443
 
27444
    @Override
27445
    public boolean equals(Object that) {
27446
      if (that == null)
27447
        return false;
27448
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_args)
27449
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_args)that);
27450
      return false;
27451
    }
27452
 
27453
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_args that) {
27454
      if (that == null)
27455
        return false;
27456
 
27457
      return true;
27458
    }
27459
 
27460
    @Override
27461
    public int hashCode() {
27462
      return 0;
27463
    }
27464
 
27465
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_args other) {
27466
      if (!getClass().equals(other.getClass())) {
27467
        return getClass().getName().compareTo(other.getClass().getName());
27468
      }
27469
 
27470
      int lastComparison = 0;
27471
      getNoOfCustomersWithSuccessfulTransaction_args typedOther = (getNoOfCustomersWithSuccessfulTransaction_args)other;
27472
 
27473
      return 0;
27474
    }
27475
 
27476
    public void read(TProtocol iprot) throws TException {
27477
      TField field;
27478
      iprot.readStructBegin();
27479
      while (true)
27480
      {
27481
        field = iprot.readFieldBegin();
27482
        if (field.type == TType.STOP) { 
27483
          break;
27484
        }
27485
        _Fields fieldId = _Fields.findByThriftId(field.id);
27486
        if (fieldId == null) {
27487
          TProtocolUtil.skip(iprot, field.type);
27488
        } else {
27489
          switch (fieldId) {
27490
          }
27491
          iprot.readFieldEnd();
27492
        }
27493
      }
27494
      iprot.readStructEnd();
27495
      validate();
27496
    }
27497
 
27498
    public void write(TProtocol oprot) throws TException {
27499
      validate();
27500
 
27501
      oprot.writeStructBegin(STRUCT_DESC);
27502
      oprot.writeFieldStop();
27503
      oprot.writeStructEnd();
27504
    }
27505
 
27506
    @Override
27507
    public String toString() {
27508
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_args(");
27509
      boolean first = true;
27510
 
27511
      sb.append(")");
27512
      return sb.toString();
27513
    }
27514
 
27515
    public void validate() throws TException {
27516
      // check for required fields
27517
    }
27518
 
27519
  }
27520
 
27521
  public static class getNoOfCustomersWithSuccessfulTransaction_result implements TBase<getNoOfCustomersWithSuccessfulTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_result>   {
27522
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_result");
27523
 
27524
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
27525
 
27526
    private long success;
27527
 
27528
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27529
    public enum _Fields implements TFieldIdEnum {
27530
      SUCCESS((short)0, "success");
27531
 
27532
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27533
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27534
 
27535
      static {
27536
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27537
          byId.put((int)field._thriftId, field);
27538
          byName.put(field.getFieldName(), field);
27539
        }
27540
      }
27541
 
27542
      /**
27543
       * Find the _Fields constant that matches fieldId, or null if its not found.
27544
       */
27545
      public static _Fields findByThriftId(int fieldId) {
27546
        return byId.get(fieldId);
27547
      }
27548
 
27549
      /**
27550
       * Find the _Fields constant that matches fieldId, throwing an exception
27551
       * if it is not found.
27552
       */
27553
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27554
        _Fields fields = findByThriftId(fieldId);
27555
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27556
        return fields;
27557
      }
27558
 
27559
      /**
27560
       * Find the _Fields constant that matches name, or null if its not found.
27561
       */
27562
      public static _Fields findByName(String name) {
27563
        return byName.get(name);
27564
      }
27565
 
27566
      private final short _thriftId;
27567
      private final String _fieldName;
27568
 
27569
      _Fields(short thriftId, String fieldName) {
27570
        _thriftId = thriftId;
27571
        _fieldName = fieldName;
27572
      }
27573
 
27574
      public short getThriftFieldId() {
27575
        return _thriftId;
27576
      }
27577
 
27578
      public String getFieldName() {
27579
        return _fieldName;
27580
      }
27581
    }
27582
 
27583
    // isset id assignments
27584
    private static final int __SUCCESS_ISSET_ID = 0;
27585
    private BitSet __isset_bit_vector = new BitSet(1);
27586
 
27587
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27588
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27589
          new FieldValueMetaData(TType.I64)));
27590
    }});
27591
 
27592
    static {
27593
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_result.class, metaDataMap);
27594
    }
27595
 
27596
    public getNoOfCustomersWithSuccessfulTransaction_result() {
27597
    }
27598
 
27599
    public getNoOfCustomersWithSuccessfulTransaction_result(
27600
      long success)
27601
    {
27602
      this();
27603
      this.success = success;
27604
      setSuccessIsSet(true);
27605
    }
27606
 
27607
    /**
27608
     * Performs a deep copy on <i>other</i>.
27609
     */
27610
    public getNoOfCustomersWithSuccessfulTransaction_result(getNoOfCustomersWithSuccessfulTransaction_result other) {
27611
      __isset_bit_vector.clear();
27612
      __isset_bit_vector.or(other.__isset_bit_vector);
27613
      this.success = other.success;
27614
    }
27615
 
27616
    public getNoOfCustomersWithSuccessfulTransaction_result deepCopy() {
27617
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27618
    }
27619
 
27620
    @Deprecated
27621
    public getNoOfCustomersWithSuccessfulTransaction_result clone() {
27622
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27623
    }
27624
 
27625
    public long getSuccess() {
27626
      return this.success;
27627
    }
27628
 
27629
    public getNoOfCustomersWithSuccessfulTransaction_result setSuccess(long success) {
27630
      this.success = success;
27631
      setSuccessIsSet(true);
27632
      return this;
27633
    }
27634
 
27635
    public void unsetSuccess() {
27636
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27637
    }
27638
 
27639
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27640
    public boolean isSetSuccess() {
27641
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27642
    }
27643
 
27644
    public void setSuccessIsSet(boolean value) {
27645
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27646
    }
27647
 
27648
    public void setFieldValue(_Fields field, Object value) {
27649
      switch (field) {
27650
      case SUCCESS:
27651
        if (value == null) {
27652
          unsetSuccess();
27653
        } else {
27654
          setSuccess((Long)value);
27655
        }
27656
        break;
27657
 
27658
      }
27659
    }
27660
 
27661
    public void setFieldValue(int fieldID, Object value) {
27662
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27663
    }
27664
 
27665
    public Object getFieldValue(_Fields field) {
27666
      switch (field) {
27667
      case SUCCESS:
27668
        return new Long(getSuccess());
27669
 
27670
      }
27671
      throw new IllegalStateException();
27672
    }
27673
 
27674
    public Object getFieldValue(int fieldId) {
27675
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27676
    }
27677
 
27678
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27679
    public boolean isSet(_Fields field) {
27680
      switch (field) {
27681
      case SUCCESS:
27682
        return isSetSuccess();
27683
      }
27684
      throw new IllegalStateException();
27685
    }
27686
 
27687
    public boolean isSet(int fieldID) {
27688
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27689
    }
27690
 
27691
    @Override
27692
    public boolean equals(Object that) {
27693
      if (that == null)
27694
        return false;
27695
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_result)
27696
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_result)that);
27697
      return false;
27698
    }
27699
 
27700
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_result that) {
27701
      if (that == null)
27702
        return false;
27703
 
27704
      boolean this_present_success = true;
27705
      boolean that_present_success = true;
27706
      if (this_present_success || that_present_success) {
27707
        if (!(this_present_success && that_present_success))
27708
          return false;
27709
        if (this.success != that.success)
27710
          return false;
27711
      }
27712
 
27713
      return true;
27714
    }
27715
 
27716
    @Override
27717
    public int hashCode() {
27718
      return 0;
27719
    }
27720
 
27721
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_result other) {
27722
      if (!getClass().equals(other.getClass())) {
27723
        return getClass().getName().compareTo(other.getClass().getName());
27724
      }
27725
 
27726
      int lastComparison = 0;
27727
      getNoOfCustomersWithSuccessfulTransaction_result typedOther = (getNoOfCustomersWithSuccessfulTransaction_result)other;
27728
 
27729
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27730
      if (lastComparison != 0) {
27731
        return lastComparison;
27732
      }
27733
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27734
      if (lastComparison != 0) {
27735
        return lastComparison;
27736
      }
27737
      return 0;
27738
    }
27739
 
27740
    public void read(TProtocol iprot) throws TException {
27741
      TField field;
27742
      iprot.readStructBegin();
27743
      while (true)
27744
      {
27745
        field = iprot.readFieldBegin();
27746
        if (field.type == TType.STOP) { 
27747
          break;
27748
        }
27749
        _Fields fieldId = _Fields.findByThriftId(field.id);
27750
        if (fieldId == null) {
27751
          TProtocolUtil.skip(iprot, field.type);
27752
        } else {
27753
          switch (fieldId) {
27754
            case SUCCESS:
27755
              if (field.type == TType.I64) {
27756
                this.success = iprot.readI64();
27757
                setSuccessIsSet(true);
27758
              } else { 
27759
                TProtocolUtil.skip(iprot, field.type);
27760
              }
27761
              break;
27762
          }
27763
          iprot.readFieldEnd();
27764
        }
27765
      }
27766
      iprot.readStructEnd();
27767
      validate();
27768
    }
27769
 
27770
    public void write(TProtocol oprot) throws TException {
27771
      oprot.writeStructBegin(STRUCT_DESC);
27772
 
27773
      if (this.isSetSuccess()) {
27774
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27775
        oprot.writeI64(this.success);
27776
        oprot.writeFieldEnd();
27777
      }
27778
      oprot.writeFieldStop();
27779
      oprot.writeStructEnd();
27780
    }
27781
 
27782
    @Override
27783
    public String toString() {
27784
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_result(");
27785
      boolean first = true;
27786
 
27787
      sb.append("success:");
27788
      sb.append(this.success);
27789
      first = false;
27790
      sb.append(")");
27791
      return sb.toString();
27792
    }
27793
 
27794
    public void validate() throws TException {
27795
      // check for required fields
27796
    }
27797
 
27798
  }
27799
 
1731 ankur.sing 27800
  public static class getValidOrdersAmountRange_args implements TBase<getValidOrdersAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_args>   {
27801
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_args");
1629 ankur.sing 27802
 
27803
 
27804
 
27805
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27806
    public enum _Fields implements TFieldIdEnum {
27807
;
27808
 
27809
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27810
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27811
 
27812
      static {
27813
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27814
          byId.put((int)field._thriftId, field);
27815
          byName.put(field.getFieldName(), field);
27816
        }
27817
      }
27818
 
27819
      /**
27820
       * Find the _Fields constant that matches fieldId, or null if its not found.
27821
       */
27822
      public static _Fields findByThriftId(int fieldId) {
27823
        return byId.get(fieldId);
27824
      }
27825
 
27826
      /**
27827
       * Find the _Fields constant that matches fieldId, throwing an exception
27828
       * if it is not found.
27829
       */
27830
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27831
        _Fields fields = findByThriftId(fieldId);
27832
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27833
        return fields;
27834
      }
27835
 
27836
      /**
27837
       * Find the _Fields constant that matches name, or null if its not found.
27838
       */
27839
      public static _Fields findByName(String name) {
27840
        return byName.get(name);
27841
      }
27842
 
27843
      private final short _thriftId;
27844
      private final String _fieldName;
27845
 
27846
      _Fields(short thriftId, String fieldName) {
27847
        _thriftId = thriftId;
27848
        _fieldName = fieldName;
27849
      }
27850
 
27851
      public short getThriftFieldId() {
27852
        return _thriftId;
27853
      }
27854
 
27855
      public String getFieldName() {
27856
        return _fieldName;
27857
      }
27858
    }
27859
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27860
    }});
27861
 
27862
    static {
1731 ankur.sing 27863
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_args.class, metaDataMap);
1629 ankur.sing 27864
    }
27865
 
1731 ankur.sing 27866
    public getValidOrdersAmountRange_args() {
1629 ankur.sing 27867
    }
27868
 
27869
    /**
27870
     * Performs a deep copy on <i>other</i>.
27871
     */
1731 ankur.sing 27872
    public getValidOrdersAmountRange_args(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27873
    }
27874
 
1731 ankur.sing 27875
    public getValidOrdersAmountRange_args deepCopy() {
27876
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27877
    }
27878
 
27879
    @Deprecated
1731 ankur.sing 27880
    public getValidOrdersAmountRange_args clone() {
27881
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27882
    }
27883
 
27884
    public void setFieldValue(_Fields field, Object value) {
27885
      switch (field) {
27886
      }
27887
    }
27888
 
27889
    public void setFieldValue(int fieldID, Object value) {
27890
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27891
    }
27892
 
27893
    public Object getFieldValue(_Fields field) {
27894
      switch (field) {
27895
      }
27896
      throw new IllegalStateException();
27897
    }
27898
 
27899
    public Object getFieldValue(int fieldId) {
27900
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27901
    }
27902
 
27903
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27904
    public boolean isSet(_Fields field) {
27905
      switch (field) {
27906
      }
27907
      throw new IllegalStateException();
27908
    }
27909
 
27910
    public boolean isSet(int fieldID) {
27911
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27912
    }
27913
 
27914
    @Override
27915
    public boolean equals(Object that) {
27916
      if (that == null)
27917
        return false;
1731 ankur.sing 27918
      if (that instanceof getValidOrdersAmountRange_args)
27919
        return this.equals((getValidOrdersAmountRange_args)that);
1629 ankur.sing 27920
      return false;
27921
    }
27922
 
1731 ankur.sing 27923
    public boolean equals(getValidOrdersAmountRange_args that) {
1629 ankur.sing 27924
      if (that == null)
27925
        return false;
27926
 
27927
      return true;
27928
    }
27929
 
27930
    @Override
27931
    public int hashCode() {
27932
      return 0;
27933
    }
27934
 
1731 ankur.sing 27935
    public int compareTo(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27936
      if (!getClass().equals(other.getClass())) {
27937
        return getClass().getName().compareTo(other.getClass().getName());
27938
      }
27939
 
27940
      int lastComparison = 0;
1731 ankur.sing 27941
      getValidOrdersAmountRange_args typedOther = (getValidOrdersAmountRange_args)other;
1629 ankur.sing 27942
 
27943
      return 0;
27944
    }
27945
 
27946
    public void read(TProtocol iprot) throws TException {
27947
      TField field;
27948
      iprot.readStructBegin();
27949
      while (true)
27950
      {
27951
        field = iprot.readFieldBegin();
27952
        if (field.type == TType.STOP) { 
27953
          break;
27954
        }
27955
        _Fields fieldId = _Fields.findByThriftId(field.id);
27956
        if (fieldId == null) {
27957
          TProtocolUtil.skip(iprot, field.type);
27958
        } else {
27959
          switch (fieldId) {
27960
          }
27961
          iprot.readFieldEnd();
27962
        }
27963
      }
27964
      iprot.readStructEnd();
27965
      validate();
27966
    }
27967
 
27968
    public void write(TProtocol oprot) throws TException {
27969
      validate();
27970
 
27971
      oprot.writeStructBegin(STRUCT_DESC);
27972
      oprot.writeFieldStop();
27973
      oprot.writeStructEnd();
27974
    }
27975
 
27976
    @Override
27977
    public String toString() {
1731 ankur.sing 27978
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_args(");
1629 ankur.sing 27979
      boolean first = true;
27980
 
27981
      sb.append(")");
27982
      return sb.toString();
27983
    }
27984
 
27985
    public void validate() throws TException {
27986
      // check for required fields
27987
    }
27988
 
27989
  }
27990
 
1731 ankur.sing 27991
  public static class getValidOrdersAmountRange_result implements TBase<getValidOrdersAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_result>   {
27992
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_result");
1629 ankur.sing 27993
 
1731 ankur.sing 27994
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 27995
 
1731 ankur.sing 27996
    private List<Double> success;
1629 ankur.sing 27997
 
27998
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27999
    public enum _Fields implements TFieldIdEnum {
28000
      SUCCESS((short)0, "success");
28001
 
28002
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28004
 
28005
      static {
28006
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28007
          byId.put((int)field._thriftId, field);
28008
          byName.put(field.getFieldName(), field);
28009
        }
28010
      }
28011
 
28012
      /**
28013
       * Find the _Fields constant that matches fieldId, or null if its not found.
28014
       */
28015
      public static _Fields findByThriftId(int fieldId) {
28016
        return byId.get(fieldId);
28017
      }
28018
 
28019
      /**
28020
       * Find the _Fields constant that matches fieldId, throwing an exception
28021
       * if it is not found.
28022
       */
28023
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28024
        _Fields fields = findByThriftId(fieldId);
28025
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28026
        return fields;
28027
      }
28028
 
28029
      /**
28030
       * Find the _Fields constant that matches name, or null if its not found.
28031
       */
28032
      public static _Fields findByName(String name) {
28033
        return byName.get(name);
28034
      }
28035
 
28036
      private final short _thriftId;
28037
      private final String _fieldName;
28038
 
28039
      _Fields(short thriftId, String fieldName) {
28040
        _thriftId = thriftId;
28041
        _fieldName = fieldName;
28042
      }
28043
 
28044
      public short getThriftFieldId() {
28045
        return _thriftId;
28046
      }
28047
 
28048
      public String getFieldName() {
28049
        return _fieldName;
28050
      }
28051
    }
28052
 
28053
    // isset id assignments
28054
 
28055
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28056
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 28057
          new ListMetaData(TType.LIST, 
28058
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 28059
    }});
28060
 
28061
    static {
1731 ankur.sing 28062
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_result.class, metaDataMap);
1629 ankur.sing 28063
    }
28064
 
1731 ankur.sing 28065
    public getValidOrdersAmountRange_result() {
1629 ankur.sing 28066
    }
28067
 
1731 ankur.sing 28068
    public getValidOrdersAmountRange_result(
28069
      List<Double> success)
1629 ankur.sing 28070
    {
28071
      this();
28072
      this.success = success;
28073
    }
28074
 
28075
    /**
28076
     * Performs a deep copy on <i>other</i>.
28077
     */
1731 ankur.sing 28078
    public getValidOrdersAmountRange_result(getValidOrdersAmountRange_result other) {
28079
      if (other.isSetSuccess()) {
28080
        List<Double> __this__success = new ArrayList<Double>();
28081
        for (Double other_element : other.success) {
28082
          __this__success.add(other_element);
1629 ankur.sing 28083
        }
1731 ankur.sing 28084
        this.success = __this__success;
1629 ankur.sing 28085
      }
28086
    }
28087
 
1731 ankur.sing 28088
    public getValidOrdersAmountRange_result deepCopy() {
28089
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 28090
    }
28091
 
28092
    @Deprecated
1731 ankur.sing 28093
    public getValidOrdersAmountRange_result clone() {
28094
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 28095
    }
28096
 
1731 ankur.sing 28097
    public int getSuccessSize() {
28098
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 28099
    }
28100
 
1731 ankur.sing 28101
    public java.util.Iterator<Double> getSuccessIterator() {
28102
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 28103
    }
28104
 
1731 ankur.sing 28105
    public void addToSuccess(double elem) {
28106
      if (this.success == null) {
28107
        this.success = new ArrayList<Double>();
1629 ankur.sing 28108
      }
1731 ankur.sing 28109
      this.success.add(elem);
1629 ankur.sing 28110
    }
28111
 
1731 ankur.sing 28112
    public List<Double> getSuccess() {
1629 ankur.sing 28113
      return this.success;
28114
    }
28115
 
1731 ankur.sing 28116
    public getValidOrdersAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 28117
      this.success = success;
28118
      return this;
28119
    }
28120
 
28121
    public void unsetSuccess() {
1731 ankur.sing 28122
      this.success = null;
1629 ankur.sing 28123
    }
28124
 
28125
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28126
    public boolean isSetSuccess() {
1731 ankur.sing 28127
      return this.success != null;
1629 ankur.sing 28128
    }
28129
 
28130
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 28131
      if (!value) {
28132
        this.success = null;
28133
      }
1629 ankur.sing 28134
    }
28135
 
28136
    public void setFieldValue(_Fields field, Object value) {
28137
      switch (field) {
28138
      case SUCCESS:
28139
        if (value == null) {
28140
          unsetSuccess();
28141
        } else {
1731 ankur.sing 28142
          setSuccess((List<Double>)value);
1629 ankur.sing 28143
        }
28144
        break;
28145
 
28146
      }
28147
    }
28148
 
28149
    public void setFieldValue(int fieldID, Object value) {
28150
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28151
    }
28152
 
28153
    public Object getFieldValue(_Fields field) {
28154
      switch (field) {
28155
      case SUCCESS:
1731 ankur.sing 28156
        return getSuccess();
1629 ankur.sing 28157
 
28158
      }
28159
      throw new IllegalStateException();
28160
    }
28161
 
28162
    public Object getFieldValue(int fieldId) {
28163
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28164
    }
28165
 
28166
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28167
    public boolean isSet(_Fields field) {
28168
      switch (field) {
28169
      case SUCCESS:
28170
        return isSetSuccess();
28171
      }
28172
      throw new IllegalStateException();
28173
    }
28174
 
28175
    public boolean isSet(int fieldID) {
28176
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28177
    }
28178
 
28179
    @Override
28180
    public boolean equals(Object that) {
28181
      if (that == null)
28182
        return false;
1731 ankur.sing 28183
      if (that instanceof getValidOrdersAmountRange_result)
28184
        return this.equals((getValidOrdersAmountRange_result)that);
1629 ankur.sing 28185
      return false;
28186
    }
28187
 
1731 ankur.sing 28188
    public boolean equals(getValidOrdersAmountRange_result that) {
1629 ankur.sing 28189
      if (that == null)
28190
        return false;
28191
 
1731 ankur.sing 28192
      boolean this_present_success = true && this.isSetSuccess();
28193
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 28194
      if (this_present_success || that_present_success) {
28195
        if (!(this_present_success && that_present_success))
28196
          return false;
1731 ankur.sing 28197
        if (!this.success.equals(that.success))
1629 ankur.sing 28198
          return false;
28199
      }
28200
 
28201
      return true;
28202
    }
28203
 
28204
    @Override
28205
    public int hashCode() {
28206
      return 0;
28207
    }
28208
 
1731 ankur.sing 28209
    public int compareTo(getValidOrdersAmountRange_result other) {
1629 ankur.sing 28210
      if (!getClass().equals(other.getClass())) {
28211
        return getClass().getName().compareTo(other.getClass().getName());
28212
      }
28213
 
28214
      int lastComparison = 0;
1731 ankur.sing 28215
      getValidOrdersAmountRange_result typedOther = (getValidOrdersAmountRange_result)other;
1629 ankur.sing 28216
 
28217
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28218
      if (lastComparison != 0) {
28219
        return lastComparison;
28220
      }
28221
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28222
      if (lastComparison != 0) {
28223
        return lastComparison;
28224
      }
28225
      return 0;
28226
    }
28227
 
28228
    public void read(TProtocol iprot) throws TException {
28229
      TField field;
28230
      iprot.readStructBegin();
28231
      while (true)
28232
      {
28233
        field = iprot.readFieldBegin();
28234
        if (field.type == TType.STOP) { 
28235
          break;
28236
        }
28237
        _Fields fieldId = _Fields.findByThriftId(field.id);
28238
        if (fieldId == null) {
28239
          TProtocolUtil.skip(iprot, field.type);
28240
        } else {
28241
          switch (fieldId) {
28242
            case SUCCESS:
1731 ankur.sing 28243
              if (field.type == TType.LIST) {
28244
                {
28245
                  TList _list80 = iprot.readListBegin();
28246
                  this.success = new ArrayList<Double>(_list80.size);
28247
                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
28248
                  {
28249
                    double _elem82;
28250
                    _elem82 = iprot.readDouble();
28251
                    this.success.add(_elem82);
28252
                  }
28253
                  iprot.readListEnd();
28254
                }
1629 ankur.sing 28255
              } else { 
28256
                TProtocolUtil.skip(iprot, field.type);
28257
              }
28258
              break;
28259
          }
28260
          iprot.readFieldEnd();
28261
        }
28262
      }
28263
      iprot.readStructEnd();
28264
      validate();
28265
    }
28266
 
28267
    public void write(TProtocol oprot) throws TException {
28268
      oprot.writeStructBegin(STRUCT_DESC);
28269
 
28270
      if (this.isSetSuccess()) {
28271
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 28272
        {
28273
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
28274
          for (double _iter83 : this.success)
28275
          {
28276
            oprot.writeDouble(_iter83);
28277
          }
28278
          oprot.writeListEnd();
28279
        }
1629 ankur.sing 28280
        oprot.writeFieldEnd();
28281
      }
28282
      oprot.writeFieldStop();
28283
      oprot.writeStructEnd();
28284
    }
28285
 
28286
    @Override
28287
    public String toString() {
1731 ankur.sing 28288
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_result(");
1629 ankur.sing 28289
      boolean first = true;
28290
 
28291
      sb.append("success:");
1731 ankur.sing 28292
      if (this.success == null) {
28293
        sb.append("null");
28294
      } else {
28295
        sb.append(this.success);
28296
      }
1629 ankur.sing 28297
      first = false;
28298
      sb.append(")");
28299
      return sb.toString();
28300
    }
28301
 
28302
    public void validate() throws TException {
28303
      // check for required fields
28304
    }
28305
 
28306
  }
28307
 
1886 ankur.sing 28308
  public static class getValidOrders_args implements TBase<getValidOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_args>   {
28309
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_args");
28310
 
28311
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)1);
28312
 
28313
    private long limit;
28314
 
28315
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28316
    public enum _Fields implements TFieldIdEnum {
28317
      LIMIT((short)1, "limit");
28318
 
28319
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28320
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28321
 
28322
      static {
28323
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28324
          byId.put((int)field._thriftId, field);
28325
          byName.put(field.getFieldName(), field);
28326
        }
28327
      }
28328
 
28329
      /**
28330
       * Find the _Fields constant that matches fieldId, or null if its not found.
28331
       */
28332
      public static _Fields findByThriftId(int fieldId) {
28333
        return byId.get(fieldId);
28334
      }
28335
 
28336
      /**
28337
       * Find the _Fields constant that matches fieldId, throwing an exception
28338
       * if it is not found.
28339
       */
28340
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28341
        _Fields fields = findByThriftId(fieldId);
28342
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28343
        return fields;
28344
      }
28345
 
28346
      /**
28347
       * Find the _Fields constant that matches name, or null if its not found.
28348
       */
28349
      public static _Fields findByName(String name) {
28350
        return byName.get(name);
28351
      }
28352
 
28353
      private final short _thriftId;
28354
      private final String _fieldName;
28355
 
28356
      _Fields(short thriftId, String fieldName) {
28357
        _thriftId = thriftId;
28358
        _fieldName = fieldName;
28359
      }
28360
 
28361
      public short getThriftFieldId() {
28362
        return _thriftId;
28363
      }
28364
 
28365
      public String getFieldName() {
28366
        return _fieldName;
28367
      }
28368
    }
28369
 
28370
    // isset id assignments
28371
    private static final int __LIMIT_ISSET_ID = 0;
28372
    private BitSet __isset_bit_vector = new BitSet(1);
28373
 
28374
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28375
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
28376
          new FieldValueMetaData(TType.I64)));
28377
    }});
28378
 
28379
    static {
28380
      FieldMetaData.addStructMetaDataMap(getValidOrders_args.class, metaDataMap);
28381
    }
28382
 
28383
    public getValidOrders_args() {
28384
    }
28385
 
28386
    public getValidOrders_args(
28387
      long limit)
28388
    {
28389
      this();
28390
      this.limit = limit;
28391
      setLimitIsSet(true);
28392
    }
28393
 
28394
    /**
28395
     * Performs a deep copy on <i>other</i>.
28396
     */
28397
    public getValidOrders_args(getValidOrders_args other) {
28398
      __isset_bit_vector.clear();
28399
      __isset_bit_vector.or(other.__isset_bit_vector);
28400
      this.limit = other.limit;
28401
    }
28402
 
28403
    public getValidOrders_args deepCopy() {
28404
      return new getValidOrders_args(this);
28405
    }
28406
 
28407
    @Deprecated
28408
    public getValidOrders_args clone() {
28409
      return new getValidOrders_args(this);
28410
    }
28411
 
28412
    public long getLimit() {
28413
      return this.limit;
28414
    }
28415
 
28416
    public getValidOrders_args setLimit(long limit) {
28417
      this.limit = limit;
28418
      setLimitIsSet(true);
28419
      return this;
28420
    }
28421
 
28422
    public void unsetLimit() {
28423
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
28424
    }
28425
 
28426
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
28427
    public boolean isSetLimit() {
28428
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
28429
    }
28430
 
28431
    public void setLimitIsSet(boolean value) {
28432
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
28433
    }
28434
 
28435
    public void setFieldValue(_Fields field, Object value) {
28436
      switch (field) {
28437
      case LIMIT:
28438
        if (value == null) {
28439
          unsetLimit();
28440
        } else {
28441
          setLimit((Long)value);
28442
        }
28443
        break;
28444
 
28445
      }
28446
    }
28447
 
28448
    public void setFieldValue(int fieldID, Object value) {
28449
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28450
    }
28451
 
28452
    public Object getFieldValue(_Fields field) {
28453
      switch (field) {
28454
      case LIMIT:
28455
        return new Long(getLimit());
28456
 
28457
      }
28458
      throw new IllegalStateException();
28459
    }
28460
 
28461
    public Object getFieldValue(int fieldId) {
28462
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28463
    }
28464
 
28465
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28466
    public boolean isSet(_Fields field) {
28467
      switch (field) {
28468
      case LIMIT:
28469
        return isSetLimit();
28470
      }
28471
      throw new IllegalStateException();
28472
    }
28473
 
28474
    public boolean isSet(int fieldID) {
28475
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28476
    }
28477
 
28478
    @Override
28479
    public boolean equals(Object that) {
28480
      if (that == null)
28481
        return false;
28482
      if (that instanceof getValidOrders_args)
28483
        return this.equals((getValidOrders_args)that);
28484
      return false;
28485
    }
28486
 
28487
    public boolean equals(getValidOrders_args that) {
28488
      if (that == null)
28489
        return false;
28490
 
28491
      boolean this_present_limit = true;
28492
      boolean that_present_limit = true;
28493
      if (this_present_limit || that_present_limit) {
28494
        if (!(this_present_limit && that_present_limit))
28495
          return false;
28496
        if (this.limit != that.limit)
28497
          return false;
28498
      }
28499
 
28500
      return true;
28501
    }
28502
 
28503
    @Override
28504
    public int hashCode() {
28505
      return 0;
28506
    }
28507
 
28508
    public int compareTo(getValidOrders_args other) {
28509
      if (!getClass().equals(other.getClass())) {
28510
        return getClass().getName().compareTo(other.getClass().getName());
28511
      }
28512
 
28513
      int lastComparison = 0;
28514
      getValidOrders_args typedOther = (getValidOrders_args)other;
28515
 
28516
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
28517
      if (lastComparison != 0) {
28518
        return lastComparison;
28519
      }
28520
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
28521
      if (lastComparison != 0) {
28522
        return lastComparison;
28523
      }
28524
      return 0;
28525
    }
28526
 
28527
    public void read(TProtocol iprot) throws TException {
28528
      TField field;
28529
      iprot.readStructBegin();
28530
      while (true)
28531
      {
28532
        field = iprot.readFieldBegin();
28533
        if (field.type == TType.STOP) { 
28534
          break;
28535
        }
28536
        _Fields fieldId = _Fields.findByThriftId(field.id);
28537
        if (fieldId == null) {
28538
          TProtocolUtil.skip(iprot, field.type);
28539
        } else {
28540
          switch (fieldId) {
28541
            case LIMIT:
28542
              if (field.type == TType.I64) {
28543
                this.limit = iprot.readI64();
28544
                setLimitIsSet(true);
28545
              } else { 
28546
                TProtocolUtil.skip(iprot, field.type);
28547
              }
28548
              break;
28549
          }
28550
          iprot.readFieldEnd();
28551
        }
28552
      }
28553
      iprot.readStructEnd();
28554
      validate();
28555
    }
28556
 
28557
    public void write(TProtocol oprot) throws TException {
28558
      validate();
28559
 
28560
      oprot.writeStructBegin(STRUCT_DESC);
28561
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
28562
      oprot.writeI64(this.limit);
28563
      oprot.writeFieldEnd();
28564
      oprot.writeFieldStop();
28565
      oprot.writeStructEnd();
28566
    }
28567
 
28568
    @Override
28569
    public String toString() {
28570
      StringBuilder sb = new StringBuilder("getValidOrders_args(");
28571
      boolean first = true;
28572
 
28573
      sb.append("limit:");
28574
      sb.append(this.limit);
28575
      first = false;
28576
      sb.append(")");
28577
      return sb.toString();
28578
    }
28579
 
28580
    public void validate() throws TException {
28581
      // check for required fields
28582
    }
28583
 
28584
  }
28585
 
28586
  public static class getValidOrders_result implements TBase<getValidOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_result>   {
28587
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_result");
28588
 
28589
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
28590
 
28591
    private List<Order> success;
28592
 
28593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28594
    public enum _Fields implements TFieldIdEnum {
28595
      SUCCESS((short)0, "success");
28596
 
28597
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28598
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28599
 
28600
      static {
28601
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28602
          byId.put((int)field._thriftId, field);
28603
          byName.put(field.getFieldName(), field);
28604
        }
28605
      }
28606
 
28607
      /**
28608
       * Find the _Fields constant that matches fieldId, or null if its not found.
28609
       */
28610
      public static _Fields findByThriftId(int fieldId) {
28611
        return byId.get(fieldId);
28612
      }
28613
 
28614
      /**
28615
       * Find the _Fields constant that matches fieldId, throwing an exception
28616
       * if it is not found.
28617
       */
28618
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28619
        _Fields fields = findByThriftId(fieldId);
28620
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28621
        return fields;
28622
      }
28623
 
28624
      /**
28625
       * Find the _Fields constant that matches name, or null if its not found.
28626
       */
28627
      public static _Fields findByName(String name) {
28628
        return byName.get(name);
28629
      }
28630
 
28631
      private final short _thriftId;
28632
      private final String _fieldName;
28633
 
28634
      _Fields(short thriftId, String fieldName) {
28635
        _thriftId = thriftId;
28636
        _fieldName = fieldName;
28637
      }
28638
 
28639
      public short getThriftFieldId() {
28640
        return _thriftId;
28641
      }
28642
 
28643
      public String getFieldName() {
28644
        return _fieldName;
28645
      }
28646
    }
28647
 
28648
    // isset id assignments
28649
 
28650
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28651
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28652
          new ListMetaData(TType.LIST, 
28653
              new StructMetaData(TType.STRUCT, Order.class))));
28654
    }});
28655
 
28656
    static {
28657
      FieldMetaData.addStructMetaDataMap(getValidOrders_result.class, metaDataMap);
28658
    }
28659
 
28660
    public getValidOrders_result() {
28661
    }
28662
 
28663
    public getValidOrders_result(
28664
      List<Order> success)
28665
    {
28666
      this();
28667
      this.success = success;
28668
    }
28669
 
28670
    /**
28671
     * Performs a deep copy on <i>other</i>.
28672
     */
28673
    public getValidOrders_result(getValidOrders_result other) {
28674
      if (other.isSetSuccess()) {
28675
        List<Order> __this__success = new ArrayList<Order>();
28676
        for (Order other_element : other.success) {
28677
          __this__success.add(new Order(other_element));
28678
        }
28679
        this.success = __this__success;
28680
      }
28681
    }
28682
 
28683
    public getValidOrders_result deepCopy() {
28684
      return new getValidOrders_result(this);
28685
    }
28686
 
28687
    @Deprecated
28688
    public getValidOrders_result clone() {
28689
      return new getValidOrders_result(this);
28690
    }
28691
 
28692
    public int getSuccessSize() {
28693
      return (this.success == null) ? 0 : this.success.size();
28694
    }
28695
 
28696
    public java.util.Iterator<Order> getSuccessIterator() {
28697
      return (this.success == null) ? null : this.success.iterator();
28698
    }
28699
 
28700
    public void addToSuccess(Order elem) {
28701
      if (this.success == null) {
28702
        this.success = new ArrayList<Order>();
28703
      }
28704
      this.success.add(elem);
28705
    }
28706
 
28707
    public List<Order> getSuccess() {
28708
      return this.success;
28709
    }
28710
 
28711
    public getValidOrders_result setSuccess(List<Order> success) {
28712
      this.success = success;
28713
      return this;
28714
    }
28715
 
28716
    public void unsetSuccess() {
28717
      this.success = null;
28718
    }
28719
 
28720
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28721
    public boolean isSetSuccess() {
28722
      return this.success != null;
28723
    }
28724
 
28725
    public void setSuccessIsSet(boolean value) {
28726
      if (!value) {
28727
        this.success = null;
28728
      }
28729
    }
28730
 
28731
    public void setFieldValue(_Fields field, Object value) {
28732
      switch (field) {
28733
      case SUCCESS:
28734
        if (value == null) {
28735
          unsetSuccess();
28736
        } else {
28737
          setSuccess((List<Order>)value);
28738
        }
28739
        break;
28740
 
28741
      }
28742
    }
28743
 
28744
    public void setFieldValue(int fieldID, Object value) {
28745
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28746
    }
28747
 
28748
    public Object getFieldValue(_Fields field) {
28749
      switch (field) {
28750
      case SUCCESS:
28751
        return getSuccess();
28752
 
28753
      }
28754
      throw new IllegalStateException();
28755
    }
28756
 
28757
    public Object getFieldValue(int fieldId) {
28758
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28759
    }
28760
 
28761
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28762
    public boolean isSet(_Fields field) {
28763
      switch (field) {
28764
      case SUCCESS:
28765
        return isSetSuccess();
28766
      }
28767
      throw new IllegalStateException();
28768
    }
28769
 
28770
    public boolean isSet(int fieldID) {
28771
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28772
    }
28773
 
28774
    @Override
28775
    public boolean equals(Object that) {
28776
      if (that == null)
28777
        return false;
28778
      if (that instanceof getValidOrders_result)
28779
        return this.equals((getValidOrders_result)that);
28780
      return false;
28781
    }
28782
 
28783
    public boolean equals(getValidOrders_result that) {
28784
      if (that == null)
28785
        return false;
28786
 
28787
      boolean this_present_success = true && this.isSetSuccess();
28788
      boolean that_present_success = true && that.isSetSuccess();
28789
      if (this_present_success || that_present_success) {
28790
        if (!(this_present_success && that_present_success))
28791
          return false;
28792
        if (!this.success.equals(that.success))
28793
          return false;
28794
      }
28795
 
28796
      return true;
28797
    }
28798
 
28799
    @Override
28800
    public int hashCode() {
28801
      return 0;
28802
    }
28803
 
28804
    public int compareTo(getValidOrders_result other) {
28805
      if (!getClass().equals(other.getClass())) {
28806
        return getClass().getName().compareTo(other.getClass().getName());
28807
      }
28808
 
28809
      int lastComparison = 0;
28810
      getValidOrders_result typedOther = (getValidOrders_result)other;
28811
 
28812
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28813
      if (lastComparison != 0) {
28814
        return lastComparison;
28815
      }
28816
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28817
      if (lastComparison != 0) {
28818
        return lastComparison;
28819
      }
28820
      return 0;
28821
    }
28822
 
28823
    public void read(TProtocol iprot) throws TException {
28824
      TField field;
28825
      iprot.readStructBegin();
28826
      while (true)
28827
      {
28828
        field = iprot.readFieldBegin();
28829
        if (field.type == TType.STOP) { 
28830
          break;
28831
        }
28832
        _Fields fieldId = _Fields.findByThriftId(field.id);
28833
        if (fieldId == null) {
28834
          TProtocolUtil.skip(iprot, field.type);
28835
        } else {
28836
          switch (fieldId) {
28837
            case SUCCESS:
28838
              if (field.type == TType.LIST) {
28839
                {
28840
                  TList _list84 = iprot.readListBegin();
28841
                  this.success = new ArrayList<Order>(_list84.size);
28842
                  for (int _i85 = 0; _i85 < _list84.size; ++_i85)
28843
                  {
28844
                    Order _elem86;
28845
                    _elem86 = new Order();
28846
                    _elem86.read(iprot);
28847
                    this.success.add(_elem86);
28848
                  }
28849
                  iprot.readListEnd();
28850
                }
28851
              } else { 
28852
                TProtocolUtil.skip(iprot, field.type);
28853
              }
28854
              break;
28855
          }
28856
          iprot.readFieldEnd();
28857
        }
28858
      }
28859
      iprot.readStructEnd();
28860
      validate();
28861
    }
28862
 
28863
    public void write(TProtocol oprot) throws TException {
28864
      oprot.writeStructBegin(STRUCT_DESC);
28865
 
28866
      if (this.isSetSuccess()) {
28867
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28868
        {
28869
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
28870
          for (Order _iter87 : this.success)
28871
          {
28872
            _iter87.write(oprot);
28873
          }
28874
          oprot.writeListEnd();
28875
        }
28876
        oprot.writeFieldEnd();
28877
      }
28878
      oprot.writeFieldStop();
28879
      oprot.writeStructEnd();
28880
    }
28881
 
28882
    @Override
28883
    public String toString() {
28884
      StringBuilder sb = new StringBuilder("getValidOrders_result(");
28885
      boolean first = true;
28886
 
28887
      sb.append("success:");
28888
      if (this.success == null) {
28889
        sb.append("null");
28890
      } else {
28891
        sb.append(this.success);
28892
      }
28893
      first = false;
28894
      sb.append(")");
28895
      return sb.toString();
28896
    }
28897
 
28898
    public void validate() throws TException {
28899
      // check for required fields
28900
    }
28901
 
28902
  }
28903
 
2538 chandransh 28904
  public static class toggleDOAFlag_args implements TBase<toggleDOAFlag_args._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_args>   {
28905
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_args");
28906
 
28907
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
28908
 
28909
    private long orderId;
28910
 
28911
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28912
    public enum _Fields implements TFieldIdEnum {
28913
      ORDER_ID((short)1, "orderId");
28914
 
28915
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28916
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28917
 
28918
      static {
28919
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28920
          byId.put((int)field._thriftId, field);
28921
          byName.put(field.getFieldName(), field);
28922
        }
28923
      }
28924
 
28925
      /**
28926
       * Find the _Fields constant that matches fieldId, or null if its not found.
28927
       */
28928
      public static _Fields findByThriftId(int fieldId) {
28929
        return byId.get(fieldId);
28930
      }
28931
 
28932
      /**
28933
       * Find the _Fields constant that matches fieldId, throwing an exception
28934
       * if it is not found.
28935
       */
28936
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28937
        _Fields fields = findByThriftId(fieldId);
28938
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28939
        return fields;
28940
      }
28941
 
28942
      /**
28943
       * Find the _Fields constant that matches name, or null if its not found.
28944
       */
28945
      public static _Fields findByName(String name) {
28946
        return byName.get(name);
28947
      }
28948
 
28949
      private final short _thriftId;
28950
      private final String _fieldName;
28951
 
28952
      _Fields(short thriftId, String fieldName) {
28953
        _thriftId = thriftId;
28954
        _fieldName = fieldName;
28955
      }
28956
 
28957
      public short getThriftFieldId() {
28958
        return _thriftId;
28959
      }
28960
 
28961
      public String getFieldName() {
28962
        return _fieldName;
28963
      }
28964
    }
28965
 
28966
    // isset id assignments
28967
    private static final int __ORDERID_ISSET_ID = 0;
28968
    private BitSet __isset_bit_vector = new BitSet(1);
28969
 
28970
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28971
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
28972
          new FieldValueMetaData(TType.I64)));
28973
    }});
28974
 
28975
    static {
28976
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_args.class, metaDataMap);
28977
    }
28978
 
28979
    public toggleDOAFlag_args() {
28980
    }
28981
 
28982
    public toggleDOAFlag_args(
28983
      long orderId)
28984
    {
28985
      this();
28986
      this.orderId = orderId;
28987
      setOrderIdIsSet(true);
28988
    }
28989
 
28990
    /**
28991
     * Performs a deep copy on <i>other</i>.
28992
     */
28993
    public toggleDOAFlag_args(toggleDOAFlag_args other) {
28994
      __isset_bit_vector.clear();
28995
      __isset_bit_vector.or(other.__isset_bit_vector);
28996
      this.orderId = other.orderId;
28997
    }
28998
 
28999
    public toggleDOAFlag_args deepCopy() {
29000
      return new toggleDOAFlag_args(this);
29001
    }
29002
 
29003
    @Deprecated
29004
    public toggleDOAFlag_args clone() {
29005
      return new toggleDOAFlag_args(this);
29006
    }
29007
 
29008
    public long getOrderId() {
29009
      return this.orderId;
29010
    }
29011
 
29012
    public toggleDOAFlag_args setOrderId(long orderId) {
29013
      this.orderId = orderId;
29014
      setOrderIdIsSet(true);
29015
      return this;
29016
    }
29017
 
29018
    public void unsetOrderId() {
29019
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
29020
    }
29021
 
29022
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
29023
    public boolean isSetOrderId() {
29024
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
29025
    }
29026
 
29027
    public void setOrderIdIsSet(boolean value) {
29028
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
29029
    }
29030
 
29031
    public void setFieldValue(_Fields field, Object value) {
29032
      switch (field) {
29033
      case ORDER_ID:
29034
        if (value == null) {
29035
          unsetOrderId();
29036
        } else {
29037
          setOrderId((Long)value);
29038
        }
29039
        break;
29040
 
29041
      }
29042
    }
29043
 
29044
    public void setFieldValue(int fieldID, Object value) {
29045
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29046
    }
29047
 
29048
    public Object getFieldValue(_Fields field) {
29049
      switch (field) {
29050
      case ORDER_ID:
29051
        return new Long(getOrderId());
29052
 
29053
      }
29054
      throw new IllegalStateException();
29055
    }
29056
 
29057
    public Object getFieldValue(int fieldId) {
29058
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29059
    }
29060
 
29061
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29062
    public boolean isSet(_Fields field) {
29063
      switch (field) {
29064
      case ORDER_ID:
29065
        return isSetOrderId();
29066
      }
29067
      throw new IllegalStateException();
29068
    }
29069
 
29070
    public boolean isSet(int fieldID) {
29071
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29072
    }
29073
 
29074
    @Override
29075
    public boolean equals(Object that) {
29076
      if (that == null)
29077
        return false;
29078
      if (that instanceof toggleDOAFlag_args)
29079
        return this.equals((toggleDOAFlag_args)that);
29080
      return false;
29081
    }
29082
 
29083
    public boolean equals(toggleDOAFlag_args that) {
29084
      if (that == null)
29085
        return false;
29086
 
29087
      boolean this_present_orderId = true;
29088
      boolean that_present_orderId = true;
29089
      if (this_present_orderId || that_present_orderId) {
29090
        if (!(this_present_orderId && that_present_orderId))
29091
          return false;
29092
        if (this.orderId != that.orderId)
29093
          return false;
29094
      }
29095
 
29096
      return true;
29097
    }
29098
 
29099
    @Override
29100
    public int hashCode() {
29101
      return 0;
29102
    }
29103
 
29104
    public int compareTo(toggleDOAFlag_args other) {
29105
      if (!getClass().equals(other.getClass())) {
29106
        return getClass().getName().compareTo(other.getClass().getName());
29107
      }
29108
 
29109
      int lastComparison = 0;
29110
      toggleDOAFlag_args typedOther = (toggleDOAFlag_args)other;
29111
 
29112
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
29113
      if (lastComparison != 0) {
29114
        return lastComparison;
29115
      }
29116
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
29117
      if (lastComparison != 0) {
29118
        return lastComparison;
29119
      }
29120
      return 0;
29121
    }
29122
 
29123
    public void read(TProtocol iprot) throws TException {
29124
      TField field;
29125
      iprot.readStructBegin();
29126
      while (true)
29127
      {
29128
        field = iprot.readFieldBegin();
29129
        if (field.type == TType.STOP) { 
29130
          break;
29131
        }
29132
        _Fields fieldId = _Fields.findByThriftId(field.id);
29133
        if (fieldId == null) {
29134
          TProtocolUtil.skip(iprot, field.type);
29135
        } else {
29136
          switch (fieldId) {
29137
            case ORDER_ID:
29138
              if (field.type == TType.I64) {
29139
                this.orderId = iprot.readI64();
29140
                setOrderIdIsSet(true);
29141
              } else { 
29142
                TProtocolUtil.skip(iprot, field.type);
29143
              }
29144
              break;
29145
          }
29146
          iprot.readFieldEnd();
29147
        }
29148
      }
29149
      iprot.readStructEnd();
29150
      validate();
29151
    }
29152
 
29153
    public void write(TProtocol oprot) throws TException {
29154
      validate();
29155
 
29156
      oprot.writeStructBegin(STRUCT_DESC);
29157
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
29158
      oprot.writeI64(this.orderId);
29159
      oprot.writeFieldEnd();
29160
      oprot.writeFieldStop();
29161
      oprot.writeStructEnd();
29162
    }
29163
 
29164
    @Override
29165
    public String toString() {
29166
      StringBuilder sb = new StringBuilder("toggleDOAFlag_args(");
29167
      boolean first = true;
29168
 
29169
      sb.append("orderId:");
29170
      sb.append(this.orderId);
29171
      first = false;
29172
      sb.append(")");
29173
      return sb.toString();
29174
    }
29175
 
29176
    public void validate() throws TException {
29177
      // check for required fields
29178
    }
29179
 
29180
  }
29181
 
29182
  public static class toggleDOAFlag_result implements TBase<toggleDOAFlag_result._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_result>   {
29183
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_result");
29184
 
29185
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
29186
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
29187
 
29188
    private boolean success;
29189
    private TransactionServiceException ex;
29190
 
29191
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29192
    public enum _Fields implements TFieldIdEnum {
29193
      SUCCESS((short)0, "success"),
29194
      EX((short)1, "ex");
29195
 
29196
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29197
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29198
 
29199
      static {
29200
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29201
          byId.put((int)field._thriftId, field);
29202
          byName.put(field.getFieldName(), field);
29203
        }
29204
      }
29205
 
29206
      /**
29207
       * Find the _Fields constant that matches fieldId, or null if its not found.
29208
       */
29209
      public static _Fields findByThriftId(int fieldId) {
29210
        return byId.get(fieldId);
29211
      }
29212
 
29213
      /**
29214
       * Find the _Fields constant that matches fieldId, throwing an exception
29215
       * if it is not found.
29216
       */
29217
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29218
        _Fields fields = findByThriftId(fieldId);
29219
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29220
        return fields;
29221
      }
29222
 
29223
      /**
29224
       * Find the _Fields constant that matches name, or null if its not found.
29225
       */
29226
      public static _Fields findByName(String name) {
29227
        return byName.get(name);
29228
      }
29229
 
29230
      private final short _thriftId;
29231
      private final String _fieldName;
29232
 
29233
      _Fields(short thriftId, String fieldName) {
29234
        _thriftId = thriftId;
29235
        _fieldName = fieldName;
29236
      }
29237
 
29238
      public short getThriftFieldId() {
29239
        return _thriftId;
29240
      }
29241
 
29242
      public String getFieldName() {
29243
        return _fieldName;
29244
      }
29245
    }
29246
 
29247
    // isset id assignments
29248
    private static final int __SUCCESS_ISSET_ID = 0;
29249
    private BitSet __isset_bit_vector = new BitSet(1);
29250
 
29251
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29252
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29253
          new FieldValueMetaData(TType.BOOL)));
29254
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
29255
          new FieldValueMetaData(TType.STRUCT)));
29256
    }});
29257
 
29258
    static {
29259
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_result.class, metaDataMap);
29260
    }
29261
 
29262
    public toggleDOAFlag_result() {
29263
    }
29264
 
29265
    public toggleDOAFlag_result(
29266
      boolean success,
29267
      TransactionServiceException ex)
29268
    {
29269
      this();
29270
      this.success = success;
29271
      setSuccessIsSet(true);
29272
      this.ex = ex;
29273
    }
29274
 
29275
    /**
29276
     * Performs a deep copy on <i>other</i>.
29277
     */
29278
    public toggleDOAFlag_result(toggleDOAFlag_result other) {
29279
      __isset_bit_vector.clear();
29280
      __isset_bit_vector.or(other.__isset_bit_vector);
29281
      this.success = other.success;
29282
      if (other.isSetEx()) {
29283
        this.ex = new TransactionServiceException(other.ex);
29284
      }
29285
    }
29286
 
29287
    public toggleDOAFlag_result deepCopy() {
29288
      return new toggleDOAFlag_result(this);
29289
    }
29290
 
29291
    @Deprecated
29292
    public toggleDOAFlag_result clone() {
29293
      return new toggleDOAFlag_result(this);
29294
    }
29295
 
29296
    public boolean isSuccess() {
29297
      return this.success;
29298
    }
29299
 
29300
    public toggleDOAFlag_result setSuccess(boolean success) {
29301
      this.success = success;
29302
      setSuccessIsSet(true);
29303
      return this;
29304
    }
29305
 
29306
    public void unsetSuccess() {
29307
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29308
    }
29309
 
29310
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29311
    public boolean isSetSuccess() {
29312
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29313
    }
29314
 
29315
    public void setSuccessIsSet(boolean value) {
29316
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29317
    }
29318
 
29319
    public TransactionServiceException getEx() {
29320
      return this.ex;
29321
    }
29322
 
29323
    public toggleDOAFlag_result setEx(TransactionServiceException ex) {
29324
      this.ex = ex;
29325
      return this;
29326
    }
29327
 
29328
    public void unsetEx() {
29329
      this.ex = null;
29330
    }
29331
 
29332
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
29333
    public boolean isSetEx() {
29334
      return this.ex != null;
29335
    }
29336
 
29337
    public void setExIsSet(boolean value) {
29338
      if (!value) {
29339
        this.ex = null;
29340
      }
29341
    }
29342
 
29343
    public void setFieldValue(_Fields field, Object value) {
29344
      switch (field) {
29345
      case SUCCESS:
29346
        if (value == null) {
29347
          unsetSuccess();
29348
        } else {
29349
          setSuccess((Boolean)value);
29350
        }
29351
        break;
29352
 
29353
      case EX:
29354
        if (value == null) {
29355
          unsetEx();
29356
        } else {
29357
          setEx((TransactionServiceException)value);
29358
        }
29359
        break;
29360
 
29361
      }
29362
    }
29363
 
29364
    public void setFieldValue(int fieldID, Object value) {
29365
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29366
    }
29367
 
29368
    public Object getFieldValue(_Fields field) {
29369
      switch (field) {
29370
      case SUCCESS:
29371
        return new Boolean(isSuccess());
29372
 
29373
      case EX:
29374
        return getEx();
29375
 
29376
      }
29377
      throw new IllegalStateException();
29378
    }
29379
 
29380
    public Object getFieldValue(int fieldId) {
29381
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29382
    }
29383
 
29384
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29385
    public boolean isSet(_Fields field) {
29386
      switch (field) {
29387
      case SUCCESS:
29388
        return isSetSuccess();
29389
      case EX:
29390
        return isSetEx();
29391
      }
29392
      throw new IllegalStateException();
29393
    }
29394
 
29395
    public boolean isSet(int fieldID) {
29396
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29397
    }
29398
 
29399
    @Override
29400
    public boolean equals(Object that) {
29401
      if (that == null)
29402
        return false;
29403
      if (that instanceof toggleDOAFlag_result)
29404
        return this.equals((toggleDOAFlag_result)that);
29405
      return false;
29406
    }
29407
 
29408
    public boolean equals(toggleDOAFlag_result that) {
29409
      if (that == null)
29410
        return false;
29411
 
29412
      boolean this_present_success = true;
29413
      boolean that_present_success = true;
29414
      if (this_present_success || that_present_success) {
29415
        if (!(this_present_success && that_present_success))
29416
          return false;
29417
        if (this.success != that.success)
29418
          return false;
29419
      }
29420
 
29421
      boolean this_present_ex = true && this.isSetEx();
29422
      boolean that_present_ex = true && that.isSetEx();
29423
      if (this_present_ex || that_present_ex) {
29424
        if (!(this_present_ex && that_present_ex))
29425
          return false;
29426
        if (!this.ex.equals(that.ex))
29427
          return false;
29428
      }
29429
 
29430
      return true;
29431
    }
29432
 
29433
    @Override
29434
    public int hashCode() {
29435
      return 0;
29436
    }
29437
 
29438
    public int compareTo(toggleDOAFlag_result other) {
29439
      if (!getClass().equals(other.getClass())) {
29440
        return getClass().getName().compareTo(other.getClass().getName());
29441
      }
29442
 
29443
      int lastComparison = 0;
29444
      toggleDOAFlag_result typedOther = (toggleDOAFlag_result)other;
29445
 
29446
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29447
      if (lastComparison != 0) {
29448
        return lastComparison;
29449
      }
29450
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29451
      if (lastComparison != 0) {
29452
        return lastComparison;
29453
      }
29454
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
29455
      if (lastComparison != 0) {
29456
        return lastComparison;
29457
      }
29458
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
29459
      if (lastComparison != 0) {
29460
        return lastComparison;
29461
      }
29462
      return 0;
29463
    }
29464
 
29465
    public void read(TProtocol iprot) throws TException {
29466
      TField field;
29467
      iprot.readStructBegin();
29468
      while (true)
29469
      {
29470
        field = iprot.readFieldBegin();
29471
        if (field.type == TType.STOP) { 
29472
          break;
29473
        }
29474
        _Fields fieldId = _Fields.findByThriftId(field.id);
29475
        if (fieldId == null) {
29476
          TProtocolUtil.skip(iprot, field.type);
29477
        } else {
29478
          switch (fieldId) {
29479
            case SUCCESS:
29480
              if (field.type == TType.BOOL) {
29481
                this.success = iprot.readBool();
29482
                setSuccessIsSet(true);
29483
              } else { 
29484
                TProtocolUtil.skip(iprot, field.type);
29485
              }
29486
              break;
29487
            case EX:
29488
              if (field.type == TType.STRUCT) {
29489
                this.ex = new TransactionServiceException();
29490
                this.ex.read(iprot);
29491
              } else { 
29492
                TProtocolUtil.skip(iprot, field.type);
29493
              }
29494
              break;
29495
          }
29496
          iprot.readFieldEnd();
29497
        }
29498
      }
29499
      iprot.readStructEnd();
29500
      validate();
29501
    }
29502
 
29503
    public void write(TProtocol oprot) throws TException {
29504
      oprot.writeStructBegin(STRUCT_DESC);
29505
 
29506
      if (this.isSetSuccess()) {
29507
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29508
        oprot.writeBool(this.success);
29509
        oprot.writeFieldEnd();
29510
      } else if (this.isSetEx()) {
29511
        oprot.writeFieldBegin(EX_FIELD_DESC);
29512
        this.ex.write(oprot);
29513
        oprot.writeFieldEnd();
29514
      }
29515
      oprot.writeFieldStop();
29516
      oprot.writeStructEnd();
29517
    }
29518
 
29519
    @Override
29520
    public String toString() {
29521
      StringBuilder sb = new StringBuilder("toggleDOAFlag_result(");
29522
      boolean first = true;
29523
 
29524
      sb.append("success:");
29525
      sb.append(this.success);
29526
      first = false;
29527
      if (!first) sb.append(", ");
29528
      sb.append("ex:");
29529
      if (this.ex == null) {
29530
        sb.append("null");
29531
      } else {
29532
        sb.append(this.ex);
29533
      }
29534
      first = false;
29535
      sb.append(")");
29536
      return sb.toString();
29537
    }
29538
 
29539
    public void validate() throws TException {
29540
      // check for required fields
29541
    }
29542
 
29543
  }
29544
 
29545
  public static class requestPickupNumber_args implements TBase<requestPickupNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_args>   {
29546
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_args");
29547
 
29548
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
29549
 
29550
    private long orderId;
29551
 
29552
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29553
    public enum _Fields implements TFieldIdEnum {
29554
      ORDER_ID((short)1, "orderId");
29555
 
29556
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29557
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29558
 
29559
      static {
29560
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29561
          byId.put((int)field._thriftId, field);
29562
          byName.put(field.getFieldName(), field);
29563
        }
29564
      }
29565
 
29566
      /**
29567
       * Find the _Fields constant that matches fieldId, or null if its not found.
29568
       */
29569
      public static _Fields findByThriftId(int fieldId) {
29570
        return byId.get(fieldId);
29571
      }
29572
 
29573
      /**
29574
       * Find the _Fields constant that matches fieldId, throwing an exception
29575
       * if it is not found.
29576
       */
29577
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29578
        _Fields fields = findByThriftId(fieldId);
29579
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29580
        return fields;
29581
      }
29582
 
29583
      /**
29584
       * Find the _Fields constant that matches name, or null if its not found.
29585
       */
29586
      public static _Fields findByName(String name) {
29587
        return byName.get(name);
29588
      }
29589
 
29590
      private final short _thriftId;
29591
      private final String _fieldName;
29592
 
29593
      _Fields(short thriftId, String fieldName) {
29594
        _thriftId = thriftId;
29595
        _fieldName = fieldName;
29596
      }
29597
 
29598
      public short getThriftFieldId() {
29599
        return _thriftId;
29600
      }
29601
 
29602
      public String getFieldName() {
29603
        return _fieldName;
29604
      }
29605
    }
29606
 
29607
    // isset id assignments
29608
    private static final int __ORDERID_ISSET_ID = 0;
29609
    private BitSet __isset_bit_vector = new BitSet(1);
29610
 
29611
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29612
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
29613
          new FieldValueMetaData(TType.I64)));
29614
    }});
29615
 
29616
    static {
29617
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_args.class, metaDataMap);
29618
    }
29619
 
29620
    public requestPickupNumber_args() {
29621
    }
29622
 
29623
    public requestPickupNumber_args(
29624
      long orderId)
29625
    {
29626
      this();
29627
      this.orderId = orderId;
29628
      setOrderIdIsSet(true);
29629
    }
29630
 
29631
    /**
29632
     * Performs a deep copy on <i>other</i>.
29633
     */
29634
    public requestPickupNumber_args(requestPickupNumber_args other) {
29635
      __isset_bit_vector.clear();
29636
      __isset_bit_vector.or(other.__isset_bit_vector);
29637
      this.orderId = other.orderId;
29638
    }
29639
 
29640
    public requestPickupNumber_args deepCopy() {
29641
      return new requestPickupNumber_args(this);
29642
    }
29643
 
29644
    @Deprecated
29645
    public requestPickupNumber_args clone() {
29646
      return new requestPickupNumber_args(this);
29647
    }
29648
 
29649
    public long getOrderId() {
29650
      return this.orderId;
29651
    }
29652
 
29653
    public requestPickupNumber_args setOrderId(long orderId) {
29654
      this.orderId = orderId;
29655
      setOrderIdIsSet(true);
29656
      return this;
29657
    }
29658
 
29659
    public void unsetOrderId() {
29660
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
29661
    }
29662
 
29663
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
29664
    public boolean isSetOrderId() {
29665
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
29666
    }
29667
 
29668
    public void setOrderIdIsSet(boolean value) {
29669
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
29670
    }
29671
 
29672
    public void setFieldValue(_Fields field, Object value) {
29673
      switch (field) {
29674
      case ORDER_ID:
29675
        if (value == null) {
29676
          unsetOrderId();
29677
        } else {
29678
          setOrderId((Long)value);
29679
        }
29680
        break;
29681
 
29682
      }
29683
    }
29684
 
29685
    public void setFieldValue(int fieldID, Object value) {
29686
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29687
    }
29688
 
29689
    public Object getFieldValue(_Fields field) {
29690
      switch (field) {
29691
      case ORDER_ID:
29692
        return new Long(getOrderId());
29693
 
29694
      }
29695
      throw new IllegalStateException();
29696
    }
29697
 
29698
    public Object getFieldValue(int fieldId) {
29699
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29700
    }
29701
 
29702
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29703
    public boolean isSet(_Fields field) {
29704
      switch (field) {
29705
      case ORDER_ID:
29706
        return isSetOrderId();
29707
      }
29708
      throw new IllegalStateException();
29709
    }
29710
 
29711
    public boolean isSet(int fieldID) {
29712
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29713
    }
29714
 
29715
    @Override
29716
    public boolean equals(Object that) {
29717
      if (that == null)
29718
        return false;
29719
      if (that instanceof requestPickupNumber_args)
29720
        return this.equals((requestPickupNumber_args)that);
29721
      return false;
29722
    }
29723
 
29724
    public boolean equals(requestPickupNumber_args that) {
29725
      if (that == null)
29726
        return false;
29727
 
29728
      boolean this_present_orderId = true;
29729
      boolean that_present_orderId = true;
29730
      if (this_present_orderId || that_present_orderId) {
29731
        if (!(this_present_orderId && that_present_orderId))
29732
          return false;
29733
        if (this.orderId != that.orderId)
29734
          return false;
29735
      }
29736
 
29737
      return true;
29738
    }
29739
 
29740
    @Override
29741
    public int hashCode() {
29742
      return 0;
29743
    }
29744
 
29745
    public int compareTo(requestPickupNumber_args other) {
29746
      if (!getClass().equals(other.getClass())) {
29747
        return getClass().getName().compareTo(other.getClass().getName());
29748
      }
29749
 
29750
      int lastComparison = 0;
29751
      requestPickupNumber_args typedOther = (requestPickupNumber_args)other;
29752
 
29753
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
29754
      if (lastComparison != 0) {
29755
        return lastComparison;
29756
      }
29757
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
29758
      if (lastComparison != 0) {
29759
        return lastComparison;
29760
      }
29761
      return 0;
29762
    }
29763
 
29764
    public void read(TProtocol iprot) throws TException {
29765
      TField field;
29766
      iprot.readStructBegin();
29767
      while (true)
29768
      {
29769
        field = iprot.readFieldBegin();
29770
        if (field.type == TType.STOP) { 
29771
          break;
29772
        }
29773
        _Fields fieldId = _Fields.findByThriftId(field.id);
29774
        if (fieldId == null) {
29775
          TProtocolUtil.skip(iprot, field.type);
29776
        } else {
29777
          switch (fieldId) {
29778
            case ORDER_ID:
29779
              if (field.type == TType.I64) {
29780
                this.orderId = iprot.readI64();
29781
                setOrderIdIsSet(true);
29782
              } else { 
29783
                TProtocolUtil.skip(iprot, field.type);
29784
              }
29785
              break;
29786
          }
29787
          iprot.readFieldEnd();
29788
        }
29789
      }
29790
      iprot.readStructEnd();
29791
      validate();
29792
    }
29793
 
29794
    public void write(TProtocol oprot) throws TException {
29795
      validate();
29796
 
29797
      oprot.writeStructBegin(STRUCT_DESC);
29798
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
29799
      oprot.writeI64(this.orderId);
29800
      oprot.writeFieldEnd();
29801
      oprot.writeFieldStop();
29802
      oprot.writeStructEnd();
29803
    }
29804
 
29805
    @Override
29806
    public String toString() {
29807
      StringBuilder sb = new StringBuilder("requestPickupNumber_args(");
29808
      boolean first = true;
29809
 
29810
      sb.append("orderId:");
29811
      sb.append(this.orderId);
29812
      first = false;
29813
      sb.append(")");
29814
      return sb.toString();
29815
    }
29816
 
29817
    public void validate() throws TException {
29818
      // check for required fields
29819
    }
29820
 
29821
  }
29822
 
29823
  public static class requestPickupNumber_result implements TBase<requestPickupNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_result>   {
29824
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_result");
29825
 
29826
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
29827
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
29828
 
29829
    private boolean success;
29830
    private TransactionServiceException ex;
29831
 
29832
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29833
    public enum _Fields implements TFieldIdEnum {
29834
      SUCCESS((short)0, "success"),
29835
      EX((short)1, "ex");
29836
 
29837
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29838
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29839
 
29840
      static {
29841
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29842
          byId.put((int)field._thriftId, field);
29843
          byName.put(field.getFieldName(), field);
29844
        }
29845
      }
29846
 
29847
      /**
29848
       * Find the _Fields constant that matches fieldId, or null if its not found.
29849
       */
29850
      public static _Fields findByThriftId(int fieldId) {
29851
        return byId.get(fieldId);
29852
      }
29853
 
29854
      /**
29855
       * Find the _Fields constant that matches fieldId, throwing an exception
29856
       * if it is not found.
29857
       */
29858
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29859
        _Fields fields = findByThriftId(fieldId);
29860
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29861
        return fields;
29862
      }
29863
 
29864
      /**
29865
       * Find the _Fields constant that matches name, or null if its not found.
29866
       */
29867
      public static _Fields findByName(String name) {
29868
        return byName.get(name);
29869
      }
29870
 
29871
      private final short _thriftId;
29872
      private final String _fieldName;
29873
 
29874
      _Fields(short thriftId, String fieldName) {
29875
        _thriftId = thriftId;
29876
        _fieldName = fieldName;
29877
      }
29878
 
29879
      public short getThriftFieldId() {
29880
        return _thriftId;
29881
      }
29882
 
29883
      public String getFieldName() {
29884
        return _fieldName;
29885
      }
29886
    }
29887
 
29888
    // isset id assignments
29889
    private static final int __SUCCESS_ISSET_ID = 0;
29890
    private BitSet __isset_bit_vector = new BitSet(1);
29891
 
29892
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29893
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29894
          new FieldValueMetaData(TType.BOOL)));
29895
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
29896
          new FieldValueMetaData(TType.STRUCT)));
29897
    }});
29898
 
29899
    static {
29900
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_result.class, metaDataMap);
29901
    }
29902
 
29903
    public requestPickupNumber_result() {
29904
    }
29905
 
29906
    public requestPickupNumber_result(
29907
      boolean success,
29908
      TransactionServiceException ex)
29909
    {
29910
      this();
29911
      this.success = success;
29912
      setSuccessIsSet(true);
29913
      this.ex = ex;
29914
    }
29915
 
29916
    /**
29917
     * Performs a deep copy on <i>other</i>.
29918
     */
29919
    public requestPickupNumber_result(requestPickupNumber_result other) {
29920
      __isset_bit_vector.clear();
29921
      __isset_bit_vector.or(other.__isset_bit_vector);
29922
      this.success = other.success;
29923
      if (other.isSetEx()) {
29924
        this.ex = new TransactionServiceException(other.ex);
29925
      }
29926
    }
29927
 
29928
    public requestPickupNumber_result deepCopy() {
29929
      return new requestPickupNumber_result(this);
29930
    }
29931
 
29932
    @Deprecated
29933
    public requestPickupNumber_result clone() {
29934
      return new requestPickupNumber_result(this);
29935
    }
29936
 
29937
    public boolean isSuccess() {
29938
      return this.success;
29939
    }
29940
 
29941
    public requestPickupNumber_result setSuccess(boolean success) {
29942
      this.success = success;
29943
      setSuccessIsSet(true);
29944
      return this;
29945
    }
29946
 
29947
    public void unsetSuccess() {
29948
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29949
    }
29950
 
29951
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29952
    public boolean isSetSuccess() {
29953
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29954
    }
29955
 
29956
    public void setSuccessIsSet(boolean value) {
29957
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29958
    }
29959
 
29960
    public TransactionServiceException getEx() {
29961
      return this.ex;
29962
    }
29963
 
29964
    public requestPickupNumber_result setEx(TransactionServiceException ex) {
29965
      this.ex = ex;
29966
      return this;
29967
    }
29968
 
29969
    public void unsetEx() {
29970
      this.ex = null;
29971
    }
29972
 
29973
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
29974
    public boolean isSetEx() {
29975
      return this.ex != null;
29976
    }
29977
 
29978
    public void setExIsSet(boolean value) {
29979
      if (!value) {
29980
        this.ex = null;
29981
      }
29982
    }
29983
 
29984
    public void setFieldValue(_Fields field, Object value) {
29985
      switch (field) {
29986
      case SUCCESS:
29987
        if (value == null) {
29988
          unsetSuccess();
29989
        } else {
29990
          setSuccess((Boolean)value);
29991
        }
29992
        break;
29993
 
29994
      case EX:
29995
        if (value == null) {
29996
          unsetEx();
29997
        } else {
29998
          setEx((TransactionServiceException)value);
29999
        }
30000
        break;
30001
 
30002
      }
30003
    }
30004
 
30005
    public void setFieldValue(int fieldID, Object value) {
30006
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30007
    }
30008
 
30009
    public Object getFieldValue(_Fields field) {
30010
      switch (field) {
30011
      case SUCCESS:
30012
        return new Boolean(isSuccess());
30013
 
30014
      case EX:
30015
        return getEx();
30016
 
30017
      }
30018
      throw new IllegalStateException();
30019
    }
30020
 
30021
    public Object getFieldValue(int fieldId) {
30022
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30023
    }
30024
 
30025
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30026
    public boolean isSet(_Fields field) {
30027
      switch (field) {
30028
      case SUCCESS:
30029
        return isSetSuccess();
30030
      case EX:
30031
        return isSetEx();
30032
      }
30033
      throw new IllegalStateException();
30034
    }
30035
 
30036
    public boolean isSet(int fieldID) {
30037
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30038
    }
30039
 
30040
    @Override
30041
    public boolean equals(Object that) {
30042
      if (that == null)
30043
        return false;
30044
      if (that instanceof requestPickupNumber_result)
30045
        return this.equals((requestPickupNumber_result)that);
30046
      return false;
30047
    }
30048
 
30049
    public boolean equals(requestPickupNumber_result that) {
30050
      if (that == null)
30051
        return false;
30052
 
30053
      boolean this_present_success = true;
30054
      boolean that_present_success = true;
30055
      if (this_present_success || that_present_success) {
30056
        if (!(this_present_success && that_present_success))
30057
          return false;
30058
        if (this.success != that.success)
30059
          return false;
30060
      }
30061
 
30062
      boolean this_present_ex = true && this.isSetEx();
30063
      boolean that_present_ex = true && that.isSetEx();
30064
      if (this_present_ex || that_present_ex) {
30065
        if (!(this_present_ex && that_present_ex))
30066
          return false;
30067
        if (!this.ex.equals(that.ex))
30068
          return false;
30069
      }
30070
 
30071
      return true;
30072
    }
30073
 
30074
    @Override
30075
    public int hashCode() {
30076
      return 0;
30077
    }
30078
 
30079
    public int compareTo(requestPickupNumber_result other) {
30080
      if (!getClass().equals(other.getClass())) {
30081
        return getClass().getName().compareTo(other.getClass().getName());
30082
      }
30083
 
30084
      int lastComparison = 0;
30085
      requestPickupNumber_result typedOther = (requestPickupNumber_result)other;
30086
 
30087
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30088
      if (lastComparison != 0) {
30089
        return lastComparison;
30090
      }
30091
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30092
      if (lastComparison != 0) {
30093
        return lastComparison;
30094
      }
30095
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
30096
      if (lastComparison != 0) {
30097
        return lastComparison;
30098
      }
30099
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
30100
      if (lastComparison != 0) {
30101
        return lastComparison;
30102
      }
30103
      return 0;
30104
    }
30105
 
30106
    public void read(TProtocol iprot) throws TException {
30107
      TField field;
30108
      iprot.readStructBegin();
30109
      while (true)
30110
      {
30111
        field = iprot.readFieldBegin();
30112
        if (field.type == TType.STOP) { 
30113
          break;
30114
        }
30115
        _Fields fieldId = _Fields.findByThriftId(field.id);
30116
        if (fieldId == null) {
30117
          TProtocolUtil.skip(iprot, field.type);
30118
        } else {
30119
          switch (fieldId) {
30120
            case SUCCESS:
30121
              if (field.type == TType.BOOL) {
30122
                this.success = iprot.readBool();
30123
                setSuccessIsSet(true);
30124
              } else { 
30125
                TProtocolUtil.skip(iprot, field.type);
30126
              }
30127
              break;
30128
            case EX:
30129
              if (field.type == TType.STRUCT) {
30130
                this.ex = new TransactionServiceException();
30131
                this.ex.read(iprot);
30132
              } else { 
30133
                TProtocolUtil.skip(iprot, field.type);
30134
              }
30135
              break;
30136
          }
30137
          iprot.readFieldEnd();
30138
        }
30139
      }
30140
      iprot.readStructEnd();
30141
      validate();
30142
    }
30143
 
30144
    public void write(TProtocol oprot) throws TException {
30145
      oprot.writeStructBegin(STRUCT_DESC);
30146
 
30147
      if (this.isSetSuccess()) {
30148
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30149
        oprot.writeBool(this.success);
30150
        oprot.writeFieldEnd();
30151
      } else if (this.isSetEx()) {
30152
        oprot.writeFieldBegin(EX_FIELD_DESC);
30153
        this.ex.write(oprot);
30154
        oprot.writeFieldEnd();
30155
      }
30156
      oprot.writeFieldStop();
30157
      oprot.writeStructEnd();
30158
    }
30159
 
30160
    @Override
30161
    public String toString() {
30162
      StringBuilder sb = new StringBuilder("requestPickupNumber_result(");
30163
      boolean first = true;
30164
 
30165
      sb.append("success:");
30166
      sb.append(this.success);
30167
      first = false;
30168
      if (!first) sb.append(", ");
30169
      sb.append("ex:");
30170
      if (this.ex == null) {
30171
        sb.append("null");
30172
      } else {
30173
        sb.append(this.ex);
30174
      }
30175
      first = false;
30176
      sb.append(")");
30177
      return sb.toString();
30178
    }
30179
 
30180
    public void validate() throws TException {
30181
      // check for required fields
30182
    }
30183
 
30184
  }
30185
 
30186
  public static class authorizePickup_args implements TBase<authorizePickup_args._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_args>   {
30187
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_args");
30188
 
30189
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
30190
    private static final TField PICKUP_NUMBER_FIELD_DESC = new TField("pickupNumber", TType.STRING, (short)2);
30191
 
30192
    private long orderId;
30193
    private String pickupNumber;
30194
 
30195
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30196
    public enum _Fields implements TFieldIdEnum {
30197
      ORDER_ID((short)1, "orderId"),
30198
      PICKUP_NUMBER((short)2, "pickupNumber");
30199
 
30200
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30201
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30202
 
30203
      static {
30204
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30205
          byId.put((int)field._thriftId, field);
30206
          byName.put(field.getFieldName(), field);
30207
        }
30208
      }
30209
 
30210
      /**
30211
       * Find the _Fields constant that matches fieldId, or null if its not found.
30212
       */
30213
      public static _Fields findByThriftId(int fieldId) {
30214
        return byId.get(fieldId);
30215
      }
30216
 
30217
      /**
30218
       * Find the _Fields constant that matches fieldId, throwing an exception
30219
       * if it is not found.
30220
       */
30221
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30222
        _Fields fields = findByThriftId(fieldId);
30223
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30224
        return fields;
30225
      }
30226
 
30227
      /**
30228
       * Find the _Fields constant that matches name, or null if its not found.
30229
       */
30230
      public static _Fields findByName(String name) {
30231
        return byName.get(name);
30232
      }
30233
 
30234
      private final short _thriftId;
30235
      private final String _fieldName;
30236
 
30237
      _Fields(short thriftId, String fieldName) {
30238
        _thriftId = thriftId;
30239
        _fieldName = fieldName;
30240
      }
30241
 
30242
      public short getThriftFieldId() {
30243
        return _thriftId;
30244
      }
30245
 
30246
      public String getFieldName() {
30247
        return _fieldName;
30248
      }
30249
    }
30250
 
30251
    // isset id assignments
30252
    private static final int __ORDERID_ISSET_ID = 0;
30253
    private BitSet __isset_bit_vector = new BitSet(1);
30254
 
30255
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30256
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
30257
          new FieldValueMetaData(TType.I64)));
30258
      put(_Fields.PICKUP_NUMBER, new FieldMetaData("pickupNumber", TFieldRequirementType.DEFAULT, 
30259
          new FieldValueMetaData(TType.STRING)));
30260
    }});
30261
 
30262
    static {
30263
      FieldMetaData.addStructMetaDataMap(authorizePickup_args.class, metaDataMap);
30264
    }
30265
 
30266
    public authorizePickup_args() {
30267
    }
30268
 
30269
    public authorizePickup_args(
30270
      long orderId,
30271
      String pickupNumber)
30272
    {
30273
      this();
30274
      this.orderId = orderId;
30275
      setOrderIdIsSet(true);
30276
      this.pickupNumber = pickupNumber;
30277
    }
30278
 
30279
    /**
30280
     * Performs a deep copy on <i>other</i>.
30281
     */
30282
    public authorizePickup_args(authorizePickup_args other) {
30283
      __isset_bit_vector.clear();
30284
      __isset_bit_vector.or(other.__isset_bit_vector);
30285
      this.orderId = other.orderId;
30286
      if (other.isSetPickupNumber()) {
30287
        this.pickupNumber = other.pickupNumber;
30288
      }
30289
    }
30290
 
30291
    public authorizePickup_args deepCopy() {
30292
      return new authorizePickup_args(this);
30293
    }
30294
 
30295
    @Deprecated
30296
    public authorizePickup_args clone() {
30297
      return new authorizePickup_args(this);
30298
    }
30299
 
30300
    public long getOrderId() {
30301
      return this.orderId;
30302
    }
30303
 
30304
    public authorizePickup_args setOrderId(long orderId) {
30305
      this.orderId = orderId;
30306
      setOrderIdIsSet(true);
30307
      return this;
30308
    }
30309
 
30310
    public void unsetOrderId() {
30311
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
30312
    }
30313
 
30314
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
30315
    public boolean isSetOrderId() {
30316
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
30317
    }
30318
 
30319
    public void setOrderIdIsSet(boolean value) {
30320
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
30321
    }
30322
 
30323
    public String getPickupNumber() {
30324
      return this.pickupNumber;
30325
    }
30326
 
30327
    public authorizePickup_args setPickupNumber(String pickupNumber) {
30328
      this.pickupNumber = pickupNumber;
30329
      return this;
30330
    }
30331
 
30332
    public void unsetPickupNumber() {
30333
      this.pickupNumber = null;
30334
    }
30335
 
30336
    /** Returns true if field pickupNumber is set (has been asigned a value) and false otherwise */
30337
    public boolean isSetPickupNumber() {
30338
      return this.pickupNumber != null;
30339
    }
30340
 
30341
    public void setPickupNumberIsSet(boolean value) {
30342
      if (!value) {
30343
        this.pickupNumber = null;
30344
      }
30345
    }
30346
 
30347
    public void setFieldValue(_Fields field, Object value) {
30348
      switch (field) {
30349
      case ORDER_ID:
30350
        if (value == null) {
30351
          unsetOrderId();
30352
        } else {
30353
          setOrderId((Long)value);
30354
        }
30355
        break;
30356
 
30357
      case PICKUP_NUMBER:
30358
        if (value == null) {
30359
          unsetPickupNumber();
30360
        } else {
30361
          setPickupNumber((String)value);
30362
        }
30363
        break;
30364
 
30365
      }
30366
    }
30367
 
30368
    public void setFieldValue(int fieldID, Object value) {
30369
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30370
    }
30371
 
30372
    public Object getFieldValue(_Fields field) {
30373
      switch (field) {
30374
      case ORDER_ID:
30375
        return new Long(getOrderId());
30376
 
30377
      case PICKUP_NUMBER:
30378
        return getPickupNumber();
30379
 
30380
      }
30381
      throw new IllegalStateException();
30382
    }
30383
 
30384
    public Object getFieldValue(int fieldId) {
30385
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30386
    }
30387
 
30388
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30389
    public boolean isSet(_Fields field) {
30390
      switch (field) {
30391
      case ORDER_ID:
30392
        return isSetOrderId();
30393
      case PICKUP_NUMBER:
30394
        return isSetPickupNumber();
30395
      }
30396
      throw new IllegalStateException();
30397
    }
30398
 
30399
    public boolean isSet(int fieldID) {
30400
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30401
    }
30402
 
30403
    @Override
30404
    public boolean equals(Object that) {
30405
      if (that == null)
30406
        return false;
30407
      if (that instanceof authorizePickup_args)
30408
        return this.equals((authorizePickup_args)that);
30409
      return false;
30410
    }
30411
 
30412
    public boolean equals(authorizePickup_args that) {
30413
      if (that == null)
30414
        return false;
30415
 
30416
      boolean this_present_orderId = true;
30417
      boolean that_present_orderId = true;
30418
      if (this_present_orderId || that_present_orderId) {
30419
        if (!(this_present_orderId && that_present_orderId))
30420
          return false;
30421
        if (this.orderId != that.orderId)
30422
          return false;
30423
      }
30424
 
30425
      boolean this_present_pickupNumber = true && this.isSetPickupNumber();
30426
      boolean that_present_pickupNumber = true && that.isSetPickupNumber();
30427
      if (this_present_pickupNumber || that_present_pickupNumber) {
30428
        if (!(this_present_pickupNumber && that_present_pickupNumber))
30429
          return false;
30430
        if (!this.pickupNumber.equals(that.pickupNumber))
30431
          return false;
30432
      }
30433
 
30434
      return true;
30435
    }
30436
 
30437
    @Override
30438
    public int hashCode() {
30439
      return 0;
30440
    }
30441
 
30442
    public int compareTo(authorizePickup_args other) {
30443
      if (!getClass().equals(other.getClass())) {
30444
        return getClass().getName().compareTo(other.getClass().getName());
30445
      }
30446
 
30447
      int lastComparison = 0;
30448
      authorizePickup_args typedOther = (authorizePickup_args)other;
30449
 
30450
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
30451
      if (lastComparison != 0) {
30452
        return lastComparison;
30453
      }
30454
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
30455
      if (lastComparison != 0) {
30456
        return lastComparison;
30457
      }
30458
      lastComparison = Boolean.valueOf(isSetPickupNumber()).compareTo(isSetPickupNumber());
30459
      if (lastComparison != 0) {
30460
        return lastComparison;
30461
      }
30462
      lastComparison = TBaseHelper.compareTo(pickupNumber, typedOther.pickupNumber);
30463
      if (lastComparison != 0) {
30464
        return lastComparison;
30465
      }
30466
      return 0;
30467
    }
30468
 
30469
    public void read(TProtocol iprot) throws TException {
30470
      TField field;
30471
      iprot.readStructBegin();
30472
      while (true)
30473
      {
30474
        field = iprot.readFieldBegin();
30475
        if (field.type == TType.STOP) { 
30476
          break;
30477
        }
30478
        _Fields fieldId = _Fields.findByThriftId(field.id);
30479
        if (fieldId == null) {
30480
          TProtocolUtil.skip(iprot, field.type);
30481
        } else {
30482
          switch (fieldId) {
30483
            case ORDER_ID:
30484
              if (field.type == TType.I64) {
30485
                this.orderId = iprot.readI64();
30486
                setOrderIdIsSet(true);
30487
              } else { 
30488
                TProtocolUtil.skip(iprot, field.type);
30489
              }
30490
              break;
30491
            case PICKUP_NUMBER:
30492
              if (field.type == TType.STRING) {
30493
                this.pickupNumber = iprot.readString();
30494
              } else { 
30495
                TProtocolUtil.skip(iprot, field.type);
30496
              }
30497
              break;
30498
          }
30499
          iprot.readFieldEnd();
30500
        }
30501
      }
30502
      iprot.readStructEnd();
30503
      validate();
30504
    }
30505
 
30506
    public void write(TProtocol oprot) throws TException {
30507
      validate();
30508
 
30509
      oprot.writeStructBegin(STRUCT_DESC);
30510
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
30511
      oprot.writeI64(this.orderId);
30512
      oprot.writeFieldEnd();
30513
      if (this.pickupNumber != null) {
30514
        oprot.writeFieldBegin(PICKUP_NUMBER_FIELD_DESC);
30515
        oprot.writeString(this.pickupNumber);
30516
        oprot.writeFieldEnd();
30517
      }
30518
      oprot.writeFieldStop();
30519
      oprot.writeStructEnd();
30520
    }
30521
 
30522
    @Override
30523
    public String toString() {
30524
      StringBuilder sb = new StringBuilder("authorizePickup_args(");
30525
      boolean first = true;
30526
 
30527
      sb.append("orderId:");
30528
      sb.append(this.orderId);
30529
      first = false;
30530
      if (!first) sb.append(", ");
30531
      sb.append("pickupNumber:");
30532
      if (this.pickupNumber == null) {
30533
        sb.append("null");
30534
      } else {
30535
        sb.append(this.pickupNumber);
30536
      }
30537
      first = false;
30538
      sb.append(")");
30539
      return sb.toString();
30540
    }
30541
 
30542
    public void validate() throws TException {
30543
      // check for required fields
30544
    }
30545
 
30546
  }
30547
 
30548
  public static class authorizePickup_result implements TBase<authorizePickup_result._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_result>   {
30549
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_result");
30550
 
30551
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
30552
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
30553
 
30554
    private boolean success;
30555
    private TransactionServiceException ex;
30556
 
30557
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30558
    public enum _Fields implements TFieldIdEnum {
30559
      SUCCESS((short)0, "success"),
30560
      EX((short)1, "ex");
30561
 
30562
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30563
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30564
 
30565
      static {
30566
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30567
          byId.put((int)field._thriftId, field);
30568
          byName.put(field.getFieldName(), field);
30569
        }
30570
      }
30571
 
30572
      /**
30573
       * Find the _Fields constant that matches fieldId, or null if its not found.
30574
       */
30575
      public static _Fields findByThriftId(int fieldId) {
30576
        return byId.get(fieldId);
30577
      }
30578
 
30579
      /**
30580
       * Find the _Fields constant that matches fieldId, throwing an exception
30581
       * if it is not found.
30582
       */
30583
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30584
        _Fields fields = findByThriftId(fieldId);
30585
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30586
        return fields;
30587
      }
30588
 
30589
      /**
30590
       * Find the _Fields constant that matches name, or null if its not found.
30591
       */
30592
      public static _Fields findByName(String name) {
30593
        return byName.get(name);
30594
      }
30595
 
30596
      private final short _thriftId;
30597
      private final String _fieldName;
30598
 
30599
      _Fields(short thriftId, String fieldName) {
30600
        _thriftId = thriftId;
30601
        _fieldName = fieldName;
30602
      }
30603
 
30604
      public short getThriftFieldId() {
30605
        return _thriftId;
30606
      }
30607
 
30608
      public String getFieldName() {
30609
        return _fieldName;
30610
      }
30611
    }
30612
 
30613
    // isset id assignments
30614
    private static final int __SUCCESS_ISSET_ID = 0;
30615
    private BitSet __isset_bit_vector = new BitSet(1);
30616
 
30617
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30618
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30619
          new FieldValueMetaData(TType.BOOL)));
30620
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
30621
          new FieldValueMetaData(TType.STRUCT)));
30622
    }});
30623
 
30624
    static {
30625
      FieldMetaData.addStructMetaDataMap(authorizePickup_result.class, metaDataMap);
30626
    }
30627
 
30628
    public authorizePickup_result() {
30629
    }
30630
 
30631
    public authorizePickup_result(
30632
      boolean success,
30633
      TransactionServiceException ex)
30634
    {
30635
      this();
30636
      this.success = success;
30637
      setSuccessIsSet(true);
30638
      this.ex = ex;
30639
    }
30640
 
30641
    /**
30642
     * Performs a deep copy on <i>other</i>.
30643
     */
30644
    public authorizePickup_result(authorizePickup_result other) {
30645
      __isset_bit_vector.clear();
30646
      __isset_bit_vector.or(other.__isset_bit_vector);
30647
      this.success = other.success;
30648
      if (other.isSetEx()) {
30649
        this.ex = new TransactionServiceException(other.ex);
30650
      }
30651
    }
30652
 
30653
    public authorizePickup_result deepCopy() {
30654
      return new authorizePickup_result(this);
30655
    }
30656
 
30657
    @Deprecated
30658
    public authorizePickup_result clone() {
30659
      return new authorizePickup_result(this);
30660
    }
30661
 
30662
    public boolean isSuccess() {
30663
      return this.success;
30664
    }
30665
 
30666
    public authorizePickup_result setSuccess(boolean success) {
30667
      this.success = success;
30668
      setSuccessIsSet(true);
30669
      return this;
30670
    }
30671
 
30672
    public void unsetSuccess() {
30673
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
30674
    }
30675
 
30676
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30677
    public boolean isSetSuccess() {
30678
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
30679
    }
30680
 
30681
    public void setSuccessIsSet(boolean value) {
30682
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
30683
    }
30684
 
30685
    public TransactionServiceException getEx() {
30686
      return this.ex;
30687
    }
30688
 
30689
    public authorizePickup_result setEx(TransactionServiceException ex) {
30690
      this.ex = ex;
30691
      return this;
30692
    }
30693
 
30694
    public void unsetEx() {
30695
      this.ex = null;
30696
    }
30697
 
30698
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
30699
    public boolean isSetEx() {
30700
      return this.ex != null;
30701
    }
30702
 
30703
    public void setExIsSet(boolean value) {
30704
      if (!value) {
30705
        this.ex = null;
30706
      }
30707
    }
30708
 
30709
    public void setFieldValue(_Fields field, Object value) {
30710
      switch (field) {
30711
      case SUCCESS:
30712
        if (value == null) {
30713
          unsetSuccess();
30714
        } else {
30715
          setSuccess((Boolean)value);
30716
        }
30717
        break;
30718
 
30719
      case EX:
30720
        if (value == null) {
30721
          unsetEx();
30722
        } else {
30723
          setEx((TransactionServiceException)value);
30724
        }
30725
        break;
30726
 
30727
      }
30728
    }
30729
 
30730
    public void setFieldValue(int fieldID, Object value) {
30731
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30732
    }
30733
 
30734
    public Object getFieldValue(_Fields field) {
30735
      switch (field) {
30736
      case SUCCESS:
30737
        return new Boolean(isSuccess());
30738
 
30739
      case EX:
30740
        return getEx();
30741
 
30742
      }
30743
      throw new IllegalStateException();
30744
    }
30745
 
30746
    public Object getFieldValue(int fieldId) {
30747
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30748
    }
30749
 
30750
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30751
    public boolean isSet(_Fields field) {
30752
      switch (field) {
30753
      case SUCCESS:
30754
        return isSetSuccess();
30755
      case EX:
30756
        return isSetEx();
30757
      }
30758
      throw new IllegalStateException();
30759
    }
30760
 
30761
    public boolean isSet(int fieldID) {
30762
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30763
    }
30764
 
30765
    @Override
30766
    public boolean equals(Object that) {
30767
      if (that == null)
30768
        return false;
30769
      if (that instanceof authorizePickup_result)
30770
        return this.equals((authorizePickup_result)that);
30771
      return false;
30772
    }
30773
 
30774
    public boolean equals(authorizePickup_result that) {
30775
      if (that == null)
30776
        return false;
30777
 
30778
      boolean this_present_success = true;
30779
      boolean that_present_success = true;
30780
      if (this_present_success || that_present_success) {
30781
        if (!(this_present_success && that_present_success))
30782
          return false;
30783
        if (this.success != that.success)
30784
          return false;
30785
      }
30786
 
30787
      boolean this_present_ex = true && this.isSetEx();
30788
      boolean that_present_ex = true && that.isSetEx();
30789
      if (this_present_ex || that_present_ex) {
30790
        if (!(this_present_ex && that_present_ex))
30791
          return false;
30792
        if (!this.ex.equals(that.ex))
30793
          return false;
30794
      }
30795
 
30796
      return true;
30797
    }
30798
 
30799
    @Override
30800
    public int hashCode() {
30801
      return 0;
30802
    }
30803
 
30804
    public int compareTo(authorizePickup_result other) {
30805
      if (!getClass().equals(other.getClass())) {
30806
        return getClass().getName().compareTo(other.getClass().getName());
30807
      }
30808
 
30809
      int lastComparison = 0;
30810
      authorizePickup_result typedOther = (authorizePickup_result)other;
30811
 
30812
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30813
      if (lastComparison != 0) {
30814
        return lastComparison;
30815
      }
30816
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30817
      if (lastComparison != 0) {
30818
        return lastComparison;
30819
      }
30820
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
30821
      if (lastComparison != 0) {
30822
        return lastComparison;
30823
      }
30824
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
30825
      if (lastComparison != 0) {
30826
        return lastComparison;
30827
      }
30828
      return 0;
30829
    }
30830
 
30831
    public void read(TProtocol iprot) throws TException {
30832
      TField field;
30833
      iprot.readStructBegin();
30834
      while (true)
30835
      {
30836
        field = iprot.readFieldBegin();
30837
        if (field.type == TType.STOP) { 
30838
          break;
30839
        }
30840
        _Fields fieldId = _Fields.findByThriftId(field.id);
30841
        if (fieldId == null) {
30842
          TProtocolUtil.skip(iprot, field.type);
30843
        } else {
30844
          switch (fieldId) {
30845
            case SUCCESS:
30846
              if (field.type == TType.BOOL) {
30847
                this.success = iprot.readBool();
30848
                setSuccessIsSet(true);
30849
              } else { 
30850
                TProtocolUtil.skip(iprot, field.type);
30851
              }
30852
              break;
30853
            case EX:
30854
              if (field.type == TType.STRUCT) {
30855
                this.ex = new TransactionServiceException();
30856
                this.ex.read(iprot);
30857
              } else { 
30858
                TProtocolUtil.skip(iprot, field.type);
30859
              }
30860
              break;
30861
          }
30862
          iprot.readFieldEnd();
30863
        }
30864
      }
30865
      iprot.readStructEnd();
30866
      validate();
30867
    }
30868
 
30869
    public void write(TProtocol oprot) throws TException {
30870
      oprot.writeStructBegin(STRUCT_DESC);
30871
 
30872
      if (this.isSetSuccess()) {
30873
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30874
        oprot.writeBool(this.success);
30875
        oprot.writeFieldEnd();
30876
      } else if (this.isSetEx()) {
30877
        oprot.writeFieldBegin(EX_FIELD_DESC);
30878
        this.ex.write(oprot);
30879
        oprot.writeFieldEnd();
30880
      }
30881
      oprot.writeFieldStop();
30882
      oprot.writeStructEnd();
30883
    }
30884
 
30885
    @Override
30886
    public String toString() {
30887
      StringBuilder sb = new StringBuilder("authorizePickup_result(");
30888
      boolean first = true;
30889
 
30890
      sb.append("success:");
30891
      sb.append(this.success);
30892
      first = false;
30893
      if (!first) sb.append(", ");
30894
      sb.append("ex:");
30895
      if (this.ex == null) {
30896
        sb.append("null");
30897
      } else {
30898
        sb.append(this.ex);
30899
      }
30900
      first = false;
30901
      sb.append(")");
30902
      return sb.toString();
30903
    }
30904
 
30905
    public void validate() throws TException {
30906
      // check for required fields
30907
    }
30908
 
30909
  }
30910
 
2615 chandransh 30911
  public static class receiveReturn_args implements TBase<receiveReturn_args._Fields>, java.io.Serializable, Cloneable, Comparable<receiveReturn_args>   {
30912
    private static final TStruct STRUCT_DESC = new TStruct("receiveReturn_args");
2590 chandransh 30913
 
30914
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
30915
 
30916
    private long orderId;
30917
 
30918
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30919
    public enum _Fields implements TFieldIdEnum {
30920
      ORDER_ID((short)1, "orderId");
30921
 
30922
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30923
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30924
 
30925
      static {
30926
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30927
          byId.put((int)field._thriftId, field);
30928
          byName.put(field.getFieldName(), field);
30929
        }
30930
      }
30931
 
30932
      /**
30933
       * Find the _Fields constant that matches fieldId, or null if its not found.
30934
       */
30935
      public static _Fields findByThriftId(int fieldId) {
30936
        return byId.get(fieldId);
30937
      }
30938
 
30939
      /**
30940
       * Find the _Fields constant that matches fieldId, throwing an exception
30941
       * if it is not found.
30942
       */
30943
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30944
        _Fields fields = findByThriftId(fieldId);
30945
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30946
        return fields;
30947
      }
30948
 
30949
      /**
30950
       * Find the _Fields constant that matches name, or null if its not found.
30951
       */
30952
      public static _Fields findByName(String name) {
30953
        return byName.get(name);
30954
      }
30955
 
30956
      private final short _thriftId;
30957
      private final String _fieldName;
30958
 
30959
      _Fields(short thriftId, String fieldName) {
30960
        _thriftId = thriftId;
30961
        _fieldName = fieldName;
30962
      }
30963
 
30964
      public short getThriftFieldId() {
30965
        return _thriftId;
30966
      }
30967
 
30968
      public String getFieldName() {
30969
        return _fieldName;
30970
      }
30971
    }
30972
 
30973
    // isset id assignments
30974
    private static final int __ORDERID_ISSET_ID = 0;
30975
    private BitSet __isset_bit_vector = new BitSet(1);
30976
 
30977
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30978
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
30979
          new FieldValueMetaData(TType.I64)));
30980
    }});
30981
 
30982
    static {
2615 chandransh 30983
      FieldMetaData.addStructMetaDataMap(receiveReturn_args.class, metaDataMap);
2590 chandransh 30984
    }
30985
 
2615 chandransh 30986
    public receiveReturn_args() {
2590 chandransh 30987
    }
30988
 
2615 chandransh 30989
    public receiveReturn_args(
2590 chandransh 30990
      long orderId)
30991
    {
30992
      this();
30993
      this.orderId = orderId;
30994
      setOrderIdIsSet(true);
30995
    }
30996
 
30997
    /**
30998
     * Performs a deep copy on <i>other</i>.
30999
     */
2615 chandransh 31000
    public receiveReturn_args(receiveReturn_args other) {
2590 chandransh 31001
      __isset_bit_vector.clear();
31002
      __isset_bit_vector.or(other.__isset_bit_vector);
31003
      this.orderId = other.orderId;
31004
    }
31005
 
2615 chandransh 31006
    public receiveReturn_args deepCopy() {
31007
      return new receiveReturn_args(this);
2590 chandransh 31008
    }
31009
 
31010
    @Deprecated
2615 chandransh 31011
    public receiveReturn_args clone() {
31012
      return new receiveReturn_args(this);
2590 chandransh 31013
    }
31014
 
31015
    public long getOrderId() {
31016
      return this.orderId;
31017
    }
31018
 
2615 chandransh 31019
    public receiveReturn_args setOrderId(long orderId) {
2590 chandransh 31020
      this.orderId = orderId;
31021
      setOrderIdIsSet(true);
31022
      return this;
31023
    }
31024
 
31025
    public void unsetOrderId() {
31026
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
31027
    }
31028
 
31029
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
31030
    public boolean isSetOrderId() {
31031
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
31032
    }
31033
 
31034
    public void setOrderIdIsSet(boolean value) {
31035
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
31036
    }
31037
 
31038
    public void setFieldValue(_Fields field, Object value) {
31039
      switch (field) {
31040
      case ORDER_ID:
31041
        if (value == null) {
31042
          unsetOrderId();
31043
        } else {
31044
          setOrderId((Long)value);
31045
        }
31046
        break;
31047
 
31048
      }
31049
    }
31050
 
31051
    public void setFieldValue(int fieldID, Object value) {
31052
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31053
    }
31054
 
31055
    public Object getFieldValue(_Fields field) {
31056
      switch (field) {
31057
      case ORDER_ID:
31058
        return new Long(getOrderId());
31059
 
31060
      }
31061
      throw new IllegalStateException();
31062
    }
31063
 
31064
    public Object getFieldValue(int fieldId) {
31065
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31066
    }
31067
 
31068
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31069
    public boolean isSet(_Fields field) {
31070
      switch (field) {
31071
      case ORDER_ID:
31072
        return isSetOrderId();
31073
      }
31074
      throw new IllegalStateException();
31075
    }
31076
 
31077
    public boolean isSet(int fieldID) {
31078
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31079
    }
31080
 
31081
    @Override
31082
    public boolean equals(Object that) {
31083
      if (that == null)
31084
        return false;
2615 chandransh 31085
      if (that instanceof receiveReturn_args)
31086
        return this.equals((receiveReturn_args)that);
2590 chandransh 31087
      return false;
31088
    }
31089
 
2615 chandransh 31090
    public boolean equals(receiveReturn_args that) {
2590 chandransh 31091
      if (that == null)
31092
        return false;
31093
 
31094
      boolean this_present_orderId = true;
31095
      boolean that_present_orderId = true;
31096
      if (this_present_orderId || that_present_orderId) {
31097
        if (!(this_present_orderId && that_present_orderId))
31098
          return false;
31099
        if (this.orderId != that.orderId)
31100
          return false;
31101
      }
31102
 
31103
      return true;
31104
    }
31105
 
31106
    @Override
31107
    public int hashCode() {
31108
      return 0;
31109
    }
31110
 
2615 chandransh 31111
    public int compareTo(receiveReturn_args other) {
2590 chandransh 31112
      if (!getClass().equals(other.getClass())) {
31113
        return getClass().getName().compareTo(other.getClass().getName());
31114
      }
31115
 
31116
      int lastComparison = 0;
2615 chandransh 31117
      receiveReturn_args typedOther = (receiveReturn_args)other;
2590 chandransh 31118
 
31119
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
31120
      if (lastComparison != 0) {
31121
        return lastComparison;
31122
      }
31123
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
31124
      if (lastComparison != 0) {
31125
        return lastComparison;
31126
      }
31127
      return 0;
31128
    }
31129
 
31130
    public void read(TProtocol iprot) throws TException {
31131
      TField field;
31132
      iprot.readStructBegin();
31133
      while (true)
31134
      {
31135
        field = iprot.readFieldBegin();
31136
        if (field.type == TType.STOP) { 
31137
          break;
31138
        }
31139
        _Fields fieldId = _Fields.findByThriftId(field.id);
31140
        if (fieldId == null) {
31141
          TProtocolUtil.skip(iprot, field.type);
31142
        } else {
31143
          switch (fieldId) {
31144
            case ORDER_ID:
31145
              if (field.type == TType.I64) {
31146
                this.orderId = iprot.readI64();
31147
                setOrderIdIsSet(true);
31148
              } else { 
31149
                TProtocolUtil.skip(iprot, field.type);
31150
              }
31151
              break;
31152
          }
31153
          iprot.readFieldEnd();
31154
        }
31155
      }
31156
      iprot.readStructEnd();
31157
      validate();
31158
    }
31159
 
31160
    public void write(TProtocol oprot) throws TException {
31161
      validate();
31162
 
31163
      oprot.writeStructBegin(STRUCT_DESC);
31164
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
31165
      oprot.writeI64(this.orderId);
31166
      oprot.writeFieldEnd();
31167
      oprot.writeFieldStop();
31168
      oprot.writeStructEnd();
31169
    }
31170
 
31171
    @Override
31172
    public String toString() {
2615 chandransh 31173
      StringBuilder sb = new StringBuilder("receiveReturn_args(");
2590 chandransh 31174
      boolean first = true;
31175
 
31176
      sb.append("orderId:");
31177
      sb.append(this.orderId);
31178
      first = false;
31179
      sb.append(")");
31180
      return sb.toString();
31181
    }
31182
 
31183
    public void validate() throws TException {
31184
      // check for required fields
31185
    }
31186
 
31187
  }
31188
 
2615 chandransh 31189
  public static class receiveReturn_result implements TBase<receiveReturn_result._Fields>, java.io.Serializable, Cloneable, Comparable<receiveReturn_result>   {
31190
    private static final TStruct STRUCT_DESC = new TStruct("receiveReturn_result");
2590 chandransh 31191
 
31192
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
31193
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
31194
 
31195
    private boolean success;
31196
    private TransactionServiceException ex;
31197
 
31198
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31199
    public enum _Fields implements TFieldIdEnum {
31200
      SUCCESS((short)0, "success"),
31201
      EX((short)1, "ex");
31202
 
31203
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31204
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31205
 
31206
      static {
31207
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31208
          byId.put((int)field._thriftId, field);
31209
          byName.put(field.getFieldName(), field);
31210
        }
31211
      }
31212
 
31213
      /**
31214
       * Find the _Fields constant that matches fieldId, or null if its not found.
31215
       */
31216
      public static _Fields findByThriftId(int fieldId) {
31217
        return byId.get(fieldId);
31218
      }
31219
 
31220
      /**
31221
       * Find the _Fields constant that matches fieldId, throwing an exception
31222
       * if it is not found.
31223
       */
31224
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31225
        _Fields fields = findByThriftId(fieldId);
31226
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31227
        return fields;
31228
      }
31229
 
31230
      /**
31231
       * Find the _Fields constant that matches name, or null if its not found.
31232
       */
31233
      public static _Fields findByName(String name) {
31234
        return byName.get(name);
31235
      }
31236
 
31237
      private final short _thriftId;
31238
      private final String _fieldName;
31239
 
31240
      _Fields(short thriftId, String fieldName) {
31241
        _thriftId = thriftId;
31242
        _fieldName = fieldName;
31243
      }
31244
 
31245
      public short getThriftFieldId() {
31246
        return _thriftId;
31247
      }
31248
 
31249
      public String getFieldName() {
31250
        return _fieldName;
31251
      }
31252
    }
31253
 
31254
    // isset id assignments
31255
    private static final int __SUCCESS_ISSET_ID = 0;
31256
    private BitSet __isset_bit_vector = new BitSet(1);
31257
 
31258
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31259
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31260
          new FieldValueMetaData(TType.BOOL)));
31261
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
31262
          new FieldValueMetaData(TType.STRUCT)));
31263
    }});
31264
 
31265
    static {
2615 chandransh 31266
      FieldMetaData.addStructMetaDataMap(receiveReturn_result.class, metaDataMap);
2590 chandransh 31267
    }
31268
 
2615 chandransh 31269
    public receiveReturn_result() {
2590 chandransh 31270
    }
31271
 
2615 chandransh 31272
    public receiveReturn_result(
2590 chandransh 31273
      boolean success,
31274
      TransactionServiceException ex)
31275
    {
31276
      this();
31277
      this.success = success;
31278
      setSuccessIsSet(true);
31279
      this.ex = ex;
31280
    }
31281
 
31282
    /**
31283
     * Performs a deep copy on <i>other</i>.
31284
     */
2615 chandransh 31285
    public receiveReturn_result(receiveReturn_result other) {
2590 chandransh 31286
      __isset_bit_vector.clear();
31287
      __isset_bit_vector.or(other.__isset_bit_vector);
31288
      this.success = other.success;
31289
      if (other.isSetEx()) {
31290
        this.ex = new TransactionServiceException(other.ex);
31291
      }
31292
    }
31293
 
2615 chandransh 31294
    public receiveReturn_result deepCopy() {
31295
      return new receiveReturn_result(this);
2590 chandransh 31296
    }
31297
 
31298
    @Deprecated
2615 chandransh 31299
    public receiveReturn_result clone() {
31300
      return new receiveReturn_result(this);
2590 chandransh 31301
    }
31302
 
31303
    public boolean isSuccess() {
31304
      return this.success;
31305
    }
31306
 
2615 chandransh 31307
    public receiveReturn_result setSuccess(boolean success) {
2590 chandransh 31308
      this.success = success;
31309
      setSuccessIsSet(true);
31310
      return this;
31311
    }
31312
 
31313
    public void unsetSuccess() {
31314
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
31315
    }
31316
 
31317
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31318
    public boolean isSetSuccess() {
31319
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
31320
    }
31321
 
31322
    public void setSuccessIsSet(boolean value) {
31323
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
31324
    }
31325
 
31326
    public TransactionServiceException getEx() {
31327
      return this.ex;
31328
    }
31329
 
2615 chandransh 31330
    public receiveReturn_result setEx(TransactionServiceException ex) {
2590 chandransh 31331
      this.ex = ex;
31332
      return this;
31333
    }
31334
 
31335
    public void unsetEx() {
31336
      this.ex = null;
31337
    }
31338
 
31339
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
31340
    public boolean isSetEx() {
31341
      return this.ex != null;
31342
    }
31343
 
31344
    public void setExIsSet(boolean value) {
31345
      if (!value) {
31346
        this.ex = null;
31347
      }
31348
    }
31349
 
31350
    public void setFieldValue(_Fields field, Object value) {
31351
      switch (field) {
31352
      case SUCCESS:
31353
        if (value == null) {
31354
          unsetSuccess();
31355
        } else {
31356
          setSuccess((Boolean)value);
31357
        }
31358
        break;
31359
 
31360
      case EX:
31361
        if (value == null) {
31362
          unsetEx();
31363
        } else {
31364
          setEx((TransactionServiceException)value);
31365
        }
31366
        break;
31367
 
31368
      }
31369
    }
31370
 
31371
    public void setFieldValue(int fieldID, Object value) {
31372
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31373
    }
31374
 
31375
    public Object getFieldValue(_Fields field) {
31376
      switch (field) {
31377
      case SUCCESS:
31378
        return new Boolean(isSuccess());
31379
 
31380
      case EX:
31381
        return getEx();
31382
 
31383
      }
31384
      throw new IllegalStateException();
31385
    }
31386
 
31387
    public Object getFieldValue(int fieldId) {
31388
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31389
    }
31390
 
31391
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31392
    public boolean isSet(_Fields field) {
31393
      switch (field) {
31394
      case SUCCESS:
31395
        return isSetSuccess();
31396
      case EX:
31397
        return isSetEx();
31398
      }
31399
      throw new IllegalStateException();
31400
    }
31401
 
31402
    public boolean isSet(int fieldID) {
31403
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31404
    }
31405
 
31406
    @Override
31407
    public boolean equals(Object that) {
31408
      if (that == null)
31409
        return false;
2615 chandransh 31410
      if (that instanceof receiveReturn_result)
31411
        return this.equals((receiveReturn_result)that);
2590 chandransh 31412
      return false;
31413
    }
31414
 
2615 chandransh 31415
    public boolean equals(receiveReturn_result that) {
2590 chandransh 31416
      if (that == null)
31417
        return false;
31418
 
31419
      boolean this_present_success = true;
31420
      boolean that_present_success = true;
31421
      if (this_present_success || that_present_success) {
31422
        if (!(this_present_success && that_present_success))
31423
          return false;
31424
        if (this.success != that.success)
31425
          return false;
31426
      }
31427
 
31428
      boolean this_present_ex = true && this.isSetEx();
31429
      boolean that_present_ex = true && that.isSetEx();
31430
      if (this_present_ex || that_present_ex) {
31431
        if (!(this_present_ex && that_present_ex))
31432
          return false;
31433
        if (!this.ex.equals(that.ex))
31434
          return false;
31435
      }
31436
 
31437
      return true;
31438
    }
31439
 
31440
    @Override
31441
    public int hashCode() {
31442
      return 0;
31443
    }
31444
 
2615 chandransh 31445
    public int compareTo(receiveReturn_result other) {
2590 chandransh 31446
      if (!getClass().equals(other.getClass())) {
31447
        return getClass().getName().compareTo(other.getClass().getName());
31448
      }
31449
 
31450
      int lastComparison = 0;
2615 chandransh 31451
      receiveReturn_result typedOther = (receiveReturn_result)other;
2590 chandransh 31452
 
31453
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31454
      if (lastComparison != 0) {
31455
        return lastComparison;
31456
      }
31457
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31458
      if (lastComparison != 0) {
31459
        return lastComparison;
31460
      }
31461
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
31462
      if (lastComparison != 0) {
31463
        return lastComparison;
31464
      }
31465
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
31466
      if (lastComparison != 0) {
31467
        return lastComparison;
31468
      }
31469
      return 0;
31470
    }
31471
 
31472
    public void read(TProtocol iprot) throws TException {
31473
      TField field;
31474
      iprot.readStructBegin();
31475
      while (true)
31476
      {
31477
        field = iprot.readFieldBegin();
31478
        if (field.type == TType.STOP) { 
31479
          break;
31480
        }
31481
        _Fields fieldId = _Fields.findByThriftId(field.id);
31482
        if (fieldId == null) {
31483
          TProtocolUtil.skip(iprot, field.type);
31484
        } else {
31485
          switch (fieldId) {
31486
            case SUCCESS:
31487
              if (field.type == TType.BOOL) {
31488
                this.success = iprot.readBool();
31489
                setSuccessIsSet(true);
31490
              } else { 
31491
                TProtocolUtil.skip(iprot, field.type);
31492
              }
31493
              break;
31494
            case EX:
31495
              if (field.type == TType.STRUCT) {
31496
                this.ex = new TransactionServiceException();
31497
                this.ex.read(iprot);
31498
              } else { 
31499
                TProtocolUtil.skip(iprot, field.type);
31500
              }
31501
              break;
31502
          }
31503
          iprot.readFieldEnd();
31504
        }
31505
      }
31506
      iprot.readStructEnd();
31507
      validate();
31508
    }
31509
 
31510
    public void write(TProtocol oprot) throws TException {
31511
      oprot.writeStructBegin(STRUCT_DESC);
31512
 
31513
      if (this.isSetSuccess()) {
31514
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31515
        oprot.writeBool(this.success);
31516
        oprot.writeFieldEnd();
31517
      } else if (this.isSetEx()) {
31518
        oprot.writeFieldBegin(EX_FIELD_DESC);
31519
        this.ex.write(oprot);
31520
        oprot.writeFieldEnd();
31521
      }
31522
      oprot.writeFieldStop();
31523
      oprot.writeStructEnd();
31524
    }
31525
 
31526
    @Override
31527
    public String toString() {
2615 chandransh 31528
      StringBuilder sb = new StringBuilder("receiveReturn_result(");
2590 chandransh 31529
      boolean first = true;
31530
 
31531
      sb.append("success:");
31532
      sb.append(this.success);
31533
      first = false;
31534
      if (!first) sb.append(", ");
31535
      sb.append("ex:");
31536
      if (this.ex == null) {
31537
        sb.append("null");
31538
      } else {
31539
        sb.append(this.ex);
31540
      }
31541
      first = false;
31542
      sb.append(")");
31543
      return sb.toString();
31544
    }
31545
 
31546
    public void validate() throws TException {
31547
      // check for required fields
31548
    }
31549
 
31550
  }
31551
 
31552
  public static class validateDoa_args implements TBase<validateDoa_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_args>   {
31553
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_args");
31554
 
31555
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
31556
    private static final TField IS_VALID_FIELD_DESC = new TField("isValid", TType.BOOL, (short)2);
31557
 
31558
    private long orderId;
31559
    private boolean isValid;
31560
 
31561
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31562
    public enum _Fields implements TFieldIdEnum {
31563
      ORDER_ID((short)1, "orderId"),
31564
      IS_VALID((short)2, "isValid");
31565
 
31566
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31567
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31568
 
31569
      static {
31570
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31571
          byId.put((int)field._thriftId, field);
31572
          byName.put(field.getFieldName(), field);
31573
        }
31574
      }
31575
 
31576
      /**
31577
       * Find the _Fields constant that matches fieldId, or null if its not found.
31578
       */
31579
      public static _Fields findByThriftId(int fieldId) {
31580
        return byId.get(fieldId);
31581
      }
31582
 
31583
      /**
31584
       * Find the _Fields constant that matches fieldId, throwing an exception
31585
       * if it is not found.
31586
       */
31587
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31588
        _Fields fields = findByThriftId(fieldId);
31589
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31590
        return fields;
31591
      }
31592
 
31593
      /**
31594
       * Find the _Fields constant that matches name, or null if its not found.
31595
       */
31596
      public static _Fields findByName(String name) {
31597
        return byName.get(name);
31598
      }
31599
 
31600
      private final short _thriftId;
31601
      private final String _fieldName;
31602
 
31603
      _Fields(short thriftId, String fieldName) {
31604
        _thriftId = thriftId;
31605
        _fieldName = fieldName;
31606
      }
31607
 
31608
      public short getThriftFieldId() {
31609
        return _thriftId;
31610
      }
31611
 
31612
      public String getFieldName() {
31613
        return _fieldName;
31614
      }
31615
    }
31616
 
31617
    // isset id assignments
31618
    private static final int __ORDERID_ISSET_ID = 0;
31619
    private static final int __ISVALID_ISSET_ID = 1;
31620
    private BitSet __isset_bit_vector = new BitSet(2);
31621
 
31622
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31623
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
31624
          new FieldValueMetaData(TType.I64)));
31625
      put(_Fields.IS_VALID, new FieldMetaData("isValid", TFieldRequirementType.DEFAULT, 
31626
          new FieldValueMetaData(TType.BOOL)));
31627
    }});
31628
 
31629
    static {
31630
      FieldMetaData.addStructMetaDataMap(validateDoa_args.class, metaDataMap);
31631
    }
31632
 
31633
    public validateDoa_args() {
31634
    }
31635
 
31636
    public validateDoa_args(
31637
      long orderId,
31638
      boolean isValid)
31639
    {
31640
      this();
31641
      this.orderId = orderId;
31642
      setOrderIdIsSet(true);
31643
      this.isValid = isValid;
31644
      setIsValidIsSet(true);
31645
    }
31646
 
31647
    /**
31648
     * Performs a deep copy on <i>other</i>.
31649
     */
31650
    public validateDoa_args(validateDoa_args other) {
31651
      __isset_bit_vector.clear();
31652
      __isset_bit_vector.or(other.__isset_bit_vector);
31653
      this.orderId = other.orderId;
31654
      this.isValid = other.isValid;
31655
    }
31656
 
31657
    public validateDoa_args deepCopy() {
31658
      return new validateDoa_args(this);
31659
    }
31660
 
31661
    @Deprecated
31662
    public validateDoa_args clone() {
31663
      return new validateDoa_args(this);
31664
    }
31665
 
31666
    public long getOrderId() {
31667
      return this.orderId;
31668
    }
31669
 
31670
    public validateDoa_args setOrderId(long orderId) {
31671
      this.orderId = orderId;
31672
      setOrderIdIsSet(true);
31673
      return this;
31674
    }
31675
 
31676
    public void unsetOrderId() {
31677
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
31678
    }
31679
 
31680
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
31681
    public boolean isSetOrderId() {
31682
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
31683
    }
31684
 
31685
    public void setOrderIdIsSet(boolean value) {
31686
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
31687
    }
31688
 
31689
    public boolean isIsValid() {
31690
      return this.isValid;
31691
    }
31692
 
31693
    public validateDoa_args setIsValid(boolean isValid) {
31694
      this.isValid = isValid;
31695
      setIsValidIsSet(true);
31696
      return this;
31697
    }
31698
 
31699
    public void unsetIsValid() {
31700
      __isset_bit_vector.clear(__ISVALID_ISSET_ID);
31701
    }
31702
 
31703
    /** Returns true if field isValid is set (has been asigned a value) and false otherwise */
31704
    public boolean isSetIsValid() {
31705
      return __isset_bit_vector.get(__ISVALID_ISSET_ID);
31706
    }
31707
 
31708
    public void setIsValidIsSet(boolean value) {
31709
      __isset_bit_vector.set(__ISVALID_ISSET_ID, value);
31710
    }
31711
 
31712
    public void setFieldValue(_Fields field, Object value) {
31713
      switch (field) {
31714
      case ORDER_ID:
31715
        if (value == null) {
31716
          unsetOrderId();
31717
        } else {
31718
          setOrderId((Long)value);
31719
        }
31720
        break;
31721
 
31722
      case IS_VALID:
31723
        if (value == null) {
31724
          unsetIsValid();
31725
        } else {
31726
          setIsValid((Boolean)value);
31727
        }
31728
        break;
31729
 
31730
      }
31731
    }
31732
 
31733
    public void setFieldValue(int fieldID, Object value) {
31734
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31735
    }
31736
 
31737
    public Object getFieldValue(_Fields field) {
31738
      switch (field) {
31739
      case ORDER_ID:
31740
        return new Long(getOrderId());
31741
 
31742
      case IS_VALID:
31743
        return new Boolean(isIsValid());
31744
 
31745
      }
31746
      throw new IllegalStateException();
31747
    }
31748
 
31749
    public Object getFieldValue(int fieldId) {
31750
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31751
    }
31752
 
31753
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31754
    public boolean isSet(_Fields field) {
31755
      switch (field) {
31756
      case ORDER_ID:
31757
        return isSetOrderId();
31758
      case IS_VALID:
31759
        return isSetIsValid();
31760
      }
31761
      throw new IllegalStateException();
31762
    }
31763
 
31764
    public boolean isSet(int fieldID) {
31765
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31766
    }
31767
 
31768
    @Override
31769
    public boolean equals(Object that) {
31770
      if (that == null)
31771
        return false;
31772
      if (that instanceof validateDoa_args)
31773
        return this.equals((validateDoa_args)that);
31774
      return false;
31775
    }
31776
 
31777
    public boolean equals(validateDoa_args that) {
31778
      if (that == null)
31779
        return false;
31780
 
31781
      boolean this_present_orderId = true;
31782
      boolean that_present_orderId = true;
31783
      if (this_present_orderId || that_present_orderId) {
31784
        if (!(this_present_orderId && that_present_orderId))
31785
          return false;
31786
        if (this.orderId != that.orderId)
31787
          return false;
31788
      }
31789
 
31790
      boolean this_present_isValid = true;
31791
      boolean that_present_isValid = true;
31792
      if (this_present_isValid || that_present_isValid) {
31793
        if (!(this_present_isValid && that_present_isValid))
31794
          return false;
31795
        if (this.isValid != that.isValid)
31796
          return false;
31797
      }
31798
 
31799
      return true;
31800
    }
31801
 
31802
    @Override
31803
    public int hashCode() {
31804
      return 0;
31805
    }
31806
 
31807
    public int compareTo(validateDoa_args other) {
31808
      if (!getClass().equals(other.getClass())) {
31809
        return getClass().getName().compareTo(other.getClass().getName());
31810
      }
31811
 
31812
      int lastComparison = 0;
31813
      validateDoa_args typedOther = (validateDoa_args)other;
31814
 
31815
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
31816
      if (lastComparison != 0) {
31817
        return lastComparison;
31818
      }
31819
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
31820
      if (lastComparison != 0) {
31821
        return lastComparison;
31822
      }
31823
      lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(isSetIsValid());
31824
      if (lastComparison != 0) {
31825
        return lastComparison;
31826
      }
31827
      lastComparison = TBaseHelper.compareTo(isValid, typedOther.isValid);
31828
      if (lastComparison != 0) {
31829
        return lastComparison;
31830
      }
31831
      return 0;
31832
    }
31833
 
31834
    public void read(TProtocol iprot) throws TException {
31835
      TField field;
31836
      iprot.readStructBegin();
31837
      while (true)
31838
      {
31839
        field = iprot.readFieldBegin();
31840
        if (field.type == TType.STOP) { 
31841
          break;
31842
        }
31843
        _Fields fieldId = _Fields.findByThriftId(field.id);
31844
        if (fieldId == null) {
31845
          TProtocolUtil.skip(iprot, field.type);
31846
        } else {
31847
          switch (fieldId) {
31848
            case ORDER_ID:
31849
              if (field.type == TType.I64) {
31850
                this.orderId = iprot.readI64();
31851
                setOrderIdIsSet(true);
31852
              } else { 
31853
                TProtocolUtil.skip(iprot, field.type);
31854
              }
31855
              break;
31856
            case IS_VALID:
31857
              if (field.type == TType.BOOL) {
31858
                this.isValid = iprot.readBool();
31859
                setIsValidIsSet(true);
31860
              } else { 
31861
                TProtocolUtil.skip(iprot, field.type);
31862
              }
31863
              break;
31864
          }
31865
          iprot.readFieldEnd();
31866
        }
31867
      }
31868
      iprot.readStructEnd();
31869
      validate();
31870
    }
31871
 
31872
    public void write(TProtocol oprot) throws TException {
31873
      validate();
31874
 
31875
      oprot.writeStructBegin(STRUCT_DESC);
31876
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
31877
      oprot.writeI64(this.orderId);
31878
      oprot.writeFieldEnd();
31879
      oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
31880
      oprot.writeBool(this.isValid);
31881
      oprot.writeFieldEnd();
31882
      oprot.writeFieldStop();
31883
      oprot.writeStructEnd();
31884
    }
31885
 
31886
    @Override
31887
    public String toString() {
31888
      StringBuilder sb = new StringBuilder("validateDoa_args(");
31889
      boolean first = true;
31890
 
31891
      sb.append("orderId:");
31892
      sb.append(this.orderId);
31893
      first = false;
31894
      if (!first) sb.append(", ");
31895
      sb.append("isValid:");
31896
      sb.append(this.isValid);
31897
      first = false;
31898
      sb.append(")");
31899
      return sb.toString();
31900
    }
31901
 
31902
    public void validate() throws TException {
31903
      // check for required fields
31904
    }
31905
 
31906
  }
31907
 
31908
  public static class validateDoa_result implements TBase<validateDoa_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_result>   {
31909
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_result");
31910
 
31911
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
31912
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
31913
 
31914
    private boolean success;
31915
    private TransactionServiceException ex;
31916
 
31917
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31918
    public enum _Fields implements TFieldIdEnum {
31919
      SUCCESS((short)0, "success"),
31920
      EX((short)1, "ex");
31921
 
31922
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31923
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31924
 
31925
      static {
31926
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31927
          byId.put((int)field._thriftId, field);
31928
          byName.put(field.getFieldName(), field);
31929
        }
31930
      }
31931
 
31932
      /**
31933
       * Find the _Fields constant that matches fieldId, or null if its not found.
31934
       */
31935
      public static _Fields findByThriftId(int fieldId) {
31936
        return byId.get(fieldId);
31937
      }
31938
 
31939
      /**
31940
       * Find the _Fields constant that matches fieldId, throwing an exception
31941
       * if it is not found.
31942
       */
31943
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31944
        _Fields fields = findByThriftId(fieldId);
31945
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31946
        return fields;
31947
      }
31948
 
31949
      /**
31950
       * Find the _Fields constant that matches name, or null if its not found.
31951
       */
31952
      public static _Fields findByName(String name) {
31953
        return byName.get(name);
31954
      }
31955
 
31956
      private final short _thriftId;
31957
      private final String _fieldName;
31958
 
31959
      _Fields(short thriftId, String fieldName) {
31960
        _thriftId = thriftId;
31961
        _fieldName = fieldName;
31962
      }
31963
 
31964
      public short getThriftFieldId() {
31965
        return _thriftId;
31966
      }
31967
 
31968
      public String getFieldName() {
31969
        return _fieldName;
31970
      }
31971
    }
31972
 
31973
    // isset id assignments
31974
    private static final int __SUCCESS_ISSET_ID = 0;
31975
    private BitSet __isset_bit_vector = new BitSet(1);
31976
 
31977
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31978
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31979
          new FieldValueMetaData(TType.BOOL)));
31980
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
31981
          new FieldValueMetaData(TType.STRUCT)));
31982
    }});
31983
 
31984
    static {
31985
      FieldMetaData.addStructMetaDataMap(validateDoa_result.class, metaDataMap);
31986
    }
31987
 
31988
    public validateDoa_result() {
31989
    }
31990
 
31991
    public validateDoa_result(
31992
      boolean success,
31993
      TransactionServiceException ex)
31994
    {
31995
      this();
31996
      this.success = success;
31997
      setSuccessIsSet(true);
31998
      this.ex = ex;
31999
    }
32000
 
32001
    /**
32002
     * Performs a deep copy on <i>other</i>.
32003
     */
32004
    public validateDoa_result(validateDoa_result other) {
32005
      __isset_bit_vector.clear();
32006
      __isset_bit_vector.or(other.__isset_bit_vector);
32007
      this.success = other.success;
32008
      if (other.isSetEx()) {
32009
        this.ex = new TransactionServiceException(other.ex);
32010
      }
32011
    }
32012
 
32013
    public validateDoa_result deepCopy() {
32014
      return new validateDoa_result(this);
32015
    }
32016
 
32017
    @Deprecated
32018
    public validateDoa_result clone() {
32019
      return new validateDoa_result(this);
32020
    }
32021
 
32022
    public boolean isSuccess() {
32023
      return this.success;
32024
    }
32025
 
32026
    public validateDoa_result setSuccess(boolean success) {
32027
      this.success = success;
32028
      setSuccessIsSet(true);
32029
      return this;
32030
    }
32031
 
32032
    public void unsetSuccess() {
32033
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
32034
    }
32035
 
32036
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32037
    public boolean isSetSuccess() {
32038
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
32039
    }
32040
 
32041
    public void setSuccessIsSet(boolean value) {
32042
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
32043
    }
32044
 
32045
    public TransactionServiceException getEx() {
32046
      return this.ex;
32047
    }
32048
 
32049
    public validateDoa_result setEx(TransactionServiceException ex) {
32050
      this.ex = ex;
32051
      return this;
32052
    }
32053
 
32054
    public void unsetEx() {
32055
      this.ex = null;
32056
    }
32057
 
32058
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
32059
    public boolean isSetEx() {
32060
      return this.ex != null;
32061
    }
32062
 
32063
    public void setExIsSet(boolean value) {
32064
      if (!value) {
32065
        this.ex = null;
32066
      }
32067
    }
32068
 
32069
    public void setFieldValue(_Fields field, Object value) {
32070
      switch (field) {
32071
      case SUCCESS:
32072
        if (value == null) {
32073
          unsetSuccess();
32074
        } else {
32075
          setSuccess((Boolean)value);
32076
        }
32077
        break;
32078
 
32079
      case EX:
32080
        if (value == null) {
32081
          unsetEx();
32082
        } else {
32083
          setEx((TransactionServiceException)value);
32084
        }
32085
        break;
32086
 
32087
      }
32088
    }
32089
 
32090
    public void setFieldValue(int fieldID, Object value) {
32091
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32092
    }
32093
 
32094
    public Object getFieldValue(_Fields field) {
32095
      switch (field) {
32096
      case SUCCESS:
32097
        return new Boolean(isSuccess());
32098
 
32099
      case EX:
32100
        return getEx();
32101
 
32102
      }
32103
      throw new IllegalStateException();
32104
    }
32105
 
32106
    public Object getFieldValue(int fieldId) {
32107
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32108
    }
32109
 
32110
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32111
    public boolean isSet(_Fields field) {
32112
      switch (field) {
32113
      case SUCCESS:
32114
        return isSetSuccess();
32115
      case EX:
32116
        return isSetEx();
32117
      }
32118
      throw new IllegalStateException();
32119
    }
32120
 
32121
    public boolean isSet(int fieldID) {
32122
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32123
    }
32124
 
32125
    @Override
32126
    public boolean equals(Object that) {
32127
      if (that == null)
32128
        return false;
32129
      if (that instanceof validateDoa_result)
32130
        return this.equals((validateDoa_result)that);
32131
      return false;
32132
    }
32133
 
32134
    public boolean equals(validateDoa_result that) {
32135
      if (that == null)
32136
        return false;
32137
 
32138
      boolean this_present_success = true;
32139
      boolean that_present_success = true;
32140
      if (this_present_success || that_present_success) {
32141
        if (!(this_present_success && that_present_success))
32142
          return false;
32143
        if (this.success != that.success)
32144
          return false;
32145
      }
32146
 
32147
      boolean this_present_ex = true && this.isSetEx();
32148
      boolean that_present_ex = true && that.isSetEx();
32149
      if (this_present_ex || that_present_ex) {
32150
        if (!(this_present_ex && that_present_ex))
32151
          return false;
32152
        if (!this.ex.equals(that.ex))
32153
          return false;
32154
      }
32155
 
32156
      return true;
32157
    }
32158
 
32159
    @Override
32160
    public int hashCode() {
32161
      return 0;
32162
    }
32163
 
32164
    public int compareTo(validateDoa_result other) {
32165
      if (!getClass().equals(other.getClass())) {
32166
        return getClass().getName().compareTo(other.getClass().getName());
32167
      }
32168
 
32169
      int lastComparison = 0;
32170
      validateDoa_result typedOther = (validateDoa_result)other;
32171
 
32172
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32173
      if (lastComparison != 0) {
32174
        return lastComparison;
32175
      }
32176
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32177
      if (lastComparison != 0) {
32178
        return lastComparison;
32179
      }
32180
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
32181
      if (lastComparison != 0) {
32182
        return lastComparison;
32183
      }
32184
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
32185
      if (lastComparison != 0) {
32186
        return lastComparison;
32187
      }
32188
      return 0;
32189
    }
32190
 
32191
    public void read(TProtocol iprot) throws TException {
32192
      TField field;
32193
      iprot.readStructBegin();
32194
      while (true)
32195
      {
32196
        field = iprot.readFieldBegin();
32197
        if (field.type == TType.STOP) { 
32198
          break;
32199
        }
32200
        _Fields fieldId = _Fields.findByThriftId(field.id);
32201
        if (fieldId == null) {
32202
          TProtocolUtil.skip(iprot, field.type);
32203
        } else {
32204
          switch (fieldId) {
32205
            case SUCCESS:
32206
              if (field.type == TType.BOOL) {
32207
                this.success = iprot.readBool();
32208
                setSuccessIsSet(true);
32209
              } else { 
32210
                TProtocolUtil.skip(iprot, field.type);
32211
              }
32212
              break;
32213
            case EX:
32214
              if (field.type == TType.STRUCT) {
32215
                this.ex = new TransactionServiceException();
32216
                this.ex.read(iprot);
32217
              } else { 
32218
                TProtocolUtil.skip(iprot, field.type);
32219
              }
32220
              break;
32221
          }
32222
          iprot.readFieldEnd();
32223
        }
32224
      }
32225
      iprot.readStructEnd();
32226
      validate();
32227
    }
32228
 
32229
    public void write(TProtocol oprot) throws TException {
32230
      oprot.writeStructBegin(STRUCT_DESC);
32231
 
32232
      if (this.isSetSuccess()) {
32233
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32234
        oprot.writeBool(this.success);
32235
        oprot.writeFieldEnd();
32236
      } else if (this.isSetEx()) {
32237
        oprot.writeFieldBegin(EX_FIELD_DESC);
32238
        this.ex.write(oprot);
32239
        oprot.writeFieldEnd();
32240
      }
32241
      oprot.writeFieldStop();
32242
      oprot.writeStructEnd();
32243
    }
32244
 
32245
    @Override
32246
    public String toString() {
32247
      StringBuilder sb = new StringBuilder("validateDoa_result(");
32248
      boolean first = true;
32249
 
32250
      sb.append("success:");
32251
      sb.append(this.success);
32252
      first = false;
32253
      if (!first) sb.append(", ");
32254
      sb.append("ex:");
32255
      if (this.ex == null) {
32256
        sb.append("null");
32257
      } else {
32258
        sb.append(this.ex);
32259
      }
32260
      first = false;
32261
      sb.append(")");
32262
      return sb.toString();
32263
    }
32264
 
32265
    public void validate() throws TException {
32266
      // check for required fields
32267
    }
32268
 
32269
  }
32270
 
2615 chandransh 32271
  public static class reshipOrder_args implements TBase<reshipOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<reshipOrder_args>   {
32272
    private static final TStruct STRUCT_DESC = new TStruct("reshipOrder_args");
32273
 
32274
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
32275
 
32276
    private long orderId;
32277
 
32278
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32279
    public enum _Fields implements TFieldIdEnum {
32280
      ORDER_ID((short)1, "orderId");
32281
 
32282
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32283
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32284
 
32285
      static {
32286
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32287
          byId.put((int)field._thriftId, field);
32288
          byName.put(field.getFieldName(), field);
32289
        }
32290
      }
32291
 
32292
      /**
32293
       * Find the _Fields constant that matches fieldId, or null if its not found.
32294
       */
32295
      public static _Fields findByThriftId(int fieldId) {
32296
        return byId.get(fieldId);
32297
      }
32298
 
32299
      /**
32300
       * Find the _Fields constant that matches fieldId, throwing an exception
32301
       * if it is not found.
32302
       */
32303
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32304
        _Fields fields = findByThriftId(fieldId);
32305
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32306
        return fields;
32307
      }
32308
 
32309
      /**
32310
       * Find the _Fields constant that matches name, or null if its not found.
32311
       */
32312
      public static _Fields findByName(String name) {
32313
        return byName.get(name);
32314
      }
32315
 
32316
      private final short _thriftId;
32317
      private final String _fieldName;
32318
 
32319
      _Fields(short thriftId, String fieldName) {
32320
        _thriftId = thriftId;
32321
        _fieldName = fieldName;
32322
      }
32323
 
32324
      public short getThriftFieldId() {
32325
        return _thriftId;
32326
      }
32327
 
32328
      public String getFieldName() {
32329
        return _fieldName;
32330
      }
32331
    }
32332
 
32333
    // isset id assignments
32334
    private static final int __ORDERID_ISSET_ID = 0;
32335
    private BitSet __isset_bit_vector = new BitSet(1);
32336
 
32337
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32338
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
32339
          new FieldValueMetaData(TType.I64)));
32340
    }});
32341
 
32342
    static {
32343
      FieldMetaData.addStructMetaDataMap(reshipOrder_args.class, metaDataMap);
32344
    }
32345
 
32346
    public reshipOrder_args() {
32347
    }
32348
 
32349
    public reshipOrder_args(
32350
      long orderId)
32351
    {
32352
      this();
32353
      this.orderId = orderId;
32354
      setOrderIdIsSet(true);
32355
    }
32356
 
32357
    /**
32358
     * Performs a deep copy on <i>other</i>.
32359
     */
32360
    public reshipOrder_args(reshipOrder_args other) {
32361
      __isset_bit_vector.clear();
32362
      __isset_bit_vector.or(other.__isset_bit_vector);
32363
      this.orderId = other.orderId;
32364
    }
32365
 
32366
    public reshipOrder_args deepCopy() {
32367
      return new reshipOrder_args(this);
32368
    }
32369
 
32370
    @Deprecated
32371
    public reshipOrder_args clone() {
32372
      return new reshipOrder_args(this);
32373
    }
32374
 
32375
    public long getOrderId() {
32376
      return this.orderId;
32377
    }
32378
 
32379
    public reshipOrder_args setOrderId(long orderId) {
32380
      this.orderId = orderId;
32381
      setOrderIdIsSet(true);
32382
      return this;
32383
    }
32384
 
32385
    public void unsetOrderId() {
32386
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
32387
    }
32388
 
32389
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
32390
    public boolean isSetOrderId() {
32391
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
32392
    }
32393
 
32394
    public void setOrderIdIsSet(boolean value) {
32395
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
32396
    }
32397
 
32398
    public void setFieldValue(_Fields field, Object value) {
32399
      switch (field) {
32400
      case ORDER_ID:
32401
        if (value == null) {
32402
          unsetOrderId();
32403
        } else {
32404
          setOrderId((Long)value);
32405
        }
32406
        break;
32407
 
32408
      }
32409
    }
32410
 
32411
    public void setFieldValue(int fieldID, Object value) {
32412
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32413
    }
32414
 
32415
    public Object getFieldValue(_Fields field) {
32416
      switch (field) {
32417
      case ORDER_ID:
32418
        return new Long(getOrderId());
32419
 
32420
      }
32421
      throw new IllegalStateException();
32422
    }
32423
 
32424
    public Object getFieldValue(int fieldId) {
32425
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32426
    }
32427
 
32428
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32429
    public boolean isSet(_Fields field) {
32430
      switch (field) {
32431
      case ORDER_ID:
32432
        return isSetOrderId();
32433
      }
32434
      throw new IllegalStateException();
32435
    }
32436
 
32437
    public boolean isSet(int fieldID) {
32438
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32439
    }
32440
 
32441
    @Override
32442
    public boolean equals(Object that) {
32443
      if (that == null)
32444
        return false;
32445
      if (that instanceof reshipOrder_args)
32446
        return this.equals((reshipOrder_args)that);
32447
      return false;
32448
    }
32449
 
32450
    public boolean equals(reshipOrder_args that) {
32451
      if (that == null)
32452
        return false;
32453
 
32454
      boolean this_present_orderId = true;
32455
      boolean that_present_orderId = true;
32456
      if (this_present_orderId || that_present_orderId) {
32457
        if (!(this_present_orderId && that_present_orderId))
32458
          return false;
32459
        if (this.orderId != that.orderId)
32460
          return false;
32461
      }
32462
 
32463
      return true;
32464
    }
32465
 
32466
    @Override
32467
    public int hashCode() {
32468
      return 0;
32469
    }
32470
 
32471
    public int compareTo(reshipOrder_args other) {
32472
      if (!getClass().equals(other.getClass())) {
32473
        return getClass().getName().compareTo(other.getClass().getName());
32474
      }
32475
 
32476
      int lastComparison = 0;
32477
      reshipOrder_args typedOther = (reshipOrder_args)other;
32478
 
32479
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
32480
      if (lastComparison != 0) {
32481
        return lastComparison;
32482
      }
32483
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
32484
      if (lastComparison != 0) {
32485
        return lastComparison;
32486
      }
32487
      return 0;
32488
    }
32489
 
32490
    public void read(TProtocol iprot) throws TException {
32491
      TField field;
32492
      iprot.readStructBegin();
32493
      while (true)
32494
      {
32495
        field = iprot.readFieldBegin();
32496
        if (field.type == TType.STOP) { 
32497
          break;
32498
        }
32499
        _Fields fieldId = _Fields.findByThriftId(field.id);
32500
        if (fieldId == null) {
32501
          TProtocolUtil.skip(iprot, field.type);
32502
        } else {
32503
          switch (fieldId) {
32504
            case ORDER_ID:
32505
              if (field.type == TType.I64) {
32506
                this.orderId = iprot.readI64();
32507
                setOrderIdIsSet(true);
32508
              } else { 
32509
                TProtocolUtil.skip(iprot, field.type);
32510
              }
32511
              break;
32512
          }
32513
          iprot.readFieldEnd();
32514
        }
32515
      }
32516
      iprot.readStructEnd();
32517
      validate();
32518
    }
32519
 
32520
    public void write(TProtocol oprot) throws TException {
32521
      validate();
32522
 
32523
      oprot.writeStructBegin(STRUCT_DESC);
32524
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
32525
      oprot.writeI64(this.orderId);
32526
      oprot.writeFieldEnd();
32527
      oprot.writeFieldStop();
32528
      oprot.writeStructEnd();
32529
    }
32530
 
32531
    @Override
32532
    public String toString() {
32533
      StringBuilder sb = new StringBuilder("reshipOrder_args(");
32534
      boolean first = true;
32535
 
32536
      sb.append("orderId:");
32537
      sb.append(this.orderId);
32538
      first = false;
32539
      sb.append(")");
32540
      return sb.toString();
32541
    }
32542
 
32543
    public void validate() throws TException {
32544
      // check for required fields
32545
    }
32546
 
32547
  }
32548
 
32549
  public static class reshipOrder_result implements TBase<reshipOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<reshipOrder_result>   {
32550
    private static final TStruct STRUCT_DESC = new TStruct("reshipOrder_result");
32551
 
32552
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
32553
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
32554
 
32555
    private long success;
32556
    private TransactionServiceException ex;
32557
 
32558
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32559
    public enum _Fields implements TFieldIdEnum {
32560
      SUCCESS((short)0, "success"),
32561
      EX((short)1, "ex");
32562
 
32563
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32564
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32565
 
32566
      static {
32567
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32568
          byId.put((int)field._thriftId, field);
32569
          byName.put(field.getFieldName(), field);
32570
        }
32571
      }
32572
 
32573
      /**
32574
       * Find the _Fields constant that matches fieldId, or null if its not found.
32575
       */
32576
      public static _Fields findByThriftId(int fieldId) {
32577
        return byId.get(fieldId);
32578
      }
32579
 
32580
      /**
32581
       * Find the _Fields constant that matches fieldId, throwing an exception
32582
       * if it is not found.
32583
       */
32584
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32585
        _Fields fields = findByThriftId(fieldId);
32586
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32587
        return fields;
32588
      }
32589
 
32590
      /**
32591
       * Find the _Fields constant that matches name, or null if its not found.
32592
       */
32593
      public static _Fields findByName(String name) {
32594
        return byName.get(name);
32595
      }
32596
 
32597
      private final short _thriftId;
32598
      private final String _fieldName;
32599
 
32600
      _Fields(short thriftId, String fieldName) {
32601
        _thriftId = thriftId;
32602
        _fieldName = fieldName;
32603
      }
32604
 
32605
      public short getThriftFieldId() {
32606
        return _thriftId;
32607
      }
32608
 
32609
      public String getFieldName() {
32610
        return _fieldName;
32611
      }
32612
    }
32613
 
32614
    // isset id assignments
32615
    private static final int __SUCCESS_ISSET_ID = 0;
32616
    private BitSet __isset_bit_vector = new BitSet(1);
32617
 
32618
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32619
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
32620
          new FieldValueMetaData(TType.I64)));
32621
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
32622
          new FieldValueMetaData(TType.STRUCT)));
32623
    }});
32624
 
32625
    static {
32626
      FieldMetaData.addStructMetaDataMap(reshipOrder_result.class, metaDataMap);
32627
    }
32628
 
32629
    public reshipOrder_result() {
32630
    }
32631
 
32632
    public reshipOrder_result(
32633
      long success,
32634
      TransactionServiceException ex)
32635
    {
32636
      this();
32637
      this.success = success;
32638
      setSuccessIsSet(true);
32639
      this.ex = ex;
32640
    }
32641
 
32642
    /**
32643
     * Performs a deep copy on <i>other</i>.
32644
     */
32645
    public reshipOrder_result(reshipOrder_result other) {
32646
      __isset_bit_vector.clear();
32647
      __isset_bit_vector.or(other.__isset_bit_vector);
32648
      this.success = other.success;
32649
      if (other.isSetEx()) {
32650
        this.ex = new TransactionServiceException(other.ex);
32651
      }
32652
    }
32653
 
32654
    public reshipOrder_result deepCopy() {
32655
      return new reshipOrder_result(this);
32656
    }
32657
 
32658
    @Deprecated
32659
    public reshipOrder_result clone() {
32660
      return new reshipOrder_result(this);
32661
    }
32662
 
32663
    public long getSuccess() {
32664
      return this.success;
32665
    }
32666
 
32667
    public reshipOrder_result setSuccess(long success) {
32668
      this.success = success;
32669
      setSuccessIsSet(true);
32670
      return this;
32671
    }
32672
 
32673
    public void unsetSuccess() {
32674
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
32675
    }
32676
 
32677
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32678
    public boolean isSetSuccess() {
32679
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
32680
    }
32681
 
32682
    public void setSuccessIsSet(boolean value) {
32683
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
32684
    }
32685
 
32686
    public TransactionServiceException getEx() {
32687
      return this.ex;
32688
    }
32689
 
32690
    public reshipOrder_result setEx(TransactionServiceException ex) {
32691
      this.ex = ex;
32692
      return this;
32693
    }
32694
 
32695
    public void unsetEx() {
32696
      this.ex = null;
32697
    }
32698
 
32699
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
32700
    public boolean isSetEx() {
32701
      return this.ex != null;
32702
    }
32703
 
32704
    public void setExIsSet(boolean value) {
32705
      if (!value) {
32706
        this.ex = null;
32707
      }
32708
    }
32709
 
32710
    public void setFieldValue(_Fields field, Object value) {
32711
      switch (field) {
32712
      case SUCCESS:
32713
        if (value == null) {
32714
          unsetSuccess();
32715
        } else {
32716
          setSuccess((Long)value);
32717
        }
32718
        break;
32719
 
32720
      case EX:
32721
        if (value == null) {
32722
          unsetEx();
32723
        } else {
32724
          setEx((TransactionServiceException)value);
32725
        }
32726
        break;
32727
 
32728
      }
32729
    }
32730
 
32731
    public void setFieldValue(int fieldID, Object value) {
32732
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32733
    }
32734
 
32735
    public Object getFieldValue(_Fields field) {
32736
      switch (field) {
32737
      case SUCCESS:
32738
        return new Long(getSuccess());
32739
 
32740
      case EX:
32741
        return getEx();
32742
 
32743
      }
32744
      throw new IllegalStateException();
32745
    }
32746
 
32747
    public Object getFieldValue(int fieldId) {
32748
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32749
    }
32750
 
32751
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32752
    public boolean isSet(_Fields field) {
32753
      switch (field) {
32754
      case SUCCESS:
32755
        return isSetSuccess();
32756
      case EX:
32757
        return isSetEx();
32758
      }
32759
      throw new IllegalStateException();
32760
    }
32761
 
32762
    public boolean isSet(int fieldID) {
32763
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32764
    }
32765
 
32766
    @Override
32767
    public boolean equals(Object that) {
32768
      if (that == null)
32769
        return false;
32770
      if (that instanceof reshipOrder_result)
32771
        return this.equals((reshipOrder_result)that);
32772
      return false;
32773
    }
32774
 
32775
    public boolean equals(reshipOrder_result that) {
32776
      if (that == null)
32777
        return false;
32778
 
32779
      boolean this_present_success = true;
32780
      boolean that_present_success = true;
32781
      if (this_present_success || that_present_success) {
32782
        if (!(this_present_success && that_present_success))
32783
          return false;
32784
        if (this.success != that.success)
32785
          return false;
32786
      }
32787
 
32788
      boolean this_present_ex = true && this.isSetEx();
32789
      boolean that_present_ex = true && that.isSetEx();
32790
      if (this_present_ex || that_present_ex) {
32791
        if (!(this_present_ex && that_present_ex))
32792
          return false;
32793
        if (!this.ex.equals(that.ex))
32794
          return false;
32795
      }
32796
 
32797
      return true;
32798
    }
32799
 
32800
    @Override
32801
    public int hashCode() {
32802
      return 0;
32803
    }
32804
 
32805
    public int compareTo(reshipOrder_result other) {
32806
      if (!getClass().equals(other.getClass())) {
32807
        return getClass().getName().compareTo(other.getClass().getName());
32808
      }
32809
 
32810
      int lastComparison = 0;
32811
      reshipOrder_result typedOther = (reshipOrder_result)other;
32812
 
32813
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32814
      if (lastComparison != 0) {
32815
        return lastComparison;
32816
      }
32817
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32818
      if (lastComparison != 0) {
32819
        return lastComparison;
32820
      }
32821
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
32822
      if (lastComparison != 0) {
32823
        return lastComparison;
32824
      }
32825
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
32826
      if (lastComparison != 0) {
32827
        return lastComparison;
32828
      }
32829
      return 0;
32830
    }
32831
 
32832
    public void read(TProtocol iprot) throws TException {
32833
      TField field;
32834
      iprot.readStructBegin();
32835
      while (true)
32836
      {
32837
        field = iprot.readFieldBegin();
32838
        if (field.type == TType.STOP) { 
32839
          break;
32840
        }
32841
        _Fields fieldId = _Fields.findByThriftId(field.id);
32842
        if (fieldId == null) {
32843
          TProtocolUtil.skip(iprot, field.type);
32844
        } else {
32845
          switch (fieldId) {
32846
            case SUCCESS:
32847
              if (field.type == TType.I64) {
32848
                this.success = iprot.readI64();
32849
                setSuccessIsSet(true);
32850
              } else { 
32851
                TProtocolUtil.skip(iprot, field.type);
32852
              }
32853
              break;
32854
            case EX:
32855
              if (field.type == TType.STRUCT) {
32856
                this.ex = new TransactionServiceException();
32857
                this.ex.read(iprot);
32858
              } else { 
32859
                TProtocolUtil.skip(iprot, field.type);
32860
              }
32861
              break;
32862
          }
32863
          iprot.readFieldEnd();
32864
        }
32865
      }
32866
      iprot.readStructEnd();
32867
      validate();
32868
    }
32869
 
32870
    public void write(TProtocol oprot) throws TException {
32871
      oprot.writeStructBegin(STRUCT_DESC);
32872
 
32873
      if (this.isSetSuccess()) {
32874
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32875
        oprot.writeI64(this.success);
32876
        oprot.writeFieldEnd();
32877
      } else if (this.isSetEx()) {
32878
        oprot.writeFieldBegin(EX_FIELD_DESC);
32879
        this.ex.write(oprot);
32880
        oprot.writeFieldEnd();
32881
      }
32882
      oprot.writeFieldStop();
32883
      oprot.writeStructEnd();
32884
    }
32885
 
32886
    @Override
32887
    public String toString() {
32888
      StringBuilder sb = new StringBuilder("reshipOrder_result(");
32889
      boolean first = true;
32890
 
32891
      sb.append("success:");
32892
      sb.append(this.success);
32893
      first = false;
32894
      if (!first) sb.append(", ");
32895
      sb.append("ex:");
32896
      if (this.ex == null) {
32897
        sb.append("null");
32898
      } else {
32899
        sb.append(this.ex);
32900
      }
32901
      first = false;
32902
      sb.append(")");
32903
      return sb.toString();
32904
    }
32905
 
32906
    public void validate() throws TException {
32907
      // check for required fields
32908
    }
32909
 
32910
  }
32911
 
32912
  public static class refundOrder_args implements TBase<refundOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<refundOrder_args>   {
32913
    private static final TStruct STRUCT_DESC = new TStruct("refundOrder_args");
32914
 
32915
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
32916
 
32917
    private long orderId;
32918
 
32919
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32920
    public enum _Fields implements TFieldIdEnum {
32921
      ORDER_ID((short)1, "orderId");
32922
 
32923
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32924
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32925
 
32926
      static {
32927
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32928
          byId.put((int)field._thriftId, field);
32929
          byName.put(field.getFieldName(), field);
32930
        }
32931
      }
32932
 
32933
      /**
32934
       * Find the _Fields constant that matches fieldId, or null if its not found.
32935
       */
32936
      public static _Fields findByThriftId(int fieldId) {
32937
        return byId.get(fieldId);
32938
      }
32939
 
32940
      /**
32941
       * Find the _Fields constant that matches fieldId, throwing an exception
32942
       * if it is not found.
32943
       */
32944
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32945
        _Fields fields = findByThriftId(fieldId);
32946
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32947
        return fields;
32948
      }
32949
 
32950
      /**
32951
       * Find the _Fields constant that matches name, or null if its not found.
32952
       */
32953
      public static _Fields findByName(String name) {
32954
        return byName.get(name);
32955
      }
32956
 
32957
      private final short _thriftId;
32958
      private final String _fieldName;
32959
 
32960
      _Fields(short thriftId, String fieldName) {
32961
        _thriftId = thriftId;
32962
        _fieldName = fieldName;
32963
      }
32964
 
32965
      public short getThriftFieldId() {
32966
        return _thriftId;
32967
      }
32968
 
32969
      public String getFieldName() {
32970
        return _fieldName;
32971
      }
32972
    }
32973
 
32974
    // isset id assignments
32975
    private static final int __ORDERID_ISSET_ID = 0;
32976
    private BitSet __isset_bit_vector = new BitSet(1);
32977
 
32978
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32979
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
32980
          new FieldValueMetaData(TType.I64)));
32981
    }});
32982
 
32983
    static {
32984
      FieldMetaData.addStructMetaDataMap(refundOrder_args.class, metaDataMap);
32985
    }
32986
 
32987
    public refundOrder_args() {
32988
    }
32989
 
32990
    public refundOrder_args(
32991
      long orderId)
32992
    {
32993
      this();
32994
      this.orderId = orderId;
32995
      setOrderIdIsSet(true);
32996
    }
32997
 
32998
    /**
32999
     * Performs a deep copy on <i>other</i>.
33000
     */
33001
    public refundOrder_args(refundOrder_args other) {
33002
      __isset_bit_vector.clear();
33003
      __isset_bit_vector.or(other.__isset_bit_vector);
33004
      this.orderId = other.orderId;
33005
    }
33006
 
33007
    public refundOrder_args deepCopy() {
33008
      return new refundOrder_args(this);
33009
    }
33010
 
33011
    @Deprecated
33012
    public refundOrder_args clone() {
33013
      return new refundOrder_args(this);
33014
    }
33015
 
33016
    public long getOrderId() {
33017
      return this.orderId;
33018
    }
33019
 
33020
    public refundOrder_args setOrderId(long orderId) {
33021
      this.orderId = orderId;
33022
      setOrderIdIsSet(true);
33023
      return this;
33024
    }
33025
 
33026
    public void unsetOrderId() {
33027
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
33028
    }
33029
 
33030
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
33031
    public boolean isSetOrderId() {
33032
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
33033
    }
33034
 
33035
    public void setOrderIdIsSet(boolean value) {
33036
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
33037
    }
33038
 
33039
    public void setFieldValue(_Fields field, Object value) {
33040
      switch (field) {
33041
      case ORDER_ID:
33042
        if (value == null) {
33043
          unsetOrderId();
33044
        } else {
33045
          setOrderId((Long)value);
33046
        }
33047
        break;
33048
 
33049
      }
33050
    }
33051
 
33052
    public void setFieldValue(int fieldID, Object value) {
33053
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33054
    }
33055
 
33056
    public Object getFieldValue(_Fields field) {
33057
      switch (field) {
33058
      case ORDER_ID:
33059
        return new Long(getOrderId());
33060
 
33061
      }
33062
      throw new IllegalStateException();
33063
    }
33064
 
33065
    public Object getFieldValue(int fieldId) {
33066
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33067
    }
33068
 
33069
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33070
    public boolean isSet(_Fields field) {
33071
      switch (field) {
33072
      case ORDER_ID:
33073
        return isSetOrderId();
33074
      }
33075
      throw new IllegalStateException();
33076
    }
33077
 
33078
    public boolean isSet(int fieldID) {
33079
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33080
    }
33081
 
33082
    @Override
33083
    public boolean equals(Object that) {
33084
      if (that == null)
33085
        return false;
33086
      if (that instanceof refundOrder_args)
33087
        return this.equals((refundOrder_args)that);
33088
      return false;
33089
    }
33090
 
33091
    public boolean equals(refundOrder_args that) {
33092
      if (that == null)
33093
        return false;
33094
 
33095
      boolean this_present_orderId = true;
33096
      boolean that_present_orderId = true;
33097
      if (this_present_orderId || that_present_orderId) {
33098
        if (!(this_present_orderId && that_present_orderId))
33099
          return false;
33100
        if (this.orderId != that.orderId)
33101
          return false;
33102
      }
33103
 
33104
      return true;
33105
    }
33106
 
33107
    @Override
33108
    public int hashCode() {
33109
      return 0;
33110
    }
33111
 
33112
    public int compareTo(refundOrder_args other) {
33113
      if (!getClass().equals(other.getClass())) {
33114
        return getClass().getName().compareTo(other.getClass().getName());
33115
      }
33116
 
33117
      int lastComparison = 0;
33118
      refundOrder_args typedOther = (refundOrder_args)other;
33119
 
33120
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
33121
      if (lastComparison != 0) {
33122
        return lastComparison;
33123
      }
33124
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
33125
      if (lastComparison != 0) {
33126
        return lastComparison;
33127
      }
33128
      return 0;
33129
    }
33130
 
33131
    public void read(TProtocol iprot) throws TException {
33132
      TField field;
33133
      iprot.readStructBegin();
33134
      while (true)
33135
      {
33136
        field = iprot.readFieldBegin();
33137
        if (field.type == TType.STOP) { 
33138
          break;
33139
        }
33140
        _Fields fieldId = _Fields.findByThriftId(field.id);
33141
        if (fieldId == null) {
33142
          TProtocolUtil.skip(iprot, field.type);
33143
        } else {
33144
          switch (fieldId) {
33145
            case ORDER_ID:
33146
              if (field.type == TType.I64) {
33147
                this.orderId = iprot.readI64();
33148
                setOrderIdIsSet(true);
33149
              } else { 
33150
                TProtocolUtil.skip(iprot, field.type);
33151
              }
33152
              break;
33153
          }
33154
          iprot.readFieldEnd();
33155
        }
33156
      }
33157
      iprot.readStructEnd();
33158
      validate();
33159
    }
33160
 
33161
    public void write(TProtocol oprot) throws TException {
33162
      validate();
33163
 
33164
      oprot.writeStructBegin(STRUCT_DESC);
33165
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
33166
      oprot.writeI64(this.orderId);
33167
      oprot.writeFieldEnd();
33168
      oprot.writeFieldStop();
33169
      oprot.writeStructEnd();
33170
    }
33171
 
33172
    @Override
33173
    public String toString() {
33174
      StringBuilder sb = new StringBuilder("refundOrder_args(");
33175
      boolean first = true;
33176
 
33177
      sb.append("orderId:");
33178
      sb.append(this.orderId);
33179
      first = false;
33180
      sb.append(")");
33181
      return sb.toString();
33182
    }
33183
 
33184
    public void validate() throws TException {
33185
      // check for required fields
33186
    }
33187
 
33188
  }
33189
 
33190
  public static class refundOrder_result implements TBase<refundOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<refundOrder_result>   {
33191
    private static final TStruct STRUCT_DESC = new TStruct("refundOrder_result");
33192
 
33193
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
33194
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
33195
 
33196
    private boolean success;
33197
    private TransactionServiceException ex;
33198
 
33199
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33200
    public enum _Fields implements TFieldIdEnum {
33201
      SUCCESS((short)0, "success"),
33202
      EX((short)1, "ex");
33203
 
33204
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33205
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33206
 
33207
      static {
33208
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33209
          byId.put((int)field._thriftId, field);
33210
          byName.put(field.getFieldName(), field);
33211
        }
33212
      }
33213
 
33214
      /**
33215
       * Find the _Fields constant that matches fieldId, or null if its not found.
33216
       */
33217
      public static _Fields findByThriftId(int fieldId) {
33218
        return byId.get(fieldId);
33219
      }
33220
 
33221
      /**
33222
       * Find the _Fields constant that matches fieldId, throwing an exception
33223
       * if it is not found.
33224
       */
33225
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33226
        _Fields fields = findByThriftId(fieldId);
33227
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33228
        return fields;
33229
      }
33230
 
33231
      /**
33232
       * Find the _Fields constant that matches name, or null if its not found.
33233
       */
33234
      public static _Fields findByName(String name) {
33235
        return byName.get(name);
33236
      }
33237
 
33238
      private final short _thriftId;
33239
      private final String _fieldName;
33240
 
33241
      _Fields(short thriftId, String fieldName) {
33242
        _thriftId = thriftId;
33243
        _fieldName = fieldName;
33244
      }
33245
 
33246
      public short getThriftFieldId() {
33247
        return _thriftId;
33248
      }
33249
 
33250
      public String getFieldName() {
33251
        return _fieldName;
33252
      }
33253
    }
33254
 
33255
    // isset id assignments
33256
    private static final int __SUCCESS_ISSET_ID = 0;
33257
    private BitSet __isset_bit_vector = new BitSet(1);
33258
 
33259
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33260
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
33261
          new FieldValueMetaData(TType.BOOL)));
33262
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
33263
          new FieldValueMetaData(TType.STRUCT)));
33264
    }});
33265
 
33266
    static {
33267
      FieldMetaData.addStructMetaDataMap(refundOrder_result.class, metaDataMap);
33268
    }
33269
 
33270
    public refundOrder_result() {
33271
    }
33272
 
33273
    public refundOrder_result(
33274
      boolean success,
33275
      TransactionServiceException ex)
33276
    {
33277
      this();
33278
      this.success = success;
33279
      setSuccessIsSet(true);
33280
      this.ex = ex;
33281
    }
33282
 
33283
    /**
33284
     * Performs a deep copy on <i>other</i>.
33285
     */
33286
    public refundOrder_result(refundOrder_result other) {
33287
      __isset_bit_vector.clear();
33288
      __isset_bit_vector.or(other.__isset_bit_vector);
33289
      this.success = other.success;
33290
      if (other.isSetEx()) {
33291
        this.ex = new TransactionServiceException(other.ex);
33292
      }
33293
    }
33294
 
33295
    public refundOrder_result deepCopy() {
33296
      return new refundOrder_result(this);
33297
    }
33298
 
33299
    @Deprecated
33300
    public refundOrder_result clone() {
33301
      return new refundOrder_result(this);
33302
    }
33303
 
33304
    public boolean isSuccess() {
33305
      return this.success;
33306
    }
33307
 
33308
    public refundOrder_result setSuccess(boolean success) {
33309
      this.success = success;
33310
      setSuccessIsSet(true);
33311
      return this;
33312
    }
33313
 
33314
    public void unsetSuccess() {
33315
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
33316
    }
33317
 
33318
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
33319
    public boolean isSetSuccess() {
33320
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
33321
    }
33322
 
33323
    public void setSuccessIsSet(boolean value) {
33324
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
33325
    }
33326
 
33327
    public TransactionServiceException getEx() {
33328
      return this.ex;
33329
    }
33330
 
33331
    public refundOrder_result setEx(TransactionServiceException ex) {
33332
      this.ex = ex;
33333
      return this;
33334
    }
33335
 
33336
    public void unsetEx() {
33337
      this.ex = null;
33338
    }
33339
 
33340
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
33341
    public boolean isSetEx() {
33342
      return this.ex != null;
33343
    }
33344
 
33345
    public void setExIsSet(boolean value) {
33346
      if (!value) {
33347
        this.ex = null;
33348
      }
33349
    }
33350
 
33351
    public void setFieldValue(_Fields field, Object value) {
33352
      switch (field) {
33353
      case SUCCESS:
33354
        if (value == null) {
33355
          unsetSuccess();
33356
        } else {
33357
          setSuccess((Boolean)value);
33358
        }
33359
        break;
33360
 
33361
      case EX:
33362
        if (value == null) {
33363
          unsetEx();
33364
        } else {
33365
          setEx((TransactionServiceException)value);
33366
        }
33367
        break;
33368
 
33369
      }
33370
    }
33371
 
33372
    public void setFieldValue(int fieldID, Object value) {
33373
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33374
    }
33375
 
33376
    public Object getFieldValue(_Fields field) {
33377
      switch (field) {
33378
      case SUCCESS:
33379
        return new Boolean(isSuccess());
33380
 
33381
      case EX:
33382
        return getEx();
33383
 
33384
      }
33385
      throw new IllegalStateException();
33386
    }
33387
 
33388
    public Object getFieldValue(int fieldId) {
33389
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33390
    }
33391
 
33392
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33393
    public boolean isSet(_Fields field) {
33394
      switch (field) {
33395
      case SUCCESS:
33396
        return isSetSuccess();
33397
      case EX:
33398
        return isSetEx();
33399
      }
33400
      throw new IllegalStateException();
33401
    }
33402
 
33403
    public boolean isSet(int fieldID) {
33404
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33405
    }
33406
 
33407
    @Override
33408
    public boolean equals(Object that) {
33409
      if (that == null)
33410
        return false;
33411
      if (that instanceof refundOrder_result)
33412
        return this.equals((refundOrder_result)that);
33413
      return false;
33414
    }
33415
 
33416
    public boolean equals(refundOrder_result that) {
33417
      if (that == null)
33418
        return false;
33419
 
33420
      boolean this_present_success = true;
33421
      boolean that_present_success = true;
33422
      if (this_present_success || that_present_success) {
33423
        if (!(this_present_success && that_present_success))
33424
          return false;
33425
        if (this.success != that.success)
33426
          return false;
33427
      }
33428
 
33429
      boolean this_present_ex = true && this.isSetEx();
33430
      boolean that_present_ex = true && that.isSetEx();
33431
      if (this_present_ex || that_present_ex) {
33432
        if (!(this_present_ex && that_present_ex))
33433
          return false;
33434
        if (!this.ex.equals(that.ex))
33435
          return false;
33436
      }
33437
 
33438
      return true;
33439
    }
33440
 
33441
    @Override
33442
    public int hashCode() {
33443
      return 0;
33444
    }
33445
 
33446
    public int compareTo(refundOrder_result other) {
33447
      if (!getClass().equals(other.getClass())) {
33448
        return getClass().getName().compareTo(other.getClass().getName());
33449
      }
33450
 
33451
      int lastComparison = 0;
33452
      refundOrder_result typedOther = (refundOrder_result)other;
33453
 
33454
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
33455
      if (lastComparison != 0) {
33456
        return lastComparison;
33457
      }
33458
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
33459
      if (lastComparison != 0) {
33460
        return lastComparison;
33461
      }
33462
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
33463
      if (lastComparison != 0) {
33464
        return lastComparison;
33465
      }
33466
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
33467
      if (lastComparison != 0) {
33468
        return lastComparison;
33469
      }
33470
      return 0;
33471
    }
33472
 
33473
    public void read(TProtocol iprot) throws TException {
33474
      TField field;
33475
      iprot.readStructBegin();
33476
      while (true)
33477
      {
33478
        field = iprot.readFieldBegin();
33479
        if (field.type == TType.STOP) { 
33480
          break;
33481
        }
33482
        _Fields fieldId = _Fields.findByThriftId(field.id);
33483
        if (fieldId == null) {
33484
          TProtocolUtil.skip(iprot, field.type);
33485
        } else {
33486
          switch (fieldId) {
33487
            case SUCCESS:
33488
              if (field.type == TType.BOOL) {
33489
                this.success = iprot.readBool();
33490
                setSuccessIsSet(true);
33491
              } else { 
33492
                TProtocolUtil.skip(iprot, field.type);
33493
              }
33494
              break;
33495
            case EX:
33496
              if (field.type == TType.STRUCT) {
33497
                this.ex = new TransactionServiceException();
33498
                this.ex.read(iprot);
33499
              } else { 
33500
                TProtocolUtil.skip(iprot, field.type);
33501
              }
33502
              break;
33503
          }
33504
          iprot.readFieldEnd();
33505
        }
33506
      }
33507
      iprot.readStructEnd();
33508
      validate();
33509
    }
33510
 
33511
    public void write(TProtocol oprot) throws TException {
33512
      oprot.writeStructBegin(STRUCT_DESC);
33513
 
33514
      if (this.isSetSuccess()) {
33515
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
33516
        oprot.writeBool(this.success);
33517
        oprot.writeFieldEnd();
33518
      } else if (this.isSetEx()) {
33519
        oprot.writeFieldBegin(EX_FIELD_DESC);
33520
        this.ex.write(oprot);
33521
        oprot.writeFieldEnd();
33522
      }
33523
      oprot.writeFieldStop();
33524
      oprot.writeStructEnd();
33525
    }
33526
 
33527
    @Override
33528
    public String toString() {
33529
      StringBuilder sb = new StringBuilder("refundOrder_result(");
33530
      boolean first = true;
33531
 
33532
      sb.append("success:");
33533
      sb.append(this.success);
33534
      first = false;
33535
      if (!first) sb.append(", ");
33536
      sb.append("ex:");
33537
      if (this.ex == null) {
33538
        sb.append("null");
33539
      } else {
33540
        sb.append(this.ex);
33541
      }
33542
      first = false;
33543
      sb.append(")");
33544
      return sb.toString();
33545
    }
33546
 
33547
    public void validate() throws TException {
33548
      // check for required fields
33549
    }
33550
 
33551
  }
33552
 
68 ashish 33553
}