Subversion Repositories SmartDukaan

Rev

Rev 2765 | Rev 2819 | 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
2779 chandransh 95
     * @param imeiNumber
96
     * @param itemNumber
97
     * @param billedBy
1148 chandransh 98
     */
2779 chandransh 99
    public boolean addJacketNumber(long orderId, long jacketNumber, long imeiNumber, String itemNumber, String billedBy) throws TransactionServiceException, TException;
1148 chandransh 100
 
923 rajveer 101
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
102
 
103
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
104
 
1529 ankur.sing 105
    /**
106
     * Returns list of orders for given transaction Id. Also filters based on customer Id so that
107
     * only user who owns the transaction can view its order details.
108
     * 
109
     * @param transactionId
110
     * @param customerId
111
     */
112
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException;
68 ashish 113
 
483 rajveer 114
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 115
 
483 rajveer 116
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 117
 
483 rajveer 118
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 119
 
483 rajveer 120
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 121
 
758 chandransh 122
    /**
1529 ankur.sing 123
     * Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
124
     * Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
125
     * 
126
     * @param orderId
127
     * @param customerId
128
     */
129
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException;
130
 
131
    /**
1221 chandransh 132
     * Create a batch of all the pending orders for the given warehouse.
133
     * The returned list is orderd by created_timestamp.
134
     * If there are no pending orders, an empty list is returned.
135
     * 
136
     * @param warehouseId
137
     */
138
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
139
 
140
    /**
1209 chandransh 141
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
142
     * 
143
     * @param orderId
144
     */
145
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
146
 
147
    /**
758 chandransh 148
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
149
     * 
150
     * @param warehouseId
151
     * @param providerId
152
     */
153
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
154
 
1114 chandransh 155
    /**
156
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
157
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
158
     * Raises an exception if we encounter report for an AWB number that we did not ship.
159
     * 
160
     * @param providerId
161
     * @param pickupDetails
162
     */
1245 chandransh 163
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 164
 
1133 chandransh 165
    /**
166
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
167
     * the name of the receiver.
168
     * Raises an exception if we encounter report for an AWB number that we did not ship.
169
     * 
170
     * @param providerId
171
     * @param deliveredOrders
172
     */
173
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
174
 
175
    /**
176
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
177
     * Raises an exception if we encounter report for an AWB number that we did not ship.
178
     * 
179
     * @param providerId
180
     * @param returnedOrders
181
     */
182
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
183
 
1245 chandransh 184
    /**
185
     * Update the status description of orders whose AWB numbers are keys of the Map.
186
     * 
187
     * @param providerId
188
     * @param undeliveredOrders
189
     */
190
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
191
 
1406 ankur.sing 192
    /**
193
     * Returns the list of orders whose delivery time has passed but have not been
194
     * delivered yet for the given provider and warehouse. To get a complete list of
195
     * undelivered orders, pass them as -1.
196
     * Returns an empty list if no such orders exist.
197
     * 
198
     * @param providerId
199
     * @param warehouseId
200
     */
201
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
202
 
483 rajveer 203
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 204
 
483 rajveer 205
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 206
 
1598 ankur.sing 207
    /**
208
     * Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
209
     */
210
    public long getValidOrderCount() throws TException;
211
 
1629 ankur.sing 212
    /**
213
     * Returns the number of distinct customers who have done successful transactions
214
     */
215
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException;
216
 
217
    /**
1731 ankur.sing 218
     * Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
219
     * List contains two values, first minimum amount and second maximum amount.
1629 ankur.sing 220
     */
1731 ankur.sing 221
    public List<Double> getValidOrdersAmountRange() throws TException;
1629 ankur.sing 222
 
1886 ankur.sing 223
    /**
224
     * Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
225
     * If limit is passed as 0, then all valid Orders are returned.
226
     * 
227
     * @param limit
228
     */
229
    public List<Order> getValidOrders(long limit) throws TException;
230
 
2538 chandransh 231
    /**
232
     * 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.
233
     * Returns the final flag status.
234
     * Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
235
     * 
236
     * @param orderId
237
     */
238
    public boolean toggleDOAFlag(long orderId) throws TransactionServiceException, TException;
239
 
240
    /**
241
     * Sends out an email to the account manager of the original courier provider used to ship the order.
242
     * If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
243
     * If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
244
     * For any other status, it returns false.
245
     * Throws an exception if the order with the given id couldn't be found.
246
     * 
247
     * @param orderId
248
     */
249
    public boolean requestPickupNumber(long orderId) throws TransactionServiceException, TException;
250
 
251
    /**
252
     * If the order status is DOA_PICKUP_REQUESTED, it does the following
253
     * 	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
254
     * 	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
255
     * 	3. Returns true
2590 chandransh 256
     * If the order is in any other status, it returns false.
2538 chandransh 257
     * Throws an exception if the order with the given id couldn't be found.
258
     * 
259
     * @param orderId
260
     * @param pickupNumber
261
     */
262
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException;
263
 
2590 chandransh 264
    /**
2765 chandransh 265
     * Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
266
     * Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
267
     * 
268
     * @param providerId
269
     * @param pickupDetails
270
     */
271
    public List<Order> markDoasAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException;
272
 
273
    /**
2601 chandransh 274
     * 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 275
     * If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
2590 chandransh 276
     * If the order is in any other state, it returns false.
277
     * Throws an exception if the order with the given id couldn't be found.
278
     * 
279
     * @param orderId
280
     */
2615 chandransh 281
    public boolean receiveReturn(long orderId) throws TransactionServiceException, TException;
2590 chandransh 282
 
283
    /**
2601 chandransh 284
     * Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
2615 chandransh 285
     * 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 286
     * If the order is in any other state, it returns false.
287
     * Throws an exception if the order with the given id couldn't be found.
288
     * 
289
     * @param orderId
290
     * @param isValid
291
     */
292
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException;
293
 
2615 chandransh 294
    /**
295
     * If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
296
     * 	1. Creates a new order for processing in the BILLED state. All billing information is saved.
297
     * 	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.
298
     * 	
299
     * If the order is in DOA_CERT_VALID state, it does the following:
300
     * 	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
301
     * 	2. Creates a return order for the warehouse executive to return the DOA material.
302
     * 	3. Marks the current order as the final DOA_RESHIPPED state.
303
     * 
304
     * Returns the id of the newly created order.
305
     * 
306
     * Throws an exception if the order with the given id couldn't be found.
307
     * 
308
     * @param orderId
309
     */
310
    public long reshipOrder(long orderId) throws TransactionServiceException, TException;
311
 
312
    /**
313
     * If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
314
     * 	1. Creates a refund request for batch processing.
315
     * 	2. Creates a return order for the warehouse executive to return the shipped material.
316
     * 	3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
317
     * 
318
     * If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
319
     * 	1. Creates a refund request for batch processing.
320
     * 	2. Marks the current order as the REFUNDED final state.
321
     * 
322
     * Returns True if it is successful, False otherwise.
323
     * 
324
     * Throws an exception if the order with the given id couldn't be found.
325
     * 
326
     * @param orderId
327
     */
328
    public boolean refundOrder(long orderId) throws TransactionServiceException, TException;
329
 
2690 chandransh 330
    /**
331
     * Get all return orders created between the from and to dates for the given warehouse.
332
     * Ignores the warehouse if it is passed as -1.
333
     * 
334
     * @param warehouseId
335
     * @param fromDate
336
     * @param toDate
337
     */
338
    public List<ReturnOrder> getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException;
339
 
340
    /**
2700 chandransh 341
     * Returns the ReturnOrder corresponding to the given id.
342
     * Throws an exception if the return order with the given id couldn't be found.
343
     * 
344
     * @param id
345
     */
346
    public ReturnOrder getReturnOrder(long id) throws TransactionServiceException, TException;
347
 
348
    /**
2690 chandransh 349
     * Marks the return order with the given id as processed. Raises an exception if no such return order exists.
350
     * 
351
     * @param returnOrderId
352
     */
353
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException;
354
 
68 ashish 355
  }
356
 
357
  public static class Client implements Iface {
358
    public Client(TProtocol prot)
359
    {
360
      this(prot, prot);
361
    }
362
 
363
    public Client(TProtocol iprot, TProtocol oprot)
364
    {
365
      iprot_ = iprot;
366
      oprot_ = oprot;
367
    }
368
 
369
    protected TProtocol iprot_;
370
    protected TProtocol oprot_;
371
 
372
    protected int seqid_;
373
 
374
    public TProtocol getInputProtocol()
375
    {
376
      return this.iprot_;
377
    }
378
 
379
    public TProtocol getOutputProtocol()
380
    {
381
      return this.oprot_;
382
    }
383
 
764 rajveer 384
    public void closeSession() throws TException
385
    {
386
      send_closeSession();
387
      recv_closeSession();
388
    }
389
 
390
    public void send_closeSession() throws TException
391
    {
392
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
393
      closeSession_args args = new closeSession_args();
394
      args.write(oprot_);
395
      oprot_.writeMessageEnd();
396
      oprot_.getTransport().flush();
397
    }
398
 
399
    public void recv_closeSession() throws TException
400
    {
401
      TMessage msg = iprot_.readMessageBegin();
402
      if (msg.type == TMessageType.EXCEPTION) {
403
        TApplicationException x = TApplicationException.read(iprot_);
404
        iprot_.readMessageEnd();
405
        throw x;
406
      }
407
      closeSession_result result = new closeSession_result();
408
      result.read(iprot_);
409
      iprot_.readMessageEnd();
410
      return;
411
    }
412
 
132 ashish 413
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 414
    {
415
      send_createTransaction(transaction);
132 ashish 416
      return recv_createTransaction();
68 ashish 417
    }
418
 
419
    public void send_createTransaction(Transaction transaction) throws TException
420
    {
421
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
422
      createTransaction_args args = new createTransaction_args();
423
      args.transaction = transaction;
424
      args.write(oprot_);
425
      oprot_.writeMessageEnd();
426
      oprot_.getTransport().flush();
427
    }
428
 
132 ashish 429
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 430
    {
431
      TMessage msg = iprot_.readMessageBegin();
432
      if (msg.type == TMessageType.EXCEPTION) {
433
        TApplicationException x = TApplicationException.read(iprot_);
434
        iprot_.readMessageEnd();
435
        throw x;
436
      }
437
      createTransaction_result result = new createTransaction_result();
438
      result.read(iprot_);
439
      iprot_.readMessageEnd();
132 ashish 440
      if (result.isSetSuccess()) {
441
        return result.success;
442
      }
68 ashish 443
      if (result.ex != null) {
444
        throw result.ex;
445
      }
132 ashish 446
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 447
    }
448
 
449
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
450
    {
451
      send_getTransaction(id);
452
      return recv_getTransaction();
453
    }
454
 
455
    public void send_getTransaction(long id) throws TException
456
    {
457
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
458
      getTransaction_args args = new getTransaction_args();
459
      args.id = id;
460
      args.write(oprot_);
461
      oprot_.writeMessageEnd();
462
      oprot_.getTransport().flush();
463
    }
464
 
465
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
466
    {
467
      TMessage msg = iprot_.readMessageBegin();
468
      if (msg.type == TMessageType.EXCEPTION) {
469
        TApplicationException x = TApplicationException.read(iprot_);
470
        iprot_.readMessageEnd();
471
        throw x;
472
      }
473
      getTransaction_result result = new getTransaction_result();
474
      result.read(iprot_);
475
      iprot_.readMessageEnd();
476
      if (result.isSetSuccess()) {
477
        return result.success;
478
      }
479
      if (result.ex != null) {
480
        throw result.ex;
481
      }
482
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
483
    }
484
 
132 ashish 485
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 486
    {
132 ashish 487
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 488
      return recv_getTransactionsForCustomer();
489
    }
490
 
132 ashish 491
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 492
    {
493
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
494
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
495
      args.customerId = customerId;
132 ashish 496
      args.from_date = from_date;
497
      args.to_date = to_date;
68 ashish 498
      args.status = status;
499
      args.write(oprot_);
500
      oprot_.writeMessageEnd();
501
      oprot_.getTransport().flush();
502
    }
503
 
504
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
505
    {
506
      TMessage msg = iprot_.readMessageBegin();
507
      if (msg.type == TMessageType.EXCEPTION) {
508
        TApplicationException x = TApplicationException.read(iprot_);
509
        iprot_.readMessageEnd();
510
        throw x;
511
      }
512
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
513
      result.read(iprot_);
514
      iprot_.readMessageEnd();
515
      if (result.isSetSuccess()) {
516
        return result.success;
517
      }
518
      if (result.ex != null) {
519
        throw result.ex;
520
      }
521
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
522
    }
523
 
132 ashish 524
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
525
    {
526
      send_getTransactionsForShoppingCartId(shoppingCartId);
527
      return recv_getTransactionsForShoppingCartId();
528
    }
529
 
530
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
531
    {
532
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
533
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
534
      args.shoppingCartId = shoppingCartId;
535
      args.write(oprot_);
536
      oprot_.writeMessageEnd();
537
      oprot_.getTransport().flush();
538
    }
539
 
540
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
541
    {
542
      TMessage msg = iprot_.readMessageBegin();
543
      if (msg.type == TMessageType.EXCEPTION) {
544
        TApplicationException x = TApplicationException.read(iprot_);
545
        iprot_.readMessageEnd();
546
        throw x;
547
      }
548
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
549
      result.read(iprot_);
550
      iprot_.readMessageEnd();
551
      if (result.isSetSuccess()) {
552
        return result.success;
553
      }
554
      if (result.ex != null) {
555
        throw result.ex;
556
      }
557
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
558
    }
559
 
68 ashish 560
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
561
    {
562
      send_getTransactionStatus(transactionId);
563
      return recv_getTransactionStatus();
564
    }
565
 
566
    public void send_getTransactionStatus(long transactionId) throws TException
567
    {
568
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
569
      getTransactionStatus_args args = new getTransactionStatus_args();
570
      args.transactionId = transactionId;
571
      args.write(oprot_);
572
      oprot_.writeMessageEnd();
573
      oprot_.getTransport().flush();
574
    }
575
 
576
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
577
    {
578
      TMessage msg = iprot_.readMessageBegin();
579
      if (msg.type == TMessageType.EXCEPTION) {
580
        TApplicationException x = TApplicationException.read(iprot_);
581
        iprot_.readMessageEnd();
582
        throw x;
583
      }
584
      getTransactionStatus_result result = new getTransactionStatus_result();
585
      result.read(iprot_);
586
      iprot_.readMessageEnd();
587
      if (result.isSetSuccess()) {
588
        return result.success;
589
      }
590
      if (result.ex != null) {
591
        throw result.ex;
592
      }
593
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
594
    }
595
 
596
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
597
    {
598
      send_changeTransactionStatus(transactionId, status, description);
599
      return recv_changeTransactionStatus();
600
    }
601
 
602
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
603
    {
604
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
605
      changeTransactionStatus_args args = new changeTransactionStatus_args();
606
      args.transactionId = transactionId;
607
      args.status = status;
608
      args.description = description;
609
      args.write(oprot_);
610
      oprot_.writeMessageEnd();
611
      oprot_.getTransport().flush();
612
    }
613
 
614
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
615
    {
616
      TMessage msg = iprot_.readMessageBegin();
617
      if (msg.type == TMessageType.EXCEPTION) {
618
        TApplicationException x = TApplicationException.read(iprot_);
619
        iprot_.readMessageEnd();
620
        throw x;
621
      }
622
      changeTransactionStatus_result result = new changeTransactionStatus_result();
623
      result.read(iprot_);
624
      iprot_.readMessageEnd();
625
      if (result.isSetSuccess()) {
626
        return result.success;
627
      }
628
      if (result.ex != null) {
629
        throw result.ex;
630
      }
631
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
632
    }
633
 
1398 varun.gupt 634
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 635
    {
1398 varun.gupt 636
      send_enqueueTransactionInfoEmail(transactionId);
637
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 638
    }
639
 
1398 varun.gupt 640
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 641
    {
1398 varun.gupt 642
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
643
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 644
      args.transactionId = transactionId;
645
      args.write(oprot_);
646
      oprot_.writeMessageEnd();
647
      oprot_.getTransport().flush();
648
    }
649
 
1398 varun.gupt 650
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 651
    {
652
      TMessage msg = iprot_.readMessageBegin();
653
      if (msg.type == TMessageType.EXCEPTION) {
654
        TApplicationException x = TApplicationException.read(iprot_);
655
        iprot_.readMessageEnd();
656
        throw x;
657
      }
1398 varun.gupt 658
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 659
      result.read(iprot_);
660
      iprot_.readMessageEnd();
661
      if (result.isSetSuccess()) {
662
        return result.success;
663
      }
664
      if (result.ex != null) {
665
        throw result.ex;
666
      }
1398 varun.gupt 667
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 668
    }
669
 
483 rajveer 670
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 671
    {
483 rajveer 672
      send_getAllOrders(status, from_date, to_date, warehouse_id);
673
      return recv_getAllOrders();
68 ashish 674
    }
675
 
483 rajveer 676
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 677
    {
483 rajveer 678
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
679
      getAllOrders_args args = new getAllOrders_args();
680
      args.status = status;
681
      args.from_date = from_date;
682
      args.to_date = to_date;
683
      args.warehouse_id = warehouse_id;
68 ashish 684
      args.write(oprot_);
685
      oprot_.writeMessageEnd();
686
      oprot_.getTransport().flush();
687
    }
688
 
483 rajveer 689
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 690
    {
691
      TMessage msg = iprot_.readMessageBegin();
692
      if (msg.type == TMessageType.EXCEPTION) {
693
        TApplicationException x = TApplicationException.read(iprot_);
694
        iprot_.readMessageEnd();
695
        throw x;
696
      }
483 rajveer 697
      getAllOrders_result result = new getAllOrders_result();
68 ashish 698
      result.read(iprot_);
699
      iprot_.readMessageEnd();
700
      if (result.isSetSuccess()) {
701
        return result.success;
702
      }
703
      if (result.ex != null) {
704
        throw result.ex;
705
      }
483 rajveer 706
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 707
    }
708
 
1022 varun.gupt 709
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
710
    {
711
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
712
      return recv_getOrdersByBillingDate();
713
    }
714
 
715
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
716
    {
717
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
718
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
719
      args.status = status;
720
      args.start_billing_date = start_billing_date;
721
      args.end_billing_date = end_billing_date;
722
      args.warehouse_id = warehouse_id;
723
      args.write(oprot_);
724
      oprot_.writeMessageEnd();
725
      oprot_.getTransport().flush();
726
    }
727
 
728
    public List<Order> recv_getOrdersByBillingDate() 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
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_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, "getOrdersByBillingDate failed: unknown result");
746
    }
747
 
1382 varun.gupt 748
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
749
    {
750
      send_getReturnableOrdersForCustomer(customer_id, limit);
751
      return recv_getReturnableOrdersForCustomer();
752
    }
753
 
754
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
755
    {
756
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
757
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_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_getReturnableOrdersForCustomer() 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
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_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, "getReturnableOrdersForCustomer failed: unknown result");
783
    }
784
 
785
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
786
    {
787
      send_getCancellableOrdersForCustomer(customer_id, limit);
788
      return recv_getCancellableOrdersForCustomer();
789
    }
790
 
791
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
792
    {
793
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
794
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
795
      args.customer_id = customer_id;
796
      args.limit = limit;
797
      args.write(oprot_);
798
      oprot_.writeMessageEnd();
799
      oprot_.getTransport().flush();
800
    }
801
 
802
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
803
    {
804
      TMessage msg = iprot_.readMessageBegin();
805
      if (msg.type == TMessageType.EXCEPTION) {
806
        TApplicationException x = TApplicationException.read(iprot_);
807
        iprot_.readMessageEnd();
808
        throw x;
809
      }
810
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
811
      result.read(iprot_);
812
      iprot_.readMessageEnd();
813
      if (result.isSetSuccess()) {
814
        return result.success;
815
      }
816
      if (result.ex != null) {
817
        throw result.ex;
818
      }
819
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
820
    }
821
 
483 rajveer 822
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 823
    {
483 rajveer 824
      send_changeOrderStatus(orderId, status, description);
825
      return recv_changeOrderStatus();
68 ashish 826
    }
827
 
483 rajveer 828
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 829
    {
483 rajveer 830
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
831
      changeOrderStatus_args args = new changeOrderStatus_args();
832
      args.orderId = orderId;
833
      args.status = status;
834
      args.description = description;
68 ashish 835
      args.write(oprot_);
836
      oprot_.writeMessageEnd();
837
      oprot_.getTransport().flush();
838
    }
839
 
483 rajveer 840
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 841
    {
842
      TMessage msg = iprot_.readMessageBegin();
843
      if (msg.type == TMessageType.EXCEPTION) {
844
        TApplicationException x = TApplicationException.read(iprot_);
845
        iprot_.readMessageEnd();
846
        throw x;
847
      }
483 rajveer 848
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 849
      result.read(iprot_);
850
      iprot_.readMessageEnd();
851
      if (result.isSetSuccess()) {
852
        return result.success;
853
      }
854
      if (result.ex != null) {
855
        throw result.ex;
856
      }
483 rajveer 857
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 858
    }
859
 
1148 chandransh 860
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 861
    {
1148 chandransh 862
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 863
      return recv_addBillingDetails();
864
    }
865
 
1148 chandransh 866
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 867
    {
868
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
869
      addBillingDetails_args args = new addBillingDetails_args();
870
      args.orderId = orderId;
871
      args.invoice_number = invoice_number;
872
      args.billed_by = billed_by;
873
      args.write(oprot_);
874
      oprot_.writeMessageEnd();
875
      oprot_.getTransport().flush();
876
    }
877
 
878
    public boolean recv_addBillingDetails() 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
      addBillingDetails_result result = new addBillingDetails_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, "addBillingDetails failed: unknown result");
896
    }
897
 
2779 chandransh 898
    public boolean addJacketNumber(long orderId, long jacketNumber, long imeiNumber, String itemNumber, String billedBy) throws TransactionServiceException, TException
1148 chandransh 899
    {
2779 chandransh 900
      send_addJacketNumber(orderId, jacketNumber, imeiNumber, itemNumber, billedBy);
1148 chandransh 901
      return recv_addJacketNumber();
902
    }
903
 
2779 chandransh 904
    public void send_addJacketNumber(long orderId, long jacketNumber, long imeiNumber, String itemNumber, String billedBy) throws TException
1148 chandransh 905
    {
906
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
907
      addJacketNumber_args args = new addJacketNumber_args();
908
      args.orderId = orderId;
909
      args.jacketNumber = jacketNumber;
2779 chandransh 910
      args.imeiNumber = imeiNumber;
911
      args.itemNumber = itemNumber;
912
      args.billedBy = billedBy;
1148 chandransh 913
      args.write(oprot_);
914
      oprot_.writeMessageEnd();
915
      oprot_.getTransport().flush();
916
    }
917
 
918
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
919
    {
920
      TMessage msg = iprot_.readMessageBegin();
921
      if (msg.type == TMessageType.EXCEPTION) {
922
        TApplicationException x = TApplicationException.read(iprot_);
923
        iprot_.readMessageEnd();
924
        throw x;
925
      }
926
      addJacketNumber_result result = new addJacketNumber_result();
927
      result.read(iprot_);
928
      iprot_.readMessageEnd();
929
      if (result.isSetSuccess()) {
930
        return result.success;
931
      }
932
      if (result.ex != null) {
933
        throw result.ex;
934
      }
935
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
936
    }
937
 
923 rajveer 938
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
939
    {
940
      send_acceptOrder(orderId);
941
      return recv_acceptOrder();
942
    }
943
 
944
    public void send_acceptOrder(long orderId) throws TException
945
    {
946
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
947
      acceptOrder_args args = new acceptOrder_args();
948
      args.orderId = orderId;
949
      args.write(oprot_);
950
      oprot_.writeMessageEnd();
951
      oprot_.getTransport().flush();
952
    }
953
 
954
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
955
    {
956
      TMessage msg = iprot_.readMessageBegin();
957
      if (msg.type == TMessageType.EXCEPTION) {
958
        TApplicationException x = TApplicationException.read(iprot_);
959
        iprot_.readMessageEnd();
960
        throw x;
961
      }
962
      acceptOrder_result result = new acceptOrder_result();
963
      result.read(iprot_);
964
      iprot_.readMessageEnd();
965
      if (result.isSetSuccess()) {
966
        return result.success;
967
      }
968
      if (result.ex != null) {
969
        throw result.ex;
970
      }
971
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
972
    }
973
 
974
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
975
    {
976
      send_billOrder(orderId);
977
      return recv_billOrder();
978
    }
979
 
980
    public void send_billOrder(long orderId) throws TException
981
    {
982
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
983
      billOrder_args args = new billOrder_args();
984
      args.orderId = orderId;
985
      args.write(oprot_);
986
      oprot_.writeMessageEnd();
987
      oprot_.getTransport().flush();
988
    }
989
 
990
    public boolean recv_billOrder() throws TransactionServiceException, TException
991
    {
992
      TMessage msg = iprot_.readMessageBegin();
993
      if (msg.type == TMessageType.EXCEPTION) {
994
        TApplicationException x = TApplicationException.read(iprot_);
995
        iprot_.readMessageEnd();
996
        throw x;
997
      }
998
      billOrder_result result = new billOrder_result();
999
      result.read(iprot_);
1000
      iprot_.readMessageEnd();
1001
      if (result.isSetSuccess()) {
1002
        return result.success;
1003
      }
1004
      if (result.ex != null) {
1005
        throw result.ex;
1006
      }
1007
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
1008
    }
1009
 
1529 ankur.sing 1010
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 1011
    {
1529 ankur.sing 1012
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 1013
      return recv_getOrdersForTransaction();
68 ashish 1014
    }
1015
 
1529 ankur.sing 1016
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 1017
    {
483 rajveer 1018
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
1019
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1020
      args.transactionId = transactionId;
1529 ankur.sing 1021
      args.customerId = customerId;
68 ashish 1022
      args.write(oprot_);
1023
      oprot_.writeMessageEnd();
1024
      oprot_.getTransport().flush();
1025
    }
1026
 
483 rajveer 1027
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 1028
    {
1029
      TMessage msg = iprot_.readMessageBegin();
1030
      if (msg.type == TMessageType.EXCEPTION) {
1031
        TApplicationException x = TApplicationException.read(iprot_);
1032
        iprot_.readMessageEnd();
1033
        throw x;
1034
      }
483 rajveer 1035
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1036
      result.read(iprot_);
1037
      iprot_.readMessageEnd();
1038
      if (result.isSetSuccess()) {
1039
        return result.success;
1040
      }
1041
      if (result.ex != null) {
1042
        throw result.ex;
1043
      }
483 rajveer 1044
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 1045
    }
1046
 
483 rajveer 1047
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 1048
    {
483 rajveer 1049
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
1050
      return recv_getOrdersForCustomer();
68 ashish 1051
    }
1052
 
483 rajveer 1053
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 1054
    {
483 rajveer 1055
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
1056
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
1057
      args.customerId = customerId;
1058
      args.from_date = from_date;
1059
      args.to_date = to_date;
1060
      args.status = status;
68 ashish 1061
      args.write(oprot_);
1062
      oprot_.writeMessageEnd();
1063
      oprot_.getTransport().flush();
1064
    }
1065
 
483 rajveer 1066
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 1067
    {
1068
      TMessage msg = iprot_.readMessageBegin();
1069
      if (msg.type == TMessageType.EXCEPTION) {
1070
        TApplicationException x = TApplicationException.read(iprot_);
1071
        iprot_.readMessageEnd();
1072
        throw x;
1073
      }
483 rajveer 1074
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1075
      result.read(iprot_);
1076
      iprot_.readMessageEnd();
1077
      if (result.isSetSuccess()) {
1078
        return result.success;
1079
      }
1080
      if (result.ex != null) {
1081
        throw result.ex;
1082
      }
483 rajveer 1083
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 1084
    }
1085
 
483 rajveer 1086
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 1087
    {
483 rajveer 1088
      send_createOrder(order);
1089
      return recv_createOrder();
68 ashish 1090
    }
1091
 
483 rajveer 1092
    public void send_createOrder(Order order) throws TException
68 ashish 1093
    {
483 rajveer 1094
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
1095
      createOrder_args args = new createOrder_args();
1096
      args.order = order;
68 ashish 1097
      args.write(oprot_);
1098
      oprot_.writeMessageEnd();
1099
      oprot_.getTransport().flush();
1100
    }
1101
 
483 rajveer 1102
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 1103
    {
1104
      TMessage msg = iprot_.readMessageBegin();
1105
      if (msg.type == TMessageType.EXCEPTION) {
1106
        TApplicationException x = TApplicationException.read(iprot_);
1107
        iprot_.readMessageEnd();
1108
        throw x;
1109
      }
483 rajveer 1110
      createOrder_result result = new createOrder_result();
68 ashish 1111
      result.read(iprot_);
1112
      iprot_.readMessageEnd();
1113
      if (result.isSetSuccess()) {
1114
        return result.success;
1115
      }
1116
      if (result.ex != null) {
1117
        throw result.ex;
1118
      }
483 rajveer 1119
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 1120
    }
1121
 
483 rajveer 1122
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 1123
    {
483 rajveer 1124
      send_getOrder(id);
1125
      return recv_getOrder();
68 ashish 1126
    }
1127
 
483 rajveer 1128
    public void send_getOrder(long id) throws TException
68 ashish 1129
    {
483 rajveer 1130
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
1131
      getOrder_args args = new getOrder_args();
1132
      args.id = id;
68 ashish 1133
      args.write(oprot_);
1134
      oprot_.writeMessageEnd();
1135
      oprot_.getTransport().flush();
1136
    }
1137
 
483 rajveer 1138
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 1139
    {
1140
      TMessage msg = iprot_.readMessageBegin();
1141
      if (msg.type == TMessageType.EXCEPTION) {
1142
        TApplicationException x = TApplicationException.read(iprot_);
1143
        iprot_.readMessageEnd();
1144
        throw x;
1145
      }
483 rajveer 1146
      getOrder_result result = new getOrder_result();
68 ashish 1147
      result.read(iprot_);
1148
      iprot_.readMessageEnd();
1149
      if (result.isSetSuccess()) {
1150
        return result.success;
1151
      }
1152
      if (result.ex != null) {
1153
        throw result.ex;
1154
      }
483 rajveer 1155
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1156
    }
1157
 
483 rajveer 1158
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1159
    {
483 rajveer 1160
      send_getLineItemsForOrder(orderId);
1161
      return recv_getLineItemsForOrder();
68 ashish 1162
    }
1163
 
483 rajveer 1164
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1165
    {
483 rajveer 1166
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1167
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1168
      args.orderId = orderId;
68 ashish 1169
      args.write(oprot_);
1170
      oprot_.writeMessageEnd();
1171
      oprot_.getTransport().flush();
1172
    }
1173
 
483 rajveer 1174
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1175
    {
1176
      TMessage msg = iprot_.readMessageBegin();
1177
      if (msg.type == TMessageType.EXCEPTION) {
1178
        TApplicationException x = TApplicationException.read(iprot_);
1179
        iprot_.readMessageEnd();
1180
        throw x;
1181
      }
483 rajveer 1182
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1183
      result.read(iprot_);
1184
      iprot_.readMessageEnd();
1185
      if (result.isSetSuccess()) {
1186
        return result.success;
1187
      }
1188
      if (result.ex != null) {
1189
        throw result.ex;
1190
      }
483 rajveer 1191
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1192
    }
1193
 
1529 ankur.sing 1194
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1195
    {
1196
      send_getOrderForCustomer(orderId, customerId);
1197
      return recv_getOrderForCustomer();
1198
    }
1199
 
1200
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1201
    {
1202
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1203
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1204
      args.orderId = orderId;
1205
      args.customerId = customerId;
1206
      args.write(oprot_);
1207
      oprot_.writeMessageEnd();
1208
      oprot_.getTransport().flush();
1209
    }
1210
 
1211
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1212
    {
1213
      TMessage msg = iprot_.readMessageBegin();
1214
      if (msg.type == TMessageType.EXCEPTION) {
1215
        TApplicationException x = TApplicationException.read(iprot_);
1216
        iprot_.readMessageEnd();
1217
        throw x;
1218
      }
1219
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1220
      result.read(iprot_);
1221
      iprot_.readMessageEnd();
1222
      if (result.isSetSuccess()) {
1223
        return result.success;
1224
      }
1225
      if (result.ex != null) {
1226
        throw result.ex;
1227
      }
1228
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1229
    }
1230
 
1221 chandransh 1231
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1232
    {
1233
      send_batchOrders(warehouseId);
1234
      return recv_batchOrders();
1235
    }
1236
 
1237
    public void send_batchOrders(long warehouseId) throws TException
1238
    {
1239
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1240
      batchOrders_args args = new batchOrders_args();
1241
      args.warehouseId = warehouseId;
1242
      args.write(oprot_);
1243
      oprot_.writeMessageEnd();
1244
      oprot_.getTransport().flush();
1245
    }
1246
 
1247
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1248
    {
1249
      TMessage msg = iprot_.readMessageBegin();
1250
      if (msg.type == TMessageType.EXCEPTION) {
1251
        TApplicationException x = TApplicationException.read(iprot_);
1252
        iprot_.readMessageEnd();
1253
        throw x;
1254
      }
1255
      batchOrders_result result = new batchOrders_result();
1256
      result.read(iprot_);
1257
      iprot_.readMessageEnd();
1258
      if (result.isSetSuccess()) {
1259
        return result.success;
1260
      }
1261
      if (result.ex != null) {
1262
        throw result.ex;
1263
      }
1264
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1265
    }
1266
 
1209 chandransh 1267
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1268
    {
1269
      send_markOrderAsOutOfStock(orderId);
1270
      return recv_markOrderAsOutOfStock();
1271
    }
1272
 
1273
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1274
    {
1275
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1276
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1277
      args.orderId = orderId;
1278
      args.write(oprot_);
1279
      oprot_.writeMessageEnd();
1280
      oprot_.getTransport().flush();
1281
    }
1282
 
1283
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1284
    {
1285
      TMessage msg = iprot_.readMessageBegin();
1286
      if (msg.type == TMessageType.EXCEPTION) {
1287
        TApplicationException x = TApplicationException.read(iprot_);
1288
        iprot_.readMessageEnd();
1289
        throw x;
1290
      }
1291
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1292
      result.read(iprot_);
1293
      iprot_.readMessageEnd();
1294
      if (result.isSetSuccess()) {
1295
        return result.success;
1296
      }
1297
      if (result.ex != null) {
1298
        throw result.ex;
1299
      }
1300
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1301
    }
1302
 
758 chandransh 1303
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1304
    {
1305
      send_markOrdersAsManifested(warehouseId, providerId);
1306
      return recv_markOrdersAsManifested();
1307
    }
1308
 
1309
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1310
    {
1311
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1312
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1313
      args.warehouseId = warehouseId;
1314
      args.providerId = providerId;
1315
      args.write(oprot_);
1316
      oprot_.writeMessageEnd();
1317
      oprot_.getTransport().flush();
1318
    }
1319
 
1320
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1321
    {
1322
      TMessage msg = iprot_.readMessageBegin();
1323
      if (msg.type == TMessageType.EXCEPTION) {
1324
        TApplicationException x = TApplicationException.read(iprot_);
1325
        iprot_.readMessageEnd();
1326
        throw x;
1327
      }
1328
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1329
      result.read(iprot_);
1330
      iprot_.readMessageEnd();
1331
      if (result.isSetSuccess()) {
1332
        return result.success;
1333
      }
1334
      if (result.ex != null) {
1335
        throw result.ex;
1336
      }
1337
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1338
    }
1339
 
1245 chandransh 1340
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1341
    {
1342
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1343
      return recv_markOrdersAsPickedUp();
1344
    }
1345
 
1245 chandransh 1346
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1347
    {
1348
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1349
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1350
      args.providerId = providerId;
1351
      args.pickupDetails = pickupDetails;
1352
      args.write(oprot_);
1353
      oprot_.writeMessageEnd();
1354
      oprot_.getTransport().flush();
1355
    }
1356
 
1357
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1358
    {
1359
      TMessage msg = iprot_.readMessageBegin();
1360
      if (msg.type == TMessageType.EXCEPTION) {
1361
        TApplicationException x = TApplicationException.read(iprot_);
1362
        iprot_.readMessageEnd();
1363
        throw x;
1364
      }
1365
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1366
      result.read(iprot_);
1367
      iprot_.readMessageEnd();
1368
      if (result.isSetSuccess()) {
1369
        return result.success;
1370
      }
1371
      if (result.ex != null) {
1372
        throw result.ex;
1373
      }
1374
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1375
    }
1376
 
1133 chandransh 1377
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1378
    {
1379
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1380
      recv_markOrdersAsDelivered();
1381
    }
1382
 
1383
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1384
    {
1385
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1386
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1387
      args.providerId = providerId;
1388
      args.deliveredOrders = deliveredOrders;
1389
      args.write(oprot_);
1390
      oprot_.writeMessageEnd();
1391
      oprot_.getTransport().flush();
1392
    }
1393
 
1394
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1395
    {
1396
      TMessage msg = iprot_.readMessageBegin();
1397
      if (msg.type == TMessageType.EXCEPTION) {
1398
        TApplicationException x = TApplicationException.read(iprot_);
1399
        iprot_.readMessageEnd();
1400
        throw x;
1401
      }
1402
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1403
      result.read(iprot_);
1404
      iprot_.readMessageEnd();
1405
      if (result.ex != null) {
1406
        throw result.ex;
1407
      }
1408
      return;
1409
    }
1410
 
1411
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1412
    {
1413
      send_markOrdersAsFailed(providerId, returnedOrders);
1414
      recv_markOrdersAsFailed();
1415
    }
1416
 
1417
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1418
    {
1419
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1420
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1421
      args.providerId = providerId;
1422
      args.returnedOrders = returnedOrders;
1423
      args.write(oprot_);
1424
      oprot_.writeMessageEnd();
1425
      oprot_.getTransport().flush();
1426
    }
1427
 
1428
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1429
    {
1430
      TMessage msg = iprot_.readMessageBegin();
1431
      if (msg.type == TMessageType.EXCEPTION) {
1432
        TApplicationException x = TApplicationException.read(iprot_);
1433
        iprot_.readMessageEnd();
1434
        throw x;
1435
      }
1436
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1437
      result.read(iprot_);
1438
      iprot_.readMessageEnd();
1439
      if (result.ex != null) {
1440
        throw result.ex;
1441
      }
1442
      return;
1443
    }
1444
 
1245 chandransh 1445
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1446
    {
1447
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1448
      recv_updateNonDeliveryReason();
1449
    }
1450
 
1451
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1452
    {
1453
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1454
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1455
      args.providerId = providerId;
1456
      args.undeliveredOrders = undeliveredOrders;
1457
      args.write(oprot_);
1458
      oprot_.writeMessageEnd();
1459
      oprot_.getTransport().flush();
1460
    }
1461
 
1462
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1463
    {
1464
      TMessage msg = iprot_.readMessageBegin();
1465
      if (msg.type == TMessageType.EXCEPTION) {
1466
        TApplicationException x = TApplicationException.read(iprot_);
1467
        iprot_.readMessageEnd();
1468
        throw x;
1469
      }
1470
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1471
      result.read(iprot_);
1472
      iprot_.readMessageEnd();
1473
      if (result.ex != null) {
1474
        throw result.ex;
1475
      }
1476
      return;
1477
    }
1478
 
1406 ankur.sing 1479
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1480
    {
1481
      send_getUndeliveredOrders(providerId, warehouseId);
1482
      return recv_getUndeliveredOrders();
1483
    }
1484
 
1485
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1486
    {
1487
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1488
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1489
      args.providerId = providerId;
1490
      args.warehouseId = warehouseId;
1491
      args.write(oprot_);
1492
      oprot_.writeMessageEnd();
1493
      oprot_.getTransport().flush();
1494
    }
1495
 
1496
    public List<Order> recv_getUndeliveredOrders() throws TException
1497
    {
1498
      TMessage msg = iprot_.readMessageBegin();
1499
      if (msg.type == TMessageType.EXCEPTION) {
1500
        TApplicationException x = TApplicationException.read(iprot_);
1501
        iprot_.readMessageEnd();
1502
        throw x;
1503
      }
1504
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1505
      result.read(iprot_);
1506
      iprot_.readMessageEnd();
1507
      if (result.isSetSuccess()) {
1508
        return result.success;
1509
      }
1510
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1511
    }
1512
 
483 rajveer 1513
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1514
    {
483 rajveer 1515
      send_getAlerts(orderId, valid);
305 ashish 1516
      return recv_getAlerts();
1517
    }
1518
 
483 rajveer 1519
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1520
    {
1521
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1522
      getAlerts_args args = new getAlerts_args();
483 rajveer 1523
      args.orderId = orderId;
305 ashish 1524
      args.valid = valid;
1525
      args.write(oprot_);
1526
      oprot_.writeMessageEnd();
1527
      oprot_.getTransport().flush();
1528
    }
1529
 
1530
    public List<Alert> recv_getAlerts() throws TException
1531
    {
1532
      TMessage msg = iprot_.readMessageBegin();
1533
      if (msg.type == TMessageType.EXCEPTION) {
1534
        TApplicationException x = TApplicationException.read(iprot_);
1535
        iprot_.readMessageEnd();
1536
        throw x;
1537
      }
1538
      getAlerts_result result = new getAlerts_result();
1539
      result.read(iprot_);
1540
      iprot_.readMessageEnd();
1541
      if (result.isSetSuccess()) {
1542
        return result.success;
1543
      }
1544
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1545
    }
1546
 
483 rajveer 1547
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1548
    {
483 rajveer 1549
      send_setAlert(orderId, unset, type, comment);
305 ashish 1550
      recv_setAlert();
1551
    }
1552
 
483 rajveer 1553
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1554
    {
1555
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1556
      setAlert_args args = new setAlert_args();
483 rajveer 1557
      args.orderId = orderId;
305 ashish 1558
      args.unset = unset;
1559
      args.type = type;
1560
      args.comment = comment;
1561
      args.write(oprot_);
1562
      oprot_.writeMessageEnd();
1563
      oprot_.getTransport().flush();
1564
    }
1565
 
1566
    public void recv_setAlert() throws TException
1567
    {
1568
      TMessage msg = iprot_.readMessageBegin();
1569
      if (msg.type == TMessageType.EXCEPTION) {
1570
        TApplicationException x = TApplicationException.read(iprot_);
1571
        iprot_.readMessageEnd();
1572
        throw x;
1573
      }
1574
      setAlert_result result = new setAlert_result();
1575
      result.read(iprot_);
1576
      iprot_.readMessageEnd();
1577
      return;
1578
    }
1579
 
1598 ankur.sing 1580
    public long getValidOrderCount() throws TException
1581
    {
1582
      send_getValidOrderCount();
1583
      return recv_getValidOrderCount();
1584
    }
1585
 
1586
    public void send_getValidOrderCount() throws TException
1587
    {
1588
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1589
      getValidOrderCount_args args = new getValidOrderCount_args();
1590
      args.write(oprot_);
1591
      oprot_.writeMessageEnd();
1592
      oprot_.getTransport().flush();
1593
    }
1594
 
1595
    public long recv_getValidOrderCount() throws TException
1596
    {
1597
      TMessage msg = iprot_.readMessageBegin();
1598
      if (msg.type == TMessageType.EXCEPTION) {
1599
        TApplicationException x = TApplicationException.read(iprot_);
1600
        iprot_.readMessageEnd();
1601
        throw x;
1602
      }
1603
      getValidOrderCount_result result = new getValidOrderCount_result();
1604
      result.read(iprot_);
1605
      iprot_.readMessageEnd();
1606
      if (result.isSetSuccess()) {
1607
        return result.success;
1608
      }
1609
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1610
    }
1611
 
1629 ankur.sing 1612
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException
1613
    {
1614
      send_getNoOfCustomersWithSuccessfulTransaction();
1615
      return recv_getNoOfCustomersWithSuccessfulTransaction();
1616
    }
1617
 
1618
    public void send_getNoOfCustomersWithSuccessfulTransaction() throws TException
1619
    {
1620
      oprot_.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.CALL, seqid_));
1621
      getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
1622
      args.write(oprot_);
1623
      oprot_.writeMessageEnd();
1624
      oprot_.getTransport().flush();
1625
    }
1626
 
1627
    public long recv_getNoOfCustomersWithSuccessfulTransaction() throws TException
1628
    {
1629
      TMessage msg = iprot_.readMessageBegin();
1630
      if (msg.type == TMessageType.EXCEPTION) {
1631
        TApplicationException x = TApplicationException.read(iprot_);
1632
        iprot_.readMessageEnd();
1633
        throw x;
1634
      }
1635
      getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
1636
      result.read(iprot_);
1637
      iprot_.readMessageEnd();
1638
      if (result.isSetSuccess()) {
1639
        return result.success;
1640
      }
1641
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1642
    }
1643
 
1731 ankur.sing 1644
    public List<Double> getValidOrdersAmountRange() throws TException
1629 ankur.sing 1645
    {
1731 ankur.sing 1646
      send_getValidOrdersAmountRange();
1647
      return recv_getValidOrdersAmountRange();
1629 ankur.sing 1648
    }
1649
 
1731 ankur.sing 1650
    public void send_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1651
    {
1731 ankur.sing 1652
      oprot_.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.CALL, seqid_));
1653
      getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 1654
      args.write(oprot_);
1655
      oprot_.writeMessageEnd();
1656
      oprot_.getTransport().flush();
1657
    }
1658
 
1731 ankur.sing 1659
    public List<Double> recv_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1660
    {
1661
      TMessage msg = iprot_.readMessageBegin();
1662
      if (msg.type == TMessageType.EXCEPTION) {
1663
        TApplicationException x = TApplicationException.read(iprot_);
1664
        iprot_.readMessageEnd();
1665
        throw x;
1666
      }
1731 ankur.sing 1667
      getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
1629 ankur.sing 1668
      result.read(iprot_);
1669
      iprot_.readMessageEnd();
1670
      if (result.isSetSuccess()) {
1671
        return result.success;
1672
      }
1731 ankur.sing 1673
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1629 ankur.sing 1674
    }
1675
 
1886 ankur.sing 1676
    public List<Order> getValidOrders(long limit) throws TException
1677
    {
1678
      send_getValidOrders(limit);
1679
      return recv_getValidOrders();
1680
    }
1681
 
1682
    public void send_getValidOrders(long limit) throws TException
1683
    {
1684
      oprot_.writeMessageBegin(new TMessage("getValidOrders", TMessageType.CALL, seqid_));
1685
      getValidOrders_args args = new getValidOrders_args();
1686
      args.limit = limit;
1687
      args.write(oprot_);
1688
      oprot_.writeMessageEnd();
1689
      oprot_.getTransport().flush();
1690
    }
1691
 
1692
    public List<Order> recv_getValidOrders() throws TException
1693
    {
1694
      TMessage msg = iprot_.readMessageBegin();
1695
      if (msg.type == TMessageType.EXCEPTION) {
1696
        TApplicationException x = TApplicationException.read(iprot_);
1697
        iprot_.readMessageEnd();
1698
        throw x;
1699
      }
1700
      getValidOrders_result result = new getValidOrders_result();
1701
      result.read(iprot_);
1702
      iprot_.readMessageEnd();
1703
      if (result.isSetSuccess()) {
1704
        return result.success;
1705
      }
1706
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1707
    }
1708
 
2538 chandransh 1709
    public boolean toggleDOAFlag(long orderId) throws TransactionServiceException, TException
1710
    {
1711
      send_toggleDOAFlag(orderId);
1712
      return recv_toggleDOAFlag();
1713
    }
1714
 
1715
    public void send_toggleDOAFlag(long orderId) throws TException
1716
    {
1717
      oprot_.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.CALL, seqid_));
1718
      toggleDOAFlag_args args = new toggleDOAFlag_args();
1719
      args.orderId = orderId;
1720
      args.write(oprot_);
1721
      oprot_.writeMessageEnd();
1722
      oprot_.getTransport().flush();
1723
    }
1724
 
1725
    public boolean recv_toggleDOAFlag() throws TransactionServiceException, TException
1726
    {
1727
      TMessage msg = iprot_.readMessageBegin();
1728
      if (msg.type == TMessageType.EXCEPTION) {
1729
        TApplicationException x = TApplicationException.read(iprot_);
1730
        iprot_.readMessageEnd();
1731
        throw x;
1732
      }
1733
      toggleDOAFlag_result result = new toggleDOAFlag_result();
1734
      result.read(iprot_);
1735
      iprot_.readMessageEnd();
1736
      if (result.isSetSuccess()) {
1737
        return result.success;
1738
      }
1739
      if (result.ex != null) {
1740
        throw result.ex;
1741
      }
1742
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");
1743
    }
1744
 
1745
    public boolean requestPickupNumber(long orderId) throws TransactionServiceException, TException
1746
    {
1747
      send_requestPickupNumber(orderId);
1748
      return recv_requestPickupNumber();
1749
    }
1750
 
1751
    public void send_requestPickupNumber(long orderId) throws TException
1752
    {
1753
      oprot_.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.CALL, seqid_));
1754
      requestPickupNumber_args args = new requestPickupNumber_args();
1755
      args.orderId = orderId;
1756
      args.write(oprot_);
1757
      oprot_.writeMessageEnd();
1758
      oprot_.getTransport().flush();
1759
    }
1760
 
1761
    public boolean recv_requestPickupNumber() throws TransactionServiceException, TException
1762
    {
1763
      TMessage msg = iprot_.readMessageBegin();
1764
      if (msg.type == TMessageType.EXCEPTION) {
1765
        TApplicationException x = TApplicationException.read(iprot_);
1766
        iprot_.readMessageEnd();
1767
        throw x;
1768
      }
1769
      requestPickupNumber_result result = new requestPickupNumber_result();
1770
      result.read(iprot_);
1771
      iprot_.readMessageEnd();
1772
      if (result.isSetSuccess()) {
1773
        return result.success;
1774
      }
1775
      if (result.ex != null) {
1776
        throw result.ex;
1777
      }
1778
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");
1779
    }
1780
 
1781
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException
1782
    {
1783
      send_authorizePickup(orderId, pickupNumber);
1784
      return recv_authorizePickup();
1785
    }
1786
 
1787
    public void send_authorizePickup(long orderId, String pickupNumber) throws TException
1788
    {
1789
      oprot_.writeMessageBegin(new TMessage("authorizePickup", TMessageType.CALL, seqid_));
1790
      authorizePickup_args args = new authorizePickup_args();
1791
      args.orderId = orderId;
1792
      args.pickupNumber = pickupNumber;
1793
      args.write(oprot_);
1794
      oprot_.writeMessageEnd();
1795
      oprot_.getTransport().flush();
1796
    }
1797
 
1798
    public boolean recv_authorizePickup() throws TransactionServiceException, TException
1799
    {
1800
      TMessage msg = iprot_.readMessageBegin();
1801
      if (msg.type == TMessageType.EXCEPTION) {
1802
        TApplicationException x = TApplicationException.read(iprot_);
1803
        iprot_.readMessageEnd();
1804
        throw x;
1805
      }
1806
      authorizePickup_result result = new authorizePickup_result();
1807
      result.read(iprot_);
1808
      iprot_.readMessageEnd();
1809
      if (result.isSetSuccess()) {
1810
        return result.success;
1811
      }
1812
      if (result.ex != null) {
1813
        throw result.ex;
1814
      }
1815
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1816
    }
1817
 
2765 chandransh 1818
    public List<Order> markDoasAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1819
    {
1820
      send_markDoasAsPickedUp(providerId, pickupDetails);
1821
      return recv_markDoasAsPickedUp();
1822
    }
1823
 
1824
    public void send_markDoasAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1825
    {
1826
      oprot_.writeMessageBegin(new TMessage("markDoasAsPickedUp", TMessageType.CALL, seqid_));
1827
      markDoasAsPickedUp_args args = new markDoasAsPickedUp_args();
1828
      args.providerId = providerId;
1829
      args.pickupDetails = pickupDetails;
1830
      args.write(oprot_);
1831
      oprot_.writeMessageEnd();
1832
      oprot_.getTransport().flush();
1833
    }
1834
 
1835
    public List<Order> recv_markDoasAsPickedUp() throws TException
1836
    {
1837
      TMessage msg = iprot_.readMessageBegin();
1838
      if (msg.type == TMessageType.EXCEPTION) {
1839
        TApplicationException x = TApplicationException.read(iprot_);
1840
        iprot_.readMessageEnd();
1841
        throw x;
1842
      }
1843
      markDoasAsPickedUp_result result = new markDoasAsPickedUp_result();
1844
      result.read(iprot_);
1845
      iprot_.readMessageEnd();
1846
      if (result.isSetSuccess()) {
1847
        return result.success;
1848
      }
1849
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
1850
    }
1851
 
2615 chandransh 1852
    public boolean receiveReturn(long orderId) throws TransactionServiceException, TException
2590 chandransh 1853
    {
2615 chandransh 1854
      send_receiveReturn(orderId);
1855
      return recv_receiveReturn();
2590 chandransh 1856
    }
1857
 
2615 chandransh 1858
    public void send_receiveReturn(long orderId) throws TException
2590 chandransh 1859
    {
2615 chandransh 1860
      oprot_.writeMessageBegin(new TMessage("receiveReturn", TMessageType.CALL, seqid_));
1861
      receiveReturn_args args = new receiveReturn_args();
2590 chandransh 1862
      args.orderId = orderId;
1863
      args.write(oprot_);
1864
      oprot_.writeMessageEnd();
1865
      oprot_.getTransport().flush();
1866
    }
1867
 
2615 chandransh 1868
    public boolean recv_receiveReturn() throws TransactionServiceException, TException
2590 chandransh 1869
    {
1870
      TMessage msg = iprot_.readMessageBegin();
1871
      if (msg.type == TMessageType.EXCEPTION) {
1872
        TApplicationException x = TApplicationException.read(iprot_);
1873
        iprot_.readMessageEnd();
1874
        throw x;
1875
      }
2615 chandransh 1876
      receiveReturn_result result = new receiveReturn_result();
2590 chandransh 1877
      result.read(iprot_);
1878
      iprot_.readMessageEnd();
1879
      if (result.isSetSuccess()) {
1880
        return result.success;
1881
      }
1882
      if (result.ex != null) {
1883
        throw result.ex;
1884
      }
2615 chandransh 1885
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "receiveReturn failed: unknown result");
2590 chandransh 1886
    }
1887
 
1888
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException
1889
    {
1890
      send_validateDoa(orderId, isValid);
1891
      return recv_validateDoa();
1892
    }
1893
 
1894
    public void send_validateDoa(long orderId, boolean isValid) throws TException
1895
    {
1896
      oprot_.writeMessageBegin(new TMessage("validateDoa", TMessageType.CALL, seqid_));
1897
      validateDoa_args args = new validateDoa_args();
1898
      args.orderId = orderId;
1899
      args.isValid = isValid;
1900
      args.write(oprot_);
1901
      oprot_.writeMessageEnd();
1902
      oprot_.getTransport().flush();
1903
    }
1904
 
1905
    public boolean recv_validateDoa() throws TransactionServiceException, TException
1906
    {
1907
      TMessage msg = iprot_.readMessageBegin();
1908
      if (msg.type == TMessageType.EXCEPTION) {
1909
        TApplicationException x = TApplicationException.read(iprot_);
1910
        iprot_.readMessageEnd();
1911
        throw x;
1912
      }
1913
      validateDoa_result result = new validateDoa_result();
1914
      result.read(iprot_);
1915
      iprot_.readMessageEnd();
1916
      if (result.isSetSuccess()) {
1917
        return result.success;
1918
      }
1919
      if (result.ex != null) {
1920
        throw result.ex;
1921
      }
1922
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
1923
    }
1924
 
2615 chandransh 1925
    public long reshipOrder(long orderId) throws TransactionServiceException, TException
1926
    {
1927
      send_reshipOrder(orderId);
1928
      return recv_reshipOrder();
1929
    }
1930
 
1931
    public void send_reshipOrder(long orderId) throws TException
1932
    {
1933
      oprot_.writeMessageBegin(new TMessage("reshipOrder", TMessageType.CALL, seqid_));
1934
      reshipOrder_args args = new reshipOrder_args();
1935
      args.orderId = orderId;
1936
      args.write(oprot_);
1937
      oprot_.writeMessageEnd();
1938
      oprot_.getTransport().flush();
1939
    }
1940
 
1941
    public long recv_reshipOrder() throws TransactionServiceException, TException
1942
    {
1943
      TMessage msg = iprot_.readMessageBegin();
1944
      if (msg.type == TMessageType.EXCEPTION) {
1945
        TApplicationException x = TApplicationException.read(iprot_);
1946
        iprot_.readMessageEnd();
1947
        throw x;
1948
      }
1949
      reshipOrder_result result = new reshipOrder_result();
1950
      result.read(iprot_);
1951
      iprot_.readMessageEnd();
1952
      if (result.isSetSuccess()) {
1953
        return result.success;
1954
      }
1955
      if (result.ex != null) {
1956
        throw result.ex;
1957
      }
1958
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "reshipOrder failed: unknown result");
1959
    }
1960
 
1961
    public boolean refundOrder(long orderId) throws TransactionServiceException, TException
1962
    {
1963
      send_refundOrder(orderId);
1964
      return recv_refundOrder();
1965
    }
1966
 
1967
    public void send_refundOrder(long orderId) throws TException
1968
    {
1969
      oprot_.writeMessageBegin(new TMessage("refundOrder", TMessageType.CALL, seqid_));
1970
      refundOrder_args args = new refundOrder_args();
1971
      args.orderId = orderId;
1972
      args.write(oprot_);
1973
      oprot_.writeMessageEnd();
1974
      oprot_.getTransport().flush();
1975
    }
1976
 
1977
    public boolean recv_refundOrder() throws TransactionServiceException, TException
1978
    {
1979
      TMessage msg = iprot_.readMessageBegin();
1980
      if (msg.type == TMessageType.EXCEPTION) {
1981
        TApplicationException x = TApplicationException.read(iprot_);
1982
        iprot_.readMessageEnd();
1983
        throw x;
1984
      }
1985
      refundOrder_result result = new refundOrder_result();
1986
      result.read(iprot_);
1987
      iprot_.readMessageEnd();
1988
      if (result.isSetSuccess()) {
1989
        return result.success;
1990
      }
1991
      if (result.ex != null) {
1992
        throw result.ex;
1993
      }
1994
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "refundOrder failed: unknown result");
1995
    }
1996
 
2690 chandransh 1997
    public List<ReturnOrder> getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException
1998
    {
1999
      send_getReturnOrders(warehouseId, fromDate, toDate);
2000
      return recv_getReturnOrders();
2001
    }
2002
 
2003
    public void send_getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException
2004
    {
2005
      oprot_.writeMessageBegin(new TMessage("getReturnOrders", TMessageType.CALL, seqid_));
2006
      getReturnOrders_args args = new getReturnOrders_args();
2007
      args.warehouseId = warehouseId;
2008
      args.fromDate = fromDate;
2009
      args.toDate = toDate;
2010
      args.write(oprot_);
2011
      oprot_.writeMessageEnd();
2012
      oprot_.getTransport().flush();
2013
    }
2014
 
2015
    public List<ReturnOrder> recv_getReturnOrders() throws TException
2016
    {
2017
      TMessage msg = iprot_.readMessageBegin();
2018
      if (msg.type == TMessageType.EXCEPTION) {
2019
        TApplicationException x = TApplicationException.read(iprot_);
2020
        iprot_.readMessageEnd();
2021
        throw x;
2022
      }
2023
      getReturnOrders_result result = new getReturnOrders_result();
2024
      result.read(iprot_);
2025
      iprot_.readMessageEnd();
2026
      if (result.isSetSuccess()) {
2027
        return result.success;
2028
      }
2029
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrders failed: unknown result");
2030
    }
2031
 
2700 chandransh 2032
    public ReturnOrder getReturnOrder(long id) throws TransactionServiceException, TException
2033
    {
2034
      send_getReturnOrder(id);
2035
      return recv_getReturnOrder();
2036
    }
2037
 
2038
    public void send_getReturnOrder(long id) throws TException
2039
    {
2040
      oprot_.writeMessageBegin(new TMessage("getReturnOrder", TMessageType.CALL, seqid_));
2041
      getReturnOrder_args args = new getReturnOrder_args();
2042
      args.id = id;
2043
      args.write(oprot_);
2044
      oprot_.writeMessageEnd();
2045
      oprot_.getTransport().flush();
2046
    }
2047
 
2048
    public ReturnOrder recv_getReturnOrder() throws TransactionServiceException, TException
2049
    {
2050
      TMessage msg = iprot_.readMessageBegin();
2051
      if (msg.type == TMessageType.EXCEPTION) {
2052
        TApplicationException x = TApplicationException.read(iprot_);
2053
        iprot_.readMessageEnd();
2054
        throw x;
2055
      }
2056
      getReturnOrder_result result = new getReturnOrder_result();
2057
      result.read(iprot_);
2058
      iprot_.readMessageEnd();
2059
      if (result.isSetSuccess()) {
2060
        return result.success;
2061
      }
2062
      if (result.ex != null) {
2063
        throw result.ex;
2064
      }
2065
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrder failed: unknown result");
2066
    }
2067
 
2690 chandransh 2068
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException
2069
    {
2070
      send_processReturn(returnOrderId);
2071
      recv_processReturn();
2072
    }
2073
 
2074
    public void send_processReturn(long returnOrderId) throws TException
2075
    {
2076
      oprot_.writeMessageBegin(new TMessage("processReturn", TMessageType.CALL, seqid_));
2077
      processReturn_args args = new processReturn_args();
2078
      args.returnOrderId = returnOrderId;
2079
      args.write(oprot_);
2080
      oprot_.writeMessageEnd();
2081
      oprot_.getTransport().flush();
2082
    }
2083
 
2084
    public void recv_processReturn() throws TransactionServiceException, TException
2085
    {
2086
      TMessage msg = iprot_.readMessageBegin();
2087
      if (msg.type == TMessageType.EXCEPTION) {
2088
        TApplicationException x = TApplicationException.read(iprot_);
2089
        iprot_.readMessageEnd();
2090
        throw x;
2091
      }
2092
      processReturn_result result = new processReturn_result();
2093
      result.read(iprot_);
2094
      iprot_.readMessageEnd();
2095
      if (result.ex != null) {
2096
        throw result.ex;
2097
      }
2098
      return;
2099
    }
2100
 
68 ashish 2101
  }
2102
  public static class Processor implements TProcessor {
2103
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2104
    public Processor(Iface iface)
2105
    {
2106
      iface_ = iface;
764 rajveer 2107
      processMap_.put("closeSession", new closeSession());
68 ashish 2108
      processMap_.put("createTransaction", new createTransaction());
2109
      processMap_.put("getTransaction", new getTransaction());
2110
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 2111
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 2112
      processMap_.put("getTransactionStatus", new getTransactionStatus());
2113
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 2114
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 2115
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 2116
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 2117
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
2118
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 2119
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 2120
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 2121
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 2122
      processMap_.put("acceptOrder", new acceptOrder());
2123
      processMap_.put("billOrder", new billOrder());
483 rajveer 2124
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
2125
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
2126
      processMap_.put("createOrder", new createOrder());
2127
      processMap_.put("getOrder", new getOrder());
2128
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 2129
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 2130
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 2131
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 2132
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 2133
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 2134
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
2135
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 2136
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 2137
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 2138
      processMap_.put("getAlerts", new getAlerts());
2139
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 2140
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1629 ankur.sing 2141
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1731 ankur.sing 2142
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1886 ankur.sing 2143
      processMap_.put("getValidOrders", new getValidOrders());
2538 chandransh 2144
      processMap_.put("toggleDOAFlag", new toggleDOAFlag());
2145
      processMap_.put("requestPickupNumber", new requestPickupNumber());
2146
      processMap_.put("authorizePickup", new authorizePickup());
2765 chandransh 2147
      processMap_.put("markDoasAsPickedUp", new markDoasAsPickedUp());
2615 chandransh 2148
      processMap_.put("receiveReturn", new receiveReturn());
2590 chandransh 2149
      processMap_.put("validateDoa", new validateDoa());
2615 chandransh 2150
      processMap_.put("reshipOrder", new reshipOrder());
2151
      processMap_.put("refundOrder", new refundOrder());
2690 chandransh 2152
      processMap_.put("getReturnOrders", new getReturnOrders());
2700 chandransh 2153
      processMap_.put("getReturnOrder", new getReturnOrder());
2690 chandransh 2154
      processMap_.put("processReturn", new processReturn());
68 ashish 2155
    }
2156
 
2157
    protected static interface ProcessFunction {
2158
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
2159
    }
2160
 
2161
    private Iface iface_;
2162
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
2163
 
2164
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
2165
    {
2166
      TMessage msg = iprot.readMessageBegin();
2167
      ProcessFunction fn = processMap_.get(msg.name);
2168
      if (fn == null) {
2169
        TProtocolUtil.skip(iprot, TType.STRUCT);
2170
        iprot.readMessageEnd();
2171
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
2172
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
2173
        x.write(oprot);
2174
        oprot.writeMessageEnd();
2175
        oprot.getTransport().flush();
2176
        return true;
2177
      }
2178
      fn.process(msg.seqid, iprot, oprot);
2179
      return true;
2180
    }
2181
 
764 rajveer 2182
    private class closeSession implements ProcessFunction {
2183
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2184
      {
2185
        closeSession_args args = new closeSession_args();
2186
        args.read(iprot);
2187
        iprot.readMessageEnd();
2188
        closeSession_result result = new closeSession_result();
2189
        iface_.closeSession();
2190
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
2191
        result.write(oprot);
2192
        oprot.writeMessageEnd();
2193
        oprot.getTransport().flush();
2194
      }
2195
 
2196
    }
2197
 
68 ashish 2198
    private class createTransaction implements ProcessFunction {
2199
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2200
      {
2201
        createTransaction_args args = new createTransaction_args();
2202
        args.read(iprot);
2203
        iprot.readMessageEnd();
2204
        createTransaction_result result = new createTransaction_result();
2205
        try {
132 ashish 2206
          result.success = iface_.createTransaction(args.transaction);
2207
          result.setSuccessIsSet(true);
68 ashish 2208
        } catch (TransactionServiceException ex) {
2209
          result.ex = ex;
2210
        } catch (Throwable th) {
2211
          LOGGER.error("Internal error processing createTransaction", th);
2212
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
2213
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
2214
          x.write(oprot);
2215
          oprot.writeMessageEnd();
2216
          oprot.getTransport().flush();
2217
          return;
2218
        }
2219
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
2220
        result.write(oprot);
2221
        oprot.writeMessageEnd();
2222
        oprot.getTransport().flush();
2223
      }
2224
 
2225
    }
2226
 
2227
    private class getTransaction implements ProcessFunction {
2228
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2229
      {
2230
        getTransaction_args args = new getTransaction_args();
2231
        args.read(iprot);
2232
        iprot.readMessageEnd();
2233
        getTransaction_result result = new getTransaction_result();
2234
        try {
2235
          result.success = iface_.getTransaction(args.id);
2236
        } catch (TransactionServiceException ex) {
2237
          result.ex = ex;
2238
        } catch (Throwable th) {
2239
          LOGGER.error("Internal error processing getTransaction", th);
2240
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
2241
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
2242
          x.write(oprot);
2243
          oprot.writeMessageEnd();
2244
          oprot.getTransport().flush();
2245
          return;
2246
        }
2247
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
2248
        result.write(oprot);
2249
        oprot.writeMessageEnd();
2250
        oprot.getTransport().flush();
2251
      }
2252
 
2253
    }
2254
 
2255
    private class getTransactionsForCustomer implements ProcessFunction {
2256
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2257
      {
2258
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
2259
        args.read(iprot);
2260
        iprot.readMessageEnd();
2261
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
2262
        try {
132 ashish 2263
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2264
        } catch (TransactionServiceException ex) {
2265
          result.ex = ex;
2266
        } catch (Throwable th) {
2267
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
2268
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
2269
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
2270
          x.write(oprot);
2271
          oprot.writeMessageEnd();
2272
          oprot.getTransport().flush();
2273
          return;
2274
        }
2275
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
2276
        result.write(oprot);
2277
        oprot.writeMessageEnd();
2278
        oprot.getTransport().flush();
2279
      }
2280
 
2281
    }
2282
 
132 ashish 2283
    private class getTransactionsForShoppingCartId implements ProcessFunction {
2284
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2285
      {
2286
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
2287
        args.read(iprot);
2288
        iprot.readMessageEnd();
2289
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
2290
        try {
2291
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
2292
        } catch (TransactionServiceException ex) {
2293
          result.ex = ex;
2294
        } catch (Throwable th) {
2295
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
2296
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
2297
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
2298
          x.write(oprot);
2299
          oprot.writeMessageEnd();
2300
          oprot.getTransport().flush();
2301
          return;
2302
        }
2303
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
2304
        result.write(oprot);
2305
        oprot.writeMessageEnd();
2306
        oprot.getTransport().flush();
2307
      }
2308
 
2309
    }
2310
 
68 ashish 2311
    private class getTransactionStatus implements ProcessFunction {
2312
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2313
      {
2314
        getTransactionStatus_args args = new getTransactionStatus_args();
2315
        args.read(iprot);
2316
        iprot.readMessageEnd();
2317
        getTransactionStatus_result result = new getTransactionStatus_result();
2318
        try {
2319
          result.success = iface_.getTransactionStatus(args.transactionId);
2320
        } catch (TransactionServiceException ex) {
2321
          result.ex = ex;
2322
        } catch (Throwable th) {
2323
          LOGGER.error("Internal error processing getTransactionStatus", th);
2324
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
2325
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
2326
          x.write(oprot);
2327
          oprot.writeMessageEnd();
2328
          oprot.getTransport().flush();
2329
          return;
2330
        }
2331
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
2332
        result.write(oprot);
2333
        oprot.writeMessageEnd();
2334
        oprot.getTransport().flush();
2335
      }
2336
 
2337
    }
2338
 
2339
    private class changeTransactionStatus implements ProcessFunction {
2340
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2341
      {
2342
        changeTransactionStatus_args args = new changeTransactionStatus_args();
2343
        args.read(iprot);
2344
        iprot.readMessageEnd();
2345
        changeTransactionStatus_result result = new changeTransactionStatus_result();
2346
        try {
2347
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
2348
          result.setSuccessIsSet(true);
2349
        } catch (TransactionServiceException ex) {
2350
          result.ex = ex;
2351
        } catch (Throwable th) {
2352
          LOGGER.error("Internal error processing changeTransactionStatus", th);
2353
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
2354
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
2355
          x.write(oprot);
2356
          oprot.writeMessageEnd();
2357
          oprot.getTransport().flush();
2358
          return;
2359
        }
2360
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
2361
        result.write(oprot);
2362
        oprot.writeMessageEnd();
2363
        oprot.getTransport().flush();
2364
      }
2365
 
2366
    }
2367
 
1398 varun.gupt 2368
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 2369
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2370
      {
1398 varun.gupt 2371
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 2372
        args.read(iprot);
2373
        iprot.readMessageEnd();
1398 varun.gupt 2374
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 2375
        try {
1398 varun.gupt 2376
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 2377
          result.setSuccessIsSet(true);
2378
        } catch (TransactionServiceException ex) {
2379
          result.ex = ex;
2380
        } catch (Throwable th) {
1398 varun.gupt 2381
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
2382
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
2383
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 2384
          x.write(oprot);
2385
          oprot.writeMessageEnd();
2386
          oprot.getTransport().flush();
2387
          return;
2388
        }
1398 varun.gupt 2389
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 2390
        result.write(oprot);
2391
        oprot.writeMessageEnd();
2392
        oprot.getTransport().flush();
2393
      }
2394
 
2395
    }
2396
 
483 rajveer 2397
    private class getAllOrders implements ProcessFunction {
68 ashish 2398
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2399
      {
483 rajveer 2400
        getAllOrders_args args = new getAllOrders_args();
68 ashish 2401
        args.read(iprot);
2402
        iprot.readMessageEnd();
483 rajveer 2403
        getAllOrders_result result = new getAllOrders_result();
68 ashish 2404
        try {
483 rajveer 2405
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 2406
        } catch (TransactionServiceException ex) {
2407
          result.ex = ex;
2408
        } catch (Throwable th) {
483 rajveer 2409
          LOGGER.error("Internal error processing getAllOrders", th);
2410
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
2411
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 2412
          x.write(oprot);
2413
          oprot.writeMessageEnd();
2414
          oprot.getTransport().flush();
2415
          return;
2416
        }
483 rajveer 2417
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 2418
        result.write(oprot);
2419
        oprot.writeMessageEnd();
2420
        oprot.getTransport().flush();
2421
      }
2422
 
2423
    }
2424
 
1022 varun.gupt 2425
    private class getOrdersByBillingDate implements ProcessFunction {
2426
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2427
      {
2428
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
2429
        args.read(iprot);
2430
        iprot.readMessageEnd();
2431
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
2432
        try {
2433
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
2434
        } catch (TransactionServiceException ex) {
2435
          result.ex = ex;
2436
        } catch (Throwable th) {
2437
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
2438
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
2439
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
2440
          x.write(oprot);
2441
          oprot.writeMessageEnd();
2442
          oprot.getTransport().flush();
2443
          return;
2444
        }
2445
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
2446
        result.write(oprot);
2447
        oprot.writeMessageEnd();
2448
        oprot.getTransport().flush();
2449
      }
2450
 
2451
    }
2452
 
1382 varun.gupt 2453
    private class getReturnableOrdersForCustomer implements ProcessFunction {
2454
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2455
      {
2456
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
2457
        args.read(iprot);
2458
        iprot.readMessageEnd();
2459
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
2460
        try {
2461
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
2462
        } catch (TransactionServiceException ex) {
2463
          result.ex = ex;
2464
        } catch (Throwable th) {
2465
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
2466
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
2467
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2468
          x.write(oprot);
2469
          oprot.writeMessageEnd();
2470
          oprot.getTransport().flush();
2471
          return;
2472
        }
2473
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
2474
        result.write(oprot);
2475
        oprot.writeMessageEnd();
2476
        oprot.getTransport().flush();
2477
      }
2478
 
2479
    }
2480
 
2481
    private class getCancellableOrdersForCustomer implements ProcessFunction {
2482
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2483
      {
2484
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
2485
        args.read(iprot);
2486
        iprot.readMessageEnd();
2487
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
2488
        try {
2489
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
2490
        } catch (TransactionServiceException ex) {
2491
          result.ex = ex;
2492
        } catch (Throwable th) {
2493
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
2494
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
2495
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2496
          x.write(oprot);
2497
          oprot.writeMessageEnd();
2498
          oprot.getTransport().flush();
2499
          return;
2500
        }
2501
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
2502
        result.write(oprot);
2503
        oprot.writeMessageEnd();
2504
        oprot.getTransport().flush();
2505
      }
2506
 
2507
    }
2508
 
483 rajveer 2509
    private class changeOrderStatus implements ProcessFunction {
68 ashish 2510
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2511
      {
483 rajveer 2512
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 2513
        args.read(iprot);
2514
        iprot.readMessageEnd();
483 rajveer 2515
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 2516
        try {
483 rajveer 2517
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 2518
          result.setSuccessIsSet(true);
2519
        } catch (TransactionServiceException ex) {
2520
          result.ex = ex;
2521
        } catch (Throwable th) {
483 rajveer 2522
          LOGGER.error("Internal error processing changeOrderStatus", th);
2523
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
2524
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 2525
          x.write(oprot);
2526
          oprot.writeMessageEnd();
2527
          oprot.getTransport().flush();
2528
          return;
2529
        }
483 rajveer 2530
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 2531
        result.write(oprot);
2532
        oprot.writeMessageEnd();
2533
        oprot.getTransport().flush();
2534
      }
2535
 
2536
    }
2537
 
495 rajveer 2538
    private class addBillingDetails implements ProcessFunction {
2539
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2540
      {
2541
        addBillingDetails_args args = new addBillingDetails_args();
2542
        args.read(iprot);
2543
        iprot.readMessageEnd();
2544
        addBillingDetails_result result = new addBillingDetails_result();
2545
        try {
1148 chandransh 2546
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 2547
          result.setSuccessIsSet(true);
2548
        } catch (TransactionServiceException ex) {
2549
          result.ex = ex;
2550
        } catch (Throwable th) {
2551
          LOGGER.error("Internal error processing addBillingDetails", th);
2552
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
2553
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
2554
          x.write(oprot);
2555
          oprot.writeMessageEnd();
2556
          oprot.getTransport().flush();
2557
          return;
2558
        }
2559
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
2560
        result.write(oprot);
2561
        oprot.writeMessageEnd();
2562
        oprot.getTransport().flush();
2563
      }
2564
 
2565
    }
2566
 
1148 chandransh 2567
    private class addJacketNumber implements ProcessFunction {
2568
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2569
      {
2570
        addJacketNumber_args args = new addJacketNumber_args();
2571
        args.read(iprot);
2572
        iprot.readMessageEnd();
2573
        addJacketNumber_result result = new addJacketNumber_result();
2574
        try {
2779 chandransh 2575
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber, args.imeiNumber, args.itemNumber, args.billedBy);
1148 chandransh 2576
          result.setSuccessIsSet(true);
2577
        } catch (TransactionServiceException ex) {
2578
          result.ex = ex;
2579
        } catch (Throwable th) {
2580
          LOGGER.error("Internal error processing addJacketNumber", th);
2581
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
2582
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
2583
          x.write(oprot);
2584
          oprot.writeMessageEnd();
2585
          oprot.getTransport().flush();
2586
          return;
2587
        }
2588
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
2589
        result.write(oprot);
2590
        oprot.writeMessageEnd();
2591
        oprot.getTransport().flush();
2592
      }
2593
 
2594
    }
2595
 
923 rajveer 2596
    private class acceptOrder implements ProcessFunction {
2597
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2598
      {
2599
        acceptOrder_args args = new acceptOrder_args();
2600
        args.read(iprot);
2601
        iprot.readMessageEnd();
2602
        acceptOrder_result result = new acceptOrder_result();
2603
        try {
2604
          result.success = iface_.acceptOrder(args.orderId);
2605
          result.setSuccessIsSet(true);
2606
        } catch (TransactionServiceException ex) {
2607
          result.ex = ex;
2608
        } catch (Throwable th) {
2609
          LOGGER.error("Internal error processing acceptOrder", th);
2610
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
2611
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
2612
          x.write(oprot);
2613
          oprot.writeMessageEnd();
2614
          oprot.getTransport().flush();
2615
          return;
2616
        }
2617
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
2618
        result.write(oprot);
2619
        oprot.writeMessageEnd();
2620
        oprot.getTransport().flush();
2621
      }
2622
 
2623
    }
2624
 
2625
    private class billOrder implements ProcessFunction {
2626
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2627
      {
2628
        billOrder_args args = new billOrder_args();
2629
        args.read(iprot);
2630
        iprot.readMessageEnd();
2631
        billOrder_result result = new billOrder_result();
2632
        try {
2633
          result.success = iface_.billOrder(args.orderId);
2634
          result.setSuccessIsSet(true);
2635
        } catch (TransactionServiceException ex) {
2636
          result.ex = ex;
2637
        } catch (Throwable th) {
2638
          LOGGER.error("Internal error processing billOrder", th);
2639
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
2640
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
2641
          x.write(oprot);
2642
          oprot.writeMessageEnd();
2643
          oprot.getTransport().flush();
2644
          return;
2645
        }
2646
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
2647
        result.write(oprot);
2648
        oprot.writeMessageEnd();
2649
        oprot.getTransport().flush();
2650
      }
2651
 
2652
    }
2653
 
483 rajveer 2654
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2655
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2656
      {
483 rajveer 2657
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2658
        args.read(iprot);
2659
        iprot.readMessageEnd();
483 rajveer 2660
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2661
        try {
1529 ankur.sing 2662
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2663
        } catch (TransactionServiceException ex) {
2664
          result.ex = ex;
2665
        } catch (Throwable th) {
483 rajveer 2666
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2667
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2668
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2669
          x.write(oprot);
2670
          oprot.writeMessageEnd();
2671
          oprot.getTransport().flush();
2672
          return;
2673
        }
483 rajveer 2674
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2675
        result.write(oprot);
2676
        oprot.writeMessageEnd();
2677
        oprot.getTransport().flush();
2678
      }
2679
 
2680
    }
2681
 
483 rajveer 2682
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2683
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2684
      {
483 rajveer 2685
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2686
        args.read(iprot);
2687
        iprot.readMessageEnd();
483 rajveer 2688
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2689
        try {
483 rajveer 2690
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2691
        } catch (TransactionServiceException ex) {
2692
          result.ex = ex;
2693
        } catch (Throwable th) {
483 rajveer 2694
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2695
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2696
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2697
          x.write(oprot);
2698
          oprot.writeMessageEnd();
2699
          oprot.getTransport().flush();
2700
          return;
2701
        }
483 rajveer 2702
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2703
        result.write(oprot);
2704
        oprot.writeMessageEnd();
2705
        oprot.getTransport().flush();
2706
      }
2707
 
2708
    }
2709
 
483 rajveer 2710
    private class createOrder implements ProcessFunction {
68 ashish 2711
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2712
      {
483 rajveer 2713
        createOrder_args args = new createOrder_args();
68 ashish 2714
        args.read(iprot);
2715
        iprot.readMessageEnd();
483 rajveer 2716
        createOrder_result result = new createOrder_result();
68 ashish 2717
        try {
483 rajveer 2718
          result.success = iface_.createOrder(args.order);
68 ashish 2719
          result.setSuccessIsSet(true);
2720
        } catch (TransactionServiceException ex) {
2721
          result.ex = ex;
2722
        } catch (Throwable th) {
483 rajveer 2723
          LOGGER.error("Internal error processing createOrder", th);
2724
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2725
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2726
          x.write(oprot);
2727
          oprot.writeMessageEnd();
2728
          oprot.getTransport().flush();
2729
          return;
2730
        }
483 rajveer 2731
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2732
        result.write(oprot);
2733
        oprot.writeMessageEnd();
2734
        oprot.getTransport().flush();
2735
      }
2736
 
2737
    }
2738
 
483 rajveer 2739
    private class getOrder implements ProcessFunction {
68 ashish 2740
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2741
      {
483 rajveer 2742
        getOrder_args args = new getOrder_args();
68 ashish 2743
        args.read(iprot);
2744
        iprot.readMessageEnd();
483 rajveer 2745
        getOrder_result result = new getOrder_result();
68 ashish 2746
        try {
483 rajveer 2747
          result.success = iface_.getOrder(args.id);
68 ashish 2748
        } catch (TransactionServiceException ex) {
2749
          result.ex = ex;
2750
        } catch (Throwable th) {
483 rajveer 2751
          LOGGER.error("Internal error processing getOrder", th);
2752
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2753
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2754
          x.write(oprot);
2755
          oprot.writeMessageEnd();
2756
          oprot.getTransport().flush();
2757
          return;
2758
        }
483 rajveer 2759
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2760
        result.write(oprot);
2761
        oprot.writeMessageEnd();
2762
        oprot.getTransport().flush();
2763
      }
2764
 
2765
    }
2766
 
483 rajveer 2767
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2768
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2769
      {
483 rajveer 2770
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2771
        args.read(iprot);
2772
        iprot.readMessageEnd();
483 rajveer 2773
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2774
        try {
483 rajveer 2775
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2776
        } catch (TransactionServiceException ex) {
2777
          result.ex = ex;
2778
        } catch (Throwable th) {
483 rajveer 2779
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2780
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2781
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2782
          x.write(oprot);
2783
          oprot.writeMessageEnd();
2784
          oprot.getTransport().flush();
2785
          return;
2786
        }
483 rajveer 2787
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2788
        result.write(oprot);
2789
        oprot.writeMessageEnd();
2790
        oprot.getTransport().flush();
2791
      }
2792
 
2793
    }
2794
 
1529 ankur.sing 2795
    private class getOrderForCustomer implements ProcessFunction {
2796
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2797
      {
2798
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2799
        args.read(iprot);
2800
        iprot.readMessageEnd();
2801
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2802
        try {
2803
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2804
        } catch (TransactionServiceException ex) {
2805
          result.ex = ex;
2806
        } catch (Throwable th) {
2807
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2808
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2809
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2810
          x.write(oprot);
2811
          oprot.writeMessageEnd();
2812
          oprot.getTransport().flush();
2813
          return;
2814
        }
2815
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2816
        result.write(oprot);
2817
        oprot.writeMessageEnd();
2818
        oprot.getTransport().flush();
2819
      }
2820
 
2821
    }
2822
 
1221 chandransh 2823
    private class batchOrders implements ProcessFunction {
2824
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2825
      {
2826
        batchOrders_args args = new batchOrders_args();
2827
        args.read(iprot);
2828
        iprot.readMessageEnd();
2829
        batchOrders_result result = new batchOrders_result();
2830
        try {
2831
          result.success = iface_.batchOrders(args.warehouseId);
2832
        } catch (TransactionServiceException ex) {
2833
          result.ex = ex;
2834
        } catch (Throwable th) {
2835
          LOGGER.error("Internal error processing batchOrders", th);
2836
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2837
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2838
          x.write(oprot);
2839
          oprot.writeMessageEnd();
2840
          oprot.getTransport().flush();
2841
          return;
2842
        }
2843
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2844
        result.write(oprot);
2845
        oprot.writeMessageEnd();
2846
        oprot.getTransport().flush();
2847
      }
2848
 
2849
    }
2850
 
1209 chandransh 2851
    private class markOrderAsOutOfStock implements ProcessFunction {
2852
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2853
      {
2854
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2855
        args.read(iprot);
2856
        iprot.readMessageEnd();
2857
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2858
        try {
2859
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2860
          result.setSuccessIsSet(true);
2861
        } catch (TransactionServiceException ex) {
2862
          result.ex = ex;
2863
        } catch (Throwable th) {
2864
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2865
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2866
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2867
          x.write(oprot);
2868
          oprot.writeMessageEnd();
2869
          oprot.getTransport().flush();
2870
          return;
2871
        }
2872
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2873
        result.write(oprot);
2874
        oprot.writeMessageEnd();
2875
        oprot.getTransport().flush();
2876
      }
2877
 
2878
    }
2879
 
758 chandransh 2880
    private class markOrdersAsManifested implements ProcessFunction {
2881
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2882
      {
2883
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2884
        args.read(iprot);
2885
        iprot.readMessageEnd();
2886
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2887
        try {
2888
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2889
          result.setSuccessIsSet(true);
2890
        } catch (TransactionServiceException ex) {
2891
          result.ex = ex;
2892
        } catch (Throwable th) {
2893
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2894
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2895
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2896
          x.write(oprot);
2897
          oprot.writeMessageEnd();
2898
          oprot.getTransport().flush();
2899
          return;
2900
        }
2901
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2902
        result.write(oprot);
2903
        oprot.writeMessageEnd();
2904
        oprot.getTransport().flush();
2905
      }
2906
 
2907
    }
2908
 
1114 chandransh 2909
    private class markOrdersAsPickedUp implements ProcessFunction {
2910
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2911
      {
2912
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2913
        args.read(iprot);
2914
        iprot.readMessageEnd();
2915
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2916
        try {
2917
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2918
        } catch (TransactionServiceException ex) {
2919
          result.ex = ex;
2920
        } catch (Throwable th) {
2921
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2922
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2923
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2924
          x.write(oprot);
2925
          oprot.writeMessageEnd();
2926
          oprot.getTransport().flush();
2927
          return;
2928
        }
2929
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2930
        result.write(oprot);
2931
        oprot.writeMessageEnd();
2932
        oprot.getTransport().flush();
2933
      }
2934
 
2935
    }
2936
 
1133 chandransh 2937
    private class markOrdersAsDelivered implements ProcessFunction {
2938
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2939
      {
2940
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2941
        args.read(iprot);
2942
        iprot.readMessageEnd();
2943
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2944
        try {
2945
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2946
        } catch (TransactionServiceException ex) {
2947
          result.ex = ex;
2948
        } catch (Throwable th) {
2949
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2950
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2951
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2952
          x.write(oprot);
2953
          oprot.writeMessageEnd();
2954
          oprot.getTransport().flush();
2955
          return;
2956
        }
2957
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2958
        result.write(oprot);
2959
        oprot.writeMessageEnd();
2960
        oprot.getTransport().flush();
2961
      }
2962
 
2963
    }
2964
 
2965
    private class markOrdersAsFailed implements ProcessFunction {
2966
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2967
      {
2968
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2969
        args.read(iprot);
2970
        iprot.readMessageEnd();
2971
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2972
        try {
2973
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2974
        } catch (TransactionServiceException ex) {
2975
          result.ex = ex;
2976
        } catch (Throwable th) {
2977
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2978
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2979
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2980
          x.write(oprot);
2981
          oprot.writeMessageEnd();
2982
          oprot.getTransport().flush();
2983
          return;
2984
        }
2985
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2986
        result.write(oprot);
2987
        oprot.writeMessageEnd();
2988
        oprot.getTransport().flush();
2989
      }
2990
 
2991
    }
2992
 
1245 chandransh 2993
    private class updateNonDeliveryReason implements ProcessFunction {
2994
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2995
      {
2996
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2997
        args.read(iprot);
2998
        iprot.readMessageEnd();
2999
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
3000
        try {
3001
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
3002
        } catch (TransactionServiceException ex) {
3003
          result.ex = ex;
3004
        } catch (Throwable th) {
3005
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
3006
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
3007
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
3008
          x.write(oprot);
3009
          oprot.writeMessageEnd();
3010
          oprot.getTransport().flush();
3011
          return;
3012
        }
3013
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
3014
        result.write(oprot);
3015
        oprot.writeMessageEnd();
3016
        oprot.getTransport().flush();
3017
      }
3018
 
3019
    }
3020
 
1406 ankur.sing 3021
    private class getUndeliveredOrders implements ProcessFunction {
3022
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3023
      {
3024
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
3025
        args.read(iprot);
3026
        iprot.readMessageEnd();
3027
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
3028
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
3029
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
3030
        result.write(oprot);
3031
        oprot.writeMessageEnd();
3032
        oprot.getTransport().flush();
3033
      }
3034
 
3035
    }
3036
 
305 ashish 3037
    private class getAlerts implements ProcessFunction {
3038
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3039
      {
3040
        getAlerts_args args = new getAlerts_args();
3041
        args.read(iprot);
3042
        iprot.readMessageEnd();
3043
        getAlerts_result result = new getAlerts_result();
483 rajveer 3044
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 3045
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
3046
        result.write(oprot);
3047
        oprot.writeMessageEnd();
3048
        oprot.getTransport().flush();
3049
      }
3050
 
3051
    }
3052
 
3053
    private class setAlert implements ProcessFunction {
3054
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3055
      {
3056
        setAlert_args args = new setAlert_args();
3057
        args.read(iprot);
3058
        iprot.readMessageEnd();
3059
        setAlert_result result = new setAlert_result();
483 rajveer 3060
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 3061
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
3062
        result.write(oprot);
3063
        oprot.writeMessageEnd();
3064
        oprot.getTransport().flush();
3065
      }
3066
 
3067
    }
3068
 
1598 ankur.sing 3069
    private class getValidOrderCount implements ProcessFunction {
3070
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3071
      {
3072
        getValidOrderCount_args args = new getValidOrderCount_args();
3073
        args.read(iprot);
3074
        iprot.readMessageEnd();
3075
        getValidOrderCount_result result = new getValidOrderCount_result();
3076
        result.success = iface_.getValidOrderCount();
3077
        result.setSuccessIsSet(true);
3078
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
3079
        result.write(oprot);
3080
        oprot.writeMessageEnd();
3081
        oprot.getTransport().flush();
3082
      }
3083
 
3084
    }
3085
 
1629 ankur.sing 3086
    private class getNoOfCustomersWithSuccessfulTransaction implements ProcessFunction {
3087
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3088
      {
3089
        getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
3090
        args.read(iprot);
3091
        iprot.readMessageEnd();
3092
        getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
3093
        result.success = iface_.getNoOfCustomersWithSuccessfulTransaction();
3094
        result.setSuccessIsSet(true);
3095
        oprot.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid));
3096
        result.write(oprot);
3097
        oprot.writeMessageEnd();
3098
        oprot.getTransport().flush();
3099
      }
3100
 
3101
    }
3102
 
1731 ankur.sing 3103
    private class getValidOrdersAmountRange implements ProcessFunction {
1629 ankur.sing 3104
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3105
      {
1731 ankur.sing 3106
        getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 3107
        args.read(iprot);
3108
        iprot.readMessageEnd();
1731 ankur.sing 3109
        getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
3110
        result.success = iface_.getValidOrdersAmountRange();
3111
        oprot.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 3112
        result.write(oprot);
3113
        oprot.writeMessageEnd();
3114
        oprot.getTransport().flush();
3115
      }
3116
 
3117
    }
3118
 
1886 ankur.sing 3119
    private class getValidOrders implements ProcessFunction {
3120
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3121
      {
3122
        getValidOrders_args args = new getValidOrders_args();
3123
        args.read(iprot);
3124
        iprot.readMessageEnd();
3125
        getValidOrders_result result = new getValidOrders_result();
3126
        result.success = iface_.getValidOrders(args.limit);
3127
        oprot.writeMessageBegin(new TMessage("getValidOrders", TMessageType.REPLY, seqid));
3128
        result.write(oprot);
3129
        oprot.writeMessageEnd();
3130
        oprot.getTransport().flush();
3131
      }
3132
 
3133
    }
3134
 
2538 chandransh 3135
    private class toggleDOAFlag implements ProcessFunction {
3136
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3137
      {
3138
        toggleDOAFlag_args args = new toggleDOAFlag_args();
3139
        args.read(iprot);
3140
        iprot.readMessageEnd();
3141
        toggleDOAFlag_result result = new toggleDOAFlag_result();
3142
        try {
3143
          result.success = iface_.toggleDOAFlag(args.orderId);
3144
          result.setSuccessIsSet(true);
3145
        } catch (TransactionServiceException ex) {
3146
          result.ex = ex;
3147
        } catch (Throwable th) {
3148
          LOGGER.error("Internal error processing toggleDOAFlag", th);
3149
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing toggleDOAFlag");
3150
          oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.EXCEPTION, seqid));
3151
          x.write(oprot);
3152
          oprot.writeMessageEnd();
3153
          oprot.getTransport().flush();
3154
          return;
3155
        }
3156
        oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.REPLY, seqid));
3157
        result.write(oprot);
3158
        oprot.writeMessageEnd();
3159
        oprot.getTransport().flush();
3160
      }
3161
 
3162
    }
3163
 
3164
    private class requestPickupNumber implements ProcessFunction {
3165
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3166
      {
3167
        requestPickupNumber_args args = new requestPickupNumber_args();
3168
        args.read(iprot);
3169
        iprot.readMessageEnd();
3170
        requestPickupNumber_result result = new requestPickupNumber_result();
3171
        try {
3172
          result.success = iface_.requestPickupNumber(args.orderId);
3173
          result.setSuccessIsSet(true);
3174
        } catch (TransactionServiceException ex) {
3175
          result.ex = ex;
3176
        } catch (Throwable th) {
3177
          LOGGER.error("Internal error processing requestPickupNumber", th);
3178
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing requestPickupNumber");
3179
          oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.EXCEPTION, seqid));
3180
          x.write(oprot);
3181
          oprot.writeMessageEnd();
3182
          oprot.getTransport().flush();
3183
          return;
3184
        }
3185
        oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.REPLY, seqid));
3186
        result.write(oprot);
3187
        oprot.writeMessageEnd();
3188
        oprot.getTransport().flush();
3189
      }
3190
 
3191
    }
3192
 
3193
    private class authorizePickup implements ProcessFunction {
3194
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3195
      {
3196
        authorizePickup_args args = new authorizePickup_args();
3197
        args.read(iprot);
3198
        iprot.readMessageEnd();
3199
        authorizePickup_result result = new authorizePickup_result();
3200
        try {
3201
          result.success = iface_.authorizePickup(args.orderId, args.pickupNumber);
3202
          result.setSuccessIsSet(true);
3203
        } catch (TransactionServiceException ex) {
3204
          result.ex = ex;
3205
        } catch (Throwable th) {
3206
          LOGGER.error("Internal error processing authorizePickup", th);
3207
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authorizePickup");
3208
          oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.EXCEPTION, seqid));
3209
          x.write(oprot);
3210
          oprot.writeMessageEnd();
3211
          oprot.getTransport().flush();
3212
          return;
3213
        }
3214
        oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.REPLY, seqid));
3215
        result.write(oprot);
3216
        oprot.writeMessageEnd();
3217
        oprot.getTransport().flush();
3218
      }
3219
 
3220
    }
3221
 
2765 chandransh 3222
    private class markDoasAsPickedUp implements ProcessFunction {
3223
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3224
      {
3225
        markDoasAsPickedUp_args args = new markDoasAsPickedUp_args();
3226
        args.read(iprot);
3227
        iprot.readMessageEnd();
3228
        markDoasAsPickedUp_result result = new markDoasAsPickedUp_result();
3229
        result.success = iface_.markDoasAsPickedUp(args.providerId, args.pickupDetails);
3230
        oprot.writeMessageBegin(new TMessage("markDoasAsPickedUp", TMessageType.REPLY, seqid));
3231
        result.write(oprot);
3232
        oprot.writeMessageEnd();
3233
        oprot.getTransport().flush();
3234
      }
3235
 
3236
    }
3237
 
2615 chandransh 3238
    private class receiveReturn implements ProcessFunction {
2590 chandransh 3239
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3240
      {
2615 chandransh 3241
        receiveReturn_args args = new receiveReturn_args();
2590 chandransh 3242
        args.read(iprot);
3243
        iprot.readMessageEnd();
2615 chandransh 3244
        receiveReturn_result result = new receiveReturn_result();
2590 chandransh 3245
        try {
2615 chandransh 3246
          result.success = iface_.receiveReturn(args.orderId);
2590 chandransh 3247
          result.setSuccessIsSet(true);
3248
        } catch (TransactionServiceException ex) {
3249
          result.ex = ex;
3250
        } catch (Throwable th) {
2615 chandransh 3251
          LOGGER.error("Internal error processing receiveReturn", th);
3252
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing receiveReturn");
3253
          oprot.writeMessageBegin(new TMessage("receiveReturn", TMessageType.EXCEPTION, seqid));
2590 chandransh 3254
          x.write(oprot);
3255
          oprot.writeMessageEnd();
3256
          oprot.getTransport().flush();
3257
          return;
3258
        }
2615 chandransh 3259
        oprot.writeMessageBegin(new TMessage("receiveReturn", TMessageType.REPLY, seqid));
2590 chandransh 3260
        result.write(oprot);
3261
        oprot.writeMessageEnd();
3262
        oprot.getTransport().flush();
3263
      }
3264
 
3265
    }
3266
 
3267
    private class validateDoa implements ProcessFunction {
3268
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3269
      {
3270
        validateDoa_args args = new validateDoa_args();
3271
        args.read(iprot);
3272
        iprot.readMessageEnd();
3273
        validateDoa_result result = new validateDoa_result();
3274
        try {
3275
          result.success = iface_.validateDoa(args.orderId, args.isValid);
3276
          result.setSuccessIsSet(true);
3277
        } catch (TransactionServiceException ex) {
3278
          result.ex = ex;
3279
        } catch (Throwable th) {
3280
          LOGGER.error("Internal error processing validateDoa", th);
3281
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateDoa");
3282
          oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.EXCEPTION, seqid));
3283
          x.write(oprot);
3284
          oprot.writeMessageEnd();
3285
          oprot.getTransport().flush();
3286
          return;
3287
        }
3288
        oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.REPLY, seqid));
3289
        result.write(oprot);
3290
        oprot.writeMessageEnd();
3291
        oprot.getTransport().flush();
3292
      }
3293
 
3294
    }
3295
 
2615 chandransh 3296
    private class reshipOrder implements ProcessFunction {
3297
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3298
      {
3299
        reshipOrder_args args = new reshipOrder_args();
3300
        args.read(iprot);
3301
        iprot.readMessageEnd();
3302
        reshipOrder_result result = new reshipOrder_result();
3303
        try {
3304
          result.success = iface_.reshipOrder(args.orderId);
3305
          result.setSuccessIsSet(true);
3306
        } catch (TransactionServiceException ex) {
3307
          result.ex = ex;
3308
        } catch (Throwable th) {
3309
          LOGGER.error("Internal error processing reshipOrder", th);
3310
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing reshipOrder");
3311
          oprot.writeMessageBegin(new TMessage("reshipOrder", TMessageType.EXCEPTION, seqid));
3312
          x.write(oprot);
3313
          oprot.writeMessageEnd();
3314
          oprot.getTransport().flush();
3315
          return;
3316
        }
3317
        oprot.writeMessageBegin(new TMessage("reshipOrder", TMessageType.REPLY, seqid));
3318
        result.write(oprot);
3319
        oprot.writeMessageEnd();
3320
        oprot.getTransport().flush();
3321
      }
3322
 
3323
    }
3324
 
3325
    private class refundOrder implements ProcessFunction {
3326
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3327
      {
3328
        refundOrder_args args = new refundOrder_args();
3329
        args.read(iprot);
3330
        iprot.readMessageEnd();
3331
        refundOrder_result result = new refundOrder_result();
3332
        try {
3333
          result.success = iface_.refundOrder(args.orderId);
3334
          result.setSuccessIsSet(true);
3335
        } catch (TransactionServiceException ex) {
3336
          result.ex = ex;
3337
        } catch (Throwable th) {
3338
          LOGGER.error("Internal error processing refundOrder", th);
3339
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing refundOrder");
3340
          oprot.writeMessageBegin(new TMessage("refundOrder", TMessageType.EXCEPTION, seqid));
3341
          x.write(oprot);
3342
          oprot.writeMessageEnd();
3343
          oprot.getTransport().flush();
3344
          return;
3345
        }
3346
        oprot.writeMessageBegin(new TMessage("refundOrder", TMessageType.REPLY, seqid));
3347
        result.write(oprot);
3348
        oprot.writeMessageEnd();
3349
        oprot.getTransport().flush();
3350
      }
3351
 
3352
    }
3353
 
2690 chandransh 3354
    private class getReturnOrders implements ProcessFunction {
3355
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3356
      {
3357
        getReturnOrders_args args = new getReturnOrders_args();
3358
        args.read(iprot);
3359
        iprot.readMessageEnd();
3360
        getReturnOrders_result result = new getReturnOrders_result();
3361
        result.success = iface_.getReturnOrders(args.warehouseId, args.fromDate, args.toDate);
3362
        oprot.writeMessageBegin(new TMessage("getReturnOrders", TMessageType.REPLY, seqid));
3363
        result.write(oprot);
3364
        oprot.writeMessageEnd();
3365
        oprot.getTransport().flush();
3366
      }
3367
 
3368
    }
3369
 
2700 chandransh 3370
    private class getReturnOrder implements ProcessFunction {
3371
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3372
      {
3373
        getReturnOrder_args args = new getReturnOrder_args();
3374
        args.read(iprot);
3375
        iprot.readMessageEnd();
3376
        getReturnOrder_result result = new getReturnOrder_result();
3377
        try {
3378
          result.success = iface_.getReturnOrder(args.id);
3379
        } catch (TransactionServiceException ex) {
3380
          result.ex = ex;
3381
        } catch (Throwable th) {
3382
          LOGGER.error("Internal error processing getReturnOrder", th);
3383
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnOrder");
3384
          oprot.writeMessageBegin(new TMessage("getReturnOrder", TMessageType.EXCEPTION, seqid));
3385
          x.write(oprot);
3386
          oprot.writeMessageEnd();
3387
          oprot.getTransport().flush();
3388
          return;
3389
        }
3390
        oprot.writeMessageBegin(new TMessage("getReturnOrder", TMessageType.REPLY, seqid));
3391
        result.write(oprot);
3392
        oprot.writeMessageEnd();
3393
        oprot.getTransport().flush();
3394
      }
3395
 
3396
    }
3397
 
2690 chandransh 3398
    private class processReturn implements ProcessFunction {
3399
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3400
      {
3401
        processReturn_args args = new processReturn_args();
3402
        args.read(iprot);
3403
        iprot.readMessageEnd();
3404
        processReturn_result result = new processReturn_result();
3405
        try {
3406
          iface_.processReturn(args.returnOrderId);
3407
        } catch (TransactionServiceException ex) {
3408
          result.ex = ex;
3409
        } catch (Throwable th) {
3410
          LOGGER.error("Internal error processing processReturn", th);
3411
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing processReturn");
3412
          oprot.writeMessageBegin(new TMessage("processReturn", TMessageType.EXCEPTION, seqid));
3413
          x.write(oprot);
3414
          oprot.writeMessageEnd();
3415
          oprot.getTransport().flush();
3416
          return;
3417
        }
3418
        oprot.writeMessageBegin(new TMessage("processReturn", TMessageType.REPLY, seqid));
3419
        result.write(oprot);
3420
        oprot.writeMessageEnd();
3421
        oprot.getTransport().flush();
3422
      }
3423
 
3424
    }
3425
 
68 ashish 3426
  }
3427
 
764 rajveer 3428
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3429
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3430
 
3431
 
3432
 
3433
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3434
    public enum _Fields implements TFieldIdEnum {
3435
;
3436
 
3437
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3438
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3439
 
3440
      static {
3441
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3442
          byId.put((int)field._thriftId, field);
3443
          byName.put(field.getFieldName(), field);
3444
        }
3445
      }
3446
 
3447
      /**
3448
       * Find the _Fields constant that matches fieldId, or null if its not found.
3449
       */
3450
      public static _Fields findByThriftId(int fieldId) {
3451
        return byId.get(fieldId);
3452
      }
3453
 
3454
      /**
3455
       * Find the _Fields constant that matches fieldId, throwing an exception
3456
       * if it is not found.
3457
       */
3458
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3459
        _Fields fields = findByThriftId(fieldId);
3460
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3461
        return fields;
3462
      }
3463
 
3464
      /**
3465
       * Find the _Fields constant that matches name, or null if its not found.
3466
       */
3467
      public static _Fields findByName(String name) {
3468
        return byName.get(name);
3469
      }
3470
 
3471
      private final short _thriftId;
3472
      private final String _fieldName;
3473
 
3474
      _Fields(short thriftId, String fieldName) {
3475
        _thriftId = thriftId;
3476
        _fieldName = fieldName;
3477
      }
3478
 
3479
      public short getThriftFieldId() {
3480
        return _thriftId;
3481
      }
3482
 
3483
      public String getFieldName() {
3484
        return _fieldName;
3485
      }
3486
    }
3487
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3488
    }});
3489
 
3490
    static {
3491
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3492
    }
3493
 
3494
    public closeSession_args() {
3495
    }
3496
 
3497
    /**
3498
     * Performs a deep copy on <i>other</i>.
3499
     */
3500
    public closeSession_args(closeSession_args other) {
3501
    }
3502
 
3503
    public closeSession_args deepCopy() {
3504
      return new closeSession_args(this);
3505
    }
3506
 
3507
    @Deprecated
3508
    public closeSession_args clone() {
3509
      return new closeSession_args(this);
3510
    }
3511
 
3512
    public void setFieldValue(_Fields field, Object value) {
3513
      switch (field) {
3514
      }
3515
    }
3516
 
3517
    public void setFieldValue(int fieldID, Object value) {
3518
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3519
    }
3520
 
3521
    public Object getFieldValue(_Fields field) {
3522
      switch (field) {
3523
      }
3524
      throw new IllegalStateException();
3525
    }
3526
 
3527
    public Object getFieldValue(int fieldId) {
3528
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3529
    }
3530
 
3531
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3532
    public boolean isSet(_Fields field) {
3533
      switch (field) {
3534
      }
3535
      throw new IllegalStateException();
3536
    }
3537
 
3538
    public boolean isSet(int fieldID) {
3539
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3540
    }
3541
 
3542
    @Override
3543
    public boolean equals(Object that) {
3544
      if (that == null)
3545
        return false;
3546
      if (that instanceof closeSession_args)
3547
        return this.equals((closeSession_args)that);
3548
      return false;
3549
    }
3550
 
3551
    public boolean equals(closeSession_args that) {
3552
      if (that == null)
3553
        return false;
3554
 
3555
      return true;
3556
    }
3557
 
3558
    @Override
3559
    public int hashCode() {
3560
      return 0;
3561
    }
3562
 
3563
    public int compareTo(closeSession_args other) {
3564
      if (!getClass().equals(other.getClass())) {
3565
        return getClass().getName().compareTo(other.getClass().getName());
3566
      }
3567
 
3568
      int lastComparison = 0;
3569
      closeSession_args typedOther = (closeSession_args)other;
3570
 
3571
      return 0;
3572
    }
3573
 
3574
    public void read(TProtocol iprot) throws TException {
3575
      TField field;
3576
      iprot.readStructBegin();
3577
      while (true)
3578
      {
3579
        field = iprot.readFieldBegin();
3580
        if (field.type == TType.STOP) { 
3581
          break;
3582
        }
3583
        _Fields fieldId = _Fields.findByThriftId(field.id);
3584
        if (fieldId == null) {
3585
          TProtocolUtil.skip(iprot, field.type);
3586
        } else {
3587
          switch (fieldId) {
3588
          }
3589
          iprot.readFieldEnd();
3590
        }
3591
      }
3592
      iprot.readStructEnd();
3593
      validate();
3594
    }
3595
 
3596
    public void write(TProtocol oprot) throws TException {
3597
      validate();
3598
 
3599
      oprot.writeStructBegin(STRUCT_DESC);
3600
      oprot.writeFieldStop();
3601
      oprot.writeStructEnd();
3602
    }
3603
 
3604
    @Override
3605
    public String toString() {
3606
      StringBuilder sb = new StringBuilder("closeSession_args(");
3607
      boolean first = true;
3608
 
3609
      sb.append(")");
3610
      return sb.toString();
3611
    }
3612
 
3613
    public void validate() throws TException {
3614
      // check for required fields
3615
    }
3616
 
3617
  }
3618
 
3619
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3620
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3621
 
3622
 
3623
 
3624
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3625
    public enum _Fields implements TFieldIdEnum {
3626
;
3627
 
3628
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3629
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3630
 
3631
      static {
3632
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3633
          byId.put((int)field._thriftId, field);
3634
          byName.put(field.getFieldName(), field);
3635
        }
3636
      }
3637
 
3638
      /**
3639
       * Find the _Fields constant that matches fieldId, or null if its not found.
3640
       */
3641
      public static _Fields findByThriftId(int fieldId) {
3642
        return byId.get(fieldId);
3643
      }
3644
 
3645
      /**
3646
       * Find the _Fields constant that matches fieldId, throwing an exception
3647
       * if it is not found.
3648
       */
3649
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3650
        _Fields fields = findByThriftId(fieldId);
3651
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3652
        return fields;
3653
      }
3654
 
3655
      /**
3656
       * Find the _Fields constant that matches name, or null if its not found.
3657
       */
3658
      public static _Fields findByName(String name) {
3659
        return byName.get(name);
3660
      }
3661
 
3662
      private final short _thriftId;
3663
      private final String _fieldName;
3664
 
3665
      _Fields(short thriftId, String fieldName) {
3666
        _thriftId = thriftId;
3667
        _fieldName = fieldName;
3668
      }
3669
 
3670
      public short getThriftFieldId() {
3671
        return _thriftId;
3672
      }
3673
 
3674
      public String getFieldName() {
3675
        return _fieldName;
3676
      }
3677
    }
3678
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3679
    }});
3680
 
3681
    static {
3682
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3683
    }
3684
 
3685
    public closeSession_result() {
3686
    }
3687
 
3688
    /**
3689
     * Performs a deep copy on <i>other</i>.
3690
     */
3691
    public closeSession_result(closeSession_result other) {
3692
    }
3693
 
3694
    public closeSession_result deepCopy() {
3695
      return new closeSession_result(this);
3696
    }
3697
 
3698
    @Deprecated
3699
    public closeSession_result clone() {
3700
      return new closeSession_result(this);
3701
    }
3702
 
3703
    public void setFieldValue(_Fields field, Object value) {
3704
      switch (field) {
3705
      }
3706
    }
3707
 
3708
    public void setFieldValue(int fieldID, Object value) {
3709
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3710
    }
3711
 
3712
    public Object getFieldValue(_Fields field) {
3713
      switch (field) {
3714
      }
3715
      throw new IllegalStateException();
3716
    }
3717
 
3718
    public Object getFieldValue(int fieldId) {
3719
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3720
    }
3721
 
3722
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3723
    public boolean isSet(_Fields field) {
3724
      switch (field) {
3725
      }
3726
      throw new IllegalStateException();
3727
    }
3728
 
3729
    public boolean isSet(int fieldID) {
3730
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3731
    }
3732
 
3733
    @Override
3734
    public boolean equals(Object that) {
3735
      if (that == null)
3736
        return false;
3737
      if (that instanceof closeSession_result)
3738
        return this.equals((closeSession_result)that);
3739
      return false;
3740
    }
3741
 
3742
    public boolean equals(closeSession_result that) {
3743
      if (that == null)
3744
        return false;
3745
 
3746
      return true;
3747
    }
3748
 
3749
    @Override
3750
    public int hashCode() {
3751
      return 0;
3752
    }
3753
 
3754
    public int compareTo(closeSession_result other) {
3755
      if (!getClass().equals(other.getClass())) {
3756
        return getClass().getName().compareTo(other.getClass().getName());
3757
      }
3758
 
3759
      int lastComparison = 0;
3760
      closeSession_result typedOther = (closeSession_result)other;
3761
 
3762
      return 0;
3763
    }
3764
 
3765
    public void read(TProtocol iprot) throws TException {
3766
      TField field;
3767
      iprot.readStructBegin();
3768
      while (true)
3769
      {
3770
        field = iprot.readFieldBegin();
3771
        if (field.type == TType.STOP) { 
3772
          break;
3773
        }
3774
        _Fields fieldId = _Fields.findByThriftId(field.id);
3775
        if (fieldId == null) {
3776
          TProtocolUtil.skip(iprot, field.type);
3777
        } else {
3778
          switch (fieldId) {
3779
          }
3780
          iprot.readFieldEnd();
3781
        }
3782
      }
3783
      iprot.readStructEnd();
3784
      validate();
3785
    }
3786
 
3787
    public void write(TProtocol oprot) throws TException {
3788
      oprot.writeStructBegin(STRUCT_DESC);
3789
 
3790
      oprot.writeFieldStop();
3791
      oprot.writeStructEnd();
3792
    }
3793
 
3794
    @Override
3795
    public String toString() {
3796
      StringBuilder sb = new StringBuilder("closeSession_result(");
3797
      boolean first = true;
3798
 
3799
      sb.append(")");
3800
      return sb.toString();
3801
    }
3802
 
3803
    public void validate() throws TException {
3804
      // check for required fields
3805
    }
3806
 
3807
  }
3808
 
684 chandransh 3809
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 3810
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
3811
 
3812
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
3813
 
3814
    private Transaction transaction;
3815
 
3816
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3817
    public enum _Fields implements TFieldIdEnum {
3818
      TRANSACTION((short)1, "transaction");
3819
 
3820
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3821
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3822
 
3823
      static {
3824
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3825
          byId.put((int)field._thriftId, field);
3826
          byName.put(field.getFieldName(), field);
3827
        }
3828
      }
3829
 
3830
      /**
3831
       * Find the _Fields constant that matches fieldId, or null if its not found.
3832
       */
3833
      public static _Fields findByThriftId(int fieldId) {
3834
        return byId.get(fieldId);
3835
      }
3836
 
3837
      /**
3838
       * Find the _Fields constant that matches fieldId, throwing an exception
3839
       * if it is not found.
3840
       */
3841
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3842
        _Fields fields = findByThriftId(fieldId);
3843
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3844
        return fields;
3845
      }
3846
 
3847
      /**
3848
       * Find the _Fields constant that matches name, or null if its not found.
3849
       */
3850
      public static _Fields findByName(String name) {
3851
        return byName.get(name);
3852
      }
3853
 
3854
      private final short _thriftId;
3855
      private final String _fieldName;
3856
 
3857
      _Fields(short thriftId, String fieldName) {
3858
        _thriftId = thriftId;
3859
        _fieldName = fieldName;
3860
      }
3861
 
3862
      public short getThriftFieldId() {
3863
        return _thriftId;
3864
      }
3865
 
3866
      public String getFieldName() {
3867
        return _fieldName;
3868
      }
3869
    }
3870
 
3871
    // isset id assignments
3872
 
3873
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3874
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
3875
          new StructMetaData(TType.STRUCT, Transaction.class)));
3876
    }});
3877
 
3878
    static {
3879
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
3880
    }
3881
 
3882
    public createTransaction_args() {
3883
    }
3884
 
3885
    public createTransaction_args(
3886
      Transaction transaction)
3887
    {
3888
      this();
3889
      this.transaction = transaction;
3890
    }
3891
 
3892
    /**
3893
     * Performs a deep copy on <i>other</i>.
3894
     */
3895
    public createTransaction_args(createTransaction_args other) {
3896
      if (other.isSetTransaction()) {
3897
        this.transaction = new Transaction(other.transaction);
3898
      }
3899
    }
3900
 
3901
    public createTransaction_args deepCopy() {
3902
      return new createTransaction_args(this);
3903
    }
3904
 
3905
    @Deprecated
3906
    public createTransaction_args clone() {
3907
      return new createTransaction_args(this);
3908
    }
3909
 
3910
    public Transaction getTransaction() {
3911
      return this.transaction;
3912
    }
3913
 
3914
    public createTransaction_args setTransaction(Transaction transaction) {
3915
      this.transaction = transaction;
3916
      return this;
3917
    }
3918
 
3919
    public void unsetTransaction() {
3920
      this.transaction = null;
3921
    }
3922
 
3923
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
3924
    public boolean isSetTransaction() {
3925
      return this.transaction != null;
3926
    }
3927
 
3928
    public void setTransactionIsSet(boolean value) {
3929
      if (!value) {
3930
        this.transaction = null;
3931
      }
3932
    }
3933
 
3934
    public void setFieldValue(_Fields field, Object value) {
3935
      switch (field) {
3936
      case TRANSACTION:
3937
        if (value == null) {
3938
          unsetTransaction();
3939
        } else {
3940
          setTransaction((Transaction)value);
3941
        }
3942
        break;
3943
 
3944
      }
3945
    }
3946
 
3947
    public void setFieldValue(int fieldID, Object value) {
3948
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3949
    }
3950
 
3951
    public Object getFieldValue(_Fields field) {
3952
      switch (field) {
3953
      case TRANSACTION:
3954
        return getTransaction();
3955
 
3956
      }
3957
      throw new IllegalStateException();
3958
    }
3959
 
3960
    public Object getFieldValue(int fieldId) {
3961
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3962
    }
3963
 
3964
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3965
    public boolean isSet(_Fields field) {
3966
      switch (field) {
3967
      case TRANSACTION:
3968
        return isSetTransaction();
3969
      }
3970
      throw new IllegalStateException();
3971
    }
3972
 
3973
    public boolean isSet(int fieldID) {
3974
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3975
    }
3976
 
3977
    @Override
3978
    public boolean equals(Object that) {
3979
      if (that == null)
3980
        return false;
3981
      if (that instanceof createTransaction_args)
3982
        return this.equals((createTransaction_args)that);
3983
      return false;
3984
    }
3985
 
3986
    public boolean equals(createTransaction_args that) {
3987
      if (that == null)
3988
        return false;
3989
 
3990
      boolean this_present_transaction = true && this.isSetTransaction();
3991
      boolean that_present_transaction = true && that.isSetTransaction();
3992
      if (this_present_transaction || that_present_transaction) {
3993
        if (!(this_present_transaction && that_present_transaction))
3994
          return false;
3995
        if (!this.transaction.equals(that.transaction))
3996
          return false;
3997
      }
3998
 
3999
      return true;
4000
    }
4001
 
4002
    @Override
4003
    public int hashCode() {
4004
      return 0;
4005
    }
4006
 
684 chandransh 4007
    public int compareTo(createTransaction_args other) {
4008
      if (!getClass().equals(other.getClass())) {
4009
        return getClass().getName().compareTo(other.getClass().getName());
4010
      }
4011
 
4012
      int lastComparison = 0;
4013
      createTransaction_args typedOther = (createTransaction_args)other;
4014
 
4015
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
4016
      if (lastComparison != 0) {
4017
        return lastComparison;
4018
      }
4019
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
4020
      if (lastComparison != 0) {
4021
        return lastComparison;
4022
      }
4023
      return 0;
4024
    }
4025
 
68 ashish 4026
    public void read(TProtocol iprot) throws TException {
4027
      TField field;
4028
      iprot.readStructBegin();
4029
      while (true)
4030
      {
4031
        field = iprot.readFieldBegin();
4032
        if (field.type == TType.STOP) { 
4033
          break;
4034
        }
4035
        _Fields fieldId = _Fields.findByThriftId(field.id);
4036
        if (fieldId == null) {
4037
          TProtocolUtil.skip(iprot, field.type);
4038
        } else {
4039
          switch (fieldId) {
4040
            case TRANSACTION:
4041
              if (field.type == TType.STRUCT) {
4042
                this.transaction = new Transaction();
4043
                this.transaction.read(iprot);
4044
              } else { 
4045
                TProtocolUtil.skip(iprot, field.type);
4046
              }
4047
              break;
4048
          }
4049
          iprot.readFieldEnd();
4050
        }
4051
      }
4052
      iprot.readStructEnd();
4053
      validate();
4054
    }
4055
 
4056
    public void write(TProtocol oprot) throws TException {
4057
      validate();
4058
 
4059
      oprot.writeStructBegin(STRUCT_DESC);
4060
      if (this.transaction != null) {
4061
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
4062
        this.transaction.write(oprot);
4063
        oprot.writeFieldEnd();
4064
      }
4065
      oprot.writeFieldStop();
4066
      oprot.writeStructEnd();
4067
    }
4068
 
4069
    @Override
4070
    public String toString() {
4071
      StringBuilder sb = new StringBuilder("createTransaction_args(");
4072
      boolean first = true;
4073
 
4074
      sb.append("transaction:");
4075
      if (this.transaction == null) {
4076
        sb.append("null");
4077
      } else {
4078
        sb.append(this.transaction);
4079
      }
4080
      first = false;
4081
      sb.append(")");
4082
      return sb.toString();
4083
    }
4084
 
4085
    public void validate() throws TException {
4086
      // check for required fields
4087
    }
4088
 
4089
  }
4090
 
4091
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
4092
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
4093
 
132 ashish 4094
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 4095
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4096
 
132 ashish 4097
    private long success;
68 ashish 4098
    private TransactionServiceException ex;
4099
 
4100
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4101
    public enum _Fields implements TFieldIdEnum {
132 ashish 4102
      SUCCESS((short)0, "success"),
68 ashish 4103
      EX((short)1, "ex");
4104
 
4105
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4106
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4107
 
4108
      static {
4109
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4110
          byId.put((int)field._thriftId, field);
4111
          byName.put(field.getFieldName(), field);
4112
        }
4113
      }
4114
 
4115
      /**
4116
       * Find the _Fields constant that matches fieldId, or null if its not found.
4117
       */
4118
      public static _Fields findByThriftId(int fieldId) {
4119
        return byId.get(fieldId);
4120
      }
4121
 
4122
      /**
4123
       * Find the _Fields constant that matches fieldId, throwing an exception
4124
       * if it is not found.
4125
       */
4126
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4127
        _Fields fields = findByThriftId(fieldId);
4128
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4129
        return fields;
4130
      }
4131
 
4132
      /**
4133
       * Find the _Fields constant that matches name, or null if its not found.
4134
       */
4135
      public static _Fields findByName(String name) {
4136
        return byName.get(name);
4137
      }
4138
 
4139
      private final short _thriftId;
4140
      private final String _fieldName;
4141
 
4142
      _Fields(short thriftId, String fieldName) {
4143
        _thriftId = thriftId;
4144
        _fieldName = fieldName;
4145
      }
4146
 
4147
      public short getThriftFieldId() {
4148
        return _thriftId;
4149
      }
4150
 
4151
      public String getFieldName() {
4152
        return _fieldName;
4153
      }
4154
    }
4155
 
4156
    // isset id assignments
132 ashish 4157
    private static final int __SUCCESS_ISSET_ID = 0;
4158
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 4159
 
4160
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 4161
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4162
          new FieldValueMetaData(TType.I64)));
68 ashish 4163
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4164
          new FieldValueMetaData(TType.STRUCT)));
4165
    }});
4166
 
4167
    static {
4168
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
4169
    }
4170
 
4171
    public createTransaction_result() {
4172
    }
4173
 
4174
    public createTransaction_result(
132 ashish 4175
      long success,
68 ashish 4176
      TransactionServiceException ex)
4177
    {
4178
      this();
132 ashish 4179
      this.success = success;
4180
      setSuccessIsSet(true);
68 ashish 4181
      this.ex = ex;
4182
    }
4183
 
4184
    /**
4185
     * Performs a deep copy on <i>other</i>.
4186
     */
4187
    public createTransaction_result(createTransaction_result other) {
132 ashish 4188
      __isset_bit_vector.clear();
4189
      __isset_bit_vector.or(other.__isset_bit_vector);
4190
      this.success = other.success;
68 ashish 4191
      if (other.isSetEx()) {
4192
        this.ex = new TransactionServiceException(other.ex);
4193
      }
4194
    }
4195
 
4196
    public createTransaction_result deepCopy() {
4197
      return new createTransaction_result(this);
4198
    }
4199
 
4200
    @Deprecated
4201
    public createTransaction_result clone() {
4202
      return new createTransaction_result(this);
4203
    }
4204
 
132 ashish 4205
    public long getSuccess() {
4206
      return this.success;
4207
    }
4208
 
4209
    public createTransaction_result setSuccess(long success) {
4210
      this.success = success;
4211
      setSuccessIsSet(true);
4212
      return this;
4213
    }
4214
 
4215
    public void unsetSuccess() {
4216
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
4217
    }
4218
 
4219
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4220
    public boolean isSetSuccess() {
4221
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
4222
    }
4223
 
4224
    public void setSuccessIsSet(boolean value) {
4225
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
4226
    }
4227
 
68 ashish 4228
    public TransactionServiceException getEx() {
4229
      return this.ex;
4230
    }
4231
 
4232
    public createTransaction_result setEx(TransactionServiceException ex) {
4233
      this.ex = ex;
4234
      return this;
4235
    }
4236
 
4237
    public void unsetEx() {
4238
      this.ex = null;
4239
    }
4240
 
4241
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4242
    public boolean isSetEx() {
4243
      return this.ex != null;
4244
    }
4245
 
4246
    public void setExIsSet(boolean value) {
4247
      if (!value) {
4248
        this.ex = null;
4249
      }
4250
    }
4251
 
4252
    public void setFieldValue(_Fields field, Object value) {
4253
      switch (field) {
132 ashish 4254
      case SUCCESS:
4255
        if (value == null) {
4256
          unsetSuccess();
4257
        } else {
4258
          setSuccess((Long)value);
4259
        }
4260
        break;
4261
 
68 ashish 4262
      case EX:
4263
        if (value == null) {
4264
          unsetEx();
4265
        } else {
4266
          setEx((TransactionServiceException)value);
4267
        }
4268
        break;
4269
 
4270
      }
4271
    }
4272
 
4273
    public void setFieldValue(int fieldID, Object value) {
4274
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4275
    }
4276
 
4277
    public Object getFieldValue(_Fields field) {
4278
      switch (field) {
132 ashish 4279
      case SUCCESS:
4280
        return new Long(getSuccess());
4281
 
68 ashish 4282
      case EX:
4283
        return getEx();
4284
 
4285
      }
4286
      throw new IllegalStateException();
4287
    }
4288
 
4289
    public Object getFieldValue(int fieldId) {
4290
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4291
    }
4292
 
4293
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4294
    public boolean isSet(_Fields field) {
4295
      switch (field) {
132 ashish 4296
      case SUCCESS:
4297
        return isSetSuccess();
68 ashish 4298
      case EX:
4299
        return isSetEx();
4300
      }
4301
      throw new IllegalStateException();
4302
    }
4303
 
4304
    public boolean isSet(int fieldID) {
4305
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4306
    }
4307
 
4308
    @Override
4309
    public boolean equals(Object that) {
4310
      if (that == null)
4311
        return false;
4312
      if (that instanceof createTransaction_result)
4313
        return this.equals((createTransaction_result)that);
4314
      return false;
4315
    }
4316
 
4317
    public boolean equals(createTransaction_result that) {
4318
      if (that == null)
4319
        return false;
4320
 
132 ashish 4321
      boolean this_present_success = true;
4322
      boolean that_present_success = true;
4323
      if (this_present_success || that_present_success) {
4324
        if (!(this_present_success && that_present_success))
4325
          return false;
4326
        if (this.success != that.success)
4327
          return false;
4328
      }
4329
 
68 ashish 4330
      boolean this_present_ex = true && this.isSetEx();
4331
      boolean that_present_ex = true && that.isSetEx();
4332
      if (this_present_ex || that_present_ex) {
4333
        if (!(this_present_ex && that_present_ex))
4334
          return false;
4335
        if (!this.ex.equals(that.ex))
4336
          return false;
4337
      }
4338
 
4339
      return true;
4340
    }
4341
 
4342
    @Override
4343
    public int hashCode() {
4344
      return 0;
4345
    }
4346
 
4347
    public int compareTo(createTransaction_result other) {
4348
      if (!getClass().equals(other.getClass())) {
4349
        return getClass().getName().compareTo(other.getClass().getName());
4350
      }
4351
 
4352
      int lastComparison = 0;
4353
      createTransaction_result typedOther = (createTransaction_result)other;
4354
 
132 ashish 4355
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4356
      if (lastComparison != 0) {
4357
        return lastComparison;
4358
      }
4359
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4360
      if (lastComparison != 0) {
4361
        return lastComparison;
4362
      }
68 ashish 4363
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4364
      if (lastComparison != 0) {
4365
        return lastComparison;
4366
      }
4367
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4368
      if (lastComparison != 0) {
4369
        return lastComparison;
4370
      }
4371
      return 0;
4372
    }
4373
 
4374
    public void read(TProtocol iprot) throws TException {
4375
      TField field;
4376
      iprot.readStructBegin();
4377
      while (true)
4378
      {
4379
        field = iprot.readFieldBegin();
4380
        if (field.type == TType.STOP) { 
4381
          break;
4382
        }
4383
        _Fields fieldId = _Fields.findByThriftId(field.id);
4384
        if (fieldId == null) {
4385
          TProtocolUtil.skip(iprot, field.type);
4386
        } else {
4387
          switch (fieldId) {
132 ashish 4388
            case SUCCESS:
4389
              if (field.type == TType.I64) {
4390
                this.success = iprot.readI64();
4391
                setSuccessIsSet(true);
4392
              } else { 
4393
                TProtocolUtil.skip(iprot, field.type);
4394
              }
4395
              break;
68 ashish 4396
            case EX:
4397
              if (field.type == TType.STRUCT) {
4398
                this.ex = new TransactionServiceException();
4399
                this.ex.read(iprot);
4400
              } else { 
4401
                TProtocolUtil.skip(iprot, field.type);
4402
              }
4403
              break;
4404
          }
4405
          iprot.readFieldEnd();
4406
        }
4407
      }
4408
      iprot.readStructEnd();
4409
      validate();
4410
    }
4411
 
4412
    public void write(TProtocol oprot) throws TException {
4413
      oprot.writeStructBegin(STRUCT_DESC);
4414
 
132 ashish 4415
      if (this.isSetSuccess()) {
4416
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4417
        oprot.writeI64(this.success);
4418
        oprot.writeFieldEnd();
4419
      } else if (this.isSetEx()) {
68 ashish 4420
        oprot.writeFieldBegin(EX_FIELD_DESC);
4421
        this.ex.write(oprot);
4422
        oprot.writeFieldEnd();
4423
      }
4424
      oprot.writeFieldStop();
4425
      oprot.writeStructEnd();
4426
    }
4427
 
4428
    @Override
4429
    public String toString() {
4430
      StringBuilder sb = new StringBuilder("createTransaction_result(");
4431
      boolean first = true;
4432
 
132 ashish 4433
      sb.append("success:");
4434
      sb.append(this.success);
4435
      first = false;
4436
      if (!first) sb.append(", ");
68 ashish 4437
      sb.append("ex:");
4438
      if (this.ex == null) {
4439
        sb.append("null");
4440
      } else {
4441
        sb.append(this.ex);
4442
      }
4443
      first = false;
4444
      sb.append(")");
4445
      return sb.toString();
4446
    }
4447
 
4448
    public void validate() throws TException {
4449
      // check for required fields
4450
    }
4451
 
4452
  }
4453
 
4454
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
4455
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
4456
 
4457
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
4458
 
4459
    private long id;
4460
 
4461
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4462
    public enum _Fields implements TFieldIdEnum {
4463
      ID((short)1, "id");
4464
 
4465
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4466
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4467
 
4468
      static {
4469
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4470
          byId.put((int)field._thriftId, field);
4471
          byName.put(field.getFieldName(), field);
4472
        }
4473
      }
4474
 
4475
      /**
4476
       * Find the _Fields constant that matches fieldId, or null if its not found.
4477
       */
4478
      public static _Fields findByThriftId(int fieldId) {
4479
        return byId.get(fieldId);
4480
      }
4481
 
4482
      /**
4483
       * Find the _Fields constant that matches fieldId, throwing an exception
4484
       * if it is not found.
4485
       */
4486
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4487
        _Fields fields = findByThriftId(fieldId);
4488
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4489
        return fields;
4490
      }
4491
 
4492
      /**
4493
       * Find the _Fields constant that matches name, or null if its not found.
4494
       */
4495
      public static _Fields findByName(String name) {
4496
        return byName.get(name);
4497
      }
4498
 
4499
      private final short _thriftId;
4500
      private final String _fieldName;
4501
 
4502
      _Fields(short thriftId, String fieldName) {
4503
        _thriftId = thriftId;
4504
        _fieldName = fieldName;
4505
      }
4506
 
4507
      public short getThriftFieldId() {
4508
        return _thriftId;
4509
      }
4510
 
4511
      public String getFieldName() {
4512
        return _fieldName;
4513
      }
4514
    }
4515
 
4516
    // isset id assignments
4517
    private static final int __ID_ISSET_ID = 0;
4518
    private BitSet __isset_bit_vector = new BitSet(1);
4519
 
4520
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4521
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
4522
          new FieldValueMetaData(TType.I64)));
4523
    }});
4524
 
4525
    static {
4526
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
4527
    }
4528
 
4529
    public getTransaction_args() {
4530
    }
4531
 
4532
    public getTransaction_args(
4533
      long id)
4534
    {
4535
      this();
4536
      this.id = id;
4537
      setIdIsSet(true);
4538
    }
4539
 
4540
    /**
4541
     * Performs a deep copy on <i>other</i>.
4542
     */
4543
    public getTransaction_args(getTransaction_args other) {
4544
      __isset_bit_vector.clear();
4545
      __isset_bit_vector.or(other.__isset_bit_vector);
4546
      this.id = other.id;
4547
    }
4548
 
4549
    public getTransaction_args deepCopy() {
4550
      return new getTransaction_args(this);
4551
    }
4552
 
4553
    @Deprecated
4554
    public getTransaction_args clone() {
4555
      return new getTransaction_args(this);
4556
    }
4557
 
4558
    public long getId() {
4559
      return this.id;
4560
    }
4561
 
4562
    public getTransaction_args setId(long id) {
4563
      this.id = id;
4564
      setIdIsSet(true);
4565
      return this;
4566
    }
4567
 
4568
    public void unsetId() {
4569
      __isset_bit_vector.clear(__ID_ISSET_ID);
4570
    }
4571
 
4572
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
4573
    public boolean isSetId() {
4574
      return __isset_bit_vector.get(__ID_ISSET_ID);
4575
    }
4576
 
4577
    public void setIdIsSet(boolean value) {
4578
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4579
    }
4580
 
4581
    public void setFieldValue(_Fields field, Object value) {
4582
      switch (field) {
4583
      case ID:
4584
        if (value == null) {
4585
          unsetId();
4586
        } else {
4587
          setId((Long)value);
4588
        }
4589
        break;
4590
 
4591
      }
4592
    }
4593
 
4594
    public void setFieldValue(int fieldID, Object value) {
4595
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4596
    }
4597
 
4598
    public Object getFieldValue(_Fields field) {
4599
      switch (field) {
4600
      case ID:
4601
        return new Long(getId());
4602
 
4603
      }
4604
      throw new IllegalStateException();
4605
    }
4606
 
4607
    public Object getFieldValue(int fieldId) {
4608
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4609
    }
4610
 
4611
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4612
    public boolean isSet(_Fields field) {
4613
      switch (field) {
4614
      case ID:
4615
        return isSetId();
4616
      }
4617
      throw new IllegalStateException();
4618
    }
4619
 
4620
    public boolean isSet(int fieldID) {
4621
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4622
    }
4623
 
4624
    @Override
4625
    public boolean equals(Object that) {
4626
      if (that == null)
4627
        return false;
4628
      if (that instanceof getTransaction_args)
4629
        return this.equals((getTransaction_args)that);
4630
      return false;
4631
    }
4632
 
4633
    public boolean equals(getTransaction_args that) {
4634
      if (that == null)
4635
        return false;
4636
 
4637
      boolean this_present_id = true;
4638
      boolean that_present_id = true;
4639
      if (this_present_id || that_present_id) {
4640
        if (!(this_present_id && that_present_id))
4641
          return false;
4642
        if (this.id != that.id)
4643
          return false;
4644
      }
4645
 
4646
      return true;
4647
    }
4648
 
4649
    @Override
4650
    public int hashCode() {
4651
      return 0;
4652
    }
4653
 
4654
    public int compareTo(getTransaction_args other) {
4655
      if (!getClass().equals(other.getClass())) {
4656
        return getClass().getName().compareTo(other.getClass().getName());
4657
      }
4658
 
4659
      int lastComparison = 0;
4660
      getTransaction_args typedOther = (getTransaction_args)other;
4661
 
4662
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
4663
      if (lastComparison != 0) {
4664
        return lastComparison;
4665
      }
4666
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
4667
      if (lastComparison != 0) {
4668
        return lastComparison;
4669
      }
4670
      return 0;
4671
    }
4672
 
4673
    public void read(TProtocol iprot) throws TException {
4674
      TField field;
4675
      iprot.readStructBegin();
4676
      while (true)
4677
      {
4678
        field = iprot.readFieldBegin();
4679
        if (field.type == TType.STOP) { 
4680
          break;
4681
        }
4682
        _Fields fieldId = _Fields.findByThriftId(field.id);
4683
        if (fieldId == null) {
4684
          TProtocolUtil.skip(iprot, field.type);
4685
        } else {
4686
          switch (fieldId) {
4687
            case ID:
4688
              if (field.type == TType.I64) {
4689
                this.id = iprot.readI64();
4690
                setIdIsSet(true);
4691
              } else { 
4692
                TProtocolUtil.skip(iprot, field.type);
4693
              }
4694
              break;
4695
          }
4696
          iprot.readFieldEnd();
4697
        }
4698
      }
4699
      iprot.readStructEnd();
4700
      validate();
4701
    }
4702
 
4703
    public void write(TProtocol oprot) throws TException {
4704
      validate();
4705
 
4706
      oprot.writeStructBegin(STRUCT_DESC);
4707
      oprot.writeFieldBegin(ID_FIELD_DESC);
4708
      oprot.writeI64(this.id);
4709
      oprot.writeFieldEnd();
4710
      oprot.writeFieldStop();
4711
      oprot.writeStructEnd();
4712
    }
4713
 
4714
    @Override
4715
    public String toString() {
4716
      StringBuilder sb = new StringBuilder("getTransaction_args(");
4717
      boolean first = true;
4718
 
4719
      sb.append("id:");
4720
      sb.append(this.id);
4721
      first = false;
4722
      sb.append(")");
4723
      return sb.toString();
4724
    }
4725
 
4726
    public void validate() throws TException {
4727
      // check for required fields
4728
    }
4729
 
4730
  }
4731
 
684 chandransh 4732
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 4733
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
4734
 
4735
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4736
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4737
 
4738
    private Transaction success;
4739
    private TransactionServiceException ex;
4740
 
4741
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4742
    public enum _Fields implements TFieldIdEnum {
4743
      SUCCESS((short)0, "success"),
4744
      EX((short)1, "ex");
4745
 
4746
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4747
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4748
 
4749
      static {
4750
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4751
          byId.put((int)field._thriftId, field);
4752
          byName.put(field.getFieldName(), field);
4753
        }
4754
      }
4755
 
4756
      /**
4757
       * Find the _Fields constant that matches fieldId, or null if its not found.
4758
       */
4759
      public static _Fields findByThriftId(int fieldId) {
4760
        return byId.get(fieldId);
4761
      }
4762
 
4763
      /**
4764
       * Find the _Fields constant that matches fieldId, throwing an exception
4765
       * if it is not found.
4766
       */
4767
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4768
        _Fields fields = findByThriftId(fieldId);
4769
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4770
        return fields;
4771
      }
4772
 
4773
      /**
4774
       * Find the _Fields constant that matches name, or null if its not found.
4775
       */
4776
      public static _Fields findByName(String name) {
4777
        return byName.get(name);
4778
      }
4779
 
4780
      private final short _thriftId;
4781
      private final String _fieldName;
4782
 
4783
      _Fields(short thriftId, String fieldName) {
4784
        _thriftId = thriftId;
4785
        _fieldName = fieldName;
4786
      }
4787
 
4788
      public short getThriftFieldId() {
4789
        return _thriftId;
4790
      }
4791
 
4792
      public String getFieldName() {
4793
        return _fieldName;
4794
      }
4795
    }
4796
 
4797
    // isset id assignments
4798
 
4799
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4800
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4801
          new StructMetaData(TType.STRUCT, Transaction.class)));
4802
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4803
          new FieldValueMetaData(TType.STRUCT)));
4804
    }});
4805
 
4806
    static {
4807
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
4808
    }
4809
 
4810
    public getTransaction_result() {
4811
    }
4812
 
4813
    public getTransaction_result(
4814
      Transaction success,
4815
      TransactionServiceException ex)
4816
    {
4817
      this();
4818
      this.success = success;
4819
      this.ex = ex;
4820
    }
4821
 
4822
    /**
4823
     * Performs a deep copy on <i>other</i>.
4824
     */
4825
    public getTransaction_result(getTransaction_result other) {
4826
      if (other.isSetSuccess()) {
4827
        this.success = new Transaction(other.success);
4828
      }
4829
      if (other.isSetEx()) {
4830
        this.ex = new TransactionServiceException(other.ex);
4831
      }
4832
    }
4833
 
4834
    public getTransaction_result deepCopy() {
4835
      return new getTransaction_result(this);
4836
    }
4837
 
4838
    @Deprecated
4839
    public getTransaction_result clone() {
4840
      return new getTransaction_result(this);
4841
    }
4842
 
4843
    public Transaction getSuccess() {
4844
      return this.success;
4845
    }
4846
 
4847
    public getTransaction_result setSuccess(Transaction success) {
4848
      this.success = success;
4849
      return this;
4850
    }
4851
 
4852
    public void unsetSuccess() {
4853
      this.success = null;
4854
    }
4855
 
4856
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4857
    public boolean isSetSuccess() {
4858
      return this.success != null;
4859
    }
4860
 
4861
    public void setSuccessIsSet(boolean value) {
4862
      if (!value) {
4863
        this.success = null;
4864
      }
4865
    }
4866
 
4867
    public TransactionServiceException getEx() {
4868
      return this.ex;
4869
    }
4870
 
4871
    public getTransaction_result setEx(TransactionServiceException ex) {
4872
      this.ex = ex;
4873
      return this;
4874
    }
4875
 
4876
    public void unsetEx() {
4877
      this.ex = null;
4878
    }
4879
 
4880
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4881
    public boolean isSetEx() {
4882
      return this.ex != null;
4883
    }
4884
 
4885
    public void setExIsSet(boolean value) {
4886
      if (!value) {
4887
        this.ex = null;
4888
      }
4889
    }
4890
 
4891
    public void setFieldValue(_Fields field, Object value) {
4892
      switch (field) {
4893
      case SUCCESS:
4894
        if (value == null) {
4895
          unsetSuccess();
4896
        } else {
4897
          setSuccess((Transaction)value);
4898
        }
4899
        break;
4900
 
4901
      case EX:
4902
        if (value == null) {
4903
          unsetEx();
4904
        } else {
4905
          setEx((TransactionServiceException)value);
4906
        }
4907
        break;
4908
 
4909
      }
4910
    }
4911
 
4912
    public void setFieldValue(int fieldID, Object value) {
4913
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4914
    }
4915
 
4916
    public Object getFieldValue(_Fields field) {
4917
      switch (field) {
4918
      case SUCCESS:
4919
        return getSuccess();
4920
 
4921
      case EX:
4922
        return getEx();
4923
 
4924
      }
4925
      throw new IllegalStateException();
4926
    }
4927
 
4928
    public Object getFieldValue(int fieldId) {
4929
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4930
    }
4931
 
4932
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4933
    public boolean isSet(_Fields field) {
4934
      switch (field) {
4935
      case SUCCESS:
4936
        return isSetSuccess();
4937
      case EX:
4938
        return isSetEx();
4939
      }
4940
      throw new IllegalStateException();
4941
    }
4942
 
4943
    public boolean isSet(int fieldID) {
4944
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4945
    }
4946
 
4947
    @Override
4948
    public boolean equals(Object that) {
4949
      if (that == null)
4950
        return false;
4951
      if (that instanceof getTransaction_result)
4952
        return this.equals((getTransaction_result)that);
4953
      return false;
4954
    }
4955
 
4956
    public boolean equals(getTransaction_result that) {
4957
      if (that == null)
4958
        return false;
4959
 
4960
      boolean this_present_success = true && this.isSetSuccess();
4961
      boolean that_present_success = true && that.isSetSuccess();
4962
      if (this_present_success || that_present_success) {
4963
        if (!(this_present_success && that_present_success))
4964
          return false;
4965
        if (!this.success.equals(that.success))
4966
          return false;
4967
      }
4968
 
4969
      boolean this_present_ex = true && this.isSetEx();
4970
      boolean that_present_ex = true && that.isSetEx();
4971
      if (this_present_ex || that_present_ex) {
4972
        if (!(this_present_ex && that_present_ex))
4973
          return false;
4974
        if (!this.ex.equals(that.ex))
4975
          return false;
4976
      }
4977
 
4978
      return true;
4979
    }
4980
 
4981
    @Override
4982
    public int hashCode() {
4983
      return 0;
4984
    }
4985
 
684 chandransh 4986
    public int compareTo(getTransaction_result other) {
4987
      if (!getClass().equals(other.getClass())) {
4988
        return getClass().getName().compareTo(other.getClass().getName());
4989
      }
4990
 
4991
      int lastComparison = 0;
4992
      getTransaction_result typedOther = (getTransaction_result)other;
4993
 
4994
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4995
      if (lastComparison != 0) {
4996
        return lastComparison;
4997
      }
4998
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4999
      if (lastComparison != 0) {
5000
        return lastComparison;
5001
      }
5002
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5003
      if (lastComparison != 0) {
5004
        return lastComparison;
5005
      }
5006
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5007
      if (lastComparison != 0) {
5008
        return lastComparison;
5009
      }
5010
      return 0;
5011
    }
5012
 
68 ashish 5013
    public void read(TProtocol iprot) throws TException {
5014
      TField field;
5015
      iprot.readStructBegin();
5016
      while (true)
5017
      {
5018
        field = iprot.readFieldBegin();
5019
        if (field.type == TType.STOP) { 
5020
          break;
5021
        }
5022
        _Fields fieldId = _Fields.findByThriftId(field.id);
5023
        if (fieldId == null) {
5024
          TProtocolUtil.skip(iprot, field.type);
5025
        } else {
5026
          switch (fieldId) {
5027
            case SUCCESS:
5028
              if (field.type == TType.STRUCT) {
5029
                this.success = new Transaction();
5030
                this.success.read(iprot);
5031
              } else { 
5032
                TProtocolUtil.skip(iprot, field.type);
5033
              }
5034
              break;
5035
            case EX:
5036
              if (field.type == TType.STRUCT) {
5037
                this.ex = new TransactionServiceException();
5038
                this.ex.read(iprot);
5039
              } else { 
5040
                TProtocolUtil.skip(iprot, field.type);
5041
              }
5042
              break;
5043
          }
5044
          iprot.readFieldEnd();
5045
        }
5046
      }
5047
      iprot.readStructEnd();
5048
      validate();
5049
    }
5050
 
5051
    public void write(TProtocol oprot) throws TException {
5052
      oprot.writeStructBegin(STRUCT_DESC);
5053
 
5054
      if (this.isSetSuccess()) {
5055
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5056
        this.success.write(oprot);
5057
        oprot.writeFieldEnd();
5058
      } else if (this.isSetEx()) {
5059
        oprot.writeFieldBegin(EX_FIELD_DESC);
5060
        this.ex.write(oprot);
5061
        oprot.writeFieldEnd();
5062
      }
5063
      oprot.writeFieldStop();
5064
      oprot.writeStructEnd();
5065
    }
5066
 
5067
    @Override
5068
    public String toString() {
5069
      StringBuilder sb = new StringBuilder("getTransaction_result(");
5070
      boolean first = true;
5071
 
5072
      sb.append("success:");
5073
      if (this.success == null) {
5074
        sb.append("null");
5075
      } else {
5076
        sb.append(this.success);
5077
      }
5078
      first = false;
5079
      if (!first) sb.append(", ");
5080
      sb.append("ex:");
5081
      if (this.ex == null) {
5082
        sb.append("null");
5083
      } else {
5084
        sb.append(this.ex);
5085
      }
5086
      first = false;
5087
      sb.append(")");
5088
      return sb.toString();
5089
    }
5090
 
5091
    public void validate() throws TException {
5092
      // check for required fields
5093
    }
5094
 
5095
  }
5096
 
5097
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
5098
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
5099
 
5100
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 5101
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
5102
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 5103
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
5104
 
5105
    private long customerId;
132 ashish 5106
    private long from_date;
5107
    private long to_date;
68 ashish 5108
    private TransactionStatus status;
5109
 
5110
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5111
    public enum _Fields implements TFieldIdEnum {
5112
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 5113
      FROM_DATE((short)2, "from_date"),
5114
      TO_DATE((short)3, "to_date"),
68 ashish 5115
      /**
5116
       * 
5117
       * @see TransactionStatus
5118
       */
5119
      STATUS((short)4, "status");
5120
 
5121
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5122
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5123
 
5124
      static {
5125
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5126
          byId.put((int)field._thriftId, field);
5127
          byName.put(field.getFieldName(), field);
5128
        }
5129
      }
5130
 
5131
      /**
5132
       * Find the _Fields constant that matches fieldId, or null if its not found.
5133
       */
5134
      public static _Fields findByThriftId(int fieldId) {
5135
        return byId.get(fieldId);
5136
      }
5137
 
5138
      /**
5139
       * Find the _Fields constant that matches fieldId, throwing an exception
5140
       * if it is not found.
5141
       */
5142
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5143
        _Fields fields = findByThriftId(fieldId);
5144
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5145
        return fields;
5146
      }
5147
 
5148
      /**
5149
       * Find the _Fields constant that matches name, or null if its not found.
5150
       */
5151
      public static _Fields findByName(String name) {
5152
        return byName.get(name);
5153
      }
5154
 
5155
      private final short _thriftId;
5156
      private final String _fieldName;
5157
 
5158
      _Fields(short thriftId, String fieldName) {
5159
        _thriftId = thriftId;
5160
        _fieldName = fieldName;
5161
      }
5162
 
5163
      public short getThriftFieldId() {
5164
        return _thriftId;
5165
      }
5166
 
5167
      public String getFieldName() {
5168
        return _fieldName;
5169
      }
5170
    }
5171
 
5172
    // isset id assignments
5173
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 5174
    private static final int __FROM_DATE_ISSET_ID = 1;
5175
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 5176
    private BitSet __isset_bit_vector = new BitSet(3);
5177
 
5178
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5179
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
5180
          new FieldValueMetaData(TType.I64)));
132 ashish 5181
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 5182
          new FieldValueMetaData(TType.I64)));
132 ashish 5183
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 5184
          new FieldValueMetaData(TType.I64)));
5185
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5186
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5187
    }});
5188
 
5189
    static {
5190
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
5191
    }
5192
 
5193
    public getTransactionsForCustomer_args() {
5194
    }
5195
 
5196
    public getTransactionsForCustomer_args(
5197
      long customerId,
132 ashish 5198
      long from_date,
5199
      long to_date,
68 ashish 5200
      TransactionStatus status)
5201
    {
5202
      this();
5203
      this.customerId = customerId;
5204
      setCustomerIdIsSet(true);
132 ashish 5205
      this.from_date = from_date;
5206
      setFrom_dateIsSet(true);
5207
      this.to_date = to_date;
5208
      setTo_dateIsSet(true);
68 ashish 5209
      this.status = status;
5210
    }
5211
 
5212
    /**
5213
     * Performs a deep copy on <i>other</i>.
5214
     */
5215
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
5216
      __isset_bit_vector.clear();
5217
      __isset_bit_vector.or(other.__isset_bit_vector);
5218
      this.customerId = other.customerId;
132 ashish 5219
      this.from_date = other.from_date;
5220
      this.to_date = other.to_date;
68 ashish 5221
      if (other.isSetStatus()) {
5222
        this.status = other.status;
5223
      }
5224
    }
5225
 
5226
    public getTransactionsForCustomer_args deepCopy() {
5227
      return new getTransactionsForCustomer_args(this);
5228
    }
5229
 
5230
    @Deprecated
5231
    public getTransactionsForCustomer_args clone() {
5232
      return new getTransactionsForCustomer_args(this);
5233
    }
5234
 
5235
    public long getCustomerId() {
5236
      return this.customerId;
5237
    }
5238
 
5239
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
5240
      this.customerId = customerId;
5241
      setCustomerIdIsSet(true);
5242
      return this;
5243
    }
5244
 
5245
    public void unsetCustomerId() {
5246
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
5247
    }
5248
 
5249
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
5250
    public boolean isSetCustomerId() {
5251
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
5252
    }
5253
 
5254
    public void setCustomerIdIsSet(boolean value) {
5255
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
5256
    }
5257
 
132 ashish 5258
    public long getFrom_date() {
5259
      return this.from_date;
68 ashish 5260
    }
5261
 
132 ashish 5262
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
5263
      this.from_date = from_date;
5264
      setFrom_dateIsSet(true);
68 ashish 5265
      return this;
5266
    }
5267
 
132 ashish 5268
    public void unsetFrom_date() {
5269
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 5270
    }
5271
 
132 ashish 5272
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
5273
    public boolean isSetFrom_date() {
5274
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 5275
    }
5276
 
132 ashish 5277
    public void setFrom_dateIsSet(boolean value) {
5278
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 5279
    }
5280
 
132 ashish 5281
    public long getTo_date() {
5282
      return this.to_date;
68 ashish 5283
    }
5284
 
132 ashish 5285
    public getTransactionsForCustomer_args setTo_date(long to_date) {
5286
      this.to_date = to_date;
5287
      setTo_dateIsSet(true);
68 ashish 5288
      return this;
5289
    }
5290
 
132 ashish 5291
    public void unsetTo_date() {
5292
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 5293
    }
5294
 
132 ashish 5295
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
5296
    public boolean isSetTo_date() {
5297
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 5298
    }
5299
 
132 ashish 5300
    public void setTo_dateIsSet(boolean value) {
5301
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 5302
    }
5303
 
5304
    /**
5305
     * 
5306
     * @see TransactionStatus
5307
     */
5308
    public TransactionStatus getStatus() {
5309
      return this.status;
5310
    }
5311
 
5312
    /**
5313
     * 
5314
     * @see TransactionStatus
5315
     */
5316
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
5317
      this.status = status;
5318
      return this;
5319
    }
5320
 
5321
    public void unsetStatus() {
5322
      this.status = null;
5323
    }
5324
 
5325
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5326
    public boolean isSetStatus() {
5327
      return this.status != null;
5328
    }
5329
 
5330
    public void setStatusIsSet(boolean value) {
5331
      if (!value) {
5332
        this.status = null;
5333
      }
5334
    }
5335
 
5336
    public void setFieldValue(_Fields field, Object value) {
5337
      switch (field) {
5338
      case CUSTOMER_ID:
5339
        if (value == null) {
5340
          unsetCustomerId();
5341
        } else {
5342
          setCustomerId((Long)value);
5343
        }
5344
        break;
5345
 
132 ashish 5346
      case FROM_DATE:
68 ashish 5347
        if (value == null) {
132 ashish 5348
          unsetFrom_date();
68 ashish 5349
        } else {
132 ashish 5350
          setFrom_date((Long)value);
68 ashish 5351
        }
5352
        break;
5353
 
132 ashish 5354
      case TO_DATE:
68 ashish 5355
        if (value == null) {
132 ashish 5356
          unsetTo_date();
68 ashish 5357
        } else {
132 ashish 5358
          setTo_date((Long)value);
68 ashish 5359
        }
5360
        break;
5361
 
5362
      case STATUS:
5363
        if (value == null) {
5364
          unsetStatus();
5365
        } else {
5366
          setStatus((TransactionStatus)value);
5367
        }
5368
        break;
5369
 
5370
      }
5371
    }
5372
 
5373
    public void setFieldValue(int fieldID, Object value) {
5374
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5375
    }
5376
 
5377
    public Object getFieldValue(_Fields field) {
5378
      switch (field) {
5379
      case CUSTOMER_ID:
5380
        return new Long(getCustomerId());
5381
 
132 ashish 5382
      case FROM_DATE:
5383
        return new Long(getFrom_date());
68 ashish 5384
 
132 ashish 5385
      case TO_DATE:
5386
        return new Long(getTo_date());
68 ashish 5387
 
5388
      case STATUS:
5389
        return getStatus();
5390
 
5391
      }
5392
      throw new IllegalStateException();
5393
    }
5394
 
5395
    public Object getFieldValue(int fieldId) {
5396
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5397
    }
5398
 
5399
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5400
    public boolean isSet(_Fields field) {
5401
      switch (field) {
5402
      case CUSTOMER_ID:
5403
        return isSetCustomerId();
132 ashish 5404
      case FROM_DATE:
5405
        return isSetFrom_date();
5406
      case TO_DATE:
5407
        return isSetTo_date();
68 ashish 5408
      case STATUS:
5409
        return isSetStatus();
5410
      }
5411
      throw new IllegalStateException();
5412
    }
5413
 
5414
    public boolean isSet(int fieldID) {
5415
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5416
    }
5417
 
5418
    @Override
5419
    public boolean equals(Object that) {
5420
      if (that == null)
5421
        return false;
5422
      if (that instanceof getTransactionsForCustomer_args)
5423
        return this.equals((getTransactionsForCustomer_args)that);
5424
      return false;
5425
    }
5426
 
5427
    public boolean equals(getTransactionsForCustomer_args that) {
5428
      if (that == null)
5429
        return false;
5430
 
5431
      boolean this_present_customerId = true;
5432
      boolean that_present_customerId = true;
5433
      if (this_present_customerId || that_present_customerId) {
5434
        if (!(this_present_customerId && that_present_customerId))
5435
          return false;
5436
        if (this.customerId != that.customerId)
5437
          return false;
5438
      }
5439
 
132 ashish 5440
      boolean this_present_from_date = true;
5441
      boolean that_present_from_date = true;
5442
      if (this_present_from_date || that_present_from_date) {
5443
        if (!(this_present_from_date && that_present_from_date))
68 ashish 5444
          return false;
132 ashish 5445
        if (this.from_date != that.from_date)
68 ashish 5446
          return false;
5447
      }
5448
 
132 ashish 5449
      boolean this_present_to_date = true;
5450
      boolean that_present_to_date = true;
5451
      if (this_present_to_date || that_present_to_date) {
5452
        if (!(this_present_to_date && that_present_to_date))
68 ashish 5453
          return false;
132 ashish 5454
        if (this.to_date != that.to_date)
68 ashish 5455
          return false;
5456
      }
5457
 
5458
      boolean this_present_status = true && this.isSetStatus();
5459
      boolean that_present_status = true && that.isSetStatus();
5460
      if (this_present_status || that_present_status) {
5461
        if (!(this_present_status && that_present_status))
5462
          return false;
5463
        if (!this.status.equals(that.status))
5464
          return false;
5465
      }
5466
 
5467
      return true;
5468
    }
5469
 
5470
    @Override
5471
    public int hashCode() {
5472
      return 0;
5473
    }
5474
 
5475
    public int compareTo(getTransactionsForCustomer_args other) {
5476
      if (!getClass().equals(other.getClass())) {
5477
        return getClass().getName().compareTo(other.getClass().getName());
5478
      }
5479
 
5480
      int lastComparison = 0;
5481
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
5482
 
5483
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
5484
      if (lastComparison != 0) {
5485
        return lastComparison;
5486
      }
5487
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
5488
      if (lastComparison != 0) {
5489
        return lastComparison;
5490
      }
132 ashish 5491
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 5492
      if (lastComparison != 0) {
5493
        return lastComparison;
5494
      }
132 ashish 5495
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 5496
      if (lastComparison != 0) {
5497
        return lastComparison;
5498
      }
132 ashish 5499
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 5500
      if (lastComparison != 0) {
5501
        return lastComparison;
5502
      }
132 ashish 5503
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 5504
      if (lastComparison != 0) {
5505
        return lastComparison;
5506
      }
5507
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
5508
      if (lastComparison != 0) {
5509
        return lastComparison;
5510
      }
5511
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
5512
      if (lastComparison != 0) {
5513
        return lastComparison;
5514
      }
5515
      return 0;
5516
    }
5517
 
5518
    public void read(TProtocol iprot) throws TException {
5519
      TField field;
5520
      iprot.readStructBegin();
5521
      while (true)
5522
      {
5523
        field = iprot.readFieldBegin();
5524
        if (field.type == TType.STOP) { 
5525
          break;
5526
        }
5527
        _Fields fieldId = _Fields.findByThriftId(field.id);
5528
        if (fieldId == null) {
5529
          TProtocolUtil.skip(iprot, field.type);
5530
        } else {
5531
          switch (fieldId) {
5532
            case CUSTOMER_ID:
5533
              if (field.type == TType.I64) {
5534
                this.customerId = iprot.readI64();
5535
                setCustomerIdIsSet(true);
5536
              } else { 
5537
                TProtocolUtil.skip(iprot, field.type);
5538
              }
5539
              break;
132 ashish 5540
            case FROM_DATE:
68 ashish 5541
              if (field.type == TType.I64) {
132 ashish 5542
                this.from_date = iprot.readI64();
5543
                setFrom_dateIsSet(true);
68 ashish 5544
              } else { 
5545
                TProtocolUtil.skip(iprot, field.type);
5546
              }
5547
              break;
132 ashish 5548
            case TO_DATE:
68 ashish 5549
              if (field.type == TType.I64) {
132 ashish 5550
                this.to_date = iprot.readI64();
5551
                setTo_dateIsSet(true);
68 ashish 5552
              } else { 
5553
                TProtocolUtil.skip(iprot, field.type);
5554
              }
5555
              break;
5556
            case STATUS:
5557
              if (field.type == TType.I32) {
5558
                this.status = TransactionStatus.findByValue(iprot.readI32());
5559
              } else { 
5560
                TProtocolUtil.skip(iprot, field.type);
5561
              }
5562
              break;
5563
          }
5564
          iprot.readFieldEnd();
5565
        }
5566
      }
5567
      iprot.readStructEnd();
5568
      validate();
5569
    }
5570
 
5571
    public void write(TProtocol oprot) throws TException {
5572
      validate();
5573
 
5574
      oprot.writeStructBegin(STRUCT_DESC);
5575
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
5576
      oprot.writeI64(this.customerId);
5577
      oprot.writeFieldEnd();
132 ashish 5578
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
5579
      oprot.writeI64(this.from_date);
68 ashish 5580
      oprot.writeFieldEnd();
132 ashish 5581
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
5582
      oprot.writeI64(this.to_date);
68 ashish 5583
      oprot.writeFieldEnd();
5584
      if (this.status != null) {
5585
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5586
        oprot.writeI32(this.status.getValue());
5587
        oprot.writeFieldEnd();
5588
      }
5589
      oprot.writeFieldStop();
5590
      oprot.writeStructEnd();
5591
    }
5592
 
5593
    @Override
5594
    public String toString() {
5595
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
5596
      boolean first = true;
5597
 
5598
      sb.append("customerId:");
5599
      sb.append(this.customerId);
5600
      first = false;
5601
      if (!first) sb.append(", ");
132 ashish 5602
      sb.append("from_date:");
5603
      sb.append(this.from_date);
68 ashish 5604
      first = false;
5605
      if (!first) sb.append(", ");
132 ashish 5606
      sb.append("to_date:");
5607
      sb.append(this.to_date);
68 ashish 5608
      first = false;
5609
      if (!first) sb.append(", ");
5610
      sb.append("status:");
5611
      if (this.status == null) {
5612
        sb.append("null");
5613
      } else {
5614
        String status_name = status.name();
5615
        if (status_name != null) {
5616
          sb.append(status_name);
5617
          sb.append(" (");
5618
        }
5619
        sb.append(this.status);
5620
        if (status_name != null) {
5621
          sb.append(")");
5622
        }
5623
      }
5624
      first = false;
5625
      sb.append(")");
5626
      return sb.toString();
5627
    }
5628
 
5629
    public void validate() throws TException {
5630
      // check for required fields
5631
    }
5632
 
5633
  }
5634
 
684 chandransh 5635
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 5636
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
5637
 
5638
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5639
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5640
 
5641
    private List<Transaction> success;
5642
    private TransactionServiceException ex;
5643
 
5644
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5645
    public enum _Fields implements TFieldIdEnum {
5646
      SUCCESS((short)0, "success"),
5647
      EX((short)1, "ex");
5648
 
5649
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5650
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5651
 
5652
      static {
5653
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5654
          byId.put((int)field._thriftId, field);
5655
          byName.put(field.getFieldName(), field);
5656
        }
5657
      }
5658
 
5659
      /**
5660
       * Find the _Fields constant that matches fieldId, or null if its not found.
5661
       */
5662
      public static _Fields findByThriftId(int fieldId) {
5663
        return byId.get(fieldId);
5664
      }
5665
 
5666
      /**
5667
       * Find the _Fields constant that matches fieldId, throwing an exception
5668
       * if it is not found.
5669
       */
5670
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5671
        _Fields fields = findByThriftId(fieldId);
5672
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5673
        return fields;
5674
      }
5675
 
5676
      /**
5677
       * Find the _Fields constant that matches name, or null if its not found.
5678
       */
5679
      public static _Fields findByName(String name) {
5680
        return byName.get(name);
5681
      }
5682
 
5683
      private final short _thriftId;
5684
      private final String _fieldName;
5685
 
5686
      _Fields(short thriftId, String fieldName) {
5687
        _thriftId = thriftId;
5688
        _fieldName = fieldName;
5689
      }
5690
 
5691
      public short getThriftFieldId() {
5692
        return _thriftId;
5693
      }
5694
 
5695
      public String getFieldName() {
5696
        return _fieldName;
5697
      }
5698
    }
5699
 
5700
    // isset id assignments
5701
 
5702
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5703
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5704
          new ListMetaData(TType.LIST, 
5705
              new StructMetaData(TType.STRUCT, Transaction.class))));
5706
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5707
          new FieldValueMetaData(TType.STRUCT)));
5708
    }});
5709
 
5710
    static {
5711
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
5712
    }
5713
 
5714
    public getTransactionsForCustomer_result() {
5715
    }
5716
 
5717
    public getTransactionsForCustomer_result(
5718
      List<Transaction> success,
5719
      TransactionServiceException ex)
5720
    {
5721
      this();
5722
      this.success = success;
5723
      this.ex = ex;
5724
    }
5725
 
5726
    /**
5727
     * Performs a deep copy on <i>other</i>.
5728
     */
5729
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
5730
      if (other.isSetSuccess()) {
5731
        List<Transaction> __this__success = new ArrayList<Transaction>();
5732
        for (Transaction other_element : other.success) {
5733
          __this__success.add(new Transaction(other_element));
5734
        }
5735
        this.success = __this__success;
5736
      }
5737
      if (other.isSetEx()) {
5738
        this.ex = new TransactionServiceException(other.ex);
5739
      }
5740
    }
5741
 
5742
    public getTransactionsForCustomer_result deepCopy() {
5743
      return new getTransactionsForCustomer_result(this);
5744
    }
5745
 
5746
    @Deprecated
5747
    public getTransactionsForCustomer_result clone() {
5748
      return new getTransactionsForCustomer_result(this);
5749
    }
5750
 
5751
    public int getSuccessSize() {
5752
      return (this.success == null) ? 0 : this.success.size();
5753
    }
5754
 
5755
    public java.util.Iterator<Transaction> getSuccessIterator() {
5756
      return (this.success == null) ? null : this.success.iterator();
5757
    }
5758
 
5759
    public void addToSuccess(Transaction elem) {
5760
      if (this.success == null) {
5761
        this.success = new ArrayList<Transaction>();
5762
      }
5763
      this.success.add(elem);
5764
    }
5765
 
5766
    public List<Transaction> getSuccess() {
5767
      return this.success;
5768
    }
5769
 
5770
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
5771
      this.success = success;
5772
      return this;
5773
    }
5774
 
5775
    public void unsetSuccess() {
5776
      this.success = null;
5777
    }
5778
 
5779
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5780
    public boolean isSetSuccess() {
5781
      return this.success != null;
5782
    }
5783
 
5784
    public void setSuccessIsSet(boolean value) {
5785
      if (!value) {
5786
        this.success = null;
5787
      }
5788
    }
5789
 
5790
    public TransactionServiceException getEx() {
5791
      return this.ex;
5792
    }
5793
 
5794
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
5795
      this.ex = ex;
5796
      return this;
5797
    }
5798
 
5799
    public void unsetEx() {
5800
      this.ex = null;
5801
    }
5802
 
5803
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5804
    public boolean isSetEx() {
5805
      return this.ex != null;
5806
    }
5807
 
5808
    public void setExIsSet(boolean value) {
5809
      if (!value) {
5810
        this.ex = null;
5811
      }
5812
    }
5813
 
5814
    public void setFieldValue(_Fields field, Object value) {
5815
      switch (field) {
5816
      case SUCCESS:
5817
        if (value == null) {
5818
          unsetSuccess();
5819
        } else {
5820
          setSuccess((List<Transaction>)value);
5821
        }
5822
        break;
5823
 
5824
      case EX:
5825
        if (value == null) {
5826
          unsetEx();
5827
        } else {
5828
          setEx((TransactionServiceException)value);
5829
        }
5830
        break;
5831
 
5832
      }
5833
    }
5834
 
5835
    public void setFieldValue(int fieldID, Object value) {
5836
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5837
    }
5838
 
5839
    public Object getFieldValue(_Fields field) {
5840
      switch (field) {
5841
      case SUCCESS:
5842
        return getSuccess();
5843
 
5844
      case EX:
5845
        return getEx();
5846
 
5847
      }
5848
      throw new IllegalStateException();
5849
    }
5850
 
5851
    public Object getFieldValue(int fieldId) {
5852
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5853
    }
5854
 
5855
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5856
    public boolean isSet(_Fields field) {
5857
      switch (field) {
5858
      case SUCCESS:
5859
        return isSetSuccess();
5860
      case EX:
5861
        return isSetEx();
5862
      }
5863
      throw new IllegalStateException();
5864
    }
5865
 
5866
    public boolean isSet(int fieldID) {
5867
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5868
    }
5869
 
5870
    @Override
5871
    public boolean equals(Object that) {
5872
      if (that == null)
5873
        return false;
5874
      if (that instanceof getTransactionsForCustomer_result)
5875
        return this.equals((getTransactionsForCustomer_result)that);
5876
      return false;
5877
    }
5878
 
5879
    public boolean equals(getTransactionsForCustomer_result that) {
5880
      if (that == null)
5881
        return false;
5882
 
5883
      boolean this_present_success = true && this.isSetSuccess();
5884
      boolean that_present_success = true && that.isSetSuccess();
5885
      if (this_present_success || that_present_success) {
5886
        if (!(this_present_success && that_present_success))
5887
          return false;
5888
        if (!this.success.equals(that.success))
5889
          return false;
5890
      }
5891
 
5892
      boolean this_present_ex = true && this.isSetEx();
5893
      boolean that_present_ex = true && that.isSetEx();
5894
      if (this_present_ex || that_present_ex) {
5895
        if (!(this_present_ex && that_present_ex))
5896
          return false;
5897
        if (!this.ex.equals(that.ex))
5898
          return false;
5899
      }
5900
 
5901
      return true;
5902
    }
5903
 
5904
    @Override
5905
    public int hashCode() {
5906
      return 0;
5907
    }
5908
 
684 chandransh 5909
    public int compareTo(getTransactionsForCustomer_result other) {
5910
      if (!getClass().equals(other.getClass())) {
5911
        return getClass().getName().compareTo(other.getClass().getName());
5912
      }
5913
 
5914
      int lastComparison = 0;
5915
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
5916
 
5917
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5918
      if (lastComparison != 0) {
5919
        return lastComparison;
5920
      }
5921
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5922
      if (lastComparison != 0) {
5923
        return lastComparison;
5924
      }
5925
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5926
      if (lastComparison != 0) {
5927
        return lastComparison;
5928
      }
5929
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5930
      if (lastComparison != 0) {
5931
        return lastComparison;
5932
      }
5933
      return 0;
5934
    }
5935
 
68 ashish 5936
    public void read(TProtocol iprot) throws TException {
5937
      TField field;
5938
      iprot.readStructBegin();
5939
      while (true)
5940
      {
5941
        field = iprot.readFieldBegin();
5942
        if (field.type == TType.STOP) { 
5943
          break;
5944
        }
5945
        _Fields fieldId = _Fields.findByThriftId(field.id);
5946
        if (fieldId == null) {
5947
          TProtocolUtil.skip(iprot, field.type);
5948
        } else {
5949
          switch (fieldId) {
5950
            case SUCCESS:
5951
              if (field.type == TType.LIST) {
5952
                {
684 chandransh 5953
                  TList _list8 = iprot.readListBegin();
5954
                  this.success = new ArrayList<Transaction>(_list8.size);
5955
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 5956
                  {
684 chandransh 5957
                    Transaction _elem10;
5958
                    _elem10 = new Transaction();
5959
                    _elem10.read(iprot);
5960
                    this.success.add(_elem10);
68 ashish 5961
                  }
5962
                  iprot.readListEnd();
5963
                }
5964
              } else { 
5965
                TProtocolUtil.skip(iprot, field.type);
5966
              }
5967
              break;
5968
            case EX:
5969
              if (field.type == TType.STRUCT) {
5970
                this.ex = new TransactionServiceException();
5971
                this.ex.read(iprot);
5972
              } else { 
5973
                TProtocolUtil.skip(iprot, field.type);
5974
              }
5975
              break;
5976
          }
5977
          iprot.readFieldEnd();
5978
        }
5979
      }
5980
      iprot.readStructEnd();
5981
      validate();
5982
    }
5983
 
5984
    public void write(TProtocol oprot) throws TException {
5985
      oprot.writeStructBegin(STRUCT_DESC);
5986
 
5987
      if (this.isSetSuccess()) {
5988
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5989
        {
5990
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5991
          for (Transaction _iter11 : this.success)
68 ashish 5992
          {
684 chandransh 5993
            _iter11.write(oprot);
68 ashish 5994
          }
5995
          oprot.writeListEnd();
5996
        }
5997
        oprot.writeFieldEnd();
5998
      } else if (this.isSetEx()) {
5999
        oprot.writeFieldBegin(EX_FIELD_DESC);
6000
        this.ex.write(oprot);
6001
        oprot.writeFieldEnd();
6002
      }
6003
      oprot.writeFieldStop();
6004
      oprot.writeStructEnd();
6005
    }
6006
 
6007
    @Override
6008
    public String toString() {
6009
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
6010
      boolean first = true;
6011
 
6012
      sb.append("success:");
6013
      if (this.success == null) {
6014
        sb.append("null");
6015
      } else {
6016
        sb.append(this.success);
6017
      }
6018
      first = false;
6019
      if (!first) sb.append(", ");
6020
      sb.append("ex:");
6021
      if (this.ex == null) {
6022
        sb.append("null");
6023
      } else {
6024
        sb.append(this.ex);
6025
      }
6026
      first = false;
6027
      sb.append(")");
6028
      return sb.toString();
6029
    }
6030
 
6031
    public void validate() throws TException {
6032
      // check for required fields
6033
    }
6034
 
6035
  }
6036
 
132 ashish 6037
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
6038
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
6039
 
6040
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
6041
 
6042
    private long shoppingCartId;
6043
 
6044
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6045
    public enum _Fields implements TFieldIdEnum {
6046
      SHOPPING_CART_ID((short)1, "shoppingCartId");
6047
 
6048
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6049
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6050
 
6051
      static {
6052
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6053
          byId.put((int)field._thriftId, field);
6054
          byName.put(field.getFieldName(), field);
6055
        }
6056
      }
6057
 
6058
      /**
6059
       * Find the _Fields constant that matches fieldId, or null if its not found.
6060
       */
6061
      public static _Fields findByThriftId(int fieldId) {
6062
        return byId.get(fieldId);
6063
      }
6064
 
6065
      /**
6066
       * Find the _Fields constant that matches fieldId, throwing an exception
6067
       * if it is not found.
6068
       */
6069
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6070
        _Fields fields = findByThriftId(fieldId);
6071
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6072
        return fields;
6073
      }
6074
 
6075
      /**
6076
       * Find the _Fields constant that matches name, or null if its not found.
6077
       */
6078
      public static _Fields findByName(String name) {
6079
        return byName.get(name);
6080
      }
6081
 
6082
      private final short _thriftId;
6083
      private final String _fieldName;
6084
 
6085
      _Fields(short thriftId, String fieldName) {
6086
        _thriftId = thriftId;
6087
        _fieldName = fieldName;
6088
      }
6089
 
6090
      public short getThriftFieldId() {
6091
        return _thriftId;
6092
      }
6093
 
6094
      public String getFieldName() {
6095
        return _fieldName;
6096
      }
6097
    }
6098
 
6099
    // isset id assignments
6100
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
6101
    private BitSet __isset_bit_vector = new BitSet(1);
6102
 
6103
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6104
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
6105
          new FieldValueMetaData(TType.I64)));
6106
    }});
6107
 
6108
    static {
6109
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
6110
    }
6111
 
6112
    public getTransactionsForShoppingCartId_args() {
6113
    }
6114
 
6115
    public getTransactionsForShoppingCartId_args(
6116
      long shoppingCartId)
6117
    {
6118
      this();
6119
      this.shoppingCartId = shoppingCartId;
6120
      setShoppingCartIdIsSet(true);
6121
    }
6122
 
6123
    /**
6124
     * Performs a deep copy on <i>other</i>.
6125
     */
6126
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
6127
      __isset_bit_vector.clear();
6128
      __isset_bit_vector.or(other.__isset_bit_vector);
6129
      this.shoppingCartId = other.shoppingCartId;
6130
    }
6131
 
6132
    public getTransactionsForShoppingCartId_args deepCopy() {
6133
      return new getTransactionsForShoppingCartId_args(this);
6134
    }
6135
 
6136
    @Deprecated
6137
    public getTransactionsForShoppingCartId_args clone() {
6138
      return new getTransactionsForShoppingCartId_args(this);
6139
    }
6140
 
6141
    public long getShoppingCartId() {
6142
      return this.shoppingCartId;
6143
    }
6144
 
6145
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
6146
      this.shoppingCartId = shoppingCartId;
6147
      setShoppingCartIdIsSet(true);
6148
      return this;
6149
    }
6150
 
6151
    public void unsetShoppingCartId() {
6152
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
6153
    }
6154
 
6155
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
6156
    public boolean isSetShoppingCartId() {
6157
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
6158
    }
6159
 
6160
    public void setShoppingCartIdIsSet(boolean value) {
6161
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
6162
    }
6163
 
6164
    public void setFieldValue(_Fields field, Object value) {
6165
      switch (field) {
6166
      case SHOPPING_CART_ID:
6167
        if (value == null) {
6168
          unsetShoppingCartId();
6169
        } else {
6170
          setShoppingCartId((Long)value);
6171
        }
6172
        break;
6173
 
6174
      }
6175
    }
6176
 
6177
    public void setFieldValue(int fieldID, Object value) {
6178
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6179
    }
6180
 
6181
    public Object getFieldValue(_Fields field) {
6182
      switch (field) {
6183
      case SHOPPING_CART_ID:
6184
        return new Long(getShoppingCartId());
6185
 
6186
      }
6187
      throw new IllegalStateException();
6188
    }
6189
 
6190
    public Object getFieldValue(int fieldId) {
6191
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6192
    }
6193
 
6194
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6195
    public boolean isSet(_Fields field) {
6196
      switch (field) {
6197
      case SHOPPING_CART_ID:
6198
        return isSetShoppingCartId();
6199
      }
6200
      throw new IllegalStateException();
6201
    }
6202
 
6203
    public boolean isSet(int fieldID) {
6204
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6205
    }
6206
 
6207
    @Override
6208
    public boolean equals(Object that) {
6209
      if (that == null)
6210
        return false;
6211
      if (that instanceof getTransactionsForShoppingCartId_args)
6212
        return this.equals((getTransactionsForShoppingCartId_args)that);
6213
      return false;
6214
    }
6215
 
6216
    public boolean equals(getTransactionsForShoppingCartId_args that) {
6217
      if (that == null)
6218
        return false;
6219
 
6220
      boolean this_present_shoppingCartId = true;
6221
      boolean that_present_shoppingCartId = true;
6222
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
6223
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
6224
          return false;
6225
        if (this.shoppingCartId != that.shoppingCartId)
6226
          return false;
6227
      }
6228
 
6229
      return true;
6230
    }
6231
 
6232
    @Override
6233
    public int hashCode() {
6234
      return 0;
6235
    }
6236
 
6237
    public int compareTo(getTransactionsForShoppingCartId_args other) {
6238
      if (!getClass().equals(other.getClass())) {
6239
        return getClass().getName().compareTo(other.getClass().getName());
6240
      }
6241
 
6242
      int lastComparison = 0;
6243
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
6244
 
6245
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
6246
      if (lastComparison != 0) {
6247
        return lastComparison;
6248
      }
6249
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
6250
      if (lastComparison != 0) {
6251
        return lastComparison;
6252
      }
6253
      return 0;
6254
    }
6255
 
6256
    public void read(TProtocol iprot) throws TException {
6257
      TField field;
6258
      iprot.readStructBegin();
6259
      while (true)
6260
      {
6261
        field = iprot.readFieldBegin();
6262
        if (field.type == TType.STOP) { 
6263
          break;
6264
        }
6265
        _Fields fieldId = _Fields.findByThriftId(field.id);
6266
        if (fieldId == null) {
6267
          TProtocolUtil.skip(iprot, field.type);
6268
        } else {
6269
          switch (fieldId) {
6270
            case SHOPPING_CART_ID:
6271
              if (field.type == TType.I64) {
6272
                this.shoppingCartId = iprot.readI64();
6273
                setShoppingCartIdIsSet(true);
6274
              } else { 
6275
                TProtocolUtil.skip(iprot, field.type);
6276
              }
6277
              break;
6278
          }
6279
          iprot.readFieldEnd();
6280
        }
6281
      }
6282
      iprot.readStructEnd();
6283
      validate();
6284
    }
6285
 
6286
    public void write(TProtocol oprot) throws TException {
6287
      validate();
6288
 
6289
      oprot.writeStructBegin(STRUCT_DESC);
6290
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
6291
      oprot.writeI64(this.shoppingCartId);
6292
      oprot.writeFieldEnd();
6293
      oprot.writeFieldStop();
6294
      oprot.writeStructEnd();
6295
    }
6296
 
6297
    @Override
6298
    public String toString() {
6299
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
6300
      boolean first = true;
6301
 
6302
      sb.append("shoppingCartId:");
6303
      sb.append(this.shoppingCartId);
6304
      first = false;
6305
      sb.append(")");
6306
      return sb.toString();
6307
    }
6308
 
6309
    public void validate() throws TException {
6310
      // check for required fields
6311
    }
6312
 
6313
  }
6314
 
684 chandransh 6315
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 6316
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
6317
 
6318
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
6319
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6320
 
6321
    private List<Transaction> success;
6322
    private TransactionServiceException ex;
6323
 
6324
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6325
    public enum _Fields implements TFieldIdEnum {
6326
      SUCCESS((short)0, "success"),
6327
      EX((short)1, "ex");
6328
 
6329
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6330
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6331
 
6332
      static {
6333
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6334
          byId.put((int)field._thriftId, field);
6335
          byName.put(field.getFieldName(), field);
6336
        }
6337
      }
6338
 
6339
      /**
6340
       * Find the _Fields constant that matches fieldId, or null if its not found.
6341
       */
6342
      public static _Fields findByThriftId(int fieldId) {
6343
        return byId.get(fieldId);
6344
      }
6345
 
6346
      /**
6347
       * Find the _Fields constant that matches fieldId, throwing an exception
6348
       * if it is not found.
6349
       */
6350
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6351
        _Fields fields = findByThriftId(fieldId);
6352
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6353
        return fields;
6354
      }
6355
 
6356
      /**
6357
       * Find the _Fields constant that matches name, or null if its not found.
6358
       */
6359
      public static _Fields findByName(String name) {
6360
        return byName.get(name);
6361
      }
6362
 
6363
      private final short _thriftId;
6364
      private final String _fieldName;
6365
 
6366
      _Fields(short thriftId, String fieldName) {
6367
        _thriftId = thriftId;
6368
        _fieldName = fieldName;
6369
      }
6370
 
6371
      public short getThriftFieldId() {
6372
        return _thriftId;
6373
      }
6374
 
6375
      public String getFieldName() {
6376
        return _fieldName;
6377
      }
6378
    }
6379
 
6380
    // isset id assignments
6381
 
6382
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6383
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6384
          new ListMetaData(TType.LIST, 
6385
              new StructMetaData(TType.STRUCT, Transaction.class))));
6386
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6387
          new FieldValueMetaData(TType.STRUCT)));
6388
    }});
6389
 
6390
    static {
6391
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
6392
    }
6393
 
6394
    public getTransactionsForShoppingCartId_result() {
6395
    }
6396
 
6397
    public getTransactionsForShoppingCartId_result(
6398
      List<Transaction> success,
6399
      TransactionServiceException ex)
6400
    {
6401
      this();
6402
      this.success = success;
6403
      this.ex = ex;
6404
    }
6405
 
6406
    /**
6407
     * Performs a deep copy on <i>other</i>.
6408
     */
6409
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
6410
      if (other.isSetSuccess()) {
6411
        List<Transaction> __this__success = new ArrayList<Transaction>();
6412
        for (Transaction other_element : other.success) {
6413
          __this__success.add(new Transaction(other_element));
6414
        }
6415
        this.success = __this__success;
6416
      }
6417
      if (other.isSetEx()) {
6418
        this.ex = new TransactionServiceException(other.ex);
6419
      }
6420
    }
6421
 
6422
    public getTransactionsForShoppingCartId_result deepCopy() {
6423
      return new getTransactionsForShoppingCartId_result(this);
6424
    }
6425
 
6426
    @Deprecated
6427
    public getTransactionsForShoppingCartId_result clone() {
6428
      return new getTransactionsForShoppingCartId_result(this);
6429
    }
6430
 
6431
    public int getSuccessSize() {
6432
      return (this.success == null) ? 0 : this.success.size();
6433
    }
6434
 
6435
    public java.util.Iterator<Transaction> getSuccessIterator() {
6436
      return (this.success == null) ? null : this.success.iterator();
6437
    }
6438
 
6439
    public void addToSuccess(Transaction elem) {
6440
      if (this.success == null) {
6441
        this.success = new ArrayList<Transaction>();
6442
      }
6443
      this.success.add(elem);
6444
    }
6445
 
6446
    public List<Transaction> getSuccess() {
6447
      return this.success;
6448
    }
6449
 
6450
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
6451
      this.success = success;
6452
      return this;
6453
    }
6454
 
6455
    public void unsetSuccess() {
6456
      this.success = null;
6457
    }
6458
 
6459
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6460
    public boolean isSetSuccess() {
6461
      return this.success != null;
6462
    }
6463
 
6464
    public void setSuccessIsSet(boolean value) {
6465
      if (!value) {
6466
        this.success = null;
6467
      }
6468
    }
6469
 
6470
    public TransactionServiceException getEx() {
6471
      return this.ex;
6472
    }
6473
 
6474
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
6475
      this.ex = ex;
6476
      return this;
6477
    }
6478
 
6479
    public void unsetEx() {
6480
      this.ex = null;
6481
    }
6482
 
6483
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6484
    public boolean isSetEx() {
6485
      return this.ex != null;
6486
    }
6487
 
6488
    public void setExIsSet(boolean value) {
6489
      if (!value) {
6490
        this.ex = null;
6491
      }
6492
    }
6493
 
6494
    public void setFieldValue(_Fields field, Object value) {
6495
      switch (field) {
6496
      case SUCCESS:
6497
        if (value == null) {
6498
          unsetSuccess();
6499
        } else {
6500
          setSuccess((List<Transaction>)value);
6501
        }
6502
        break;
6503
 
6504
      case EX:
6505
        if (value == null) {
6506
          unsetEx();
6507
        } else {
6508
          setEx((TransactionServiceException)value);
6509
        }
6510
        break;
6511
 
6512
      }
6513
    }
6514
 
6515
    public void setFieldValue(int fieldID, Object value) {
6516
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6517
    }
6518
 
6519
    public Object getFieldValue(_Fields field) {
6520
      switch (field) {
6521
      case SUCCESS:
6522
        return getSuccess();
6523
 
6524
      case EX:
6525
        return getEx();
6526
 
6527
      }
6528
      throw new IllegalStateException();
6529
    }
6530
 
6531
    public Object getFieldValue(int fieldId) {
6532
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6533
    }
6534
 
6535
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6536
    public boolean isSet(_Fields field) {
6537
      switch (field) {
6538
      case SUCCESS:
6539
        return isSetSuccess();
6540
      case EX:
6541
        return isSetEx();
6542
      }
6543
      throw new IllegalStateException();
6544
    }
6545
 
6546
    public boolean isSet(int fieldID) {
6547
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6548
    }
6549
 
6550
    @Override
6551
    public boolean equals(Object that) {
6552
      if (that == null)
6553
        return false;
6554
      if (that instanceof getTransactionsForShoppingCartId_result)
6555
        return this.equals((getTransactionsForShoppingCartId_result)that);
6556
      return false;
6557
    }
6558
 
6559
    public boolean equals(getTransactionsForShoppingCartId_result that) {
6560
      if (that == null)
6561
        return false;
6562
 
6563
      boolean this_present_success = true && this.isSetSuccess();
6564
      boolean that_present_success = true && that.isSetSuccess();
6565
      if (this_present_success || that_present_success) {
6566
        if (!(this_present_success && that_present_success))
6567
          return false;
6568
        if (!this.success.equals(that.success))
6569
          return false;
6570
      }
6571
 
6572
      boolean this_present_ex = true && this.isSetEx();
6573
      boolean that_present_ex = true && that.isSetEx();
6574
      if (this_present_ex || that_present_ex) {
6575
        if (!(this_present_ex && that_present_ex))
6576
          return false;
6577
        if (!this.ex.equals(that.ex))
6578
          return false;
6579
      }
6580
 
6581
      return true;
6582
    }
6583
 
6584
    @Override
6585
    public int hashCode() {
6586
      return 0;
6587
    }
6588
 
684 chandransh 6589
    public int compareTo(getTransactionsForShoppingCartId_result other) {
6590
      if (!getClass().equals(other.getClass())) {
6591
        return getClass().getName().compareTo(other.getClass().getName());
6592
      }
6593
 
6594
      int lastComparison = 0;
6595
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
6596
 
6597
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6598
      if (lastComparison != 0) {
6599
        return lastComparison;
6600
      }
6601
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6602
      if (lastComparison != 0) {
6603
        return lastComparison;
6604
      }
6605
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6606
      if (lastComparison != 0) {
6607
        return lastComparison;
6608
      }
6609
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6610
      if (lastComparison != 0) {
6611
        return lastComparison;
6612
      }
6613
      return 0;
6614
    }
6615
 
132 ashish 6616
    public void read(TProtocol iprot) throws TException {
6617
      TField field;
6618
      iprot.readStructBegin();
6619
      while (true)
6620
      {
6621
        field = iprot.readFieldBegin();
6622
        if (field.type == TType.STOP) { 
6623
          break;
6624
        }
6625
        _Fields fieldId = _Fields.findByThriftId(field.id);
6626
        if (fieldId == null) {
6627
          TProtocolUtil.skip(iprot, field.type);
6628
        } else {
6629
          switch (fieldId) {
6630
            case SUCCESS:
6631
              if (field.type == TType.LIST) {
6632
                {
684 chandransh 6633
                  TList _list12 = iprot.readListBegin();
6634
                  this.success = new ArrayList<Transaction>(_list12.size);
6635
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 6636
                  {
684 chandransh 6637
                    Transaction _elem14;
6638
                    _elem14 = new Transaction();
6639
                    _elem14.read(iprot);
6640
                    this.success.add(_elem14);
132 ashish 6641
                  }
6642
                  iprot.readListEnd();
6643
                }
6644
              } else { 
6645
                TProtocolUtil.skip(iprot, field.type);
6646
              }
6647
              break;
6648
            case EX:
6649
              if (field.type == TType.STRUCT) {
6650
                this.ex = new TransactionServiceException();
6651
                this.ex.read(iprot);
6652
              } else { 
6653
                TProtocolUtil.skip(iprot, field.type);
6654
              }
6655
              break;
6656
          }
6657
          iprot.readFieldEnd();
6658
        }
6659
      }
6660
      iprot.readStructEnd();
6661
      validate();
6662
    }
6663
 
6664
    public void write(TProtocol oprot) throws TException {
6665
      oprot.writeStructBegin(STRUCT_DESC);
6666
 
6667
      if (this.isSetSuccess()) {
6668
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6669
        {
6670
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 6671
          for (Transaction _iter15 : this.success)
132 ashish 6672
          {
684 chandransh 6673
            _iter15.write(oprot);
132 ashish 6674
          }
6675
          oprot.writeListEnd();
6676
        }
6677
        oprot.writeFieldEnd();
6678
      } else if (this.isSetEx()) {
6679
        oprot.writeFieldBegin(EX_FIELD_DESC);
6680
        this.ex.write(oprot);
6681
        oprot.writeFieldEnd();
6682
      }
6683
      oprot.writeFieldStop();
6684
      oprot.writeStructEnd();
6685
    }
6686
 
6687
    @Override
6688
    public String toString() {
6689
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
6690
      boolean first = true;
6691
 
6692
      sb.append("success:");
6693
      if (this.success == null) {
6694
        sb.append("null");
6695
      } else {
6696
        sb.append(this.success);
6697
      }
6698
      first = false;
6699
      if (!first) sb.append(", ");
6700
      sb.append("ex:");
6701
      if (this.ex == null) {
6702
        sb.append("null");
6703
      } else {
6704
        sb.append(this.ex);
6705
      }
6706
      first = false;
6707
      sb.append(")");
6708
      return sb.toString();
6709
    }
6710
 
6711
    public void validate() throws TException {
6712
      // check for required fields
6713
    }
6714
 
6715
  }
6716
 
68 ashish 6717
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
6718
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
6719
 
6720
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6721
 
6722
    private long transactionId;
6723
 
6724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6725
    public enum _Fields implements TFieldIdEnum {
6726
      TRANSACTION_ID((short)1, "transactionId");
6727
 
6728
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6729
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6730
 
6731
      static {
6732
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6733
          byId.put((int)field._thriftId, field);
6734
          byName.put(field.getFieldName(), field);
6735
        }
6736
      }
6737
 
6738
      /**
6739
       * Find the _Fields constant that matches fieldId, or null if its not found.
6740
       */
6741
      public static _Fields findByThriftId(int fieldId) {
6742
        return byId.get(fieldId);
6743
      }
6744
 
6745
      /**
6746
       * Find the _Fields constant that matches fieldId, throwing an exception
6747
       * if it is not found.
6748
       */
6749
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6750
        _Fields fields = findByThriftId(fieldId);
6751
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6752
        return fields;
6753
      }
6754
 
6755
      /**
6756
       * Find the _Fields constant that matches name, or null if its not found.
6757
       */
6758
      public static _Fields findByName(String name) {
6759
        return byName.get(name);
6760
      }
6761
 
6762
      private final short _thriftId;
6763
      private final String _fieldName;
6764
 
6765
      _Fields(short thriftId, String fieldName) {
6766
        _thriftId = thriftId;
6767
        _fieldName = fieldName;
6768
      }
6769
 
6770
      public short getThriftFieldId() {
6771
        return _thriftId;
6772
      }
6773
 
6774
      public String getFieldName() {
6775
        return _fieldName;
6776
      }
6777
    }
6778
 
6779
    // isset id assignments
6780
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6781
    private BitSet __isset_bit_vector = new BitSet(1);
6782
 
6783
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6784
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6785
          new FieldValueMetaData(TType.I64)));
6786
    }});
6787
 
6788
    static {
6789
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
6790
    }
6791
 
6792
    public getTransactionStatus_args() {
6793
    }
6794
 
6795
    public getTransactionStatus_args(
6796
      long transactionId)
6797
    {
6798
      this();
6799
      this.transactionId = transactionId;
6800
      setTransactionIdIsSet(true);
6801
    }
6802
 
6803
    /**
6804
     * Performs a deep copy on <i>other</i>.
6805
     */
6806
    public getTransactionStatus_args(getTransactionStatus_args other) {
6807
      __isset_bit_vector.clear();
6808
      __isset_bit_vector.or(other.__isset_bit_vector);
6809
      this.transactionId = other.transactionId;
6810
    }
6811
 
6812
    public getTransactionStatus_args deepCopy() {
6813
      return new getTransactionStatus_args(this);
6814
    }
6815
 
6816
    @Deprecated
6817
    public getTransactionStatus_args clone() {
6818
      return new getTransactionStatus_args(this);
6819
    }
6820
 
6821
    public long getTransactionId() {
6822
      return this.transactionId;
6823
    }
6824
 
6825
    public getTransactionStatus_args setTransactionId(long transactionId) {
6826
      this.transactionId = transactionId;
6827
      setTransactionIdIsSet(true);
6828
      return this;
6829
    }
6830
 
6831
    public void unsetTransactionId() {
6832
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6833
    }
6834
 
6835
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6836
    public boolean isSetTransactionId() {
6837
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6838
    }
6839
 
6840
    public void setTransactionIdIsSet(boolean value) {
6841
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6842
    }
6843
 
6844
    public void setFieldValue(_Fields field, Object value) {
6845
      switch (field) {
6846
      case TRANSACTION_ID:
6847
        if (value == null) {
6848
          unsetTransactionId();
6849
        } else {
6850
          setTransactionId((Long)value);
6851
        }
6852
        break;
6853
 
6854
      }
6855
    }
6856
 
6857
    public void setFieldValue(int fieldID, Object value) {
6858
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6859
    }
6860
 
6861
    public Object getFieldValue(_Fields field) {
6862
      switch (field) {
6863
      case TRANSACTION_ID:
6864
        return new Long(getTransactionId());
6865
 
6866
      }
6867
      throw new IllegalStateException();
6868
    }
6869
 
6870
    public Object getFieldValue(int fieldId) {
6871
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6872
    }
6873
 
6874
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6875
    public boolean isSet(_Fields field) {
6876
      switch (field) {
6877
      case TRANSACTION_ID:
6878
        return isSetTransactionId();
6879
      }
6880
      throw new IllegalStateException();
6881
    }
6882
 
6883
    public boolean isSet(int fieldID) {
6884
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6885
    }
6886
 
6887
    @Override
6888
    public boolean equals(Object that) {
6889
      if (that == null)
6890
        return false;
6891
      if (that instanceof getTransactionStatus_args)
6892
        return this.equals((getTransactionStatus_args)that);
6893
      return false;
6894
    }
6895
 
6896
    public boolean equals(getTransactionStatus_args that) {
6897
      if (that == null)
6898
        return false;
6899
 
6900
      boolean this_present_transactionId = true;
6901
      boolean that_present_transactionId = true;
6902
      if (this_present_transactionId || that_present_transactionId) {
6903
        if (!(this_present_transactionId && that_present_transactionId))
6904
          return false;
6905
        if (this.transactionId != that.transactionId)
6906
          return false;
6907
      }
6908
 
6909
      return true;
6910
    }
6911
 
6912
    @Override
6913
    public int hashCode() {
6914
      return 0;
6915
    }
6916
 
6917
    public int compareTo(getTransactionStatus_args other) {
6918
      if (!getClass().equals(other.getClass())) {
6919
        return getClass().getName().compareTo(other.getClass().getName());
6920
      }
6921
 
6922
      int lastComparison = 0;
6923
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
6924
 
6925
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6926
      if (lastComparison != 0) {
6927
        return lastComparison;
6928
      }
6929
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6930
      if (lastComparison != 0) {
6931
        return lastComparison;
6932
      }
6933
      return 0;
6934
    }
6935
 
6936
    public void read(TProtocol iprot) throws TException {
6937
      TField field;
6938
      iprot.readStructBegin();
6939
      while (true)
6940
      {
6941
        field = iprot.readFieldBegin();
6942
        if (field.type == TType.STOP) { 
6943
          break;
6944
        }
6945
        _Fields fieldId = _Fields.findByThriftId(field.id);
6946
        if (fieldId == null) {
6947
          TProtocolUtil.skip(iprot, field.type);
6948
        } else {
6949
          switch (fieldId) {
6950
            case TRANSACTION_ID:
6951
              if (field.type == TType.I64) {
6952
                this.transactionId = iprot.readI64();
6953
                setTransactionIdIsSet(true);
6954
              } else { 
6955
                TProtocolUtil.skip(iprot, field.type);
6956
              }
6957
              break;
6958
          }
6959
          iprot.readFieldEnd();
6960
        }
6961
      }
6962
      iprot.readStructEnd();
6963
      validate();
6964
    }
6965
 
6966
    public void write(TProtocol oprot) throws TException {
6967
      validate();
6968
 
6969
      oprot.writeStructBegin(STRUCT_DESC);
6970
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6971
      oprot.writeI64(this.transactionId);
6972
      oprot.writeFieldEnd();
6973
      oprot.writeFieldStop();
6974
      oprot.writeStructEnd();
6975
    }
6976
 
6977
    @Override
6978
    public String toString() {
6979
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
6980
      boolean first = true;
6981
 
6982
      sb.append("transactionId:");
6983
      sb.append(this.transactionId);
6984
      first = false;
6985
      sb.append(")");
6986
      return sb.toString();
6987
    }
6988
 
6989
    public void validate() throws TException {
6990
      // check for required fields
6991
    }
6992
 
6993
  }
6994
 
6995
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
6996
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
6997
 
6998
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
6999
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7000
 
7001
    private TransactionStatus success;
7002
    private TransactionServiceException ex;
7003
 
7004
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7005
    public enum _Fields implements TFieldIdEnum {
7006
      /**
7007
       * 
7008
       * @see TransactionStatus
7009
       */
7010
      SUCCESS((short)0, "success"),
7011
      EX((short)1, "ex");
7012
 
7013
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7014
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7015
 
7016
      static {
7017
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7018
          byId.put((int)field._thriftId, field);
7019
          byName.put(field.getFieldName(), field);
7020
        }
7021
      }
7022
 
7023
      /**
7024
       * Find the _Fields constant that matches fieldId, or null if its not found.
7025
       */
7026
      public static _Fields findByThriftId(int fieldId) {
7027
        return byId.get(fieldId);
7028
      }
7029
 
7030
      /**
7031
       * Find the _Fields constant that matches fieldId, throwing an exception
7032
       * if it is not found.
7033
       */
7034
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7035
        _Fields fields = findByThriftId(fieldId);
7036
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7037
        return fields;
7038
      }
7039
 
7040
      /**
7041
       * Find the _Fields constant that matches name, or null if its not found.
7042
       */
7043
      public static _Fields findByName(String name) {
7044
        return byName.get(name);
7045
      }
7046
 
7047
      private final short _thriftId;
7048
      private final String _fieldName;
7049
 
7050
      _Fields(short thriftId, String fieldName) {
7051
        _thriftId = thriftId;
7052
        _fieldName = fieldName;
7053
      }
7054
 
7055
      public short getThriftFieldId() {
7056
        return _thriftId;
7057
      }
7058
 
7059
      public String getFieldName() {
7060
        return _fieldName;
7061
      }
7062
    }
7063
 
7064
    // isset id assignments
7065
 
7066
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7067
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7068
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7069
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7070
          new FieldValueMetaData(TType.STRUCT)));
7071
    }});
7072
 
7073
    static {
7074
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
7075
    }
7076
 
7077
    public getTransactionStatus_result() {
7078
    }
7079
 
7080
    public getTransactionStatus_result(
7081
      TransactionStatus success,
7082
      TransactionServiceException ex)
7083
    {
7084
      this();
7085
      this.success = success;
7086
      this.ex = ex;
7087
    }
7088
 
7089
    /**
7090
     * Performs a deep copy on <i>other</i>.
7091
     */
7092
    public getTransactionStatus_result(getTransactionStatus_result other) {
7093
      if (other.isSetSuccess()) {
7094
        this.success = other.success;
7095
      }
7096
      if (other.isSetEx()) {
7097
        this.ex = new TransactionServiceException(other.ex);
7098
      }
7099
    }
7100
 
7101
    public getTransactionStatus_result deepCopy() {
7102
      return new getTransactionStatus_result(this);
7103
    }
7104
 
7105
    @Deprecated
7106
    public getTransactionStatus_result clone() {
7107
      return new getTransactionStatus_result(this);
7108
    }
7109
 
7110
    /**
7111
     * 
7112
     * @see TransactionStatus
7113
     */
7114
    public TransactionStatus getSuccess() {
7115
      return this.success;
7116
    }
7117
 
7118
    /**
7119
     * 
7120
     * @see TransactionStatus
7121
     */
7122
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
7123
      this.success = success;
7124
      return this;
7125
    }
7126
 
7127
    public void unsetSuccess() {
7128
      this.success = null;
7129
    }
7130
 
7131
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7132
    public boolean isSetSuccess() {
7133
      return this.success != null;
7134
    }
7135
 
7136
    public void setSuccessIsSet(boolean value) {
7137
      if (!value) {
7138
        this.success = null;
7139
      }
7140
    }
7141
 
7142
    public TransactionServiceException getEx() {
7143
      return this.ex;
7144
    }
7145
 
7146
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
7147
      this.ex = ex;
7148
      return this;
7149
    }
7150
 
7151
    public void unsetEx() {
7152
      this.ex = null;
7153
    }
7154
 
7155
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7156
    public boolean isSetEx() {
7157
      return this.ex != null;
7158
    }
7159
 
7160
    public void setExIsSet(boolean value) {
7161
      if (!value) {
7162
        this.ex = null;
7163
      }
7164
    }
7165
 
7166
    public void setFieldValue(_Fields field, Object value) {
7167
      switch (field) {
7168
      case SUCCESS:
7169
        if (value == null) {
7170
          unsetSuccess();
7171
        } else {
7172
          setSuccess((TransactionStatus)value);
7173
        }
7174
        break;
7175
 
7176
      case EX:
7177
        if (value == null) {
7178
          unsetEx();
7179
        } else {
7180
          setEx((TransactionServiceException)value);
7181
        }
7182
        break;
7183
 
7184
      }
7185
    }
7186
 
7187
    public void setFieldValue(int fieldID, Object value) {
7188
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7189
    }
7190
 
7191
    public Object getFieldValue(_Fields field) {
7192
      switch (field) {
7193
      case SUCCESS:
7194
        return getSuccess();
7195
 
7196
      case EX:
7197
        return getEx();
7198
 
7199
      }
7200
      throw new IllegalStateException();
7201
    }
7202
 
7203
    public Object getFieldValue(int fieldId) {
7204
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7205
    }
7206
 
7207
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7208
    public boolean isSet(_Fields field) {
7209
      switch (field) {
7210
      case SUCCESS:
7211
        return isSetSuccess();
7212
      case EX:
7213
        return isSetEx();
7214
      }
7215
      throw new IllegalStateException();
7216
    }
7217
 
7218
    public boolean isSet(int fieldID) {
7219
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7220
    }
7221
 
7222
    @Override
7223
    public boolean equals(Object that) {
7224
      if (that == null)
7225
        return false;
7226
      if (that instanceof getTransactionStatus_result)
7227
        return this.equals((getTransactionStatus_result)that);
7228
      return false;
7229
    }
7230
 
7231
    public boolean equals(getTransactionStatus_result that) {
7232
      if (that == null)
7233
        return false;
7234
 
7235
      boolean this_present_success = true && this.isSetSuccess();
7236
      boolean that_present_success = true && that.isSetSuccess();
7237
      if (this_present_success || that_present_success) {
7238
        if (!(this_present_success && that_present_success))
7239
          return false;
7240
        if (!this.success.equals(that.success))
7241
          return false;
7242
      }
7243
 
7244
      boolean this_present_ex = true && this.isSetEx();
7245
      boolean that_present_ex = true && that.isSetEx();
7246
      if (this_present_ex || that_present_ex) {
7247
        if (!(this_present_ex && that_present_ex))
7248
          return false;
7249
        if (!this.ex.equals(that.ex))
7250
          return false;
7251
      }
7252
 
7253
      return true;
7254
    }
7255
 
7256
    @Override
7257
    public int hashCode() {
7258
      return 0;
7259
    }
7260
 
7261
    public int compareTo(getTransactionStatus_result other) {
7262
      if (!getClass().equals(other.getClass())) {
7263
        return getClass().getName().compareTo(other.getClass().getName());
7264
      }
7265
 
7266
      int lastComparison = 0;
7267
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
7268
 
7269
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7270
      if (lastComparison != 0) {
7271
        return lastComparison;
7272
      }
7273
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7274
      if (lastComparison != 0) {
7275
        return lastComparison;
7276
      }
7277
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7278
      if (lastComparison != 0) {
7279
        return lastComparison;
7280
      }
7281
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7282
      if (lastComparison != 0) {
7283
        return lastComparison;
7284
      }
7285
      return 0;
7286
    }
7287
 
7288
    public void read(TProtocol iprot) throws TException {
7289
      TField field;
7290
      iprot.readStructBegin();
7291
      while (true)
7292
      {
7293
        field = iprot.readFieldBegin();
7294
        if (field.type == TType.STOP) { 
7295
          break;
7296
        }
7297
        _Fields fieldId = _Fields.findByThriftId(field.id);
7298
        if (fieldId == null) {
7299
          TProtocolUtil.skip(iprot, field.type);
7300
        } else {
7301
          switch (fieldId) {
7302
            case SUCCESS:
7303
              if (field.type == TType.I32) {
7304
                this.success = TransactionStatus.findByValue(iprot.readI32());
7305
              } else { 
7306
                TProtocolUtil.skip(iprot, field.type);
7307
              }
7308
              break;
7309
            case EX:
7310
              if (field.type == TType.STRUCT) {
7311
                this.ex = new TransactionServiceException();
7312
                this.ex.read(iprot);
7313
              } else { 
7314
                TProtocolUtil.skip(iprot, field.type);
7315
              }
7316
              break;
7317
          }
7318
          iprot.readFieldEnd();
7319
        }
7320
      }
7321
      iprot.readStructEnd();
7322
      validate();
7323
    }
7324
 
7325
    public void write(TProtocol oprot) throws TException {
7326
      oprot.writeStructBegin(STRUCT_DESC);
7327
 
7328
      if (this.isSetSuccess()) {
7329
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7330
        oprot.writeI32(this.success.getValue());
7331
        oprot.writeFieldEnd();
7332
      } else if (this.isSetEx()) {
7333
        oprot.writeFieldBegin(EX_FIELD_DESC);
7334
        this.ex.write(oprot);
7335
        oprot.writeFieldEnd();
7336
      }
7337
      oprot.writeFieldStop();
7338
      oprot.writeStructEnd();
7339
    }
7340
 
7341
    @Override
7342
    public String toString() {
7343
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
7344
      boolean first = true;
7345
 
7346
      sb.append("success:");
7347
      if (this.success == null) {
7348
        sb.append("null");
7349
      } else {
7350
        String success_name = success.name();
7351
        if (success_name != null) {
7352
          sb.append(success_name);
7353
          sb.append(" (");
7354
        }
7355
        sb.append(this.success);
7356
        if (success_name != null) {
7357
          sb.append(")");
7358
        }
7359
      }
7360
      first = false;
7361
      if (!first) sb.append(", ");
7362
      sb.append("ex:");
7363
      if (this.ex == null) {
7364
        sb.append("null");
7365
      } else {
7366
        sb.append(this.ex);
7367
      }
7368
      first = false;
7369
      sb.append(")");
7370
      return sb.toString();
7371
    }
7372
 
7373
    public void validate() throws TException {
7374
      // check for required fields
7375
    }
7376
 
7377
  }
7378
 
7379
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
7380
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
7381
 
7382
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7383
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
7384
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
7385
 
7386
    private long transactionId;
7387
    private TransactionStatus status;
7388
    private String description;
7389
 
7390
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7391
    public enum _Fields implements TFieldIdEnum {
7392
      TRANSACTION_ID((short)1, "transactionId"),
7393
      /**
7394
       * 
7395
       * @see TransactionStatus
7396
       */
7397
      STATUS((short)2, "status"),
7398
      DESCRIPTION((short)3, "description");
7399
 
7400
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7401
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7402
 
7403
      static {
7404
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7405
          byId.put((int)field._thriftId, field);
7406
          byName.put(field.getFieldName(), field);
7407
        }
7408
      }
7409
 
7410
      /**
7411
       * Find the _Fields constant that matches fieldId, or null if its not found.
7412
       */
7413
      public static _Fields findByThriftId(int fieldId) {
7414
        return byId.get(fieldId);
7415
      }
7416
 
7417
      /**
7418
       * Find the _Fields constant that matches fieldId, throwing an exception
7419
       * if it is not found.
7420
       */
7421
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7422
        _Fields fields = findByThriftId(fieldId);
7423
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7424
        return fields;
7425
      }
7426
 
7427
      /**
7428
       * Find the _Fields constant that matches name, or null if its not found.
7429
       */
7430
      public static _Fields findByName(String name) {
7431
        return byName.get(name);
7432
      }
7433
 
7434
      private final short _thriftId;
7435
      private final String _fieldName;
7436
 
7437
      _Fields(short thriftId, String fieldName) {
7438
        _thriftId = thriftId;
7439
        _fieldName = fieldName;
7440
      }
7441
 
7442
      public short getThriftFieldId() {
7443
        return _thriftId;
7444
      }
7445
 
7446
      public String getFieldName() {
7447
        return _fieldName;
7448
      }
7449
    }
7450
 
7451
    // isset id assignments
7452
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7453
    private BitSet __isset_bit_vector = new BitSet(1);
7454
 
7455
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7456
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7457
          new FieldValueMetaData(TType.I64)));
7458
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7459
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7460
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
7461
          new FieldValueMetaData(TType.STRING)));
7462
    }});
7463
 
7464
    static {
7465
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
7466
    }
7467
 
7468
    public changeTransactionStatus_args() {
7469
    }
7470
 
7471
    public changeTransactionStatus_args(
7472
      long transactionId,
7473
      TransactionStatus status,
7474
      String description)
7475
    {
7476
      this();
7477
      this.transactionId = transactionId;
7478
      setTransactionIdIsSet(true);
7479
      this.status = status;
7480
      this.description = description;
7481
    }
7482
 
7483
    /**
7484
     * Performs a deep copy on <i>other</i>.
7485
     */
7486
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
7487
      __isset_bit_vector.clear();
7488
      __isset_bit_vector.or(other.__isset_bit_vector);
7489
      this.transactionId = other.transactionId;
7490
      if (other.isSetStatus()) {
7491
        this.status = other.status;
7492
      }
7493
      if (other.isSetDescription()) {
7494
        this.description = other.description;
7495
      }
7496
    }
7497
 
7498
    public changeTransactionStatus_args deepCopy() {
7499
      return new changeTransactionStatus_args(this);
7500
    }
7501
 
7502
    @Deprecated
7503
    public changeTransactionStatus_args clone() {
7504
      return new changeTransactionStatus_args(this);
7505
    }
7506
 
7507
    public long getTransactionId() {
7508
      return this.transactionId;
7509
    }
7510
 
7511
    public changeTransactionStatus_args setTransactionId(long transactionId) {
7512
      this.transactionId = transactionId;
7513
      setTransactionIdIsSet(true);
7514
      return this;
7515
    }
7516
 
7517
    public void unsetTransactionId() {
7518
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7519
    }
7520
 
7521
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7522
    public boolean isSetTransactionId() {
7523
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7524
    }
7525
 
7526
    public void setTransactionIdIsSet(boolean value) {
7527
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7528
    }
7529
 
7530
    /**
7531
     * 
7532
     * @see TransactionStatus
7533
     */
7534
    public TransactionStatus getStatus() {
7535
      return this.status;
7536
    }
7537
 
7538
    /**
7539
     * 
7540
     * @see TransactionStatus
7541
     */
7542
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
7543
      this.status = status;
7544
      return this;
7545
    }
7546
 
7547
    public void unsetStatus() {
7548
      this.status = null;
7549
    }
7550
 
7551
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7552
    public boolean isSetStatus() {
7553
      return this.status != null;
7554
    }
7555
 
7556
    public void setStatusIsSet(boolean value) {
7557
      if (!value) {
7558
        this.status = null;
7559
      }
7560
    }
7561
 
7562
    public String getDescription() {
7563
      return this.description;
7564
    }
7565
 
7566
    public changeTransactionStatus_args setDescription(String description) {
7567
      this.description = description;
7568
      return this;
7569
    }
7570
 
7571
    public void unsetDescription() {
7572
      this.description = null;
7573
    }
7574
 
7575
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
7576
    public boolean isSetDescription() {
7577
      return this.description != null;
7578
    }
7579
 
7580
    public void setDescriptionIsSet(boolean value) {
7581
      if (!value) {
7582
        this.description = null;
7583
      }
7584
    }
7585
 
7586
    public void setFieldValue(_Fields field, Object value) {
7587
      switch (field) {
7588
      case TRANSACTION_ID:
7589
        if (value == null) {
7590
          unsetTransactionId();
7591
        } else {
7592
          setTransactionId((Long)value);
7593
        }
7594
        break;
7595
 
7596
      case STATUS:
7597
        if (value == null) {
7598
          unsetStatus();
7599
        } else {
7600
          setStatus((TransactionStatus)value);
7601
        }
7602
        break;
7603
 
7604
      case DESCRIPTION:
7605
        if (value == null) {
7606
          unsetDescription();
7607
        } else {
7608
          setDescription((String)value);
7609
        }
7610
        break;
7611
 
7612
      }
7613
    }
7614
 
7615
    public void setFieldValue(int fieldID, Object value) {
7616
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7617
    }
7618
 
7619
    public Object getFieldValue(_Fields field) {
7620
      switch (field) {
7621
      case TRANSACTION_ID:
7622
        return new Long(getTransactionId());
7623
 
7624
      case STATUS:
7625
        return getStatus();
7626
 
7627
      case DESCRIPTION:
7628
        return getDescription();
7629
 
7630
      }
7631
      throw new IllegalStateException();
7632
    }
7633
 
7634
    public Object getFieldValue(int fieldId) {
7635
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7636
    }
7637
 
7638
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7639
    public boolean isSet(_Fields field) {
7640
      switch (field) {
7641
      case TRANSACTION_ID:
7642
        return isSetTransactionId();
7643
      case STATUS:
7644
        return isSetStatus();
7645
      case DESCRIPTION:
7646
        return isSetDescription();
7647
      }
7648
      throw new IllegalStateException();
7649
    }
7650
 
7651
    public boolean isSet(int fieldID) {
7652
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7653
    }
7654
 
7655
    @Override
7656
    public boolean equals(Object that) {
7657
      if (that == null)
7658
        return false;
7659
      if (that instanceof changeTransactionStatus_args)
7660
        return this.equals((changeTransactionStatus_args)that);
7661
      return false;
7662
    }
7663
 
7664
    public boolean equals(changeTransactionStatus_args that) {
7665
      if (that == null)
7666
        return false;
7667
 
7668
      boolean this_present_transactionId = true;
7669
      boolean that_present_transactionId = true;
7670
      if (this_present_transactionId || that_present_transactionId) {
7671
        if (!(this_present_transactionId && that_present_transactionId))
7672
          return false;
7673
        if (this.transactionId != that.transactionId)
7674
          return false;
7675
      }
7676
 
7677
      boolean this_present_status = true && this.isSetStatus();
7678
      boolean that_present_status = true && that.isSetStatus();
7679
      if (this_present_status || that_present_status) {
7680
        if (!(this_present_status && that_present_status))
7681
          return false;
7682
        if (!this.status.equals(that.status))
7683
          return false;
7684
      }
7685
 
7686
      boolean this_present_description = true && this.isSetDescription();
7687
      boolean that_present_description = true && that.isSetDescription();
7688
      if (this_present_description || that_present_description) {
7689
        if (!(this_present_description && that_present_description))
7690
          return false;
7691
        if (!this.description.equals(that.description))
7692
          return false;
7693
      }
7694
 
7695
      return true;
7696
    }
7697
 
7698
    @Override
7699
    public int hashCode() {
7700
      return 0;
7701
    }
7702
 
7703
    public int compareTo(changeTransactionStatus_args other) {
7704
      if (!getClass().equals(other.getClass())) {
7705
        return getClass().getName().compareTo(other.getClass().getName());
7706
      }
7707
 
7708
      int lastComparison = 0;
7709
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
7710
 
7711
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7712
      if (lastComparison != 0) {
7713
        return lastComparison;
7714
      }
7715
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7716
      if (lastComparison != 0) {
7717
        return lastComparison;
7718
      }
7719
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7720
      if (lastComparison != 0) {
7721
        return lastComparison;
7722
      }
7723
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7724
      if (lastComparison != 0) {
7725
        return lastComparison;
7726
      }
7727
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
7728
      if (lastComparison != 0) {
7729
        return lastComparison;
7730
      }
7731
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
7732
      if (lastComparison != 0) {
7733
        return lastComparison;
7734
      }
7735
      return 0;
7736
    }
7737
 
7738
    public void read(TProtocol iprot) throws TException {
7739
      TField field;
7740
      iprot.readStructBegin();
7741
      while (true)
7742
      {
7743
        field = iprot.readFieldBegin();
7744
        if (field.type == TType.STOP) { 
7745
          break;
7746
        }
7747
        _Fields fieldId = _Fields.findByThriftId(field.id);
7748
        if (fieldId == null) {
7749
          TProtocolUtil.skip(iprot, field.type);
7750
        } else {
7751
          switch (fieldId) {
7752
            case TRANSACTION_ID:
7753
              if (field.type == TType.I64) {
7754
                this.transactionId = iprot.readI64();
7755
                setTransactionIdIsSet(true);
7756
              } else { 
7757
                TProtocolUtil.skip(iprot, field.type);
7758
              }
7759
              break;
7760
            case STATUS:
7761
              if (field.type == TType.I32) {
7762
                this.status = TransactionStatus.findByValue(iprot.readI32());
7763
              } else { 
7764
                TProtocolUtil.skip(iprot, field.type);
7765
              }
7766
              break;
7767
            case DESCRIPTION:
7768
              if (field.type == TType.STRING) {
7769
                this.description = iprot.readString();
7770
              } else { 
7771
                TProtocolUtil.skip(iprot, field.type);
7772
              }
7773
              break;
7774
          }
7775
          iprot.readFieldEnd();
7776
        }
7777
      }
7778
      iprot.readStructEnd();
7779
      validate();
7780
    }
7781
 
7782
    public void write(TProtocol oprot) throws TException {
7783
      validate();
7784
 
7785
      oprot.writeStructBegin(STRUCT_DESC);
7786
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7787
      oprot.writeI64(this.transactionId);
7788
      oprot.writeFieldEnd();
7789
      if (this.status != null) {
7790
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7791
        oprot.writeI32(this.status.getValue());
7792
        oprot.writeFieldEnd();
7793
      }
7794
      if (this.description != null) {
7795
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
7796
        oprot.writeString(this.description);
7797
        oprot.writeFieldEnd();
7798
      }
7799
      oprot.writeFieldStop();
7800
      oprot.writeStructEnd();
7801
    }
7802
 
7803
    @Override
7804
    public String toString() {
7805
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
7806
      boolean first = true;
7807
 
7808
      sb.append("transactionId:");
7809
      sb.append(this.transactionId);
7810
      first = false;
7811
      if (!first) sb.append(", ");
7812
      sb.append("status:");
7813
      if (this.status == null) {
7814
        sb.append("null");
7815
      } else {
7816
        String status_name = status.name();
7817
        if (status_name != null) {
7818
          sb.append(status_name);
7819
          sb.append(" (");
7820
        }
7821
        sb.append(this.status);
7822
        if (status_name != null) {
7823
          sb.append(")");
7824
        }
7825
      }
7826
      first = false;
7827
      if (!first) sb.append(", ");
7828
      sb.append("description:");
7829
      if (this.description == null) {
7830
        sb.append("null");
7831
      } else {
7832
        sb.append(this.description);
7833
      }
7834
      first = false;
7835
      sb.append(")");
7836
      return sb.toString();
7837
    }
7838
 
7839
    public void validate() throws TException {
7840
      // check for required fields
7841
    }
7842
 
7843
  }
7844
 
7845
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
7846
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
7847
 
7848
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7849
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7850
 
7851
    private boolean success;
7852
    private TransactionServiceException ex;
7853
 
7854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7855
    public enum _Fields implements TFieldIdEnum {
7856
      SUCCESS((short)0, "success"),
7857
      EX((short)1, "ex");
7858
 
7859
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7860
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7861
 
7862
      static {
7863
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7864
          byId.put((int)field._thriftId, field);
7865
          byName.put(field.getFieldName(), field);
7866
        }
7867
      }
7868
 
7869
      /**
7870
       * Find the _Fields constant that matches fieldId, or null if its not found.
7871
       */
7872
      public static _Fields findByThriftId(int fieldId) {
7873
        return byId.get(fieldId);
7874
      }
7875
 
7876
      /**
7877
       * Find the _Fields constant that matches fieldId, throwing an exception
7878
       * if it is not found.
7879
       */
7880
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7881
        _Fields fields = findByThriftId(fieldId);
7882
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7883
        return fields;
7884
      }
7885
 
7886
      /**
7887
       * Find the _Fields constant that matches name, or null if its not found.
7888
       */
7889
      public static _Fields findByName(String name) {
7890
        return byName.get(name);
7891
      }
7892
 
7893
      private final short _thriftId;
7894
      private final String _fieldName;
7895
 
7896
      _Fields(short thriftId, String fieldName) {
7897
        _thriftId = thriftId;
7898
        _fieldName = fieldName;
7899
      }
7900
 
7901
      public short getThriftFieldId() {
7902
        return _thriftId;
7903
      }
7904
 
7905
      public String getFieldName() {
7906
        return _fieldName;
7907
      }
7908
    }
7909
 
7910
    // isset id assignments
7911
    private static final int __SUCCESS_ISSET_ID = 0;
7912
    private BitSet __isset_bit_vector = new BitSet(1);
7913
 
7914
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7915
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7916
          new FieldValueMetaData(TType.BOOL)));
7917
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7918
          new FieldValueMetaData(TType.STRUCT)));
7919
    }});
7920
 
7921
    static {
7922
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
7923
    }
7924
 
7925
    public changeTransactionStatus_result() {
7926
    }
7927
 
7928
    public changeTransactionStatus_result(
7929
      boolean success,
7930
      TransactionServiceException ex)
7931
    {
7932
      this();
7933
      this.success = success;
7934
      setSuccessIsSet(true);
7935
      this.ex = ex;
7936
    }
7937
 
7938
    /**
7939
     * Performs a deep copy on <i>other</i>.
7940
     */
7941
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
7942
      __isset_bit_vector.clear();
7943
      __isset_bit_vector.or(other.__isset_bit_vector);
7944
      this.success = other.success;
7945
      if (other.isSetEx()) {
7946
        this.ex = new TransactionServiceException(other.ex);
7947
      }
7948
    }
7949
 
7950
    public changeTransactionStatus_result deepCopy() {
7951
      return new changeTransactionStatus_result(this);
7952
    }
7953
 
7954
    @Deprecated
7955
    public changeTransactionStatus_result clone() {
7956
      return new changeTransactionStatus_result(this);
7957
    }
7958
 
7959
    public boolean isSuccess() {
7960
      return this.success;
7961
    }
7962
 
7963
    public changeTransactionStatus_result setSuccess(boolean success) {
7964
      this.success = success;
7965
      setSuccessIsSet(true);
7966
      return this;
7967
    }
7968
 
7969
    public void unsetSuccess() {
7970
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7971
    }
7972
 
7973
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7974
    public boolean isSetSuccess() {
7975
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7976
    }
7977
 
7978
    public void setSuccessIsSet(boolean value) {
7979
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7980
    }
7981
 
7982
    public TransactionServiceException getEx() {
7983
      return this.ex;
7984
    }
7985
 
7986
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
7987
      this.ex = ex;
7988
      return this;
7989
    }
7990
 
7991
    public void unsetEx() {
7992
      this.ex = null;
7993
    }
7994
 
7995
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7996
    public boolean isSetEx() {
7997
      return this.ex != null;
7998
    }
7999
 
8000
    public void setExIsSet(boolean value) {
8001
      if (!value) {
8002
        this.ex = null;
8003
      }
8004
    }
8005
 
8006
    public void setFieldValue(_Fields field, Object value) {
8007
      switch (field) {
8008
      case SUCCESS:
8009
        if (value == null) {
8010
          unsetSuccess();
8011
        } else {
8012
          setSuccess((Boolean)value);
8013
        }
8014
        break;
8015
 
8016
      case EX:
8017
        if (value == null) {
8018
          unsetEx();
8019
        } else {
8020
          setEx((TransactionServiceException)value);
8021
        }
8022
        break;
8023
 
8024
      }
8025
    }
8026
 
8027
    public void setFieldValue(int fieldID, Object value) {
8028
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8029
    }
8030
 
8031
    public Object getFieldValue(_Fields field) {
8032
      switch (field) {
8033
      case SUCCESS:
8034
        return new Boolean(isSuccess());
8035
 
8036
      case EX:
8037
        return getEx();
8038
 
8039
      }
8040
      throw new IllegalStateException();
8041
    }
8042
 
8043
    public Object getFieldValue(int fieldId) {
8044
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8045
    }
8046
 
8047
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8048
    public boolean isSet(_Fields field) {
8049
      switch (field) {
8050
      case SUCCESS:
8051
        return isSetSuccess();
8052
      case EX:
8053
        return isSetEx();
8054
      }
8055
      throw new IllegalStateException();
8056
    }
8057
 
8058
    public boolean isSet(int fieldID) {
8059
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8060
    }
8061
 
8062
    @Override
8063
    public boolean equals(Object that) {
8064
      if (that == null)
8065
        return false;
8066
      if (that instanceof changeTransactionStatus_result)
8067
        return this.equals((changeTransactionStatus_result)that);
8068
      return false;
8069
    }
8070
 
8071
    public boolean equals(changeTransactionStatus_result that) {
8072
      if (that == null)
8073
        return false;
8074
 
8075
      boolean this_present_success = true;
8076
      boolean that_present_success = true;
8077
      if (this_present_success || that_present_success) {
8078
        if (!(this_present_success && that_present_success))
8079
          return false;
8080
        if (this.success != that.success)
8081
          return false;
8082
      }
8083
 
8084
      boolean this_present_ex = true && this.isSetEx();
8085
      boolean that_present_ex = true && that.isSetEx();
8086
      if (this_present_ex || that_present_ex) {
8087
        if (!(this_present_ex && that_present_ex))
8088
          return false;
8089
        if (!this.ex.equals(that.ex))
8090
          return false;
8091
      }
8092
 
8093
      return true;
8094
    }
8095
 
8096
    @Override
8097
    public int hashCode() {
8098
      return 0;
8099
    }
8100
 
8101
    public int compareTo(changeTransactionStatus_result other) {
8102
      if (!getClass().equals(other.getClass())) {
8103
        return getClass().getName().compareTo(other.getClass().getName());
8104
      }
8105
 
8106
      int lastComparison = 0;
8107
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
8108
 
8109
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8110
      if (lastComparison != 0) {
8111
        return lastComparison;
8112
      }
8113
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8114
      if (lastComparison != 0) {
8115
        return lastComparison;
8116
      }
8117
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8118
      if (lastComparison != 0) {
8119
        return lastComparison;
8120
      }
8121
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8122
      if (lastComparison != 0) {
8123
        return lastComparison;
8124
      }
8125
      return 0;
8126
    }
8127
 
8128
    public void read(TProtocol iprot) throws TException {
8129
      TField field;
8130
      iprot.readStructBegin();
8131
      while (true)
8132
      {
8133
        field = iprot.readFieldBegin();
8134
        if (field.type == TType.STOP) { 
8135
          break;
8136
        }
8137
        _Fields fieldId = _Fields.findByThriftId(field.id);
8138
        if (fieldId == null) {
8139
          TProtocolUtil.skip(iprot, field.type);
8140
        } else {
8141
          switch (fieldId) {
8142
            case SUCCESS:
8143
              if (field.type == TType.BOOL) {
8144
                this.success = iprot.readBool();
8145
                setSuccessIsSet(true);
8146
              } else { 
8147
                TProtocolUtil.skip(iprot, field.type);
8148
              }
8149
              break;
8150
            case EX:
8151
              if (field.type == TType.STRUCT) {
8152
                this.ex = new TransactionServiceException();
8153
                this.ex.read(iprot);
8154
              } else { 
8155
                TProtocolUtil.skip(iprot, field.type);
8156
              }
8157
              break;
8158
          }
8159
          iprot.readFieldEnd();
8160
        }
8161
      }
8162
      iprot.readStructEnd();
8163
      validate();
8164
    }
8165
 
8166
    public void write(TProtocol oprot) throws TException {
8167
      oprot.writeStructBegin(STRUCT_DESC);
8168
 
8169
      if (this.isSetSuccess()) {
8170
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8171
        oprot.writeBool(this.success);
8172
        oprot.writeFieldEnd();
8173
      } else if (this.isSetEx()) {
8174
        oprot.writeFieldBegin(EX_FIELD_DESC);
8175
        this.ex.write(oprot);
8176
        oprot.writeFieldEnd();
8177
      }
8178
      oprot.writeFieldStop();
8179
      oprot.writeStructEnd();
8180
    }
8181
 
8182
    @Override
8183
    public String toString() {
8184
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
8185
      boolean first = true;
8186
 
8187
      sb.append("success:");
8188
      sb.append(this.success);
8189
      first = false;
8190
      if (!first) sb.append(", ");
8191
      sb.append("ex:");
8192
      if (this.ex == null) {
8193
        sb.append("null");
8194
      } else {
8195
        sb.append(this.ex);
8196
      }
8197
      first = false;
8198
      sb.append(")");
8199
      return sb.toString();
8200
    }
8201
 
8202
    public void validate() throws TException {
8203
      // check for required fields
8204
    }
8205
 
8206
  }
8207
 
1398 varun.gupt 8208
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
8209
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 8210
 
8211
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
8212
 
8213
    private long transactionId;
8214
 
8215
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8216
    public enum _Fields implements TFieldIdEnum {
8217
      TRANSACTION_ID((short)1, "transactionId");
8218
 
8219
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8220
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8221
 
8222
      static {
8223
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8224
          byId.put((int)field._thriftId, field);
8225
          byName.put(field.getFieldName(), field);
8226
        }
8227
      }
8228
 
8229
      /**
8230
       * Find the _Fields constant that matches fieldId, or null if its not found.
8231
       */
8232
      public static _Fields findByThriftId(int fieldId) {
8233
        return byId.get(fieldId);
8234
      }
8235
 
8236
      /**
8237
       * Find the _Fields constant that matches fieldId, throwing an exception
8238
       * if it is not found.
8239
       */
8240
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8241
        _Fields fields = findByThriftId(fieldId);
8242
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8243
        return fields;
8244
      }
8245
 
8246
      /**
8247
       * Find the _Fields constant that matches name, or null if its not found.
8248
       */
8249
      public static _Fields findByName(String name) {
8250
        return byName.get(name);
8251
      }
8252
 
8253
      private final short _thriftId;
8254
      private final String _fieldName;
8255
 
8256
      _Fields(short thriftId, String fieldName) {
8257
        _thriftId = thriftId;
8258
        _fieldName = fieldName;
8259
      }
8260
 
8261
      public short getThriftFieldId() {
8262
        return _thriftId;
8263
      }
8264
 
8265
      public String getFieldName() {
8266
        return _fieldName;
8267
      }
8268
    }
8269
 
8270
    // isset id assignments
8271
    private static final int __TRANSACTIONID_ISSET_ID = 0;
8272
    private BitSet __isset_bit_vector = new BitSet(1);
8273
 
8274
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8275
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
8276
          new FieldValueMetaData(TType.I64)));
8277
    }});
8278
 
8279
    static {
1398 varun.gupt 8280
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 8281
    }
8282
 
1398 varun.gupt 8283
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 8284
    }
8285
 
1398 varun.gupt 8286
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 8287
      long transactionId)
8288
    {
8289
      this();
8290
      this.transactionId = transactionId;
8291
      setTransactionIdIsSet(true);
8292
    }
8293
 
8294
    /**
8295
     * Performs a deep copy on <i>other</i>.
8296
     */
1398 varun.gupt 8297
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 8298
      __isset_bit_vector.clear();
8299
      __isset_bit_vector.or(other.__isset_bit_vector);
8300
      this.transactionId = other.transactionId;
8301
    }
8302
 
1398 varun.gupt 8303
    public enqueueTransactionInfoEmail_args deepCopy() {
8304
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 8305
    }
8306
 
8307
    @Deprecated
1398 varun.gupt 8308
    public enqueueTransactionInfoEmail_args clone() {
8309
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 8310
    }
8311
 
8312
    public long getTransactionId() {
8313
      return this.transactionId;
8314
    }
8315
 
1398 varun.gupt 8316
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 8317
      this.transactionId = transactionId;
8318
      setTransactionIdIsSet(true);
8319
      return this;
8320
    }
8321
 
8322
    public void unsetTransactionId() {
8323
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
8324
    }
8325
 
8326
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
8327
    public boolean isSetTransactionId() {
8328
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
8329
    }
8330
 
8331
    public void setTransactionIdIsSet(boolean value) {
8332
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
8333
    }
8334
 
8335
    public void setFieldValue(_Fields field, Object value) {
8336
      switch (field) {
8337
      case TRANSACTION_ID:
8338
        if (value == null) {
8339
          unsetTransactionId();
8340
        } else {
8341
          setTransactionId((Long)value);
8342
        }
8343
        break;
8344
 
8345
      }
8346
    }
8347
 
8348
    public void setFieldValue(int fieldID, Object value) {
8349
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8350
    }
8351
 
8352
    public Object getFieldValue(_Fields field) {
8353
      switch (field) {
8354
      case TRANSACTION_ID:
8355
        return new Long(getTransactionId());
8356
 
8357
      }
8358
      throw new IllegalStateException();
8359
    }
8360
 
8361
    public Object getFieldValue(int fieldId) {
8362
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8363
    }
8364
 
8365
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8366
    public boolean isSet(_Fields field) {
8367
      switch (field) {
8368
      case TRANSACTION_ID:
8369
        return isSetTransactionId();
8370
      }
8371
      throw new IllegalStateException();
8372
    }
8373
 
8374
    public boolean isSet(int fieldID) {
8375
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8376
    }
8377
 
8378
    @Override
8379
    public boolean equals(Object that) {
8380
      if (that == null)
8381
        return false;
1398 varun.gupt 8382
      if (that instanceof enqueueTransactionInfoEmail_args)
8383
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 8384
      return false;
8385
    }
8386
 
1398 varun.gupt 8387
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 8388
      if (that == null)
8389
        return false;
8390
 
8391
      boolean this_present_transactionId = true;
8392
      boolean that_present_transactionId = true;
8393
      if (this_present_transactionId || that_present_transactionId) {
8394
        if (!(this_present_transactionId && that_present_transactionId))
8395
          return false;
8396
        if (this.transactionId != that.transactionId)
8397
          return false;
8398
      }
8399
 
8400
      return true;
8401
    }
8402
 
8403
    @Override
8404
    public int hashCode() {
8405
      return 0;
8406
    }
8407
 
1398 varun.gupt 8408
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 8409
      if (!getClass().equals(other.getClass())) {
8410
        return getClass().getName().compareTo(other.getClass().getName());
8411
      }
8412
 
8413
      int lastComparison = 0;
1398 varun.gupt 8414
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 8415
 
8416
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
8417
      if (lastComparison != 0) {
8418
        return lastComparison;
8419
      }
8420
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
8421
      if (lastComparison != 0) {
8422
        return lastComparison;
8423
      }
8424
      return 0;
8425
    }
8426
 
8427
    public void read(TProtocol iprot) throws TException {
8428
      TField field;
8429
      iprot.readStructBegin();
8430
      while (true)
8431
      {
8432
        field = iprot.readFieldBegin();
8433
        if (field.type == TType.STOP) { 
8434
          break;
8435
        }
8436
        _Fields fieldId = _Fields.findByThriftId(field.id);
8437
        if (fieldId == null) {
8438
          TProtocolUtil.skip(iprot, field.type);
8439
        } else {
8440
          switch (fieldId) {
8441
            case TRANSACTION_ID:
8442
              if (field.type == TType.I64) {
8443
                this.transactionId = iprot.readI64();
8444
                setTransactionIdIsSet(true);
8445
              } else { 
8446
                TProtocolUtil.skip(iprot, field.type);
8447
              }
8448
              break;
8449
          }
8450
          iprot.readFieldEnd();
8451
        }
8452
      }
8453
      iprot.readStructEnd();
8454
      validate();
8455
    }
8456
 
8457
    public void write(TProtocol oprot) throws TException {
8458
      validate();
8459
 
8460
      oprot.writeStructBegin(STRUCT_DESC);
8461
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
8462
      oprot.writeI64(this.transactionId);
8463
      oprot.writeFieldEnd();
8464
      oprot.writeFieldStop();
8465
      oprot.writeStructEnd();
8466
    }
8467
 
8468
    @Override
8469
    public String toString() {
1398 varun.gupt 8470
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 8471
      boolean first = true;
8472
 
8473
      sb.append("transactionId:");
8474
      sb.append(this.transactionId);
8475
      first = false;
8476
      sb.append(")");
8477
      return sb.toString();
8478
    }
8479
 
8480
    public void validate() throws TException {
8481
      // check for required fields
8482
    }
8483
 
8484
  }
8485
 
1398 varun.gupt 8486
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
8487
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 8488
 
8489
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8490
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8491
 
8492
    private boolean success;
8493
    private TransactionServiceException ex;
8494
 
8495
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8496
    public enum _Fields implements TFieldIdEnum {
8497
      SUCCESS((short)0, "success"),
8498
      EX((short)1, "ex");
8499
 
8500
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8501
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8502
 
8503
      static {
8504
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8505
          byId.put((int)field._thriftId, field);
8506
          byName.put(field.getFieldName(), field);
8507
        }
8508
      }
8509
 
8510
      /**
8511
       * Find the _Fields constant that matches fieldId, or null if its not found.
8512
       */
8513
      public static _Fields findByThriftId(int fieldId) {
8514
        return byId.get(fieldId);
8515
      }
8516
 
8517
      /**
8518
       * Find the _Fields constant that matches fieldId, throwing an exception
8519
       * if it is not found.
8520
       */
8521
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8522
        _Fields fields = findByThriftId(fieldId);
8523
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8524
        return fields;
8525
      }
8526
 
8527
      /**
8528
       * Find the _Fields constant that matches name, or null if its not found.
8529
       */
8530
      public static _Fields findByName(String name) {
8531
        return byName.get(name);
8532
      }
8533
 
8534
      private final short _thriftId;
8535
      private final String _fieldName;
8536
 
8537
      _Fields(short thriftId, String fieldName) {
8538
        _thriftId = thriftId;
8539
        _fieldName = fieldName;
8540
      }
8541
 
8542
      public short getThriftFieldId() {
8543
        return _thriftId;
8544
      }
8545
 
8546
      public String getFieldName() {
8547
        return _fieldName;
8548
      }
8549
    }
8550
 
8551
    // isset id assignments
8552
    private static final int __SUCCESS_ISSET_ID = 0;
8553
    private BitSet __isset_bit_vector = new BitSet(1);
8554
 
8555
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8556
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8557
          new FieldValueMetaData(TType.BOOL)));
8558
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8559
          new FieldValueMetaData(TType.STRUCT)));
8560
    }});
8561
 
8562
    static {
1398 varun.gupt 8563
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 8564
    }
8565
 
1398 varun.gupt 8566
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 8567
    }
8568
 
1398 varun.gupt 8569
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 8570
      boolean success,
8571
      TransactionServiceException ex)
8572
    {
8573
      this();
8574
      this.success = success;
8575
      setSuccessIsSet(true);
8576
      this.ex = ex;
8577
    }
8578
 
8579
    /**
8580
     * Performs a deep copy on <i>other</i>.
8581
     */
1398 varun.gupt 8582
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 8583
      __isset_bit_vector.clear();
8584
      __isset_bit_vector.or(other.__isset_bit_vector);
8585
      this.success = other.success;
8586
      if (other.isSetEx()) {
8587
        this.ex = new TransactionServiceException(other.ex);
8588
      }
8589
    }
8590
 
1398 varun.gupt 8591
    public enqueueTransactionInfoEmail_result deepCopy() {
8592
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8593
    }
8594
 
8595
    @Deprecated
1398 varun.gupt 8596
    public enqueueTransactionInfoEmail_result clone() {
8597
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8598
    }
8599
 
8600
    public boolean isSuccess() {
8601
      return this.success;
8602
    }
8603
 
1398 varun.gupt 8604
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 8605
      this.success = success;
8606
      setSuccessIsSet(true);
8607
      return this;
8608
    }
8609
 
8610
    public void unsetSuccess() {
8611
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8612
    }
8613
 
8614
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8615
    public boolean isSetSuccess() {
8616
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8617
    }
8618
 
8619
    public void setSuccessIsSet(boolean value) {
8620
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8621
    }
8622
 
8623
    public TransactionServiceException getEx() {
8624
      return this.ex;
8625
    }
8626
 
1398 varun.gupt 8627
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 8628
      this.ex = ex;
8629
      return this;
8630
    }
8631
 
8632
    public void unsetEx() {
8633
      this.ex = null;
8634
    }
8635
 
8636
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8637
    public boolean isSetEx() {
8638
      return this.ex != null;
8639
    }
8640
 
8641
    public void setExIsSet(boolean value) {
8642
      if (!value) {
8643
        this.ex = null;
8644
      }
8645
    }
8646
 
8647
    public void setFieldValue(_Fields field, Object value) {
8648
      switch (field) {
8649
      case SUCCESS:
8650
        if (value == null) {
8651
          unsetSuccess();
8652
        } else {
8653
          setSuccess((Boolean)value);
8654
        }
8655
        break;
8656
 
8657
      case EX:
8658
        if (value == null) {
8659
          unsetEx();
8660
        } else {
8661
          setEx((TransactionServiceException)value);
8662
        }
8663
        break;
8664
 
8665
      }
8666
    }
8667
 
8668
    public void setFieldValue(int fieldID, Object value) {
8669
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8670
    }
8671
 
8672
    public Object getFieldValue(_Fields field) {
8673
      switch (field) {
8674
      case SUCCESS:
8675
        return new Boolean(isSuccess());
8676
 
8677
      case EX:
8678
        return getEx();
8679
 
8680
      }
8681
      throw new IllegalStateException();
8682
    }
8683
 
8684
    public Object getFieldValue(int fieldId) {
8685
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8686
    }
8687
 
8688
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8689
    public boolean isSet(_Fields field) {
8690
      switch (field) {
8691
      case SUCCESS:
8692
        return isSetSuccess();
8693
      case EX:
8694
        return isSetEx();
8695
      }
8696
      throw new IllegalStateException();
8697
    }
8698
 
8699
    public boolean isSet(int fieldID) {
8700
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8701
    }
8702
 
8703
    @Override
8704
    public boolean equals(Object that) {
8705
      if (that == null)
8706
        return false;
1398 varun.gupt 8707
      if (that instanceof enqueueTransactionInfoEmail_result)
8708
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 8709
      return false;
8710
    }
8711
 
1398 varun.gupt 8712
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 8713
      if (that == null)
8714
        return false;
8715
 
8716
      boolean this_present_success = true;
8717
      boolean that_present_success = true;
8718
      if (this_present_success || that_present_success) {
8719
        if (!(this_present_success && that_present_success))
8720
          return false;
8721
        if (this.success != that.success)
8722
          return false;
8723
      }
8724
 
8725
      boolean this_present_ex = true && this.isSetEx();
8726
      boolean that_present_ex = true && that.isSetEx();
8727
      if (this_present_ex || that_present_ex) {
8728
        if (!(this_present_ex && that_present_ex))
8729
          return false;
8730
        if (!this.ex.equals(that.ex))
8731
          return false;
8732
      }
8733
 
8734
      return true;
8735
    }
8736
 
8737
    @Override
8738
    public int hashCode() {
8739
      return 0;
8740
    }
8741
 
1398 varun.gupt 8742
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 8743
      if (!getClass().equals(other.getClass())) {
8744
        return getClass().getName().compareTo(other.getClass().getName());
8745
      }
8746
 
8747
      int lastComparison = 0;
1398 varun.gupt 8748
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 8749
 
8750
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8751
      if (lastComparison != 0) {
8752
        return lastComparison;
8753
      }
8754
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8755
      if (lastComparison != 0) {
8756
        return lastComparison;
8757
      }
8758
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8759
      if (lastComparison != 0) {
8760
        return lastComparison;
8761
      }
8762
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8763
      if (lastComparison != 0) {
8764
        return lastComparison;
8765
      }
8766
      return 0;
8767
    }
8768
 
8769
    public void read(TProtocol iprot) throws TException {
8770
      TField field;
8771
      iprot.readStructBegin();
8772
      while (true)
8773
      {
8774
        field = iprot.readFieldBegin();
8775
        if (field.type == TType.STOP) { 
8776
          break;
8777
        }
8778
        _Fields fieldId = _Fields.findByThriftId(field.id);
8779
        if (fieldId == null) {
8780
          TProtocolUtil.skip(iprot, field.type);
8781
        } else {
8782
          switch (fieldId) {
8783
            case SUCCESS:
8784
              if (field.type == TType.BOOL) {
8785
                this.success = iprot.readBool();
8786
                setSuccessIsSet(true);
8787
              } else { 
8788
                TProtocolUtil.skip(iprot, field.type);
8789
              }
8790
              break;
8791
            case EX:
8792
              if (field.type == TType.STRUCT) {
8793
                this.ex = new TransactionServiceException();
8794
                this.ex.read(iprot);
8795
              } else { 
8796
                TProtocolUtil.skip(iprot, field.type);
8797
              }
8798
              break;
8799
          }
8800
          iprot.readFieldEnd();
8801
        }
8802
      }
8803
      iprot.readStructEnd();
8804
      validate();
8805
    }
8806
 
8807
    public void write(TProtocol oprot) throws TException {
8808
      oprot.writeStructBegin(STRUCT_DESC);
8809
 
8810
      if (this.isSetSuccess()) {
8811
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8812
        oprot.writeBool(this.success);
8813
        oprot.writeFieldEnd();
8814
      } else if (this.isSetEx()) {
8815
        oprot.writeFieldBegin(EX_FIELD_DESC);
8816
        this.ex.write(oprot);
8817
        oprot.writeFieldEnd();
8818
      }
8819
      oprot.writeFieldStop();
8820
      oprot.writeStructEnd();
8821
    }
8822
 
8823
    @Override
8824
    public String toString() {
1398 varun.gupt 8825
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 8826
      boolean first = true;
8827
 
8828
      sb.append("success:");
8829
      sb.append(this.success);
8830
      first = false;
8831
      if (!first) sb.append(", ");
8832
      sb.append("ex:");
8833
      if (this.ex == null) {
8834
        sb.append("null");
8835
      } else {
8836
        sb.append(this.ex);
8837
      }
8838
      first = false;
8839
      sb.append(")");
8840
      return sb.toString();
8841
    }
8842
 
8843
    public void validate() throws TException {
8844
      // check for required fields
8845
    }
8846
 
8847
  }
8848
 
483 rajveer 8849
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
8850
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 8851
 
483 rajveer 8852
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8853
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
8854
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
8855
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 8856
 
483 rajveer 8857
    private OrderStatus status;
8858
    private long from_date;
8859
    private long to_date;
8860
    private long warehouse_id;
68 ashish 8861
 
8862
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8863
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8864
      /**
8865
       * 
8866
       * @see OrderStatus
8867
       */
8868
      STATUS((short)1, "status"),
8869
      FROM_DATE((short)2, "from_date"),
8870
      TO_DATE((short)3, "to_date"),
8871
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 8872
 
8873
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8874
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8875
 
8876
      static {
8877
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8878
          byId.put((int)field._thriftId, field);
8879
          byName.put(field.getFieldName(), field);
8880
        }
8881
      }
8882
 
8883
      /**
8884
       * Find the _Fields constant that matches fieldId, or null if its not found.
8885
       */
8886
      public static _Fields findByThriftId(int fieldId) {
8887
        return byId.get(fieldId);
8888
      }
8889
 
8890
      /**
8891
       * Find the _Fields constant that matches fieldId, throwing an exception
8892
       * if it is not found.
8893
       */
8894
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8895
        _Fields fields = findByThriftId(fieldId);
8896
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8897
        return fields;
8898
      }
8899
 
8900
      /**
8901
       * Find the _Fields constant that matches name, or null if its not found.
8902
       */
8903
      public static _Fields findByName(String name) {
8904
        return byName.get(name);
8905
      }
8906
 
8907
      private final short _thriftId;
8908
      private final String _fieldName;
8909
 
8910
      _Fields(short thriftId, String fieldName) {
8911
        _thriftId = thriftId;
8912
        _fieldName = fieldName;
8913
      }
8914
 
8915
      public short getThriftFieldId() {
8916
        return _thriftId;
8917
      }
8918
 
8919
      public String getFieldName() {
8920
        return _fieldName;
8921
      }
8922
    }
8923
 
8924
    // isset id assignments
483 rajveer 8925
    private static final int __FROM_DATE_ISSET_ID = 0;
8926
    private static final int __TO_DATE_ISSET_ID = 1;
8927
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8928
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 8929
 
8930
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8931
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8932
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8933
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 8934
          new FieldValueMetaData(TType.I64)));
483 rajveer 8935
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
8936
          new FieldValueMetaData(TType.I64)));
8937
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8938
          new FieldValueMetaData(TType.I64)));
68 ashish 8939
    }});
8940
 
8941
    static {
483 rajveer 8942
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 8943
    }
8944
 
483 rajveer 8945
    public getAllOrders_args() {
68 ashish 8946
    }
8947
 
483 rajveer 8948
    public getAllOrders_args(
8949
      OrderStatus status,
8950
      long from_date,
8951
      long to_date,
8952
      long warehouse_id)
68 ashish 8953
    {
8954
      this();
483 rajveer 8955
      this.status = status;
8956
      this.from_date = from_date;
8957
      setFrom_dateIsSet(true);
8958
      this.to_date = to_date;
8959
      setTo_dateIsSet(true);
8960
      this.warehouse_id = warehouse_id;
8961
      setWarehouse_idIsSet(true);
68 ashish 8962
    }
8963
 
8964
    /**
8965
     * Performs a deep copy on <i>other</i>.
8966
     */
483 rajveer 8967
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 8968
      __isset_bit_vector.clear();
8969
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8970
      if (other.isSetStatus()) {
8971
        this.status = other.status;
8972
      }
8973
      this.from_date = other.from_date;
8974
      this.to_date = other.to_date;
8975
      this.warehouse_id = other.warehouse_id;
68 ashish 8976
    }
8977
 
483 rajveer 8978
    public getAllOrders_args deepCopy() {
8979
      return new getAllOrders_args(this);
68 ashish 8980
    }
8981
 
8982
    @Deprecated
483 rajveer 8983
    public getAllOrders_args clone() {
8984
      return new getAllOrders_args(this);
68 ashish 8985
    }
8986
 
483 rajveer 8987
    /**
8988
     * 
8989
     * @see OrderStatus
8990
     */
8991
    public OrderStatus getStatus() {
8992
      return this.status;
68 ashish 8993
    }
8994
 
483 rajveer 8995
    /**
8996
     * 
8997
     * @see OrderStatus
8998
     */
8999
    public getAllOrders_args setStatus(OrderStatus status) {
9000
      this.status = status;
68 ashish 9001
      return this;
9002
    }
9003
 
483 rajveer 9004
    public void unsetStatus() {
9005
      this.status = null;
68 ashish 9006
    }
9007
 
483 rajveer 9008
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9009
    public boolean isSetStatus() {
9010
      return this.status != null;
68 ashish 9011
    }
9012
 
483 rajveer 9013
    public void setStatusIsSet(boolean value) {
9014
      if (!value) {
9015
        this.status = null;
68 ashish 9016
      }
9017
    }
9018
 
483 rajveer 9019
    public long getFrom_date() {
9020
      return this.from_date;
68 ashish 9021
    }
9022
 
483 rajveer 9023
    public getAllOrders_args setFrom_date(long from_date) {
9024
      this.from_date = from_date;
9025
      setFrom_dateIsSet(true);
9026
      return this;
68 ashish 9027
    }
9028
 
483 rajveer 9029
    public void unsetFrom_date() {
9030
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 9031
    }
9032
 
483 rajveer 9033
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
9034
    public boolean isSetFrom_date() {
9035
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 9036
    }
9037
 
483 rajveer 9038
    public void setFrom_dateIsSet(boolean value) {
9039
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 9040
    }
9041
 
483 rajveer 9042
    public long getTo_date() {
9043
      return this.to_date;
68 ashish 9044
    }
9045
 
483 rajveer 9046
    public getAllOrders_args setTo_date(long to_date) {
9047
      this.to_date = to_date;
9048
      setTo_dateIsSet(true);
68 ashish 9049
      return this;
9050
    }
9051
 
483 rajveer 9052
    public void unsetTo_date() {
9053
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 9054
    }
9055
 
483 rajveer 9056
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
9057
    public boolean isSetTo_date() {
9058
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 9059
    }
9060
 
483 rajveer 9061
    public void setTo_dateIsSet(boolean value) {
9062
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 9063
    }
9064
 
483 rajveer 9065
    public long getWarehouse_id() {
9066
      return this.warehouse_id;
68 ashish 9067
    }
9068
 
483 rajveer 9069
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
9070
      this.warehouse_id = warehouse_id;
9071
      setWarehouse_idIsSet(true);
68 ashish 9072
      return this;
9073
    }
9074
 
483 rajveer 9075
    public void unsetWarehouse_id() {
9076
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 9077
    }
9078
 
483 rajveer 9079
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9080
    public boolean isSetWarehouse_id() {
9081
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 9082
    }
9083
 
483 rajveer 9084
    public void setWarehouse_idIsSet(boolean value) {
9085
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 9086
    }
9087
 
9088
    public void setFieldValue(_Fields field, Object value) {
9089
      switch (field) {
483 rajveer 9090
      case STATUS:
68 ashish 9091
        if (value == null) {
483 rajveer 9092
          unsetStatus();
68 ashish 9093
        } else {
483 rajveer 9094
          setStatus((OrderStatus)value);
68 ashish 9095
        }
9096
        break;
9097
 
483 rajveer 9098
      case FROM_DATE:
68 ashish 9099
        if (value == null) {
483 rajveer 9100
          unsetFrom_date();
68 ashish 9101
        } else {
483 rajveer 9102
          setFrom_date((Long)value);
68 ashish 9103
        }
9104
        break;
9105
 
483 rajveer 9106
      case TO_DATE:
9107
        if (value == null) {
9108
          unsetTo_date();
9109
        } else {
9110
          setTo_date((Long)value);
9111
        }
9112
        break;
9113
 
9114
      case WAREHOUSE_ID:
9115
        if (value == null) {
9116
          unsetWarehouse_id();
9117
        } else {
9118
          setWarehouse_id((Long)value);
9119
        }
9120
        break;
9121
 
68 ashish 9122
      }
9123
    }
9124
 
9125
    public void setFieldValue(int fieldID, Object value) {
9126
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9127
    }
9128
 
9129
    public Object getFieldValue(_Fields field) {
9130
      switch (field) {
483 rajveer 9131
      case STATUS:
9132
        return getStatus();
68 ashish 9133
 
483 rajveer 9134
      case FROM_DATE:
9135
        return new Long(getFrom_date());
68 ashish 9136
 
483 rajveer 9137
      case TO_DATE:
9138
        return new Long(getTo_date());
9139
 
9140
      case WAREHOUSE_ID:
9141
        return new Long(getWarehouse_id());
9142
 
68 ashish 9143
      }
9144
      throw new IllegalStateException();
9145
    }
9146
 
9147
    public Object getFieldValue(int fieldId) {
9148
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9149
    }
9150
 
9151
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9152
    public boolean isSet(_Fields field) {
9153
      switch (field) {
483 rajveer 9154
      case STATUS:
9155
        return isSetStatus();
9156
      case FROM_DATE:
9157
        return isSetFrom_date();
9158
      case TO_DATE:
9159
        return isSetTo_date();
9160
      case WAREHOUSE_ID:
9161
        return isSetWarehouse_id();
68 ashish 9162
      }
9163
      throw new IllegalStateException();
9164
    }
9165
 
9166
    public boolean isSet(int fieldID) {
9167
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9168
    }
9169
 
9170
    @Override
9171
    public boolean equals(Object that) {
9172
      if (that == null)
9173
        return false;
483 rajveer 9174
      if (that instanceof getAllOrders_args)
9175
        return this.equals((getAllOrders_args)that);
68 ashish 9176
      return false;
9177
    }
9178
 
483 rajveer 9179
    public boolean equals(getAllOrders_args that) {
68 ashish 9180
      if (that == null)
9181
        return false;
9182
 
483 rajveer 9183
      boolean this_present_status = true && this.isSetStatus();
9184
      boolean that_present_status = true && that.isSetStatus();
9185
      if (this_present_status || that_present_status) {
9186
        if (!(this_present_status && that_present_status))
68 ashish 9187
          return false;
483 rajveer 9188
        if (!this.status.equals(that.status))
68 ashish 9189
          return false;
9190
      }
9191
 
483 rajveer 9192
      boolean this_present_from_date = true;
9193
      boolean that_present_from_date = true;
9194
      if (this_present_from_date || that_present_from_date) {
9195
        if (!(this_present_from_date && that_present_from_date))
68 ashish 9196
          return false;
483 rajveer 9197
        if (this.from_date != that.from_date)
68 ashish 9198
          return false;
9199
      }
9200
 
483 rajveer 9201
      boolean this_present_to_date = true;
9202
      boolean that_present_to_date = true;
9203
      if (this_present_to_date || that_present_to_date) {
9204
        if (!(this_present_to_date && that_present_to_date))
9205
          return false;
9206
        if (this.to_date != that.to_date)
9207
          return false;
68 ashish 9208
      }
9209
 
483 rajveer 9210
      boolean this_present_warehouse_id = true;
9211
      boolean that_present_warehouse_id = true;
9212
      if (this_present_warehouse_id || that_present_warehouse_id) {
9213
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 9214
          return false;
483 rajveer 9215
        if (this.warehouse_id != that.warehouse_id)
68 ashish 9216
          return false;
9217
      }
9218
 
9219
      return true;
9220
    }
9221
 
9222
    @Override
9223
    public int hashCode() {
9224
      return 0;
9225
    }
9226
 
483 rajveer 9227
    public int compareTo(getAllOrders_args other) {
68 ashish 9228
      if (!getClass().equals(other.getClass())) {
9229
        return getClass().getName().compareTo(other.getClass().getName());
9230
      }
9231
 
9232
      int lastComparison = 0;
483 rajveer 9233
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 9234
 
483 rajveer 9235
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 9236
      if (lastComparison != 0) {
9237
        return lastComparison;
9238
      }
483 rajveer 9239
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 9240
      if (lastComparison != 0) {
9241
        return lastComparison;
9242
      }
483 rajveer 9243
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
9244
      if (lastComparison != 0) {
9245
        return lastComparison;
9246
      }
9247
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
9248
      if (lastComparison != 0) {
9249
        return lastComparison;
9250
      }
9251
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
9252
      if (lastComparison != 0) {
9253
        return lastComparison;
9254
      }
9255
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
9256
      if (lastComparison != 0) {
9257
        return lastComparison;
9258
      }
9259
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9260
      if (lastComparison != 0) {
9261
        return lastComparison;
9262
      }
9263
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9264
      if (lastComparison != 0) {
9265
        return lastComparison;
9266
      }
68 ashish 9267
      return 0;
9268
    }
9269
 
9270
    public void read(TProtocol iprot) throws TException {
9271
      TField field;
9272
      iprot.readStructBegin();
9273
      while (true)
9274
      {
9275
        field = iprot.readFieldBegin();
9276
        if (field.type == TType.STOP) { 
9277
          break;
9278
        }
9279
        _Fields fieldId = _Fields.findByThriftId(field.id);
9280
        if (fieldId == null) {
9281
          TProtocolUtil.skip(iprot, field.type);
9282
        } else {
9283
          switch (fieldId) {
483 rajveer 9284
            case STATUS:
9285
              if (field.type == TType.I32) {
9286
                this.status = OrderStatus.findByValue(iprot.readI32());
9287
              } else { 
9288
                TProtocolUtil.skip(iprot, field.type);
9289
              }
9290
              break;
9291
            case FROM_DATE:
68 ashish 9292
              if (field.type == TType.I64) {
483 rajveer 9293
                this.from_date = iprot.readI64();
9294
                setFrom_dateIsSet(true);
68 ashish 9295
              } else { 
9296
                TProtocolUtil.skip(iprot, field.type);
9297
              }
9298
              break;
483 rajveer 9299
            case TO_DATE:
9300
              if (field.type == TType.I64) {
9301
                this.to_date = iprot.readI64();
9302
                setTo_dateIsSet(true);
9303
              } else { 
9304
                TProtocolUtil.skip(iprot, field.type);
9305
              }
9306
              break;
9307
            case WAREHOUSE_ID:
9308
              if (field.type == TType.I64) {
9309
                this.warehouse_id = iprot.readI64();
9310
                setWarehouse_idIsSet(true);
9311
              } else { 
9312
                TProtocolUtil.skip(iprot, field.type);
9313
              }
9314
              break;
68 ashish 9315
          }
9316
          iprot.readFieldEnd();
9317
        }
9318
      }
9319
      iprot.readStructEnd();
9320
      validate();
9321
    }
9322
 
9323
    public void write(TProtocol oprot) throws TException {
9324
      validate();
9325
 
9326
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 9327
      if (this.status != null) {
9328
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9329
        oprot.writeI32(this.status.getValue());
9330
        oprot.writeFieldEnd();
9331
      }
9332
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
9333
      oprot.writeI64(this.from_date);
68 ashish 9334
      oprot.writeFieldEnd();
483 rajveer 9335
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
9336
      oprot.writeI64(this.to_date);
9337
      oprot.writeFieldEnd();
9338
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9339
      oprot.writeI64(this.warehouse_id);
9340
      oprot.writeFieldEnd();
68 ashish 9341
      oprot.writeFieldStop();
9342
      oprot.writeStructEnd();
9343
    }
9344
 
9345
    @Override
9346
    public String toString() {
483 rajveer 9347
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 9348
      boolean first = true;
9349
 
483 rajveer 9350
      sb.append("status:");
9351
      if (this.status == null) {
9352
        sb.append("null");
9353
      } else {
9354
        String status_name = status.name();
9355
        if (status_name != null) {
9356
          sb.append(status_name);
9357
          sb.append(" (");
9358
        }
9359
        sb.append(this.status);
9360
        if (status_name != null) {
9361
          sb.append(")");
9362
        }
9363
      }
68 ashish 9364
      first = false;
483 rajveer 9365
      if (!first) sb.append(", ");
9366
      sb.append("from_date:");
9367
      sb.append(this.from_date);
9368
      first = false;
9369
      if (!first) sb.append(", ");
9370
      sb.append("to_date:");
9371
      sb.append(this.to_date);
9372
      first = false;
9373
      if (!first) sb.append(", ");
9374
      sb.append("warehouse_id:");
9375
      sb.append(this.warehouse_id);
9376
      first = false;
68 ashish 9377
      sb.append(")");
9378
      return sb.toString();
9379
    }
9380
 
9381
    public void validate() throws TException {
9382
      // check for required fields
9383
    }
9384
 
9385
  }
9386
 
483 rajveer 9387
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
9388
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 9389
 
483 rajveer 9390
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 9391
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9392
 
483 rajveer 9393
    private List<Order> success;
68 ashish 9394
    private TransactionServiceException ex;
9395
 
9396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9397
    public enum _Fields implements TFieldIdEnum {
9398
      SUCCESS((short)0, "success"),
9399
      EX((short)1, "ex");
9400
 
9401
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9402
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9403
 
9404
      static {
9405
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9406
          byId.put((int)field._thriftId, field);
9407
          byName.put(field.getFieldName(), field);
9408
        }
9409
      }
9410
 
9411
      /**
9412
       * Find the _Fields constant that matches fieldId, or null if its not found.
9413
       */
9414
      public static _Fields findByThriftId(int fieldId) {
9415
        return byId.get(fieldId);
9416
      }
9417
 
9418
      /**
9419
       * Find the _Fields constant that matches fieldId, throwing an exception
9420
       * if it is not found.
9421
       */
9422
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9423
        _Fields fields = findByThriftId(fieldId);
9424
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9425
        return fields;
9426
      }
9427
 
9428
      /**
9429
       * Find the _Fields constant that matches name, or null if its not found.
9430
       */
9431
      public static _Fields findByName(String name) {
9432
        return byName.get(name);
9433
      }
9434
 
9435
      private final short _thriftId;
9436
      private final String _fieldName;
9437
 
9438
      _Fields(short thriftId, String fieldName) {
9439
        _thriftId = thriftId;
9440
        _fieldName = fieldName;
9441
      }
9442
 
9443
      public short getThriftFieldId() {
9444
        return _thriftId;
9445
      }
9446
 
9447
      public String getFieldName() {
9448
        return _fieldName;
9449
      }
9450
    }
9451
 
9452
    // isset id assignments
9453
 
9454
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9455
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 9456
          new ListMetaData(TType.LIST, 
9457
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 9458
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9459
          new FieldValueMetaData(TType.STRUCT)));
9460
    }});
9461
 
9462
    static {
483 rajveer 9463
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 9464
    }
9465
 
483 rajveer 9466
    public getAllOrders_result() {
68 ashish 9467
    }
9468
 
483 rajveer 9469
    public getAllOrders_result(
9470
      List<Order> success,
68 ashish 9471
      TransactionServiceException ex)
9472
    {
9473
      this();
9474
      this.success = success;
9475
      this.ex = ex;
9476
    }
9477
 
9478
    /**
9479
     * Performs a deep copy on <i>other</i>.
9480
     */
483 rajveer 9481
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 9482
      if (other.isSetSuccess()) {
483 rajveer 9483
        List<Order> __this__success = new ArrayList<Order>();
9484
        for (Order other_element : other.success) {
9485
          __this__success.add(new Order(other_element));
9486
        }
9487
        this.success = __this__success;
68 ashish 9488
      }
9489
      if (other.isSetEx()) {
9490
        this.ex = new TransactionServiceException(other.ex);
9491
      }
9492
    }
9493
 
483 rajveer 9494
    public getAllOrders_result deepCopy() {
9495
      return new getAllOrders_result(this);
68 ashish 9496
    }
9497
 
9498
    @Deprecated
483 rajveer 9499
    public getAllOrders_result clone() {
9500
      return new getAllOrders_result(this);
68 ashish 9501
    }
9502
 
483 rajveer 9503
    public int getSuccessSize() {
9504
      return (this.success == null) ? 0 : this.success.size();
9505
    }
9506
 
9507
    public java.util.Iterator<Order> getSuccessIterator() {
9508
      return (this.success == null) ? null : this.success.iterator();
9509
    }
9510
 
9511
    public void addToSuccess(Order elem) {
9512
      if (this.success == null) {
9513
        this.success = new ArrayList<Order>();
9514
      }
9515
      this.success.add(elem);
9516
    }
9517
 
9518
    public List<Order> getSuccess() {
68 ashish 9519
      return this.success;
9520
    }
9521
 
483 rajveer 9522
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 9523
      this.success = success;
9524
      return this;
9525
    }
9526
 
9527
    public void unsetSuccess() {
9528
      this.success = null;
9529
    }
9530
 
9531
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9532
    public boolean isSetSuccess() {
9533
      return this.success != null;
9534
    }
9535
 
9536
    public void setSuccessIsSet(boolean value) {
9537
      if (!value) {
9538
        this.success = null;
9539
      }
9540
    }
9541
 
9542
    public TransactionServiceException getEx() {
9543
      return this.ex;
9544
    }
9545
 
483 rajveer 9546
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 9547
      this.ex = ex;
9548
      return this;
9549
    }
9550
 
9551
    public void unsetEx() {
9552
      this.ex = null;
9553
    }
9554
 
9555
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9556
    public boolean isSetEx() {
9557
      return this.ex != null;
9558
    }
9559
 
9560
    public void setExIsSet(boolean value) {
9561
      if (!value) {
9562
        this.ex = null;
9563
      }
9564
    }
9565
 
9566
    public void setFieldValue(_Fields field, Object value) {
9567
      switch (field) {
9568
      case SUCCESS:
9569
        if (value == null) {
9570
          unsetSuccess();
9571
        } else {
483 rajveer 9572
          setSuccess((List<Order>)value);
68 ashish 9573
        }
9574
        break;
9575
 
9576
      case EX:
9577
        if (value == null) {
9578
          unsetEx();
9579
        } else {
9580
          setEx((TransactionServiceException)value);
9581
        }
9582
        break;
9583
 
9584
      }
9585
    }
9586
 
9587
    public void setFieldValue(int fieldID, Object value) {
9588
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9589
    }
9590
 
9591
    public Object getFieldValue(_Fields field) {
9592
      switch (field) {
9593
      case SUCCESS:
9594
        return getSuccess();
9595
 
9596
      case EX:
9597
        return getEx();
9598
 
9599
      }
9600
      throw new IllegalStateException();
9601
    }
9602
 
9603
    public Object getFieldValue(int fieldId) {
9604
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9605
    }
9606
 
9607
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9608
    public boolean isSet(_Fields field) {
9609
      switch (field) {
9610
      case SUCCESS:
9611
        return isSetSuccess();
9612
      case EX:
9613
        return isSetEx();
9614
      }
9615
      throw new IllegalStateException();
9616
    }
9617
 
9618
    public boolean isSet(int fieldID) {
9619
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9620
    }
9621
 
9622
    @Override
9623
    public boolean equals(Object that) {
9624
      if (that == null)
9625
        return false;
483 rajveer 9626
      if (that instanceof getAllOrders_result)
9627
        return this.equals((getAllOrders_result)that);
68 ashish 9628
      return false;
9629
    }
9630
 
483 rajveer 9631
    public boolean equals(getAllOrders_result that) {
68 ashish 9632
      if (that == null)
9633
        return false;
9634
 
9635
      boolean this_present_success = true && this.isSetSuccess();
9636
      boolean that_present_success = true && that.isSetSuccess();
9637
      if (this_present_success || that_present_success) {
9638
        if (!(this_present_success && that_present_success))
9639
          return false;
9640
        if (!this.success.equals(that.success))
9641
          return false;
9642
      }
9643
 
9644
      boolean this_present_ex = true && this.isSetEx();
9645
      boolean that_present_ex = true && that.isSetEx();
9646
      if (this_present_ex || that_present_ex) {
9647
        if (!(this_present_ex && that_present_ex))
9648
          return false;
9649
        if (!this.ex.equals(that.ex))
9650
          return false;
9651
      }
9652
 
9653
      return true;
9654
    }
9655
 
9656
    @Override
9657
    public int hashCode() {
9658
      return 0;
9659
    }
9660
 
483 rajveer 9661
    public int compareTo(getAllOrders_result other) {
9662
      if (!getClass().equals(other.getClass())) {
9663
        return getClass().getName().compareTo(other.getClass().getName());
9664
      }
9665
 
9666
      int lastComparison = 0;
9667
      getAllOrders_result typedOther = (getAllOrders_result)other;
9668
 
9669
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9670
      if (lastComparison != 0) {
9671
        return lastComparison;
9672
      }
9673
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9674
      if (lastComparison != 0) {
9675
        return lastComparison;
9676
      }
9677
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9678
      if (lastComparison != 0) {
9679
        return lastComparison;
9680
      }
9681
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9682
      if (lastComparison != 0) {
9683
        return lastComparison;
9684
      }
9685
      return 0;
9686
    }
9687
 
68 ashish 9688
    public void read(TProtocol iprot) throws TException {
9689
      TField field;
9690
      iprot.readStructBegin();
9691
      while (true)
9692
      {
9693
        field = iprot.readFieldBegin();
9694
        if (field.type == TType.STOP) { 
9695
          break;
9696
        }
9697
        _Fields fieldId = _Fields.findByThriftId(field.id);
9698
        if (fieldId == null) {
9699
          TProtocolUtil.skip(iprot, field.type);
9700
        } else {
9701
          switch (fieldId) {
9702
            case SUCCESS:
483 rajveer 9703
              if (field.type == TType.LIST) {
9704
                {
684 chandransh 9705
                  TList _list16 = iprot.readListBegin();
9706
                  this.success = new ArrayList<Order>(_list16.size);
9707
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 9708
                  {
684 chandransh 9709
                    Order _elem18;
9710
                    _elem18 = new Order();
9711
                    _elem18.read(iprot);
9712
                    this.success.add(_elem18);
483 rajveer 9713
                  }
9714
                  iprot.readListEnd();
9715
                }
68 ashish 9716
              } else { 
9717
                TProtocolUtil.skip(iprot, field.type);
9718
              }
9719
              break;
9720
            case EX:
9721
              if (field.type == TType.STRUCT) {
9722
                this.ex = new TransactionServiceException();
9723
                this.ex.read(iprot);
9724
              } else { 
9725
                TProtocolUtil.skip(iprot, field.type);
9726
              }
9727
              break;
9728
          }
9729
          iprot.readFieldEnd();
9730
        }
9731
      }
9732
      iprot.readStructEnd();
9733
      validate();
9734
    }
9735
 
9736
    public void write(TProtocol oprot) throws TException {
9737
      oprot.writeStructBegin(STRUCT_DESC);
9738
 
9739
      if (this.isSetSuccess()) {
9740
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 9741
        {
9742
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 9743
          for (Order _iter19 : this.success)
483 rajveer 9744
          {
684 chandransh 9745
            _iter19.write(oprot);
483 rajveer 9746
          }
9747
          oprot.writeListEnd();
9748
        }
68 ashish 9749
        oprot.writeFieldEnd();
9750
      } else if (this.isSetEx()) {
9751
        oprot.writeFieldBegin(EX_FIELD_DESC);
9752
        this.ex.write(oprot);
9753
        oprot.writeFieldEnd();
9754
      }
9755
      oprot.writeFieldStop();
9756
      oprot.writeStructEnd();
9757
    }
9758
 
9759
    @Override
9760
    public String toString() {
483 rajveer 9761
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 9762
      boolean first = true;
9763
 
9764
      sb.append("success:");
9765
      if (this.success == null) {
9766
        sb.append("null");
9767
      } else {
9768
        sb.append(this.success);
9769
      }
9770
      first = false;
9771
      if (!first) sb.append(", ");
9772
      sb.append("ex:");
9773
      if (this.ex == null) {
9774
        sb.append("null");
9775
      } else {
9776
        sb.append(this.ex);
9777
      }
9778
      first = false;
9779
      sb.append(")");
9780
      return sb.toString();
9781
    }
9782
 
9783
    public void validate() throws TException {
9784
      // check for required fields
9785
    }
9786
 
9787
  }
9788
 
1022 varun.gupt 9789
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
9790
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
9791
 
9792
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
9793
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
9794
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
9795
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
9796
 
9797
    private OrderStatus status;
9798
    private long start_billing_date;
9799
    private long end_billing_date;
9800
    private long warehouse_id;
9801
 
9802
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9803
    public enum _Fields implements TFieldIdEnum {
9804
      /**
9805
       * 
9806
       * @see OrderStatus
9807
       */
9808
      STATUS((short)1, "status"),
9809
      START_BILLING_DATE((short)2, "start_billing_date"),
9810
      END_BILLING_DATE((short)3, "end_billing_date"),
9811
      WAREHOUSE_ID((short)4, "warehouse_id");
9812
 
9813
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9814
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9815
 
9816
      static {
9817
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9818
          byId.put((int)field._thriftId, field);
9819
          byName.put(field.getFieldName(), field);
9820
        }
9821
      }
9822
 
9823
      /**
9824
       * Find the _Fields constant that matches fieldId, or null if its not found.
9825
       */
9826
      public static _Fields findByThriftId(int fieldId) {
9827
        return byId.get(fieldId);
9828
      }
9829
 
9830
      /**
9831
       * Find the _Fields constant that matches fieldId, throwing an exception
9832
       * if it is not found.
9833
       */
9834
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9835
        _Fields fields = findByThriftId(fieldId);
9836
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9837
        return fields;
9838
      }
9839
 
9840
      /**
9841
       * Find the _Fields constant that matches name, or null if its not found.
9842
       */
9843
      public static _Fields findByName(String name) {
9844
        return byName.get(name);
9845
      }
9846
 
9847
      private final short _thriftId;
9848
      private final String _fieldName;
9849
 
9850
      _Fields(short thriftId, String fieldName) {
9851
        _thriftId = thriftId;
9852
        _fieldName = fieldName;
9853
      }
9854
 
9855
      public short getThriftFieldId() {
9856
        return _thriftId;
9857
      }
9858
 
9859
      public String getFieldName() {
9860
        return _fieldName;
9861
      }
9862
    }
9863
 
9864
    // isset id assignments
9865
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
9866
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
9867
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
9868
    private BitSet __isset_bit_vector = new BitSet(3);
9869
 
9870
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9871
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
9872
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
9873
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
9874
          new FieldValueMetaData(TType.I64)));
9875
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
9876
          new FieldValueMetaData(TType.I64)));
9877
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
9878
          new FieldValueMetaData(TType.I64)));
9879
    }});
9880
 
9881
    static {
9882
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
9883
    }
9884
 
9885
    public getOrdersByBillingDate_args() {
9886
    }
9887
 
9888
    public getOrdersByBillingDate_args(
9889
      OrderStatus status,
9890
      long start_billing_date,
9891
      long end_billing_date,
9892
      long warehouse_id)
9893
    {
9894
      this();
9895
      this.status = status;
9896
      this.start_billing_date = start_billing_date;
9897
      setStart_billing_dateIsSet(true);
9898
      this.end_billing_date = end_billing_date;
9899
      setEnd_billing_dateIsSet(true);
9900
      this.warehouse_id = warehouse_id;
9901
      setWarehouse_idIsSet(true);
9902
    }
9903
 
9904
    /**
9905
     * Performs a deep copy on <i>other</i>.
9906
     */
9907
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
9908
      __isset_bit_vector.clear();
9909
      __isset_bit_vector.or(other.__isset_bit_vector);
9910
      if (other.isSetStatus()) {
9911
        this.status = other.status;
9912
      }
9913
      this.start_billing_date = other.start_billing_date;
9914
      this.end_billing_date = other.end_billing_date;
9915
      this.warehouse_id = other.warehouse_id;
9916
    }
9917
 
9918
    public getOrdersByBillingDate_args deepCopy() {
9919
      return new getOrdersByBillingDate_args(this);
9920
    }
9921
 
9922
    @Deprecated
9923
    public getOrdersByBillingDate_args clone() {
9924
      return new getOrdersByBillingDate_args(this);
9925
    }
9926
 
9927
    /**
9928
     * 
9929
     * @see OrderStatus
9930
     */
9931
    public OrderStatus getStatus() {
9932
      return this.status;
9933
    }
9934
 
9935
    /**
9936
     * 
9937
     * @see OrderStatus
9938
     */
9939
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
9940
      this.status = status;
9941
      return this;
9942
    }
9943
 
9944
    public void unsetStatus() {
9945
      this.status = null;
9946
    }
9947
 
9948
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9949
    public boolean isSetStatus() {
9950
      return this.status != null;
9951
    }
9952
 
9953
    public void setStatusIsSet(boolean value) {
9954
      if (!value) {
9955
        this.status = null;
9956
      }
9957
    }
9958
 
9959
    public long getStart_billing_date() {
9960
      return this.start_billing_date;
9961
    }
9962
 
9963
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
9964
      this.start_billing_date = start_billing_date;
9965
      setStart_billing_dateIsSet(true);
9966
      return this;
9967
    }
9968
 
9969
    public void unsetStart_billing_date() {
9970
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
9971
    }
9972
 
9973
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
9974
    public boolean isSetStart_billing_date() {
9975
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
9976
    }
9977
 
9978
    public void setStart_billing_dateIsSet(boolean value) {
9979
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
9980
    }
9981
 
9982
    public long getEnd_billing_date() {
9983
      return this.end_billing_date;
9984
    }
9985
 
9986
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
9987
      this.end_billing_date = end_billing_date;
9988
      setEnd_billing_dateIsSet(true);
9989
      return this;
9990
    }
9991
 
9992
    public void unsetEnd_billing_date() {
9993
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
9994
    }
9995
 
9996
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
9997
    public boolean isSetEnd_billing_date() {
9998
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
9999
    }
10000
 
10001
    public void setEnd_billing_dateIsSet(boolean value) {
10002
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
10003
    }
10004
 
10005
    public long getWarehouse_id() {
10006
      return this.warehouse_id;
10007
    }
10008
 
10009
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
10010
      this.warehouse_id = warehouse_id;
10011
      setWarehouse_idIsSet(true);
10012
      return this;
10013
    }
10014
 
10015
    public void unsetWarehouse_id() {
10016
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
10017
    }
10018
 
10019
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
10020
    public boolean isSetWarehouse_id() {
10021
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
10022
    }
10023
 
10024
    public void setWarehouse_idIsSet(boolean value) {
10025
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
10026
    }
10027
 
10028
    public void setFieldValue(_Fields field, Object value) {
10029
      switch (field) {
10030
      case STATUS:
10031
        if (value == null) {
10032
          unsetStatus();
10033
        } else {
10034
          setStatus((OrderStatus)value);
10035
        }
10036
        break;
10037
 
10038
      case START_BILLING_DATE:
10039
        if (value == null) {
10040
          unsetStart_billing_date();
10041
        } else {
10042
          setStart_billing_date((Long)value);
10043
        }
10044
        break;
10045
 
10046
      case END_BILLING_DATE:
10047
        if (value == null) {
10048
          unsetEnd_billing_date();
10049
        } else {
10050
          setEnd_billing_date((Long)value);
10051
        }
10052
        break;
10053
 
10054
      case WAREHOUSE_ID:
10055
        if (value == null) {
10056
          unsetWarehouse_id();
10057
        } else {
10058
          setWarehouse_id((Long)value);
10059
        }
10060
        break;
10061
 
10062
      }
10063
    }
10064
 
10065
    public void setFieldValue(int fieldID, Object value) {
10066
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10067
    }
10068
 
10069
    public Object getFieldValue(_Fields field) {
10070
      switch (field) {
10071
      case STATUS:
10072
        return getStatus();
10073
 
10074
      case START_BILLING_DATE:
10075
        return new Long(getStart_billing_date());
10076
 
10077
      case END_BILLING_DATE:
10078
        return new Long(getEnd_billing_date());
10079
 
10080
      case WAREHOUSE_ID:
10081
        return new Long(getWarehouse_id());
10082
 
10083
      }
10084
      throw new IllegalStateException();
10085
    }
10086
 
10087
    public Object getFieldValue(int fieldId) {
10088
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10089
    }
10090
 
10091
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10092
    public boolean isSet(_Fields field) {
10093
      switch (field) {
10094
      case STATUS:
10095
        return isSetStatus();
10096
      case START_BILLING_DATE:
10097
        return isSetStart_billing_date();
10098
      case END_BILLING_DATE:
10099
        return isSetEnd_billing_date();
10100
      case WAREHOUSE_ID:
10101
        return isSetWarehouse_id();
10102
      }
10103
      throw new IllegalStateException();
10104
    }
10105
 
10106
    public boolean isSet(int fieldID) {
10107
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10108
    }
10109
 
10110
    @Override
10111
    public boolean equals(Object that) {
10112
      if (that == null)
10113
        return false;
10114
      if (that instanceof getOrdersByBillingDate_args)
10115
        return this.equals((getOrdersByBillingDate_args)that);
10116
      return false;
10117
    }
10118
 
10119
    public boolean equals(getOrdersByBillingDate_args that) {
10120
      if (that == null)
10121
        return false;
10122
 
10123
      boolean this_present_status = true && this.isSetStatus();
10124
      boolean that_present_status = true && that.isSetStatus();
10125
      if (this_present_status || that_present_status) {
10126
        if (!(this_present_status && that_present_status))
10127
          return false;
10128
        if (!this.status.equals(that.status))
10129
          return false;
10130
      }
10131
 
10132
      boolean this_present_start_billing_date = true;
10133
      boolean that_present_start_billing_date = true;
10134
      if (this_present_start_billing_date || that_present_start_billing_date) {
10135
        if (!(this_present_start_billing_date && that_present_start_billing_date))
10136
          return false;
10137
        if (this.start_billing_date != that.start_billing_date)
10138
          return false;
10139
      }
10140
 
10141
      boolean this_present_end_billing_date = true;
10142
      boolean that_present_end_billing_date = true;
10143
      if (this_present_end_billing_date || that_present_end_billing_date) {
10144
        if (!(this_present_end_billing_date && that_present_end_billing_date))
10145
          return false;
10146
        if (this.end_billing_date != that.end_billing_date)
10147
          return false;
10148
      }
10149
 
10150
      boolean this_present_warehouse_id = true;
10151
      boolean that_present_warehouse_id = true;
10152
      if (this_present_warehouse_id || that_present_warehouse_id) {
10153
        if (!(this_present_warehouse_id && that_present_warehouse_id))
10154
          return false;
10155
        if (this.warehouse_id != that.warehouse_id)
10156
          return false;
10157
      }
10158
 
10159
      return true;
10160
    }
10161
 
10162
    @Override
10163
    public int hashCode() {
10164
      return 0;
10165
    }
10166
 
10167
    public int compareTo(getOrdersByBillingDate_args other) {
10168
      if (!getClass().equals(other.getClass())) {
10169
        return getClass().getName().compareTo(other.getClass().getName());
10170
      }
10171
 
10172
      int lastComparison = 0;
10173
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
10174
 
10175
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
10176
      if (lastComparison != 0) {
10177
        return lastComparison;
10178
      }
10179
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
10180
      if (lastComparison != 0) {
10181
        return lastComparison;
10182
      }
10183
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
10184
      if (lastComparison != 0) {
10185
        return lastComparison;
10186
      }
10187
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
10188
      if (lastComparison != 0) {
10189
        return lastComparison;
10190
      }
10191
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
10192
      if (lastComparison != 0) {
10193
        return lastComparison;
10194
      }
10195
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
10196
      if (lastComparison != 0) {
10197
        return lastComparison;
10198
      }
10199
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
10200
      if (lastComparison != 0) {
10201
        return lastComparison;
10202
      }
10203
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
10204
      if (lastComparison != 0) {
10205
        return lastComparison;
10206
      }
10207
      return 0;
10208
    }
10209
 
10210
    public void read(TProtocol iprot) throws TException {
10211
      TField field;
10212
      iprot.readStructBegin();
10213
      while (true)
10214
      {
10215
        field = iprot.readFieldBegin();
10216
        if (field.type == TType.STOP) { 
10217
          break;
10218
        }
10219
        _Fields fieldId = _Fields.findByThriftId(field.id);
10220
        if (fieldId == null) {
10221
          TProtocolUtil.skip(iprot, field.type);
10222
        } else {
10223
          switch (fieldId) {
10224
            case STATUS:
10225
              if (field.type == TType.I32) {
10226
                this.status = OrderStatus.findByValue(iprot.readI32());
10227
              } else { 
10228
                TProtocolUtil.skip(iprot, field.type);
10229
              }
10230
              break;
10231
            case START_BILLING_DATE:
10232
              if (field.type == TType.I64) {
10233
                this.start_billing_date = iprot.readI64();
10234
                setStart_billing_dateIsSet(true);
10235
              } else { 
10236
                TProtocolUtil.skip(iprot, field.type);
10237
              }
10238
              break;
10239
            case END_BILLING_DATE:
10240
              if (field.type == TType.I64) {
10241
                this.end_billing_date = iprot.readI64();
10242
                setEnd_billing_dateIsSet(true);
10243
              } else { 
10244
                TProtocolUtil.skip(iprot, field.type);
10245
              }
10246
              break;
10247
            case WAREHOUSE_ID:
10248
              if (field.type == TType.I64) {
10249
                this.warehouse_id = iprot.readI64();
10250
                setWarehouse_idIsSet(true);
10251
              } else { 
10252
                TProtocolUtil.skip(iprot, field.type);
10253
              }
10254
              break;
10255
          }
10256
          iprot.readFieldEnd();
10257
        }
10258
      }
10259
      iprot.readStructEnd();
10260
      validate();
10261
    }
10262
 
10263
    public void write(TProtocol oprot) throws TException {
10264
      validate();
10265
 
10266
      oprot.writeStructBegin(STRUCT_DESC);
10267
      if (this.status != null) {
10268
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
10269
        oprot.writeI32(this.status.getValue());
10270
        oprot.writeFieldEnd();
10271
      }
10272
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
10273
      oprot.writeI64(this.start_billing_date);
10274
      oprot.writeFieldEnd();
10275
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
10276
      oprot.writeI64(this.end_billing_date);
10277
      oprot.writeFieldEnd();
10278
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
10279
      oprot.writeI64(this.warehouse_id);
10280
      oprot.writeFieldEnd();
10281
      oprot.writeFieldStop();
10282
      oprot.writeStructEnd();
10283
    }
10284
 
10285
    @Override
10286
    public String toString() {
10287
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
10288
      boolean first = true;
10289
 
10290
      sb.append("status:");
10291
      if (this.status == null) {
10292
        sb.append("null");
10293
      } else {
10294
        String status_name = status.name();
10295
        if (status_name != null) {
10296
          sb.append(status_name);
10297
          sb.append(" (");
10298
        }
10299
        sb.append(this.status);
10300
        if (status_name != null) {
10301
          sb.append(")");
10302
        }
10303
      }
10304
      first = false;
10305
      if (!first) sb.append(", ");
10306
      sb.append("start_billing_date:");
10307
      sb.append(this.start_billing_date);
10308
      first = false;
10309
      if (!first) sb.append(", ");
10310
      sb.append("end_billing_date:");
10311
      sb.append(this.end_billing_date);
10312
      first = false;
10313
      if (!first) sb.append(", ");
10314
      sb.append("warehouse_id:");
10315
      sb.append(this.warehouse_id);
10316
      first = false;
10317
      sb.append(")");
10318
      return sb.toString();
10319
    }
10320
 
10321
    public void validate() throws TException {
10322
      // check for required fields
10323
    }
10324
 
10325
  }
10326
 
10327
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
10328
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
10329
 
10330
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10331
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10332
 
10333
    private List<Order> success;
10334
    private TransactionServiceException ex;
10335
 
10336
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10337
    public enum _Fields implements TFieldIdEnum {
10338
      SUCCESS((short)0, "success"),
10339
      EX((short)1, "ex");
10340
 
10341
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10342
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10343
 
10344
      static {
10345
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10346
          byId.put((int)field._thriftId, field);
10347
          byName.put(field.getFieldName(), field);
10348
        }
10349
      }
10350
 
10351
      /**
10352
       * Find the _Fields constant that matches fieldId, or null if its not found.
10353
       */
10354
      public static _Fields findByThriftId(int fieldId) {
10355
        return byId.get(fieldId);
10356
      }
10357
 
10358
      /**
10359
       * Find the _Fields constant that matches fieldId, throwing an exception
10360
       * if it is not found.
10361
       */
10362
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10363
        _Fields fields = findByThriftId(fieldId);
10364
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10365
        return fields;
10366
      }
10367
 
10368
      /**
10369
       * Find the _Fields constant that matches name, or null if its not found.
10370
       */
10371
      public static _Fields findByName(String name) {
10372
        return byName.get(name);
10373
      }
10374
 
10375
      private final short _thriftId;
10376
      private final String _fieldName;
10377
 
10378
      _Fields(short thriftId, String fieldName) {
10379
        _thriftId = thriftId;
10380
        _fieldName = fieldName;
10381
      }
10382
 
10383
      public short getThriftFieldId() {
10384
        return _thriftId;
10385
      }
10386
 
10387
      public String getFieldName() {
10388
        return _fieldName;
10389
      }
10390
    }
10391
 
10392
    // isset id assignments
10393
 
10394
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10395
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10396
          new ListMetaData(TType.LIST, 
10397
              new StructMetaData(TType.STRUCT, Order.class))));
10398
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10399
          new FieldValueMetaData(TType.STRUCT)));
10400
    }});
10401
 
10402
    static {
10403
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
10404
    }
10405
 
10406
    public getOrdersByBillingDate_result() {
10407
    }
10408
 
10409
    public getOrdersByBillingDate_result(
10410
      List<Order> success,
10411
      TransactionServiceException ex)
10412
    {
10413
      this();
10414
      this.success = success;
10415
      this.ex = ex;
10416
    }
10417
 
10418
    /**
10419
     * Performs a deep copy on <i>other</i>.
10420
     */
10421
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
10422
      if (other.isSetSuccess()) {
10423
        List<Order> __this__success = new ArrayList<Order>();
10424
        for (Order other_element : other.success) {
10425
          __this__success.add(new Order(other_element));
10426
        }
10427
        this.success = __this__success;
10428
      }
10429
      if (other.isSetEx()) {
10430
        this.ex = new TransactionServiceException(other.ex);
10431
      }
10432
    }
10433
 
10434
    public getOrdersByBillingDate_result deepCopy() {
10435
      return new getOrdersByBillingDate_result(this);
10436
    }
10437
 
10438
    @Deprecated
10439
    public getOrdersByBillingDate_result clone() {
10440
      return new getOrdersByBillingDate_result(this);
10441
    }
10442
 
10443
    public int getSuccessSize() {
10444
      return (this.success == null) ? 0 : this.success.size();
10445
    }
10446
 
10447
    public java.util.Iterator<Order> getSuccessIterator() {
10448
      return (this.success == null) ? null : this.success.iterator();
10449
    }
10450
 
10451
    public void addToSuccess(Order elem) {
10452
      if (this.success == null) {
10453
        this.success = new ArrayList<Order>();
10454
      }
10455
      this.success.add(elem);
10456
    }
10457
 
10458
    public List<Order> getSuccess() {
10459
      return this.success;
10460
    }
10461
 
10462
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
10463
      this.success = success;
10464
      return this;
10465
    }
10466
 
10467
    public void unsetSuccess() {
10468
      this.success = null;
10469
    }
10470
 
10471
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10472
    public boolean isSetSuccess() {
10473
      return this.success != null;
10474
    }
10475
 
10476
    public void setSuccessIsSet(boolean value) {
10477
      if (!value) {
10478
        this.success = null;
10479
      }
10480
    }
10481
 
10482
    public TransactionServiceException getEx() {
10483
      return this.ex;
10484
    }
10485
 
10486
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
10487
      this.ex = ex;
10488
      return this;
10489
    }
10490
 
10491
    public void unsetEx() {
10492
      this.ex = null;
10493
    }
10494
 
10495
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10496
    public boolean isSetEx() {
10497
      return this.ex != null;
10498
    }
10499
 
10500
    public void setExIsSet(boolean value) {
10501
      if (!value) {
10502
        this.ex = null;
10503
      }
10504
    }
10505
 
10506
    public void setFieldValue(_Fields field, Object value) {
10507
      switch (field) {
10508
      case SUCCESS:
10509
        if (value == null) {
10510
          unsetSuccess();
10511
        } else {
10512
          setSuccess((List<Order>)value);
10513
        }
10514
        break;
10515
 
10516
      case EX:
10517
        if (value == null) {
10518
          unsetEx();
10519
        } else {
10520
          setEx((TransactionServiceException)value);
10521
        }
10522
        break;
10523
 
10524
      }
10525
    }
10526
 
10527
    public void setFieldValue(int fieldID, Object value) {
10528
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10529
    }
10530
 
10531
    public Object getFieldValue(_Fields field) {
10532
      switch (field) {
10533
      case SUCCESS:
10534
        return getSuccess();
10535
 
10536
      case EX:
10537
        return getEx();
10538
 
10539
      }
10540
      throw new IllegalStateException();
10541
    }
10542
 
10543
    public Object getFieldValue(int fieldId) {
10544
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10545
    }
10546
 
10547
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10548
    public boolean isSet(_Fields field) {
10549
      switch (field) {
10550
      case SUCCESS:
10551
        return isSetSuccess();
10552
      case EX:
10553
        return isSetEx();
10554
      }
10555
      throw new IllegalStateException();
10556
    }
10557
 
10558
    public boolean isSet(int fieldID) {
10559
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10560
    }
10561
 
10562
    @Override
10563
    public boolean equals(Object that) {
10564
      if (that == null)
10565
        return false;
10566
      if (that instanceof getOrdersByBillingDate_result)
10567
        return this.equals((getOrdersByBillingDate_result)that);
10568
      return false;
10569
    }
10570
 
10571
    public boolean equals(getOrdersByBillingDate_result that) {
10572
      if (that == null)
10573
        return false;
10574
 
10575
      boolean this_present_success = true && this.isSetSuccess();
10576
      boolean that_present_success = true && that.isSetSuccess();
10577
      if (this_present_success || that_present_success) {
10578
        if (!(this_present_success && that_present_success))
10579
          return false;
10580
        if (!this.success.equals(that.success))
10581
          return false;
10582
      }
10583
 
10584
      boolean this_present_ex = true && this.isSetEx();
10585
      boolean that_present_ex = true && that.isSetEx();
10586
      if (this_present_ex || that_present_ex) {
10587
        if (!(this_present_ex && that_present_ex))
10588
          return false;
10589
        if (!this.ex.equals(that.ex))
10590
          return false;
10591
      }
10592
 
10593
      return true;
10594
    }
10595
 
10596
    @Override
10597
    public int hashCode() {
10598
      return 0;
10599
    }
10600
 
10601
    public int compareTo(getOrdersByBillingDate_result other) {
10602
      if (!getClass().equals(other.getClass())) {
10603
        return getClass().getName().compareTo(other.getClass().getName());
10604
      }
10605
 
10606
      int lastComparison = 0;
10607
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
10608
 
10609
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10610
      if (lastComparison != 0) {
10611
        return lastComparison;
10612
      }
10613
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10614
      if (lastComparison != 0) {
10615
        return lastComparison;
10616
      }
10617
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10618
      if (lastComparison != 0) {
10619
        return lastComparison;
10620
      }
10621
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10622
      if (lastComparison != 0) {
10623
        return lastComparison;
10624
      }
10625
      return 0;
10626
    }
10627
 
10628
    public void read(TProtocol iprot) throws TException {
10629
      TField field;
10630
      iprot.readStructBegin();
10631
      while (true)
10632
      {
10633
        field = iprot.readFieldBegin();
10634
        if (field.type == TType.STOP) { 
10635
          break;
10636
        }
10637
        _Fields fieldId = _Fields.findByThriftId(field.id);
10638
        if (fieldId == null) {
10639
          TProtocolUtil.skip(iprot, field.type);
10640
        } else {
10641
          switch (fieldId) {
10642
            case SUCCESS:
10643
              if (field.type == TType.LIST) {
10644
                {
10645
                  TList _list20 = iprot.readListBegin();
10646
                  this.success = new ArrayList<Order>(_list20.size);
10647
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
10648
                  {
10649
                    Order _elem22;
10650
                    _elem22 = new Order();
10651
                    _elem22.read(iprot);
10652
                    this.success.add(_elem22);
10653
                  }
10654
                  iprot.readListEnd();
10655
                }
10656
              } else { 
10657
                TProtocolUtil.skip(iprot, field.type);
10658
              }
10659
              break;
10660
            case EX:
10661
              if (field.type == TType.STRUCT) {
10662
                this.ex = new TransactionServiceException();
10663
                this.ex.read(iprot);
10664
              } else { 
10665
                TProtocolUtil.skip(iprot, field.type);
10666
              }
10667
              break;
10668
          }
10669
          iprot.readFieldEnd();
10670
        }
10671
      }
10672
      iprot.readStructEnd();
10673
      validate();
10674
    }
10675
 
10676
    public void write(TProtocol oprot) throws TException {
10677
      oprot.writeStructBegin(STRUCT_DESC);
10678
 
10679
      if (this.isSetSuccess()) {
10680
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10681
        {
10682
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
10683
          for (Order _iter23 : this.success)
10684
          {
10685
            _iter23.write(oprot);
10686
          }
10687
          oprot.writeListEnd();
10688
        }
10689
        oprot.writeFieldEnd();
10690
      } else if (this.isSetEx()) {
10691
        oprot.writeFieldBegin(EX_FIELD_DESC);
10692
        this.ex.write(oprot);
10693
        oprot.writeFieldEnd();
10694
      }
10695
      oprot.writeFieldStop();
10696
      oprot.writeStructEnd();
10697
    }
10698
 
10699
    @Override
10700
    public String toString() {
10701
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
10702
      boolean first = true;
10703
 
10704
      sb.append("success:");
10705
      if (this.success == null) {
10706
        sb.append("null");
10707
      } else {
10708
        sb.append(this.success);
10709
      }
10710
      first = false;
10711
      if (!first) sb.append(", ");
10712
      sb.append("ex:");
10713
      if (this.ex == null) {
10714
        sb.append("null");
10715
      } else {
10716
        sb.append(this.ex);
10717
      }
10718
      first = false;
10719
      sb.append(")");
10720
      return sb.toString();
10721
    }
10722
 
10723
    public void validate() throws TException {
10724
      // check for required fields
10725
    }
10726
 
10727
  }
10728
 
1382 varun.gupt 10729
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
10730
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
10731
 
10732
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10733
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10734
 
10735
    private long customer_id;
10736
    private long limit;
10737
 
10738
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10739
    public enum _Fields implements TFieldIdEnum {
10740
      CUSTOMER_ID((short)1, "customer_id"),
10741
      LIMIT((short)2, "limit");
10742
 
10743
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10744
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10745
 
10746
      static {
10747
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10748
          byId.put((int)field._thriftId, field);
10749
          byName.put(field.getFieldName(), field);
10750
        }
10751
      }
10752
 
10753
      /**
10754
       * Find the _Fields constant that matches fieldId, or null if its not found.
10755
       */
10756
      public static _Fields findByThriftId(int fieldId) {
10757
        return byId.get(fieldId);
10758
      }
10759
 
10760
      /**
10761
       * Find the _Fields constant that matches fieldId, throwing an exception
10762
       * if it is not found.
10763
       */
10764
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10765
        _Fields fields = findByThriftId(fieldId);
10766
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10767
        return fields;
10768
      }
10769
 
10770
      /**
10771
       * Find the _Fields constant that matches name, or null if its not found.
10772
       */
10773
      public static _Fields findByName(String name) {
10774
        return byName.get(name);
10775
      }
10776
 
10777
      private final short _thriftId;
10778
      private final String _fieldName;
10779
 
10780
      _Fields(short thriftId, String fieldName) {
10781
        _thriftId = thriftId;
10782
        _fieldName = fieldName;
10783
      }
10784
 
10785
      public short getThriftFieldId() {
10786
        return _thriftId;
10787
      }
10788
 
10789
      public String getFieldName() {
10790
        return _fieldName;
10791
      }
10792
    }
10793
 
10794
    // isset id assignments
10795
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10796
    private static final int __LIMIT_ISSET_ID = 1;
10797
    private BitSet __isset_bit_vector = new BitSet(2);
10798
 
10799
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10800
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10801
          new FieldValueMetaData(TType.I64)));
10802
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10803
          new FieldValueMetaData(TType.I64)));
10804
    }});
10805
 
10806
    static {
10807
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
10808
    }
10809
 
10810
    public getReturnableOrdersForCustomer_args() {
10811
    }
10812
 
10813
    public getReturnableOrdersForCustomer_args(
10814
      long customer_id,
10815
      long limit)
10816
    {
10817
      this();
10818
      this.customer_id = customer_id;
10819
      setCustomer_idIsSet(true);
10820
      this.limit = limit;
10821
      setLimitIsSet(true);
10822
    }
10823
 
10824
    /**
10825
     * Performs a deep copy on <i>other</i>.
10826
     */
10827
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
10828
      __isset_bit_vector.clear();
10829
      __isset_bit_vector.or(other.__isset_bit_vector);
10830
      this.customer_id = other.customer_id;
10831
      this.limit = other.limit;
10832
    }
10833
 
10834
    public getReturnableOrdersForCustomer_args deepCopy() {
10835
      return new getReturnableOrdersForCustomer_args(this);
10836
    }
10837
 
10838
    @Deprecated
10839
    public getReturnableOrdersForCustomer_args clone() {
10840
      return new getReturnableOrdersForCustomer_args(this);
10841
    }
10842
 
10843
    public long getCustomer_id() {
10844
      return this.customer_id;
10845
    }
10846
 
10847
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
10848
      this.customer_id = customer_id;
10849
      setCustomer_idIsSet(true);
10850
      return this;
10851
    }
10852
 
10853
    public void unsetCustomer_id() {
10854
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10855
    }
10856
 
10857
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10858
    public boolean isSetCustomer_id() {
10859
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10860
    }
10861
 
10862
    public void setCustomer_idIsSet(boolean value) {
10863
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10864
    }
10865
 
10866
    public long getLimit() {
10867
      return this.limit;
10868
    }
10869
 
10870
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
10871
      this.limit = limit;
10872
      setLimitIsSet(true);
10873
      return this;
10874
    }
10875
 
10876
    public void unsetLimit() {
10877
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10878
    }
10879
 
10880
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10881
    public boolean isSetLimit() {
10882
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10883
    }
10884
 
10885
    public void setLimitIsSet(boolean value) {
10886
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10887
    }
10888
 
10889
    public void setFieldValue(_Fields field, Object value) {
10890
      switch (field) {
10891
      case CUSTOMER_ID:
10892
        if (value == null) {
10893
          unsetCustomer_id();
10894
        } else {
10895
          setCustomer_id((Long)value);
10896
        }
10897
        break;
10898
 
10899
      case LIMIT:
10900
        if (value == null) {
10901
          unsetLimit();
10902
        } else {
10903
          setLimit((Long)value);
10904
        }
10905
        break;
10906
 
10907
      }
10908
    }
10909
 
10910
    public void setFieldValue(int fieldID, Object value) {
10911
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10912
    }
10913
 
10914
    public Object getFieldValue(_Fields field) {
10915
      switch (field) {
10916
      case CUSTOMER_ID:
10917
        return new Long(getCustomer_id());
10918
 
10919
      case LIMIT:
10920
        return new Long(getLimit());
10921
 
10922
      }
10923
      throw new IllegalStateException();
10924
    }
10925
 
10926
    public Object getFieldValue(int fieldId) {
10927
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10928
    }
10929
 
10930
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10931
    public boolean isSet(_Fields field) {
10932
      switch (field) {
10933
      case CUSTOMER_ID:
10934
        return isSetCustomer_id();
10935
      case LIMIT:
10936
        return isSetLimit();
10937
      }
10938
      throw new IllegalStateException();
10939
    }
10940
 
10941
    public boolean isSet(int fieldID) {
10942
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10943
    }
10944
 
10945
    @Override
10946
    public boolean equals(Object that) {
10947
      if (that == null)
10948
        return false;
10949
      if (that instanceof getReturnableOrdersForCustomer_args)
10950
        return this.equals((getReturnableOrdersForCustomer_args)that);
10951
      return false;
10952
    }
10953
 
10954
    public boolean equals(getReturnableOrdersForCustomer_args that) {
10955
      if (that == null)
10956
        return false;
10957
 
10958
      boolean this_present_customer_id = true;
10959
      boolean that_present_customer_id = true;
10960
      if (this_present_customer_id || that_present_customer_id) {
10961
        if (!(this_present_customer_id && that_present_customer_id))
10962
          return false;
10963
        if (this.customer_id != that.customer_id)
10964
          return false;
10965
      }
10966
 
10967
      boolean this_present_limit = true;
10968
      boolean that_present_limit = true;
10969
      if (this_present_limit || that_present_limit) {
10970
        if (!(this_present_limit && that_present_limit))
10971
          return false;
10972
        if (this.limit != that.limit)
10973
          return false;
10974
      }
10975
 
10976
      return true;
10977
    }
10978
 
10979
    @Override
10980
    public int hashCode() {
10981
      return 0;
10982
    }
10983
 
10984
    public int compareTo(getReturnableOrdersForCustomer_args other) {
10985
      if (!getClass().equals(other.getClass())) {
10986
        return getClass().getName().compareTo(other.getClass().getName());
10987
      }
10988
 
10989
      int lastComparison = 0;
10990
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
10991
 
10992
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10993
      if (lastComparison != 0) {
10994
        return lastComparison;
10995
      }
10996
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10997
      if (lastComparison != 0) {
10998
        return lastComparison;
10999
      }
11000
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
11001
      if (lastComparison != 0) {
11002
        return lastComparison;
11003
      }
11004
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
11005
      if (lastComparison != 0) {
11006
        return lastComparison;
11007
      }
11008
      return 0;
11009
    }
11010
 
11011
    public void read(TProtocol iprot) throws TException {
11012
      TField field;
11013
      iprot.readStructBegin();
11014
      while (true)
11015
      {
11016
        field = iprot.readFieldBegin();
11017
        if (field.type == TType.STOP) { 
11018
          break;
11019
        }
11020
        _Fields fieldId = _Fields.findByThriftId(field.id);
11021
        if (fieldId == null) {
11022
          TProtocolUtil.skip(iprot, field.type);
11023
        } else {
11024
          switch (fieldId) {
11025
            case CUSTOMER_ID:
11026
              if (field.type == TType.I64) {
11027
                this.customer_id = iprot.readI64();
11028
                setCustomer_idIsSet(true);
11029
              } else { 
11030
                TProtocolUtil.skip(iprot, field.type);
11031
              }
11032
              break;
11033
            case LIMIT:
11034
              if (field.type == TType.I64) {
11035
                this.limit = iprot.readI64();
11036
                setLimitIsSet(true);
11037
              } else { 
11038
                TProtocolUtil.skip(iprot, field.type);
11039
              }
11040
              break;
11041
          }
11042
          iprot.readFieldEnd();
11043
        }
11044
      }
11045
      iprot.readStructEnd();
11046
      validate();
11047
    }
11048
 
11049
    public void write(TProtocol oprot) throws TException {
11050
      validate();
11051
 
11052
      oprot.writeStructBegin(STRUCT_DESC);
11053
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
11054
      oprot.writeI64(this.customer_id);
11055
      oprot.writeFieldEnd();
11056
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
11057
      oprot.writeI64(this.limit);
11058
      oprot.writeFieldEnd();
11059
      oprot.writeFieldStop();
11060
      oprot.writeStructEnd();
11061
    }
11062
 
11063
    @Override
11064
    public String toString() {
11065
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
11066
      boolean first = true;
11067
 
11068
      sb.append("customer_id:");
11069
      sb.append(this.customer_id);
11070
      first = false;
11071
      if (!first) sb.append(", ");
11072
      sb.append("limit:");
11073
      sb.append(this.limit);
11074
      first = false;
11075
      sb.append(")");
11076
      return sb.toString();
11077
    }
11078
 
11079
    public void validate() throws TException {
11080
      // check for required fields
11081
    }
11082
 
11083
  }
11084
 
11085
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
11086
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
11087
 
11088
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11089
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11090
 
11091
    private List<Long> success;
11092
    private TransactionServiceException ex;
11093
 
11094
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11095
    public enum _Fields implements TFieldIdEnum {
11096
      SUCCESS((short)0, "success"),
11097
      EX((short)1, "ex");
11098
 
11099
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11100
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11101
 
11102
      static {
11103
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11104
          byId.put((int)field._thriftId, field);
11105
          byName.put(field.getFieldName(), field);
11106
        }
11107
      }
11108
 
11109
      /**
11110
       * Find the _Fields constant that matches fieldId, or null if its not found.
11111
       */
11112
      public static _Fields findByThriftId(int fieldId) {
11113
        return byId.get(fieldId);
11114
      }
11115
 
11116
      /**
11117
       * Find the _Fields constant that matches fieldId, throwing an exception
11118
       * if it is not found.
11119
       */
11120
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11121
        _Fields fields = findByThriftId(fieldId);
11122
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11123
        return fields;
11124
      }
11125
 
11126
      /**
11127
       * Find the _Fields constant that matches name, or null if its not found.
11128
       */
11129
      public static _Fields findByName(String name) {
11130
        return byName.get(name);
11131
      }
11132
 
11133
      private final short _thriftId;
11134
      private final String _fieldName;
11135
 
11136
      _Fields(short thriftId, String fieldName) {
11137
        _thriftId = thriftId;
11138
        _fieldName = fieldName;
11139
      }
11140
 
11141
      public short getThriftFieldId() {
11142
        return _thriftId;
11143
      }
11144
 
11145
      public String getFieldName() {
11146
        return _fieldName;
11147
      }
11148
    }
11149
 
11150
    // isset id assignments
11151
 
11152
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11153
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11154
          new ListMetaData(TType.LIST, 
11155
              new FieldValueMetaData(TType.I64))));
11156
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11157
          new FieldValueMetaData(TType.STRUCT)));
11158
    }});
11159
 
11160
    static {
11161
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
11162
    }
11163
 
11164
    public getReturnableOrdersForCustomer_result() {
11165
    }
11166
 
11167
    public getReturnableOrdersForCustomer_result(
11168
      List<Long> success,
11169
      TransactionServiceException ex)
11170
    {
11171
      this();
11172
      this.success = success;
11173
      this.ex = ex;
11174
    }
11175
 
11176
    /**
11177
     * Performs a deep copy on <i>other</i>.
11178
     */
11179
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
11180
      if (other.isSetSuccess()) {
11181
        List<Long> __this__success = new ArrayList<Long>();
11182
        for (Long other_element : other.success) {
11183
          __this__success.add(other_element);
11184
        }
11185
        this.success = __this__success;
11186
      }
11187
      if (other.isSetEx()) {
11188
        this.ex = new TransactionServiceException(other.ex);
11189
      }
11190
    }
11191
 
11192
    public getReturnableOrdersForCustomer_result deepCopy() {
11193
      return new getReturnableOrdersForCustomer_result(this);
11194
    }
11195
 
11196
    @Deprecated
11197
    public getReturnableOrdersForCustomer_result clone() {
11198
      return new getReturnableOrdersForCustomer_result(this);
11199
    }
11200
 
11201
    public int getSuccessSize() {
11202
      return (this.success == null) ? 0 : this.success.size();
11203
    }
11204
 
11205
    public java.util.Iterator<Long> getSuccessIterator() {
11206
      return (this.success == null) ? null : this.success.iterator();
11207
    }
11208
 
11209
    public void addToSuccess(long elem) {
11210
      if (this.success == null) {
11211
        this.success = new ArrayList<Long>();
11212
      }
11213
      this.success.add(elem);
11214
    }
11215
 
11216
    public List<Long> getSuccess() {
11217
      return this.success;
11218
    }
11219
 
11220
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
11221
      this.success = success;
11222
      return this;
11223
    }
11224
 
11225
    public void unsetSuccess() {
11226
      this.success = null;
11227
    }
11228
 
11229
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11230
    public boolean isSetSuccess() {
11231
      return this.success != null;
11232
    }
11233
 
11234
    public void setSuccessIsSet(boolean value) {
11235
      if (!value) {
11236
        this.success = null;
11237
      }
11238
    }
11239
 
11240
    public TransactionServiceException getEx() {
11241
      return this.ex;
11242
    }
11243
 
11244
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11245
      this.ex = ex;
11246
      return this;
11247
    }
11248
 
11249
    public void unsetEx() {
11250
      this.ex = null;
11251
    }
11252
 
11253
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11254
    public boolean isSetEx() {
11255
      return this.ex != null;
11256
    }
11257
 
11258
    public void setExIsSet(boolean value) {
11259
      if (!value) {
11260
        this.ex = null;
11261
      }
11262
    }
11263
 
11264
    public void setFieldValue(_Fields field, Object value) {
11265
      switch (field) {
11266
      case SUCCESS:
11267
        if (value == null) {
11268
          unsetSuccess();
11269
        } else {
11270
          setSuccess((List<Long>)value);
11271
        }
11272
        break;
11273
 
11274
      case EX:
11275
        if (value == null) {
11276
          unsetEx();
11277
        } else {
11278
          setEx((TransactionServiceException)value);
11279
        }
11280
        break;
11281
 
11282
      }
11283
    }
11284
 
11285
    public void setFieldValue(int fieldID, Object value) {
11286
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11287
    }
11288
 
11289
    public Object getFieldValue(_Fields field) {
11290
      switch (field) {
11291
      case SUCCESS:
11292
        return getSuccess();
11293
 
11294
      case EX:
11295
        return getEx();
11296
 
11297
      }
11298
      throw new IllegalStateException();
11299
    }
11300
 
11301
    public Object getFieldValue(int fieldId) {
11302
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11303
    }
11304
 
11305
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11306
    public boolean isSet(_Fields field) {
11307
      switch (field) {
11308
      case SUCCESS:
11309
        return isSetSuccess();
11310
      case EX:
11311
        return isSetEx();
11312
      }
11313
      throw new IllegalStateException();
11314
    }
11315
 
11316
    public boolean isSet(int fieldID) {
11317
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11318
    }
11319
 
11320
    @Override
11321
    public boolean equals(Object that) {
11322
      if (that == null)
11323
        return false;
11324
      if (that instanceof getReturnableOrdersForCustomer_result)
11325
        return this.equals((getReturnableOrdersForCustomer_result)that);
11326
      return false;
11327
    }
11328
 
11329
    public boolean equals(getReturnableOrdersForCustomer_result that) {
11330
      if (that == null)
11331
        return false;
11332
 
11333
      boolean this_present_success = true && this.isSetSuccess();
11334
      boolean that_present_success = true && that.isSetSuccess();
11335
      if (this_present_success || that_present_success) {
11336
        if (!(this_present_success && that_present_success))
11337
          return false;
11338
        if (!this.success.equals(that.success))
11339
          return false;
11340
      }
11341
 
11342
      boolean this_present_ex = true && this.isSetEx();
11343
      boolean that_present_ex = true && that.isSetEx();
11344
      if (this_present_ex || that_present_ex) {
11345
        if (!(this_present_ex && that_present_ex))
11346
          return false;
11347
        if (!this.ex.equals(that.ex))
11348
          return false;
11349
      }
11350
 
11351
      return true;
11352
    }
11353
 
11354
    @Override
11355
    public int hashCode() {
11356
      return 0;
11357
    }
11358
 
11359
    public int compareTo(getReturnableOrdersForCustomer_result other) {
11360
      if (!getClass().equals(other.getClass())) {
11361
        return getClass().getName().compareTo(other.getClass().getName());
11362
      }
11363
 
11364
      int lastComparison = 0;
11365
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
11366
 
11367
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11368
      if (lastComparison != 0) {
11369
        return lastComparison;
11370
      }
11371
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11372
      if (lastComparison != 0) {
11373
        return lastComparison;
11374
      }
11375
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11376
      if (lastComparison != 0) {
11377
        return lastComparison;
11378
      }
11379
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11380
      if (lastComparison != 0) {
11381
        return lastComparison;
11382
      }
11383
      return 0;
11384
    }
11385
 
11386
    public void read(TProtocol iprot) throws TException {
11387
      TField field;
11388
      iprot.readStructBegin();
11389
      while (true)
11390
      {
11391
        field = iprot.readFieldBegin();
11392
        if (field.type == TType.STOP) { 
11393
          break;
11394
        }
11395
        _Fields fieldId = _Fields.findByThriftId(field.id);
11396
        if (fieldId == null) {
11397
          TProtocolUtil.skip(iprot, field.type);
11398
        } else {
11399
          switch (fieldId) {
11400
            case SUCCESS:
11401
              if (field.type == TType.LIST) {
11402
                {
11403
                  TList _list24 = iprot.readListBegin();
11404
                  this.success = new ArrayList<Long>(_list24.size);
11405
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
11406
                  {
11407
                    long _elem26;
11408
                    _elem26 = iprot.readI64();
11409
                    this.success.add(_elem26);
11410
                  }
11411
                  iprot.readListEnd();
11412
                }
11413
              } else { 
11414
                TProtocolUtil.skip(iprot, field.type);
11415
              }
11416
              break;
11417
            case EX:
11418
              if (field.type == TType.STRUCT) {
11419
                this.ex = new TransactionServiceException();
11420
                this.ex.read(iprot);
11421
              } else { 
11422
                TProtocolUtil.skip(iprot, field.type);
11423
              }
11424
              break;
11425
          }
11426
          iprot.readFieldEnd();
11427
        }
11428
      }
11429
      iprot.readStructEnd();
11430
      validate();
11431
    }
11432
 
11433
    public void write(TProtocol oprot) throws TException {
11434
      oprot.writeStructBegin(STRUCT_DESC);
11435
 
11436
      if (this.isSetSuccess()) {
11437
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11438
        {
11439
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11440
          for (long _iter27 : this.success)
11441
          {
11442
            oprot.writeI64(_iter27);
11443
          }
11444
          oprot.writeListEnd();
11445
        }
11446
        oprot.writeFieldEnd();
11447
      } else if (this.isSetEx()) {
11448
        oprot.writeFieldBegin(EX_FIELD_DESC);
11449
        this.ex.write(oprot);
11450
        oprot.writeFieldEnd();
11451
      }
11452
      oprot.writeFieldStop();
11453
      oprot.writeStructEnd();
11454
    }
11455
 
11456
    @Override
11457
    public String toString() {
11458
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
11459
      boolean first = true;
11460
 
11461
      sb.append("success:");
11462
      if (this.success == null) {
11463
        sb.append("null");
11464
      } else {
11465
        sb.append(this.success);
11466
      }
11467
      first = false;
11468
      if (!first) sb.append(", ");
11469
      sb.append("ex:");
11470
      if (this.ex == null) {
11471
        sb.append("null");
11472
      } else {
11473
        sb.append(this.ex);
11474
      }
11475
      first = false;
11476
      sb.append(")");
11477
      return sb.toString();
11478
    }
11479
 
11480
    public void validate() throws TException {
11481
      // check for required fields
11482
    }
11483
 
11484
  }
11485
 
11486
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
11487
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
11488
 
11489
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
11490
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
11491
 
11492
    private long customer_id;
11493
    private long limit;
11494
 
11495
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11496
    public enum _Fields implements TFieldIdEnum {
11497
      CUSTOMER_ID((short)1, "customer_id"),
11498
      LIMIT((short)2, "limit");
11499
 
11500
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11501
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11502
 
11503
      static {
11504
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11505
          byId.put((int)field._thriftId, field);
11506
          byName.put(field.getFieldName(), field);
11507
        }
11508
      }
11509
 
11510
      /**
11511
       * Find the _Fields constant that matches fieldId, or null if its not found.
11512
       */
11513
      public static _Fields findByThriftId(int fieldId) {
11514
        return byId.get(fieldId);
11515
      }
11516
 
11517
      /**
11518
       * Find the _Fields constant that matches fieldId, throwing an exception
11519
       * if it is not found.
11520
       */
11521
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11522
        _Fields fields = findByThriftId(fieldId);
11523
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11524
        return fields;
11525
      }
11526
 
11527
      /**
11528
       * Find the _Fields constant that matches name, or null if its not found.
11529
       */
11530
      public static _Fields findByName(String name) {
11531
        return byName.get(name);
11532
      }
11533
 
11534
      private final short _thriftId;
11535
      private final String _fieldName;
11536
 
11537
      _Fields(short thriftId, String fieldName) {
11538
        _thriftId = thriftId;
11539
        _fieldName = fieldName;
11540
      }
11541
 
11542
      public short getThriftFieldId() {
11543
        return _thriftId;
11544
      }
11545
 
11546
      public String getFieldName() {
11547
        return _fieldName;
11548
      }
11549
    }
11550
 
11551
    // isset id assignments
11552
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
11553
    private static final int __LIMIT_ISSET_ID = 1;
11554
    private BitSet __isset_bit_vector = new BitSet(2);
11555
 
11556
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11557
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
11558
          new FieldValueMetaData(TType.I64)));
11559
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
11560
          new FieldValueMetaData(TType.I64)));
11561
    }});
11562
 
11563
    static {
11564
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
11565
    }
11566
 
11567
    public getCancellableOrdersForCustomer_args() {
11568
    }
11569
 
11570
    public getCancellableOrdersForCustomer_args(
11571
      long customer_id,
11572
      long limit)
11573
    {
11574
      this();
11575
      this.customer_id = customer_id;
11576
      setCustomer_idIsSet(true);
11577
      this.limit = limit;
11578
      setLimitIsSet(true);
11579
    }
11580
 
11581
    /**
11582
     * Performs a deep copy on <i>other</i>.
11583
     */
11584
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
11585
      __isset_bit_vector.clear();
11586
      __isset_bit_vector.or(other.__isset_bit_vector);
11587
      this.customer_id = other.customer_id;
11588
      this.limit = other.limit;
11589
    }
11590
 
11591
    public getCancellableOrdersForCustomer_args deepCopy() {
11592
      return new getCancellableOrdersForCustomer_args(this);
11593
    }
11594
 
11595
    @Deprecated
11596
    public getCancellableOrdersForCustomer_args clone() {
11597
      return new getCancellableOrdersForCustomer_args(this);
11598
    }
11599
 
11600
    public long getCustomer_id() {
11601
      return this.customer_id;
11602
    }
11603
 
11604
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
11605
      this.customer_id = customer_id;
11606
      setCustomer_idIsSet(true);
11607
      return this;
11608
    }
11609
 
11610
    public void unsetCustomer_id() {
11611
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
11612
    }
11613
 
11614
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
11615
    public boolean isSetCustomer_id() {
11616
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
11617
    }
11618
 
11619
    public void setCustomer_idIsSet(boolean value) {
11620
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
11621
    }
11622
 
11623
    public long getLimit() {
11624
      return this.limit;
11625
    }
11626
 
11627
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
11628
      this.limit = limit;
11629
      setLimitIsSet(true);
11630
      return this;
11631
    }
11632
 
11633
    public void unsetLimit() {
11634
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
11635
    }
11636
 
11637
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
11638
    public boolean isSetLimit() {
11639
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
11640
    }
11641
 
11642
    public void setLimitIsSet(boolean value) {
11643
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
11644
    }
11645
 
11646
    public void setFieldValue(_Fields field, Object value) {
11647
      switch (field) {
11648
      case CUSTOMER_ID:
11649
        if (value == null) {
11650
          unsetCustomer_id();
11651
        } else {
11652
          setCustomer_id((Long)value);
11653
        }
11654
        break;
11655
 
11656
      case LIMIT:
11657
        if (value == null) {
11658
          unsetLimit();
11659
        } else {
11660
          setLimit((Long)value);
11661
        }
11662
        break;
11663
 
11664
      }
11665
    }
11666
 
11667
    public void setFieldValue(int fieldID, Object value) {
11668
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11669
    }
11670
 
11671
    public Object getFieldValue(_Fields field) {
11672
      switch (field) {
11673
      case CUSTOMER_ID:
11674
        return new Long(getCustomer_id());
11675
 
11676
      case LIMIT:
11677
        return new Long(getLimit());
11678
 
11679
      }
11680
      throw new IllegalStateException();
11681
    }
11682
 
11683
    public Object getFieldValue(int fieldId) {
11684
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11685
    }
11686
 
11687
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11688
    public boolean isSet(_Fields field) {
11689
      switch (field) {
11690
      case CUSTOMER_ID:
11691
        return isSetCustomer_id();
11692
      case LIMIT:
11693
        return isSetLimit();
11694
      }
11695
      throw new IllegalStateException();
11696
    }
11697
 
11698
    public boolean isSet(int fieldID) {
11699
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11700
    }
11701
 
11702
    @Override
11703
    public boolean equals(Object that) {
11704
      if (that == null)
11705
        return false;
11706
      if (that instanceof getCancellableOrdersForCustomer_args)
11707
        return this.equals((getCancellableOrdersForCustomer_args)that);
11708
      return false;
11709
    }
11710
 
11711
    public boolean equals(getCancellableOrdersForCustomer_args that) {
11712
      if (that == null)
11713
        return false;
11714
 
11715
      boolean this_present_customer_id = true;
11716
      boolean that_present_customer_id = true;
11717
      if (this_present_customer_id || that_present_customer_id) {
11718
        if (!(this_present_customer_id && that_present_customer_id))
11719
          return false;
11720
        if (this.customer_id != that.customer_id)
11721
          return false;
11722
      }
11723
 
11724
      boolean this_present_limit = true;
11725
      boolean that_present_limit = true;
11726
      if (this_present_limit || that_present_limit) {
11727
        if (!(this_present_limit && that_present_limit))
11728
          return false;
11729
        if (this.limit != that.limit)
11730
          return false;
11731
      }
11732
 
11733
      return true;
11734
    }
11735
 
11736
    @Override
11737
    public int hashCode() {
11738
      return 0;
11739
    }
11740
 
11741
    public int compareTo(getCancellableOrdersForCustomer_args other) {
11742
      if (!getClass().equals(other.getClass())) {
11743
        return getClass().getName().compareTo(other.getClass().getName());
11744
      }
11745
 
11746
      int lastComparison = 0;
11747
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
11748
 
11749
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
11750
      if (lastComparison != 0) {
11751
        return lastComparison;
11752
      }
11753
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
11754
      if (lastComparison != 0) {
11755
        return lastComparison;
11756
      }
11757
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
11758
      if (lastComparison != 0) {
11759
        return lastComparison;
11760
      }
11761
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
11762
      if (lastComparison != 0) {
11763
        return lastComparison;
11764
      }
11765
      return 0;
11766
    }
11767
 
11768
    public void read(TProtocol iprot) throws TException {
11769
      TField field;
11770
      iprot.readStructBegin();
11771
      while (true)
11772
      {
11773
        field = iprot.readFieldBegin();
11774
        if (field.type == TType.STOP) { 
11775
          break;
11776
        }
11777
        _Fields fieldId = _Fields.findByThriftId(field.id);
11778
        if (fieldId == null) {
11779
          TProtocolUtil.skip(iprot, field.type);
11780
        } else {
11781
          switch (fieldId) {
11782
            case CUSTOMER_ID:
11783
              if (field.type == TType.I64) {
11784
                this.customer_id = iprot.readI64();
11785
                setCustomer_idIsSet(true);
11786
              } else { 
11787
                TProtocolUtil.skip(iprot, field.type);
11788
              }
11789
              break;
11790
            case LIMIT:
11791
              if (field.type == TType.I64) {
11792
                this.limit = iprot.readI64();
11793
                setLimitIsSet(true);
11794
              } else { 
11795
                TProtocolUtil.skip(iprot, field.type);
11796
              }
11797
              break;
11798
          }
11799
          iprot.readFieldEnd();
11800
        }
11801
      }
11802
      iprot.readStructEnd();
11803
      validate();
11804
    }
11805
 
11806
    public void write(TProtocol oprot) throws TException {
11807
      validate();
11808
 
11809
      oprot.writeStructBegin(STRUCT_DESC);
11810
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
11811
      oprot.writeI64(this.customer_id);
11812
      oprot.writeFieldEnd();
11813
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
11814
      oprot.writeI64(this.limit);
11815
      oprot.writeFieldEnd();
11816
      oprot.writeFieldStop();
11817
      oprot.writeStructEnd();
11818
    }
11819
 
11820
    @Override
11821
    public String toString() {
11822
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
11823
      boolean first = true;
11824
 
11825
      sb.append("customer_id:");
11826
      sb.append(this.customer_id);
11827
      first = false;
11828
      if (!first) sb.append(", ");
11829
      sb.append("limit:");
11830
      sb.append(this.limit);
11831
      first = false;
11832
      sb.append(")");
11833
      return sb.toString();
11834
    }
11835
 
11836
    public void validate() throws TException {
11837
      // check for required fields
11838
    }
11839
 
11840
  }
11841
 
11842
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
11843
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
11844
 
11845
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11846
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11847
 
11848
    private List<Long> success;
11849
    private TransactionServiceException ex;
11850
 
11851
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11852
    public enum _Fields implements TFieldIdEnum {
11853
      SUCCESS((short)0, "success"),
11854
      EX((short)1, "ex");
11855
 
11856
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11857
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11858
 
11859
      static {
11860
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11861
          byId.put((int)field._thriftId, field);
11862
          byName.put(field.getFieldName(), field);
11863
        }
11864
      }
11865
 
11866
      /**
11867
       * Find the _Fields constant that matches fieldId, or null if its not found.
11868
       */
11869
      public static _Fields findByThriftId(int fieldId) {
11870
        return byId.get(fieldId);
11871
      }
11872
 
11873
      /**
11874
       * Find the _Fields constant that matches fieldId, throwing an exception
11875
       * if it is not found.
11876
       */
11877
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11878
        _Fields fields = findByThriftId(fieldId);
11879
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11880
        return fields;
11881
      }
11882
 
11883
      /**
11884
       * Find the _Fields constant that matches name, or null if its not found.
11885
       */
11886
      public static _Fields findByName(String name) {
11887
        return byName.get(name);
11888
      }
11889
 
11890
      private final short _thriftId;
11891
      private final String _fieldName;
11892
 
11893
      _Fields(short thriftId, String fieldName) {
11894
        _thriftId = thriftId;
11895
        _fieldName = fieldName;
11896
      }
11897
 
11898
      public short getThriftFieldId() {
11899
        return _thriftId;
11900
      }
11901
 
11902
      public String getFieldName() {
11903
        return _fieldName;
11904
      }
11905
    }
11906
 
11907
    // isset id assignments
11908
 
11909
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11910
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11911
          new ListMetaData(TType.LIST, 
11912
              new FieldValueMetaData(TType.I64))));
11913
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11914
          new FieldValueMetaData(TType.STRUCT)));
11915
    }});
11916
 
11917
    static {
11918
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
11919
    }
11920
 
11921
    public getCancellableOrdersForCustomer_result() {
11922
    }
11923
 
11924
    public getCancellableOrdersForCustomer_result(
11925
      List<Long> success,
11926
      TransactionServiceException ex)
11927
    {
11928
      this();
11929
      this.success = success;
11930
      this.ex = ex;
11931
    }
11932
 
11933
    /**
11934
     * Performs a deep copy on <i>other</i>.
11935
     */
11936
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
11937
      if (other.isSetSuccess()) {
11938
        List<Long> __this__success = new ArrayList<Long>();
11939
        for (Long other_element : other.success) {
11940
          __this__success.add(other_element);
11941
        }
11942
        this.success = __this__success;
11943
      }
11944
      if (other.isSetEx()) {
11945
        this.ex = new TransactionServiceException(other.ex);
11946
      }
11947
    }
11948
 
11949
    public getCancellableOrdersForCustomer_result deepCopy() {
11950
      return new getCancellableOrdersForCustomer_result(this);
11951
    }
11952
 
11953
    @Deprecated
11954
    public getCancellableOrdersForCustomer_result clone() {
11955
      return new getCancellableOrdersForCustomer_result(this);
11956
    }
11957
 
11958
    public int getSuccessSize() {
11959
      return (this.success == null) ? 0 : this.success.size();
11960
    }
11961
 
11962
    public java.util.Iterator<Long> getSuccessIterator() {
11963
      return (this.success == null) ? null : this.success.iterator();
11964
    }
11965
 
11966
    public void addToSuccess(long elem) {
11967
      if (this.success == null) {
11968
        this.success = new ArrayList<Long>();
11969
      }
11970
      this.success.add(elem);
11971
    }
11972
 
11973
    public List<Long> getSuccess() {
11974
      return this.success;
11975
    }
11976
 
11977
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
11978
      this.success = success;
11979
      return this;
11980
    }
11981
 
11982
    public void unsetSuccess() {
11983
      this.success = null;
11984
    }
11985
 
11986
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11987
    public boolean isSetSuccess() {
11988
      return this.success != null;
11989
    }
11990
 
11991
    public void setSuccessIsSet(boolean value) {
11992
      if (!value) {
11993
        this.success = null;
11994
      }
11995
    }
11996
 
11997
    public TransactionServiceException getEx() {
11998
      return this.ex;
11999
    }
12000
 
12001
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
12002
      this.ex = ex;
12003
      return this;
12004
    }
12005
 
12006
    public void unsetEx() {
12007
      this.ex = null;
12008
    }
12009
 
12010
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12011
    public boolean isSetEx() {
12012
      return this.ex != null;
12013
    }
12014
 
12015
    public void setExIsSet(boolean value) {
12016
      if (!value) {
12017
        this.ex = null;
12018
      }
12019
    }
12020
 
12021
    public void setFieldValue(_Fields field, Object value) {
12022
      switch (field) {
12023
      case SUCCESS:
12024
        if (value == null) {
12025
          unsetSuccess();
12026
        } else {
12027
          setSuccess((List<Long>)value);
12028
        }
12029
        break;
12030
 
12031
      case EX:
12032
        if (value == null) {
12033
          unsetEx();
12034
        } else {
12035
          setEx((TransactionServiceException)value);
12036
        }
12037
        break;
12038
 
12039
      }
12040
    }
12041
 
12042
    public void setFieldValue(int fieldID, Object value) {
12043
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12044
    }
12045
 
12046
    public Object getFieldValue(_Fields field) {
12047
      switch (field) {
12048
      case SUCCESS:
12049
        return getSuccess();
12050
 
12051
      case EX:
12052
        return getEx();
12053
 
12054
      }
12055
      throw new IllegalStateException();
12056
    }
12057
 
12058
    public Object getFieldValue(int fieldId) {
12059
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12060
    }
12061
 
12062
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12063
    public boolean isSet(_Fields field) {
12064
      switch (field) {
12065
      case SUCCESS:
12066
        return isSetSuccess();
12067
      case EX:
12068
        return isSetEx();
12069
      }
12070
      throw new IllegalStateException();
12071
    }
12072
 
12073
    public boolean isSet(int fieldID) {
12074
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12075
    }
12076
 
12077
    @Override
12078
    public boolean equals(Object that) {
12079
      if (that == null)
12080
        return false;
12081
      if (that instanceof getCancellableOrdersForCustomer_result)
12082
        return this.equals((getCancellableOrdersForCustomer_result)that);
12083
      return false;
12084
    }
12085
 
12086
    public boolean equals(getCancellableOrdersForCustomer_result that) {
12087
      if (that == null)
12088
        return false;
12089
 
12090
      boolean this_present_success = true && this.isSetSuccess();
12091
      boolean that_present_success = true && that.isSetSuccess();
12092
      if (this_present_success || that_present_success) {
12093
        if (!(this_present_success && that_present_success))
12094
          return false;
12095
        if (!this.success.equals(that.success))
12096
          return false;
12097
      }
12098
 
12099
      boolean this_present_ex = true && this.isSetEx();
12100
      boolean that_present_ex = true && that.isSetEx();
12101
      if (this_present_ex || that_present_ex) {
12102
        if (!(this_present_ex && that_present_ex))
12103
          return false;
12104
        if (!this.ex.equals(that.ex))
12105
          return false;
12106
      }
12107
 
12108
      return true;
12109
    }
12110
 
12111
    @Override
12112
    public int hashCode() {
12113
      return 0;
12114
    }
12115
 
12116
    public int compareTo(getCancellableOrdersForCustomer_result other) {
12117
      if (!getClass().equals(other.getClass())) {
12118
        return getClass().getName().compareTo(other.getClass().getName());
12119
      }
12120
 
12121
      int lastComparison = 0;
12122
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
12123
 
12124
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12125
      if (lastComparison != 0) {
12126
        return lastComparison;
12127
      }
12128
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12129
      if (lastComparison != 0) {
12130
        return lastComparison;
12131
      }
12132
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12133
      if (lastComparison != 0) {
12134
        return lastComparison;
12135
      }
12136
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12137
      if (lastComparison != 0) {
12138
        return lastComparison;
12139
      }
12140
      return 0;
12141
    }
12142
 
12143
    public void read(TProtocol iprot) throws TException {
12144
      TField field;
12145
      iprot.readStructBegin();
12146
      while (true)
12147
      {
12148
        field = iprot.readFieldBegin();
12149
        if (field.type == TType.STOP) { 
12150
          break;
12151
        }
12152
        _Fields fieldId = _Fields.findByThriftId(field.id);
12153
        if (fieldId == null) {
12154
          TProtocolUtil.skip(iprot, field.type);
12155
        } else {
12156
          switch (fieldId) {
12157
            case SUCCESS:
12158
              if (field.type == TType.LIST) {
12159
                {
12160
                  TList _list28 = iprot.readListBegin();
12161
                  this.success = new ArrayList<Long>(_list28.size);
12162
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
12163
                  {
12164
                    long _elem30;
12165
                    _elem30 = iprot.readI64();
12166
                    this.success.add(_elem30);
12167
                  }
12168
                  iprot.readListEnd();
12169
                }
12170
              } else { 
12171
                TProtocolUtil.skip(iprot, field.type);
12172
              }
12173
              break;
12174
            case EX:
12175
              if (field.type == TType.STRUCT) {
12176
                this.ex = new TransactionServiceException();
12177
                this.ex.read(iprot);
12178
              } else { 
12179
                TProtocolUtil.skip(iprot, field.type);
12180
              }
12181
              break;
12182
          }
12183
          iprot.readFieldEnd();
12184
        }
12185
      }
12186
      iprot.readStructEnd();
12187
      validate();
12188
    }
12189
 
12190
    public void write(TProtocol oprot) throws TException {
12191
      oprot.writeStructBegin(STRUCT_DESC);
12192
 
12193
      if (this.isSetSuccess()) {
12194
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12195
        {
12196
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
12197
          for (long _iter31 : this.success)
12198
          {
12199
            oprot.writeI64(_iter31);
12200
          }
12201
          oprot.writeListEnd();
12202
        }
12203
        oprot.writeFieldEnd();
12204
      } else if (this.isSetEx()) {
12205
        oprot.writeFieldBegin(EX_FIELD_DESC);
12206
        this.ex.write(oprot);
12207
        oprot.writeFieldEnd();
12208
      }
12209
      oprot.writeFieldStop();
12210
      oprot.writeStructEnd();
12211
    }
12212
 
12213
    @Override
12214
    public String toString() {
12215
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
12216
      boolean first = true;
12217
 
12218
      sb.append("success:");
12219
      if (this.success == null) {
12220
        sb.append("null");
12221
      } else {
12222
        sb.append(this.success);
12223
      }
12224
      first = false;
12225
      if (!first) sb.append(", ");
12226
      sb.append("ex:");
12227
      if (this.ex == null) {
12228
        sb.append("null");
12229
      } else {
12230
        sb.append(this.ex);
12231
      }
12232
      first = false;
12233
      sb.append(")");
12234
      return sb.toString();
12235
    }
12236
 
12237
    public void validate() throws TException {
12238
      // check for required fields
12239
    }
12240
 
12241
  }
12242
 
483 rajveer 12243
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
12244
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 12245
 
483 rajveer 12246
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12247
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
12248
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 12249
 
483 rajveer 12250
    private long orderId;
12251
    private OrderStatus status;
12252
    private String description;
68 ashish 12253
 
12254
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12255
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12256
      ORDER_ID((short)1, "orderId"),
12257
      /**
12258
       * 
12259
       * @see OrderStatus
12260
       */
12261
      STATUS((short)2, "status"),
12262
      DESCRIPTION((short)3, "description");
68 ashish 12263
 
12264
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12265
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12266
 
12267
      static {
12268
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12269
          byId.put((int)field._thriftId, field);
12270
          byName.put(field.getFieldName(), field);
12271
        }
12272
      }
12273
 
12274
      /**
12275
       * Find the _Fields constant that matches fieldId, or null if its not found.
12276
       */
12277
      public static _Fields findByThriftId(int fieldId) {
12278
        return byId.get(fieldId);
12279
      }
12280
 
12281
      /**
12282
       * Find the _Fields constant that matches fieldId, throwing an exception
12283
       * if it is not found.
12284
       */
12285
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12286
        _Fields fields = findByThriftId(fieldId);
12287
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12288
        return fields;
12289
      }
12290
 
12291
      /**
12292
       * Find the _Fields constant that matches name, or null if its not found.
12293
       */
12294
      public static _Fields findByName(String name) {
12295
        return byName.get(name);
12296
      }
12297
 
12298
      private final short _thriftId;
12299
      private final String _fieldName;
12300
 
12301
      _Fields(short thriftId, String fieldName) {
12302
        _thriftId = thriftId;
12303
        _fieldName = fieldName;
12304
      }
12305
 
12306
      public short getThriftFieldId() {
12307
        return _thriftId;
12308
      }
12309
 
12310
      public String getFieldName() {
12311
        return _fieldName;
12312
      }
12313
    }
12314
 
12315
    // isset id assignments
483 rajveer 12316
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 12317
    private BitSet __isset_bit_vector = new BitSet(1);
12318
 
12319
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 12320
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 12321
          new FieldValueMetaData(TType.I64)));
483 rajveer 12322
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
12323
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
12324
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
12325
          new FieldValueMetaData(TType.STRING)));
68 ashish 12326
    }});
12327
 
12328
    static {
483 rajveer 12329
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 12330
    }
12331
 
483 rajveer 12332
    public changeOrderStatus_args() {
68 ashish 12333
    }
12334
 
483 rajveer 12335
    public changeOrderStatus_args(
12336
      long orderId,
12337
      OrderStatus status,
12338
      String description)
68 ashish 12339
    {
12340
      this();
483 rajveer 12341
      this.orderId = orderId;
12342
      setOrderIdIsSet(true);
12343
      this.status = status;
12344
      this.description = description;
68 ashish 12345
    }
12346
 
12347
    /**
12348
     * Performs a deep copy on <i>other</i>.
12349
     */
483 rajveer 12350
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 12351
      __isset_bit_vector.clear();
12352
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 12353
      this.orderId = other.orderId;
12354
      if (other.isSetStatus()) {
12355
        this.status = other.status;
12356
      }
12357
      if (other.isSetDescription()) {
12358
        this.description = other.description;
12359
      }
68 ashish 12360
    }
12361
 
483 rajveer 12362
    public changeOrderStatus_args deepCopy() {
12363
      return new changeOrderStatus_args(this);
68 ashish 12364
    }
12365
 
12366
    @Deprecated
483 rajveer 12367
    public changeOrderStatus_args clone() {
12368
      return new changeOrderStatus_args(this);
68 ashish 12369
    }
12370
 
483 rajveer 12371
    public long getOrderId() {
12372
      return this.orderId;
68 ashish 12373
    }
12374
 
483 rajveer 12375
    public changeOrderStatus_args setOrderId(long orderId) {
12376
      this.orderId = orderId;
12377
      setOrderIdIsSet(true);
68 ashish 12378
      return this;
12379
    }
12380
 
483 rajveer 12381
    public void unsetOrderId() {
12382
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 12383
    }
12384
 
483 rajveer 12385
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12386
    public boolean isSetOrderId() {
12387
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 12388
    }
12389
 
483 rajveer 12390
    public void setOrderIdIsSet(boolean value) {
12391
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 12392
    }
12393
 
483 rajveer 12394
    /**
12395
     * 
12396
     * @see OrderStatus
12397
     */
12398
    public OrderStatus getStatus() {
12399
      return this.status;
68 ashish 12400
    }
12401
 
12402
    /**
483 rajveer 12403
     * 
12404
     * @see OrderStatus
68 ashish 12405
     */
483 rajveer 12406
    public changeOrderStatus_args setStatus(OrderStatus status) {
12407
      this.status = status;
68 ashish 12408
      return this;
12409
    }
12410
 
483 rajveer 12411
    public void unsetStatus() {
12412
      this.status = null;
68 ashish 12413
    }
12414
 
483 rajveer 12415
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
12416
    public boolean isSetStatus() {
12417
      return this.status != null;
68 ashish 12418
    }
12419
 
483 rajveer 12420
    public void setStatusIsSet(boolean value) {
68 ashish 12421
      if (!value) {
483 rajveer 12422
        this.status = null;
68 ashish 12423
      }
12424
    }
12425
 
483 rajveer 12426
    public String getDescription() {
12427
      return this.description;
68 ashish 12428
    }
12429
 
483 rajveer 12430
    public changeOrderStatus_args setDescription(String description) {
12431
      this.description = description;
68 ashish 12432
      return this;
12433
    }
12434
 
483 rajveer 12435
    public void unsetDescription() {
12436
      this.description = null;
68 ashish 12437
    }
12438
 
483 rajveer 12439
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
12440
    public boolean isSetDescription() {
12441
      return this.description != null;
68 ashish 12442
    }
12443
 
483 rajveer 12444
    public void setDescriptionIsSet(boolean value) {
68 ashish 12445
      if (!value) {
483 rajveer 12446
        this.description = null;
68 ashish 12447
      }
12448
    }
12449
 
12450
    public void setFieldValue(_Fields field, Object value) {
12451
      switch (field) {
483 rajveer 12452
      case ORDER_ID:
68 ashish 12453
        if (value == null) {
483 rajveer 12454
          unsetOrderId();
68 ashish 12455
        } else {
483 rajveer 12456
          setOrderId((Long)value);
68 ashish 12457
        }
12458
        break;
12459
 
483 rajveer 12460
      case STATUS:
68 ashish 12461
        if (value == null) {
483 rajveer 12462
          unsetStatus();
68 ashish 12463
        } else {
483 rajveer 12464
          setStatus((OrderStatus)value);
68 ashish 12465
        }
12466
        break;
12467
 
483 rajveer 12468
      case DESCRIPTION:
12469
        if (value == null) {
12470
          unsetDescription();
12471
        } else {
12472
          setDescription((String)value);
12473
        }
12474
        break;
12475
 
68 ashish 12476
      }
12477
    }
12478
 
12479
    public void setFieldValue(int fieldID, Object value) {
12480
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12481
    }
12482
 
12483
    public Object getFieldValue(_Fields field) {
12484
      switch (field) {
483 rajveer 12485
      case ORDER_ID:
12486
        return new Long(getOrderId());
68 ashish 12487
 
483 rajveer 12488
      case STATUS:
12489
        return getStatus();
68 ashish 12490
 
483 rajveer 12491
      case DESCRIPTION:
12492
        return getDescription();
12493
 
68 ashish 12494
      }
12495
      throw new IllegalStateException();
12496
    }
12497
 
12498
    public Object getFieldValue(int fieldId) {
12499
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12500
    }
12501
 
12502
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12503
    public boolean isSet(_Fields field) {
12504
      switch (field) {
483 rajveer 12505
      case ORDER_ID:
12506
        return isSetOrderId();
12507
      case STATUS:
12508
        return isSetStatus();
12509
      case DESCRIPTION:
12510
        return isSetDescription();
68 ashish 12511
      }
12512
      throw new IllegalStateException();
12513
    }
12514
 
12515
    public boolean isSet(int fieldID) {
12516
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12517
    }
12518
 
12519
    @Override
12520
    public boolean equals(Object that) {
12521
      if (that == null)
12522
        return false;
483 rajveer 12523
      if (that instanceof changeOrderStatus_args)
12524
        return this.equals((changeOrderStatus_args)that);
68 ashish 12525
      return false;
12526
    }
12527
 
483 rajveer 12528
    public boolean equals(changeOrderStatus_args that) {
68 ashish 12529
      if (that == null)
12530
        return false;
12531
 
483 rajveer 12532
      boolean this_present_orderId = true;
12533
      boolean that_present_orderId = true;
12534
      if (this_present_orderId || that_present_orderId) {
12535
        if (!(this_present_orderId && that_present_orderId))
68 ashish 12536
          return false;
483 rajveer 12537
        if (this.orderId != that.orderId)
68 ashish 12538
          return false;
12539
      }
12540
 
483 rajveer 12541
      boolean this_present_status = true && this.isSetStatus();
12542
      boolean that_present_status = true && that.isSetStatus();
12543
      if (this_present_status || that_present_status) {
12544
        if (!(this_present_status && that_present_status))
68 ashish 12545
          return false;
483 rajveer 12546
        if (!this.status.equals(that.status))
68 ashish 12547
          return false;
12548
      }
12549
 
483 rajveer 12550
      boolean this_present_description = true && this.isSetDescription();
12551
      boolean that_present_description = true && that.isSetDescription();
12552
      if (this_present_description || that_present_description) {
12553
        if (!(this_present_description && that_present_description))
12554
          return false;
12555
        if (!this.description.equals(that.description))
12556
          return false;
12557
      }
12558
 
68 ashish 12559
      return true;
12560
    }
12561
 
12562
    @Override
12563
    public int hashCode() {
12564
      return 0;
12565
    }
12566
 
483 rajveer 12567
    public int compareTo(changeOrderStatus_args other) {
12568
      if (!getClass().equals(other.getClass())) {
12569
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 12570
      }
12571
 
483 rajveer 12572
      int lastComparison = 0;
12573
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 12574
 
483 rajveer 12575
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12576
      if (lastComparison != 0) {
12577
        return lastComparison;
68 ashish 12578
      }
483 rajveer 12579
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12580
      if (lastComparison != 0) {
12581
        return lastComparison;
68 ashish 12582
      }
483 rajveer 12583
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
12584
      if (lastComparison != 0) {
12585
        return lastComparison;
68 ashish 12586
      }
483 rajveer 12587
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
12588
      if (lastComparison != 0) {
12589
        return lastComparison;
68 ashish 12590
      }
483 rajveer 12591
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
12592
      if (lastComparison != 0) {
12593
        return lastComparison;
68 ashish 12594
      }
483 rajveer 12595
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
12596
      if (lastComparison != 0) {
12597
        return lastComparison;
68 ashish 12598
      }
12599
      return 0;
12600
    }
12601
 
12602
    public void read(TProtocol iprot) throws TException {
12603
      TField field;
12604
      iprot.readStructBegin();
12605
      while (true)
12606
      {
12607
        field = iprot.readFieldBegin();
12608
        if (field.type == TType.STOP) { 
12609
          break;
12610
        }
12611
        _Fields fieldId = _Fields.findByThriftId(field.id);
12612
        if (fieldId == null) {
12613
          TProtocolUtil.skip(iprot, field.type);
12614
        } else {
12615
          switch (fieldId) {
483 rajveer 12616
            case ORDER_ID:
68 ashish 12617
              if (field.type == TType.I64) {
483 rajveer 12618
                this.orderId = iprot.readI64();
12619
                setOrderIdIsSet(true);
68 ashish 12620
              } else { 
12621
                TProtocolUtil.skip(iprot, field.type);
12622
              }
12623
              break;
483 rajveer 12624
            case STATUS:
12625
              if (field.type == TType.I32) {
12626
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 12627
              } else { 
12628
                TProtocolUtil.skip(iprot, field.type);
12629
              }
12630
              break;
483 rajveer 12631
            case DESCRIPTION:
12632
              if (field.type == TType.STRING) {
12633
                this.description = iprot.readString();
12634
              } else { 
12635
                TProtocolUtil.skip(iprot, field.type);
12636
              }
12637
              break;
68 ashish 12638
          }
12639
          iprot.readFieldEnd();
12640
        }
12641
      }
12642
      iprot.readStructEnd();
12643
      validate();
12644
    }
12645
 
12646
    public void write(TProtocol oprot) throws TException {
12647
      validate();
12648
 
12649
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12650
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12651
      oprot.writeI64(this.orderId);
68 ashish 12652
      oprot.writeFieldEnd();
483 rajveer 12653
      if (this.status != null) {
12654
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
12655
        oprot.writeI32(this.status.getValue());
68 ashish 12656
        oprot.writeFieldEnd();
12657
      }
483 rajveer 12658
      if (this.description != null) {
12659
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
12660
        oprot.writeString(this.description);
12661
        oprot.writeFieldEnd();
12662
      }
68 ashish 12663
      oprot.writeFieldStop();
12664
      oprot.writeStructEnd();
12665
    }
12666
 
12667
    @Override
12668
    public String toString() {
483 rajveer 12669
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 12670
      boolean first = true;
12671
 
483 rajveer 12672
      sb.append("orderId:");
12673
      sb.append(this.orderId);
68 ashish 12674
      first = false;
12675
      if (!first) sb.append(", ");
483 rajveer 12676
      sb.append("status:");
12677
      if (this.status == null) {
68 ashish 12678
        sb.append("null");
12679
      } else {
483 rajveer 12680
        String status_name = status.name();
12681
        if (status_name != null) {
12682
          sb.append(status_name);
12683
          sb.append(" (");
12684
        }
12685
        sb.append(this.status);
12686
        if (status_name != null) {
12687
          sb.append(")");
12688
        }
68 ashish 12689
      }
12690
      first = false;
483 rajveer 12691
      if (!first) sb.append(", ");
12692
      sb.append("description:");
12693
      if (this.description == null) {
12694
        sb.append("null");
12695
      } else {
12696
        sb.append(this.description);
12697
      }
12698
      first = false;
68 ashish 12699
      sb.append(")");
12700
      return sb.toString();
12701
    }
12702
 
12703
    public void validate() throws TException {
12704
      // check for required fields
12705
    }
12706
 
12707
  }
12708
 
483 rajveer 12709
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
12710
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 12711
 
12712
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12713
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12714
 
12715
    private boolean success;
12716
    private TransactionServiceException ex;
12717
 
12718
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12719
    public enum _Fields implements TFieldIdEnum {
12720
      SUCCESS((short)0, "success"),
12721
      EX((short)1, "ex");
12722
 
12723
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12724
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12725
 
12726
      static {
12727
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12728
          byId.put((int)field._thriftId, field);
12729
          byName.put(field.getFieldName(), field);
12730
        }
12731
      }
12732
 
12733
      /**
12734
       * Find the _Fields constant that matches fieldId, or null if its not found.
12735
       */
12736
      public static _Fields findByThriftId(int fieldId) {
12737
        return byId.get(fieldId);
12738
      }
12739
 
12740
      /**
12741
       * Find the _Fields constant that matches fieldId, throwing an exception
12742
       * if it is not found.
12743
       */
12744
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12745
        _Fields fields = findByThriftId(fieldId);
12746
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12747
        return fields;
12748
      }
12749
 
12750
      /**
12751
       * Find the _Fields constant that matches name, or null if its not found.
12752
       */
12753
      public static _Fields findByName(String name) {
12754
        return byName.get(name);
12755
      }
12756
 
12757
      private final short _thriftId;
12758
      private final String _fieldName;
12759
 
12760
      _Fields(short thriftId, String fieldName) {
12761
        _thriftId = thriftId;
12762
        _fieldName = fieldName;
12763
      }
12764
 
12765
      public short getThriftFieldId() {
12766
        return _thriftId;
12767
      }
12768
 
12769
      public String getFieldName() {
12770
        return _fieldName;
12771
      }
12772
    }
12773
 
12774
    // isset id assignments
12775
    private static final int __SUCCESS_ISSET_ID = 0;
12776
    private BitSet __isset_bit_vector = new BitSet(1);
12777
 
12778
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12779
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12780
          new FieldValueMetaData(TType.BOOL)));
12781
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12782
          new FieldValueMetaData(TType.STRUCT)));
12783
    }});
12784
 
12785
    static {
483 rajveer 12786
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 12787
    }
12788
 
483 rajveer 12789
    public changeOrderStatus_result() {
68 ashish 12790
    }
12791
 
483 rajveer 12792
    public changeOrderStatus_result(
68 ashish 12793
      boolean success,
12794
      TransactionServiceException ex)
12795
    {
12796
      this();
12797
      this.success = success;
12798
      setSuccessIsSet(true);
12799
      this.ex = ex;
12800
    }
12801
 
12802
    /**
12803
     * Performs a deep copy on <i>other</i>.
12804
     */
483 rajveer 12805
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 12806
      __isset_bit_vector.clear();
12807
      __isset_bit_vector.or(other.__isset_bit_vector);
12808
      this.success = other.success;
12809
      if (other.isSetEx()) {
12810
        this.ex = new TransactionServiceException(other.ex);
12811
      }
12812
    }
12813
 
483 rajveer 12814
    public changeOrderStatus_result deepCopy() {
12815
      return new changeOrderStatus_result(this);
68 ashish 12816
    }
12817
 
12818
    @Deprecated
483 rajveer 12819
    public changeOrderStatus_result clone() {
12820
      return new changeOrderStatus_result(this);
68 ashish 12821
    }
12822
 
12823
    public boolean isSuccess() {
12824
      return this.success;
12825
    }
12826
 
483 rajveer 12827
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 12828
      this.success = success;
12829
      setSuccessIsSet(true);
12830
      return this;
12831
    }
12832
 
12833
    public void unsetSuccess() {
12834
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12835
    }
12836
 
12837
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12838
    public boolean isSetSuccess() {
12839
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12840
    }
12841
 
12842
    public void setSuccessIsSet(boolean value) {
12843
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12844
    }
12845
 
12846
    public TransactionServiceException getEx() {
12847
      return this.ex;
12848
    }
12849
 
483 rajveer 12850
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 12851
      this.ex = ex;
12852
      return this;
12853
    }
12854
 
12855
    public void unsetEx() {
12856
      this.ex = null;
12857
    }
12858
 
12859
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12860
    public boolean isSetEx() {
12861
      return this.ex != null;
12862
    }
12863
 
12864
    public void setExIsSet(boolean value) {
12865
      if (!value) {
12866
        this.ex = null;
12867
      }
12868
    }
12869
 
12870
    public void setFieldValue(_Fields field, Object value) {
12871
      switch (field) {
12872
      case SUCCESS:
12873
        if (value == null) {
12874
          unsetSuccess();
12875
        } else {
12876
          setSuccess((Boolean)value);
12877
        }
12878
        break;
12879
 
12880
      case EX:
12881
        if (value == null) {
12882
          unsetEx();
12883
        } else {
12884
          setEx((TransactionServiceException)value);
12885
        }
12886
        break;
12887
 
12888
      }
12889
    }
12890
 
12891
    public void setFieldValue(int fieldID, Object value) {
12892
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12893
    }
12894
 
12895
    public Object getFieldValue(_Fields field) {
12896
      switch (field) {
12897
      case SUCCESS:
12898
        return new Boolean(isSuccess());
12899
 
12900
      case EX:
12901
        return getEx();
12902
 
12903
      }
12904
      throw new IllegalStateException();
12905
    }
12906
 
12907
    public Object getFieldValue(int fieldId) {
12908
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12909
    }
12910
 
12911
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12912
    public boolean isSet(_Fields field) {
12913
      switch (field) {
12914
      case SUCCESS:
12915
        return isSetSuccess();
12916
      case EX:
12917
        return isSetEx();
12918
      }
12919
      throw new IllegalStateException();
12920
    }
12921
 
12922
    public boolean isSet(int fieldID) {
12923
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12924
    }
12925
 
12926
    @Override
12927
    public boolean equals(Object that) {
12928
      if (that == null)
12929
        return false;
483 rajveer 12930
      if (that instanceof changeOrderStatus_result)
12931
        return this.equals((changeOrderStatus_result)that);
68 ashish 12932
      return false;
12933
    }
12934
 
483 rajveer 12935
    public boolean equals(changeOrderStatus_result that) {
68 ashish 12936
      if (that == null)
12937
        return false;
12938
 
12939
      boolean this_present_success = true;
12940
      boolean that_present_success = true;
12941
      if (this_present_success || that_present_success) {
12942
        if (!(this_present_success && that_present_success))
12943
          return false;
12944
        if (this.success != that.success)
12945
          return false;
12946
      }
12947
 
12948
      boolean this_present_ex = true && this.isSetEx();
12949
      boolean that_present_ex = true && that.isSetEx();
12950
      if (this_present_ex || that_present_ex) {
12951
        if (!(this_present_ex && that_present_ex))
12952
          return false;
12953
        if (!this.ex.equals(that.ex))
12954
          return false;
12955
      }
12956
 
12957
      return true;
12958
    }
12959
 
12960
    @Override
12961
    public int hashCode() {
12962
      return 0;
12963
    }
12964
 
483 rajveer 12965
    public int compareTo(changeOrderStatus_result other) {
68 ashish 12966
      if (!getClass().equals(other.getClass())) {
12967
        return getClass().getName().compareTo(other.getClass().getName());
12968
      }
12969
 
12970
      int lastComparison = 0;
483 rajveer 12971
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 12972
 
12973
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12974
      if (lastComparison != 0) {
12975
        return lastComparison;
12976
      }
12977
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12978
      if (lastComparison != 0) {
12979
        return lastComparison;
12980
      }
12981
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12982
      if (lastComparison != 0) {
12983
        return lastComparison;
12984
      }
12985
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12986
      if (lastComparison != 0) {
12987
        return lastComparison;
12988
      }
12989
      return 0;
12990
    }
12991
 
12992
    public void read(TProtocol iprot) throws TException {
12993
      TField field;
12994
      iprot.readStructBegin();
12995
      while (true)
12996
      {
12997
        field = iprot.readFieldBegin();
12998
        if (field.type == TType.STOP) { 
12999
          break;
13000
        }
13001
        _Fields fieldId = _Fields.findByThriftId(field.id);
13002
        if (fieldId == null) {
13003
          TProtocolUtil.skip(iprot, field.type);
13004
        } else {
13005
          switch (fieldId) {
13006
            case SUCCESS:
13007
              if (field.type == TType.BOOL) {
13008
                this.success = iprot.readBool();
13009
                setSuccessIsSet(true);
13010
              } else { 
13011
                TProtocolUtil.skip(iprot, field.type);
13012
              }
13013
              break;
13014
            case EX:
13015
              if (field.type == TType.STRUCT) {
13016
                this.ex = new TransactionServiceException();
13017
                this.ex.read(iprot);
13018
              } else { 
13019
                TProtocolUtil.skip(iprot, field.type);
13020
              }
13021
              break;
13022
          }
13023
          iprot.readFieldEnd();
13024
        }
13025
      }
13026
      iprot.readStructEnd();
13027
      validate();
13028
    }
13029
 
13030
    public void write(TProtocol oprot) throws TException {
13031
      oprot.writeStructBegin(STRUCT_DESC);
13032
 
13033
      if (this.isSetSuccess()) {
13034
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13035
        oprot.writeBool(this.success);
13036
        oprot.writeFieldEnd();
13037
      } else if (this.isSetEx()) {
13038
        oprot.writeFieldBegin(EX_FIELD_DESC);
13039
        this.ex.write(oprot);
13040
        oprot.writeFieldEnd();
13041
      }
13042
      oprot.writeFieldStop();
13043
      oprot.writeStructEnd();
13044
    }
13045
 
13046
    @Override
13047
    public String toString() {
483 rajveer 13048
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 13049
      boolean first = true;
13050
 
13051
      sb.append("success:");
13052
      sb.append(this.success);
13053
      first = false;
13054
      if (!first) sb.append(", ");
13055
      sb.append("ex:");
13056
      if (this.ex == null) {
13057
        sb.append("null");
13058
      } else {
13059
        sb.append(this.ex);
13060
      }
13061
      first = false;
13062
      sb.append(")");
13063
      return sb.toString();
13064
    }
13065
 
13066
    public void validate() throws TException {
13067
      // check for required fields
13068
    }
13069
 
13070
  }
13071
 
495 rajveer 13072
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
13073
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
13074
 
13075
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13076
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 13077
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 13078
 
13079
    private long orderId;
13080
    private String invoice_number;
13081
    private String billed_by;
13082
 
13083
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13084
    public enum _Fields implements TFieldIdEnum {
13085
      ORDER_ID((short)1, "orderId"),
13086
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 13087
      BILLED_BY((short)3, "billed_by");
495 rajveer 13088
 
13089
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13090
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13091
 
13092
      static {
13093
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13094
          byId.put((int)field._thriftId, field);
13095
          byName.put(field.getFieldName(), field);
13096
        }
13097
      }
13098
 
13099
      /**
13100
       * Find the _Fields constant that matches fieldId, or null if its not found.
13101
       */
13102
      public static _Fields findByThriftId(int fieldId) {
13103
        return byId.get(fieldId);
13104
      }
13105
 
13106
      /**
13107
       * Find the _Fields constant that matches fieldId, throwing an exception
13108
       * if it is not found.
13109
       */
13110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13111
        _Fields fields = findByThriftId(fieldId);
13112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13113
        return fields;
13114
      }
13115
 
13116
      /**
13117
       * Find the _Fields constant that matches name, or null if its not found.
13118
       */
13119
      public static _Fields findByName(String name) {
13120
        return byName.get(name);
13121
      }
13122
 
13123
      private final short _thriftId;
13124
      private final String _fieldName;
13125
 
13126
      _Fields(short thriftId, String fieldName) {
13127
        _thriftId = thriftId;
13128
        _fieldName = fieldName;
13129
      }
13130
 
13131
      public short getThriftFieldId() {
13132
        return _thriftId;
13133
      }
13134
 
13135
      public String getFieldName() {
13136
        return _fieldName;
13137
      }
13138
    }
13139
 
13140
    // isset id assignments
13141
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 13142
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 13143
 
13144
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13145
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13146
          new FieldValueMetaData(TType.I64)));
13147
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
13148
          new FieldValueMetaData(TType.STRING)));
13149
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
13150
          new FieldValueMetaData(TType.STRING)));
13151
    }});
13152
 
13153
    static {
13154
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
13155
    }
13156
 
13157
    public addBillingDetails_args() {
13158
    }
13159
 
13160
    public addBillingDetails_args(
13161
      long orderId,
13162
      String invoice_number,
13163
      String billed_by)
13164
    {
13165
      this();
13166
      this.orderId = orderId;
13167
      setOrderIdIsSet(true);
13168
      this.invoice_number = invoice_number;
13169
      this.billed_by = billed_by;
13170
    }
13171
 
13172
    /**
13173
     * Performs a deep copy on <i>other</i>.
13174
     */
13175
    public addBillingDetails_args(addBillingDetails_args other) {
13176
      __isset_bit_vector.clear();
13177
      __isset_bit_vector.or(other.__isset_bit_vector);
13178
      this.orderId = other.orderId;
13179
      if (other.isSetInvoice_number()) {
13180
        this.invoice_number = other.invoice_number;
13181
      }
13182
      if (other.isSetBilled_by()) {
13183
        this.billed_by = other.billed_by;
13184
      }
13185
    }
13186
 
13187
    public addBillingDetails_args deepCopy() {
13188
      return new addBillingDetails_args(this);
13189
    }
13190
 
13191
    @Deprecated
13192
    public addBillingDetails_args clone() {
13193
      return new addBillingDetails_args(this);
13194
    }
13195
 
13196
    public long getOrderId() {
13197
      return this.orderId;
13198
    }
13199
 
13200
    public addBillingDetails_args setOrderId(long orderId) {
13201
      this.orderId = orderId;
13202
      setOrderIdIsSet(true);
13203
      return this;
13204
    }
13205
 
13206
    public void unsetOrderId() {
13207
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13208
    }
13209
 
13210
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13211
    public boolean isSetOrderId() {
13212
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13213
    }
13214
 
13215
    public void setOrderIdIsSet(boolean value) {
13216
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13217
    }
13218
 
13219
    public String getInvoice_number() {
13220
      return this.invoice_number;
13221
    }
13222
 
13223
    public addBillingDetails_args setInvoice_number(String invoice_number) {
13224
      this.invoice_number = invoice_number;
13225
      return this;
13226
    }
13227
 
13228
    public void unsetInvoice_number() {
13229
      this.invoice_number = null;
13230
    }
13231
 
13232
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
13233
    public boolean isSetInvoice_number() {
13234
      return this.invoice_number != null;
13235
    }
13236
 
13237
    public void setInvoice_numberIsSet(boolean value) {
13238
      if (!value) {
13239
        this.invoice_number = null;
13240
      }
13241
    }
13242
 
13243
    public String getBilled_by() {
13244
      return this.billed_by;
13245
    }
13246
 
13247
    public addBillingDetails_args setBilled_by(String billed_by) {
13248
      this.billed_by = billed_by;
13249
      return this;
13250
    }
13251
 
13252
    public void unsetBilled_by() {
13253
      this.billed_by = null;
13254
    }
13255
 
13256
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
13257
    public boolean isSetBilled_by() {
13258
      return this.billed_by != null;
13259
    }
13260
 
13261
    public void setBilled_byIsSet(boolean value) {
13262
      if (!value) {
13263
        this.billed_by = null;
13264
      }
13265
    }
13266
 
13267
    public void setFieldValue(_Fields field, Object value) {
13268
      switch (field) {
13269
      case ORDER_ID:
13270
        if (value == null) {
13271
          unsetOrderId();
13272
        } else {
13273
          setOrderId((Long)value);
13274
        }
13275
        break;
13276
 
13277
      case INVOICE_NUMBER:
13278
        if (value == null) {
13279
          unsetInvoice_number();
13280
        } else {
13281
          setInvoice_number((String)value);
13282
        }
13283
        break;
13284
 
13285
      case BILLED_BY:
13286
        if (value == null) {
13287
          unsetBilled_by();
13288
        } else {
13289
          setBilled_by((String)value);
13290
        }
13291
        break;
13292
 
13293
      }
13294
    }
13295
 
13296
    public void setFieldValue(int fieldID, Object value) {
13297
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13298
    }
13299
 
13300
    public Object getFieldValue(_Fields field) {
13301
      switch (field) {
13302
      case ORDER_ID:
13303
        return new Long(getOrderId());
13304
 
13305
      case INVOICE_NUMBER:
13306
        return getInvoice_number();
13307
 
13308
      case BILLED_BY:
13309
        return getBilled_by();
13310
 
13311
      }
13312
      throw new IllegalStateException();
13313
    }
13314
 
13315
    public Object getFieldValue(int fieldId) {
13316
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13317
    }
13318
 
13319
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13320
    public boolean isSet(_Fields field) {
13321
      switch (field) {
13322
      case ORDER_ID:
13323
        return isSetOrderId();
13324
      case INVOICE_NUMBER:
13325
        return isSetInvoice_number();
13326
      case BILLED_BY:
13327
        return isSetBilled_by();
13328
      }
13329
      throw new IllegalStateException();
13330
    }
13331
 
13332
    public boolean isSet(int fieldID) {
13333
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13334
    }
13335
 
13336
    @Override
13337
    public boolean equals(Object that) {
13338
      if (that == null)
13339
        return false;
13340
      if (that instanceof addBillingDetails_args)
13341
        return this.equals((addBillingDetails_args)that);
13342
      return false;
13343
    }
13344
 
13345
    public boolean equals(addBillingDetails_args that) {
13346
      if (that == null)
13347
        return false;
13348
 
13349
      boolean this_present_orderId = true;
13350
      boolean that_present_orderId = true;
13351
      if (this_present_orderId || that_present_orderId) {
13352
        if (!(this_present_orderId && that_present_orderId))
13353
          return false;
13354
        if (this.orderId != that.orderId)
13355
          return false;
13356
      }
13357
 
13358
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
13359
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
13360
      if (this_present_invoice_number || that_present_invoice_number) {
13361
        if (!(this_present_invoice_number && that_present_invoice_number))
13362
          return false;
13363
        if (!this.invoice_number.equals(that.invoice_number))
13364
          return false;
13365
      }
13366
 
13367
      boolean this_present_billed_by = true && this.isSetBilled_by();
13368
      boolean that_present_billed_by = true && that.isSetBilled_by();
13369
      if (this_present_billed_by || that_present_billed_by) {
13370
        if (!(this_present_billed_by && that_present_billed_by))
13371
          return false;
13372
        if (!this.billed_by.equals(that.billed_by))
13373
          return false;
13374
      }
13375
 
13376
      return true;
13377
    }
13378
 
13379
    @Override
13380
    public int hashCode() {
13381
      return 0;
13382
    }
13383
 
13384
    public int compareTo(addBillingDetails_args other) {
13385
      if (!getClass().equals(other.getClass())) {
13386
        return getClass().getName().compareTo(other.getClass().getName());
13387
      }
13388
 
13389
      int lastComparison = 0;
13390
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
13391
 
13392
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13393
      if (lastComparison != 0) {
13394
        return lastComparison;
13395
      }
13396
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13397
      if (lastComparison != 0) {
13398
        return lastComparison;
13399
      }
13400
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
13401
      if (lastComparison != 0) {
13402
        return lastComparison;
13403
      }
13404
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
13405
      if (lastComparison != 0) {
13406
        return lastComparison;
13407
      }
13408
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
13409
      if (lastComparison != 0) {
13410
        return lastComparison;
13411
      }
13412
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
13413
      if (lastComparison != 0) {
13414
        return lastComparison;
13415
      }
13416
      return 0;
13417
    }
13418
 
13419
    public void read(TProtocol iprot) throws TException {
13420
      TField field;
13421
      iprot.readStructBegin();
13422
      while (true)
13423
      {
13424
        field = iprot.readFieldBegin();
13425
        if (field.type == TType.STOP) { 
13426
          break;
13427
        }
13428
        _Fields fieldId = _Fields.findByThriftId(field.id);
13429
        if (fieldId == null) {
13430
          TProtocolUtil.skip(iprot, field.type);
13431
        } else {
13432
          switch (fieldId) {
13433
            case ORDER_ID:
13434
              if (field.type == TType.I64) {
13435
                this.orderId = iprot.readI64();
13436
                setOrderIdIsSet(true);
13437
              } else { 
13438
                TProtocolUtil.skip(iprot, field.type);
13439
              }
13440
              break;
13441
            case INVOICE_NUMBER:
13442
              if (field.type == TType.STRING) {
13443
                this.invoice_number = iprot.readString();
13444
              } else { 
13445
                TProtocolUtil.skip(iprot, field.type);
13446
              }
13447
              break;
13448
            case BILLED_BY:
13449
              if (field.type == TType.STRING) {
13450
                this.billed_by = iprot.readString();
13451
              } else { 
13452
                TProtocolUtil.skip(iprot, field.type);
13453
              }
13454
              break;
13455
          }
13456
          iprot.readFieldEnd();
13457
        }
13458
      }
13459
      iprot.readStructEnd();
13460
      validate();
13461
    }
13462
 
13463
    public void write(TProtocol oprot) throws TException {
13464
      validate();
13465
 
13466
      oprot.writeStructBegin(STRUCT_DESC);
13467
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13468
      oprot.writeI64(this.orderId);
13469
      oprot.writeFieldEnd();
13470
      if (this.invoice_number != null) {
13471
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
13472
        oprot.writeString(this.invoice_number);
13473
        oprot.writeFieldEnd();
13474
      }
13475
      if (this.billed_by != null) {
13476
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
13477
        oprot.writeString(this.billed_by);
13478
        oprot.writeFieldEnd();
13479
      }
13480
      oprot.writeFieldStop();
13481
      oprot.writeStructEnd();
13482
    }
13483
 
13484
    @Override
13485
    public String toString() {
13486
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
13487
      boolean first = true;
13488
 
13489
      sb.append("orderId:");
13490
      sb.append(this.orderId);
13491
      first = false;
13492
      if (!first) sb.append(", ");
13493
      sb.append("invoice_number:");
13494
      if (this.invoice_number == null) {
13495
        sb.append("null");
13496
      } else {
13497
        sb.append(this.invoice_number);
13498
      }
13499
      first = false;
13500
      if (!first) sb.append(", ");
13501
      sb.append("billed_by:");
13502
      if (this.billed_by == null) {
13503
        sb.append("null");
13504
      } else {
13505
        sb.append(this.billed_by);
13506
      }
13507
      first = false;
13508
      sb.append(")");
13509
      return sb.toString();
13510
    }
13511
 
13512
    public void validate() throws TException {
13513
      // check for required fields
13514
    }
13515
 
13516
  }
13517
 
13518
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
13519
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
13520
 
13521
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13522
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13523
 
13524
    private boolean success;
13525
    private TransactionServiceException ex;
13526
 
13527
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13528
    public enum _Fields implements TFieldIdEnum {
13529
      SUCCESS((short)0, "success"),
13530
      EX((short)1, "ex");
13531
 
13532
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13533
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13534
 
13535
      static {
13536
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13537
          byId.put((int)field._thriftId, field);
13538
          byName.put(field.getFieldName(), field);
13539
        }
13540
      }
13541
 
13542
      /**
13543
       * Find the _Fields constant that matches fieldId, or null if its not found.
13544
       */
13545
      public static _Fields findByThriftId(int fieldId) {
13546
        return byId.get(fieldId);
13547
      }
13548
 
13549
      /**
13550
       * Find the _Fields constant that matches fieldId, throwing an exception
13551
       * if it is not found.
13552
       */
13553
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13554
        _Fields fields = findByThriftId(fieldId);
13555
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13556
        return fields;
13557
      }
13558
 
13559
      /**
13560
       * Find the _Fields constant that matches name, or null if its not found.
13561
       */
13562
      public static _Fields findByName(String name) {
13563
        return byName.get(name);
13564
      }
13565
 
13566
      private final short _thriftId;
13567
      private final String _fieldName;
13568
 
13569
      _Fields(short thriftId, String fieldName) {
13570
        _thriftId = thriftId;
13571
        _fieldName = fieldName;
13572
      }
13573
 
13574
      public short getThriftFieldId() {
13575
        return _thriftId;
13576
      }
13577
 
13578
      public String getFieldName() {
13579
        return _fieldName;
13580
      }
13581
    }
13582
 
13583
    // isset id assignments
13584
    private static final int __SUCCESS_ISSET_ID = 0;
13585
    private BitSet __isset_bit_vector = new BitSet(1);
13586
 
13587
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13588
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13589
          new FieldValueMetaData(TType.BOOL)));
13590
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13591
          new FieldValueMetaData(TType.STRUCT)));
13592
    }});
13593
 
13594
    static {
13595
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
13596
    }
13597
 
13598
    public addBillingDetails_result() {
13599
    }
13600
 
13601
    public addBillingDetails_result(
13602
      boolean success,
13603
      TransactionServiceException ex)
13604
    {
13605
      this();
13606
      this.success = success;
13607
      setSuccessIsSet(true);
13608
      this.ex = ex;
13609
    }
13610
 
13611
    /**
13612
     * Performs a deep copy on <i>other</i>.
13613
     */
13614
    public addBillingDetails_result(addBillingDetails_result other) {
13615
      __isset_bit_vector.clear();
13616
      __isset_bit_vector.or(other.__isset_bit_vector);
13617
      this.success = other.success;
13618
      if (other.isSetEx()) {
13619
        this.ex = new TransactionServiceException(other.ex);
13620
      }
13621
    }
13622
 
13623
    public addBillingDetails_result deepCopy() {
13624
      return new addBillingDetails_result(this);
13625
    }
13626
 
13627
    @Deprecated
13628
    public addBillingDetails_result clone() {
13629
      return new addBillingDetails_result(this);
13630
    }
13631
 
13632
    public boolean isSuccess() {
13633
      return this.success;
13634
    }
13635
 
13636
    public addBillingDetails_result setSuccess(boolean success) {
13637
      this.success = success;
13638
      setSuccessIsSet(true);
13639
      return this;
13640
    }
13641
 
13642
    public void unsetSuccess() {
13643
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13644
    }
13645
 
13646
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13647
    public boolean isSetSuccess() {
13648
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13649
    }
13650
 
13651
    public void setSuccessIsSet(boolean value) {
13652
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13653
    }
13654
 
13655
    public TransactionServiceException getEx() {
13656
      return this.ex;
13657
    }
13658
 
13659
    public addBillingDetails_result setEx(TransactionServiceException ex) {
13660
      this.ex = ex;
13661
      return this;
13662
    }
13663
 
13664
    public void unsetEx() {
13665
      this.ex = null;
13666
    }
13667
 
13668
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13669
    public boolean isSetEx() {
13670
      return this.ex != null;
13671
    }
13672
 
13673
    public void setExIsSet(boolean value) {
13674
      if (!value) {
13675
        this.ex = null;
13676
      }
13677
    }
13678
 
13679
    public void setFieldValue(_Fields field, Object value) {
13680
      switch (field) {
13681
      case SUCCESS:
13682
        if (value == null) {
13683
          unsetSuccess();
13684
        } else {
13685
          setSuccess((Boolean)value);
13686
        }
13687
        break;
13688
 
13689
      case EX:
13690
        if (value == null) {
13691
          unsetEx();
13692
        } else {
13693
          setEx((TransactionServiceException)value);
13694
        }
13695
        break;
13696
 
13697
      }
13698
    }
13699
 
13700
    public void setFieldValue(int fieldID, Object value) {
13701
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13702
    }
13703
 
13704
    public Object getFieldValue(_Fields field) {
13705
      switch (field) {
13706
      case SUCCESS:
13707
        return new Boolean(isSuccess());
13708
 
13709
      case EX:
13710
        return getEx();
13711
 
13712
      }
13713
      throw new IllegalStateException();
13714
    }
13715
 
13716
    public Object getFieldValue(int fieldId) {
13717
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13718
    }
13719
 
13720
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13721
    public boolean isSet(_Fields field) {
13722
      switch (field) {
13723
      case SUCCESS:
13724
        return isSetSuccess();
13725
      case EX:
13726
        return isSetEx();
13727
      }
13728
      throw new IllegalStateException();
13729
    }
13730
 
13731
    public boolean isSet(int fieldID) {
13732
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13733
    }
13734
 
13735
    @Override
13736
    public boolean equals(Object that) {
13737
      if (that == null)
13738
        return false;
13739
      if (that instanceof addBillingDetails_result)
13740
        return this.equals((addBillingDetails_result)that);
13741
      return false;
13742
    }
13743
 
13744
    public boolean equals(addBillingDetails_result that) {
13745
      if (that == null)
13746
        return false;
13747
 
13748
      boolean this_present_success = true;
13749
      boolean that_present_success = true;
13750
      if (this_present_success || that_present_success) {
13751
        if (!(this_present_success && that_present_success))
13752
          return false;
13753
        if (this.success != that.success)
13754
          return false;
13755
      }
13756
 
13757
      boolean this_present_ex = true && this.isSetEx();
13758
      boolean that_present_ex = true && that.isSetEx();
13759
      if (this_present_ex || that_present_ex) {
13760
        if (!(this_present_ex && that_present_ex))
13761
          return false;
13762
        if (!this.ex.equals(that.ex))
13763
          return false;
13764
      }
13765
 
13766
      return true;
13767
    }
13768
 
13769
    @Override
13770
    public int hashCode() {
13771
      return 0;
13772
    }
13773
 
13774
    public int compareTo(addBillingDetails_result other) {
13775
      if (!getClass().equals(other.getClass())) {
13776
        return getClass().getName().compareTo(other.getClass().getName());
13777
      }
13778
 
13779
      int lastComparison = 0;
13780
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
13781
 
13782
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13783
      if (lastComparison != 0) {
13784
        return lastComparison;
13785
      }
13786
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13787
      if (lastComparison != 0) {
13788
        return lastComparison;
13789
      }
13790
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13791
      if (lastComparison != 0) {
13792
        return lastComparison;
13793
      }
13794
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13795
      if (lastComparison != 0) {
13796
        return lastComparison;
13797
      }
13798
      return 0;
13799
    }
13800
 
13801
    public void read(TProtocol iprot) throws TException {
13802
      TField field;
13803
      iprot.readStructBegin();
13804
      while (true)
13805
      {
13806
        field = iprot.readFieldBegin();
13807
        if (field.type == TType.STOP) { 
13808
          break;
13809
        }
13810
        _Fields fieldId = _Fields.findByThriftId(field.id);
13811
        if (fieldId == null) {
13812
          TProtocolUtil.skip(iprot, field.type);
13813
        } else {
13814
          switch (fieldId) {
13815
            case SUCCESS:
13816
              if (field.type == TType.BOOL) {
13817
                this.success = iprot.readBool();
13818
                setSuccessIsSet(true);
13819
              } else { 
13820
                TProtocolUtil.skip(iprot, field.type);
13821
              }
13822
              break;
13823
            case EX:
13824
              if (field.type == TType.STRUCT) {
13825
                this.ex = new TransactionServiceException();
13826
                this.ex.read(iprot);
13827
              } else { 
13828
                TProtocolUtil.skip(iprot, field.type);
13829
              }
13830
              break;
13831
          }
13832
          iprot.readFieldEnd();
13833
        }
13834
      }
13835
      iprot.readStructEnd();
13836
      validate();
13837
    }
13838
 
13839
    public void write(TProtocol oprot) throws TException {
13840
      oprot.writeStructBegin(STRUCT_DESC);
13841
 
13842
      if (this.isSetSuccess()) {
13843
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13844
        oprot.writeBool(this.success);
13845
        oprot.writeFieldEnd();
13846
      } else if (this.isSetEx()) {
13847
        oprot.writeFieldBegin(EX_FIELD_DESC);
13848
        this.ex.write(oprot);
13849
        oprot.writeFieldEnd();
13850
      }
13851
      oprot.writeFieldStop();
13852
      oprot.writeStructEnd();
13853
    }
13854
 
13855
    @Override
13856
    public String toString() {
13857
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
13858
      boolean first = true;
13859
 
13860
      sb.append("success:");
13861
      sb.append(this.success);
13862
      first = false;
13863
      if (!first) sb.append(", ");
13864
      sb.append("ex:");
13865
      if (this.ex == null) {
13866
        sb.append("null");
13867
      } else {
13868
        sb.append(this.ex);
13869
      }
13870
      first = false;
13871
      sb.append(")");
13872
      return sb.toString();
13873
    }
13874
 
13875
    public void validate() throws TException {
13876
      // check for required fields
13877
    }
13878
 
13879
  }
13880
 
1148 chandransh 13881
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
13882
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
13883
 
13884
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13885
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
2779 chandransh 13886
    private static final TField IMEI_NUMBER_FIELD_DESC = new TField("imeiNumber", TType.I64, (short)3);
13887
    private static final TField ITEM_NUMBER_FIELD_DESC = new TField("itemNumber", TType.STRING, (short)4);
13888
    private static final TField BILLED_BY_FIELD_DESC = new TField("billedBy", TType.STRING, (short)5);
1148 chandransh 13889
 
13890
    private long orderId;
13891
    private long jacketNumber;
2779 chandransh 13892
    private long imeiNumber;
13893
    private String itemNumber;
13894
    private String billedBy;
1148 chandransh 13895
 
13896
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13897
    public enum _Fields implements TFieldIdEnum {
13898
      ORDER_ID((short)1, "orderId"),
2779 chandransh 13899
      JACKET_NUMBER((short)2, "jacketNumber"),
13900
      IMEI_NUMBER((short)3, "imeiNumber"),
13901
      ITEM_NUMBER((short)4, "itemNumber"),
13902
      BILLED_BY((short)5, "billedBy");
1148 chandransh 13903
 
13904
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13905
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13906
 
13907
      static {
13908
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13909
          byId.put((int)field._thriftId, field);
13910
          byName.put(field.getFieldName(), field);
13911
        }
13912
      }
13913
 
13914
      /**
13915
       * Find the _Fields constant that matches fieldId, or null if its not found.
13916
       */
13917
      public static _Fields findByThriftId(int fieldId) {
13918
        return byId.get(fieldId);
13919
      }
13920
 
13921
      /**
13922
       * Find the _Fields constant that matches fieldId, throwing an exception
13923
       * if it is not found.
13924
       */
13925
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13926
        _Fields fields = findByThriftId(fieldId);
13927
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13928
        return fields;
13929
      }
13930
 
13931
      /**
13932
       * Find the _Fields constant that matches name, or null if its not found.
13933
       */
13934
      public static _Fields findByName(String name) {
13935
        return byName.get(name);
13936
      }
13937
 
13938
      private final short _thriftId;
13939
      private final String _fieldName;
13940
 
13941
      _Fields(short thriftId, String fieldName) {
13942
        _thriftId = thriftId;
13943
        _fieldName = fieldName;
13944
      }
13945
 
13946
      public short getThriftFieldId() {
13947
        return _thriftId;
13948
      }
13949
 
13950
      public String getFieldName() {
13951
        return _fieldName;
13952
      }
13953
    }
13954
 
13955
    // isset id assignments
13956
    private static final int __ORDERID_ISSET_ID = 0;
13957
    private static final int __JACKETNUMBER_ISSET_ID = 1;
2779 chandransh 13958
    private static final int __IMEINUMBER_ISSET_ID = 2;
13959
    private BitSet __isset_bit_vector = new BitSet(3);
1148 chandransh 13960
 
13961
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13962
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13963
          new FieldValueMetaData(TType.I64)));
13964
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
13965
          new FieldValueMetaData(TType.I64)));
2779 chandransh 13966
      put(_Fields.IMEI_NUMBER, new FieldMetaData("imeiNumber", TFieldRequirementType.DEFAULT, 
13967
          new FieldValueMetaData(TType.I64)));
13968
      put(_Fields.ITEM_NUMBER, new FieldMetaData("itemNumber", TFieldRequirementType.DEFAULT, 
13969
          new FieldValueMetaData(TType.STRING)));
13970
      put(_Fields.BILLED_BY, new FieldMetaData("billedBy", TFieldRequirementType.DEFAULT, 
13971
          new FieldValueMetaData(TType.STRING)));
1148 chandransh 13972
    }});
13973
 
13974
    static {
13975
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
13976
    }
13977
 
13978
    public addJacketNumber_args() {
13979
    }
13980
 
13981
    public addJacketNumber_args(
13982
      long orderId,
2779 chandransh 13983
      long jacketNumber,
13984
      long imeiNumber,
13985
      String itemNumber,
13986
      String billedBy)
1148 chandransh 13987
    {
13988
      this();
13989
      this.orderId = orderId;
13990
      setOrderIdIsSet(true);
13991
      this.jacketNumber = jacketNumber;
13992
      setJacketNumberIsSet(true);
2779 chandransh 13993
      this.imeiNumber = imeiNumber;
13994
      setImeiNumberIsSet(true);
13995
      this.itemNumber = itemNumber;
13996
      this.billedBy = billedBy;
1148 chandransh 13997
    }
13998
 
13999
    /**
14000
     * Performs a deep copy on <i>other</i>.
14001
     */
14002
    public addJacketNumber_args(addJacketNumber_args other) {
14003
      __isset_bit_vector.clear();
14004
      __isset_bit_vector.or(other.__isset_bit_vector);
14005
      this.orderId = other.orderId;
14006
      this.jacketNumber = other.jacketNumber;
2779 chandransh 14007
      this.imeiNumber = other.imeiNumber;
14008
      if (other.isSetItemNumber()) {
14009
        this.itemNumber = other.itemNumber;
14010
      }
14011
      if (other.isSetBilledBy()) {
14012
        this.billedBy = other.billedBy;
14013
      }
1148 chandransh 14014
    }
14015
 
14016
    public addJacketNumber_args deepCopy() {
14017
      return new addJacketNumber_args(this);
14018
    }
14019
 
14020
    @Deprecated
14021
    public addJacketNumber_args clone() {
14022
      return new addJacketNumber_args(this);
14023
    }
14024
 
14025
    public long getOrderId() {
14026
      return this.orderId;
14027
    }
14028
 
14029
    public addJacketNumber_args setOrderId(long orderId) {
14030
      this.orderId = orderId;
14031
      setOrderIdIsSet(true);
14032
      return this;
14033
    }
14034
 
14035
    public void unsetOrderId() {
14036
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14037
    }
14038
 
14039
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14040
    public boolean isSetOrderId() {
14041
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14042
    }
14043
 
14044
    public void setOrderIdIsSet(boolean value) {
14045
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14046
    }
14047
 
14048
    public long getJacketNumber() {
14049
      return this.jacketNumber;
14050
    }
14051
 
14052
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
14053
      this.jacketNumber = jacketNumber;
14054
      setJacketNumberIsSet(true);
14055
      return this;
14056
    }
14057
 
14058
    public void unsetJacketNumber() {
14059
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
14060
    }
14061
 
14062
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
14063
    public boolean isSetJacketNumber() {
14064
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
14065
    }
14066
 
14067
    public void setJacketNumberIsSet(boolean value) {
14068
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
14069
    }
14070
 
2779 chandransh 14071
    public long getImeiNumber() {
14072
      return this.imeiNumber;
14073
    }
14074
 
14075
    public addJacketNumber_args setImeiNumber(long imeiNumber) {
14076
      this.imeiNumber = imeiNumber;
14077
      setImeiNumberIsSet(true);
14078
      return this;
14079
    }
14080
 
14081
    public void unsetImeiNumber() {
14082
      __isset_bit_vector.clear(__IMEINUMBER_ISSET_ID);
14083
    }
14084
 
14085
    /** Returns true if field imeiNumber is set (has been asigned a value) and false otherwise */
14086
    public boolean isSetImeiNumber() {
14087
      return __isset_bit_vector.get(__IMEINUMBER_ISSET_ID);
14088
    }
14089
 
14090
    public void setImeiNumberIsSet(boolean value) {
14091
      __isset_bit_vector.set(__IMEINUMBER_ISSET_ID, value);
14092
    }
14093
 
14094
    public String getItemNumber() {
14095
      return this.itemNumber;
14096
    }
14097
 
14098
    public addJacketNumber_args setItemNumber(String itemNumber) {
14099
      this.itemNumber = itemNumber;
14100
      return this;
14101
    }
14102
 
14103
    public void unsetItemNumber() {
14104
      this.itemNumber = null;
14105
    }
14106
 
14107
    /** Returns true if field itemNumber is set (has been asigned a value) and false otherwise */
14108
    public boolean isSetItemNumber() {
14109
      return this.itemNumber != null;
14110
    }
14111
 
14112
    public void setItemNumberIsSet(boolean value) {
14113
      if (!value) {
14114
        this.itemNumber = null;
14115
      }
14116
    }
14117
 
14118
    public String getBilledBy() {
14119
      return this.billedBy;
14120
    }
14121
 
14122
    public addJacketNumber_args setBilledBy(String billedBy) {
14123
      this.billedBy = billedBy;
14124
      return this;
14125
    }
14126
 
14127
    public void unsetBilledBy() {
14128
      this.billedBy = null;
14129
    }
14130
 
14131
    /** Returns true if field billedBy is set (has been asigned a value) and false otherwise */
14132
    public boolean isSetBilledBy() {
14133
      return this.billedBy != null;
14134
    }
14135
 
14136
    public void setBilledByIsSet(boolean value) {
14137
      if (!value) {
14138
        this.billedBy = null;
14139
      }
14140
    }
14141
 
1148 chandransh 14142
    public void setFieldValue(_Fields field, Object value) {
14143
      switch (field) {
14144
      case ORDER_ID:
14145
        if (value == null) {
14146
          unsetOrderId();
14147
        } else {
14148
          setOrderId((Long)value);
14149
        }
14150
        break;
14151
 
14152
      case JACKET_NUMBER:
14153
        if (value == null) {
14154
          unsetJacketNumber();
14155
        } else {
14156
          setJacketNumber((Long)value);
14157
        }
14158
        break;
14159
 
2779 chandransh 14160
      case IMEI_NUMBER:
14161
        if (value == null) {
14162
          unsetImeiNumber();
14163
        } else {
14164
          setImeiNumber((Long)value);
14165
        }
14166
        break;
14167
 
14168
      case ITEM_NUMBER:
14169
        if (value == null) {
14170
          unsetItemNumber();
14171
        } else {
14172
          setItemNumber((String)value);
14173
        }
14174
        break;
14175
 
14176
      case BILLED_BY:
14177
        if (value == null) {
14178
          unsetBilledBy();
14179
        } else {
14180
          setBilledBy((String)value);
14181
        }
14182
        break;
14183
 
1148 chandransh 14184
      }
14185
    }
14186
 
14187
    public void setFieldValue(int fieldID, Object value) {
14188
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14189
    }
14190
 
14191
    public Object getFieldValue(_Fields field) {
14192
      switch (field) {
14193
      case ORDER_ID:
14194
        return new Long(getOrderId());
14195
 
14196
      case JACKET_NUMBER:
14197
        return new Long(getJacketNumber());
14198
 
2779 chandransh 14199
      case IMEI_NUMBER:
14200
        return new Long(getImeiNumber());
14201
 
14202
      case ITEM_NUMBER:
14203
        return getItemNumber();
14204
 
14205
      case BILLED_BY:
14206
        return getBilledBy();
14207
 
1148 chandransh 14208
      }
14209
      throw new IllegalStateException();
14210
    }
14211
 
14212
    public Object getFieldValue(int fieldId) {
14213
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14214
    }
14215
 
14216
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14217
    public boolean isSet(_Fields field) {
14218
      switch (field) {
14219
      case ORDER_ID:
14220
        return isSetOrderId();
14221
      case JACKET_NUMBER:
14222
        return isSetJacketNumber();
2779 chandransh 14223
      case IMEI_NUMBER:
14224
        return isSetImeiNumber();
14225
      case ITEM_NUMBER:
14226
        return isSetItemNumber();
14227
      case BILLED_BY:
14228
        return isSetBilledBy();
1148 chandransh 14229
      }
14230
      throw new IllegalStateException();
14231
    }
14232
 
14233
    public boolean isSet(int fieldID) {
14234
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14235
    }
14236
 
14237
    @Override
14238
    public boolean equals(Object that) {
14239
      if (that == null)
14240
        return false;
14241
      if (that instanceof addJacketNumber_args)
14242
        return this.equals((addJacketNumber_args)that);
14243
      return false;
14244
    }
14245
 
14246
    public boolean equals(addJacketNumber_args that) {
14247
      if (that == null)
14248
        return false;
14249
 
14250
      boolean this_present_orderId = true;
14251
      boolean that_present_orderId = true;
14252
      if (this_present_orderId || that_present_orderId) {
14253
        if (!(this_present_orderId && that_present_orderId))
14254
          return false;
14255
        if (this.orderId != that.orderId)
14256
          return false;
14257
      }
14258
 
14259
      boolean this_present_jacketNumber = true;
14260
      boolean that_present_jacketNumber = true;
14261
      if (this_present_jacketNumber || that_present_jacketNumber) {
14262
        if (!(this_present_jacketNumber && that_present_jacketNumber))
14263
          return false;
14264
        if (this.jacketNumber != that.jacketNumber)
14265
          return false;
14266
      }
14267
 
2779 chandransh 14268
      boolean this_present_imeiNumber = true;
14269
      boolean that_present_imeiNumber = true;
14270
      if (this_present_imeiNumber || that_present_imeiNumber) {
14271
        if (!(this_present_imeiNumber && that_present_imeiNumber))
14272
          return false;
14273
        if (this.imeiNumber != that.imeiNumber)
14274
          return false;
14275
      }
14276
 
14277
      boolean this_present_itemNumber = true && this.isSetItemNumber();
14278
      boolean that_present_itemNumber = true && that.isSetItemNumber();
14279
      if (this_present_itemNumber || that_present_itemNumber) {
14280
        if (!(this_present_itemNumber && that_present_itemNumber))
14281
          return false;
14282
        if (!this.itemNumber.equals(that.itemNumber))
14283
          return false;
14284
      }
14285
 
14286
      boolean this_present_billedBy = true && this.isSetBilledBy();
14287
      boolean that_present_billedBy = true && that.isSetBilledBy();
14288
      if (this_present_billedBy || that_present_billedBy) {
14289
        if (!(this_present_billedBy && that_present_billedBy))
14290
          return false;
14291
        if (!this.billedBy.equals(that.billedBy))
14292
          return false;
14293
      }
14294
 
1148 chandransh 14295
      return true;
14296
    }
14297
 
14298
    @Override
14299
    public int hashCode() {
14300
      return 0;
14301
    }
14302
 
14303
    public int compareTo(addJacketNumber_args other) {
14304
      if (!getClass().equals(other.getClass())) {
14305
        return getClass().getName().compareTo(other.getClass().getName());
14306
      }
14307
 
14308
      int lastComparison = 0;
14309
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
14310
 
14311
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14312
      if (lastComparison != 0) {
14313
        return lastComparison;
14314
      }
14315
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14316
      if (lastComparison != 0) {
14317
        return lastComparison;
14318
      }
14319
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
14320
      if (lastComparison != 0) {
14321
        return lastComparison;
14322
      }
14323
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
14324
      if (lastComparison != 0) {
14325
        return lastComparison;
14326
      }
2779 chandransh 14327
      lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(isSetImeiNumber());
14328
      if (lastComparison != 0) {
14329
        return lastComparison;
14330
      }
14331
      lastComparison = TBaseHelper.compareTo(imeiNumber, typedOther.imeiNumber);
14332
      if (lastComparison != 0) {
14333
        return lastComparison;
14334
      }
14335
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(isSetItemNumber());
14336
      if (lastComparison != 0) {
14337
        return lastComparison;
14338
      }
14339
      lastComparison = TBaseHelper.compareTo(itemNumber, typedOther.itemNumber);
14340
      if (lastComparison != 0) {
14341
        return lastComparison;
14342
      }
14343
      lastComparison = Boolean.valueOf(isSetBilledBy()).compareTo(isSetBilledBy());
14344
      if (lastComparison != 0) {
14345
        return lastComparison;
14346
      }
14347
      lastComparison = TBaseHelper.compareTo(billedBy, typedOther.billedBy);
14348
      if (lastComparison != 0) {
14349
        return lastComparison;
14350
      }
1148 chandransh 14351
      return 0;
14352
    }
14353
 
14354
    public void read(TProtocol iprot) throws TException {
14355
      TField field;
14356
      iprot.readStructBegin();
14357
      while (true)
14358
      {
14359
        field = iprot.readFieldBegin();
14360
        if (field.type == TType.STOP) { 
14361
          break;
14362
        }
14363
        _Fields fieldId = _Fields.findByThriftId(field.id);
14364
        if (fieldId == null) {
14365
          TProtocolUtil.skip(iprot, field.type);
14366
        } else {
14367
          switch (fieldId) {
14368
            case ORDER_ID:
14369
              if (field.type == TType.I64) {
14370
                this.orderId = iprot.readI64();
14371
                setOrderIdIsSet(true);
14372
              } else { 
14373
                TProtocolUtil.skip(iprot, field.type);
14374
              }
14375
              break;
14376
            case JACKET_NUMBER:
14377
              if (field.type == TType.I64) {
14378
                this.jacketNumber = iprot.readI64();
14379
                setJacketNumberIsSet(true);
14380
              } else { 
14381
                TProtocolUtil.skip(iprot, field.type);
14382
              }
14383
              break;
2779 chandransh 14384
            case IMEI_NUMBER:
14385
              if (field.type == TType.I64) {
14386
                this.imeiNumber = iprot.readI64();
14387
                setImeiNumberIsSet(true);
14388
              } else { 
14389
                TProtocolUtil.skip(iprot, field.type);
14390
              }
14391
              break;
14392
            case ITEM_NUMBER:
14393
              if (field.type == TType.STRING) {
14394
                this.itemNumber = iprot.readString();
14395
              } else { 
14396
                TProtocolUtil.skip(iprot, field.type);
14397
              }
14398
              break;
14399
            case BILLED_BY:
14400
              if (field.type == TType.STRING) {
14401
                this.billedBy = iprot.readString();
14402
              } else { 
14403
                TProtocolUtil.skip(iprot, field.type);
14404
              }
14405
              break;
1148 chandransh 14406
          }
14407
          iprot.readFieldEnd();
14408
        }
14409
      }
14410
      iprot.readStructEnd();
14411
      validate();
14412
    }
14413
 
14414
    public void write(TProtocol oprot) throws TException {
14415
      validate();
14416
 
14417
      oprot.writeStructBegin(STRUCT_DESC);
14418
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14419
      oprot.writeI64(this.orderId);
14420
      oprot.writeFieldEnd();
14421
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
14422
      oprot.writeI64(this.jacketNumber);
14423
      oprot.writeFieldEnd();
2779 chandransh 14424
      oprot.writeFieldBegin(IMEI_NUMBER_FIELD_DESC);
14425
      oprot.writeI64(this.imeiNumber);
14426
      oprot.writeFieldEnd();
14427
      if (this.itemNumber != null) {
14428
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
14429
        oprot.writeString(this.itemNumber);
14430
        oprot.writeFieldEnd();
14431
      }
14432
      if (this.billedBy != null) {
14433
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
14434
        oprot.writeString(this.billedBy);
14435
        oprot.writeFieldEnd();
14436
      }
1148 chandransh 14437
      oprot.writeFieldStop();
14438
      oprot.writeStructEnd();
14439
    }
14440
 
14441
    @Override
14442
    public String toString() {
14443
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
14444
      boolean first = true;
14445
 
14446
      sb.append("orderId:");
14447
      sb.append(this.orderId);
14448
      first = false;
14449
      if (!first) sb.append(", ");
14450
      sb.append("jacketNumber:");
14451
      sb.append(this.jacketNumber);
14452
      first = false;
2779 chandransh 14453
      if (!first) sb.append(", ");
14454
      sb.append("imeiNumber:");
14455
      sb.append(this.imeiNumber);
14456
      first = false;
14457
      if (!first) sb.append(", ");
14458
      sb.append("itemNumber:");
14459
      if (this.itemNumber == null) {
14460
        sb.append("null");
14461
      } else {
14462
        sb.append(this.itemNumber);
14463
      }
14464
      first = false;
14465
      if (!first) sb.append(", ");
14466
      sb.append("billedBy:");
14467
      if (this.billedBy == null) {
14468
        sb.append("null");
14469
      } else {
14470
        sb.append(this.billedBy);
14471
      }
14472
      first = false;
1148 chandransh 14473
      sb.append(")");
14474
      return sb.toString();
14475
    }
14476
 
14477
    public void validate() throws TException {
14478
      // check for required fields
14479
    }
14480
 
14481
  }
14482
 
14483
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
14484
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
14485
 
14486
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14487
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14488
 
14489
    private boolean success;
14490
    private TransactionServiceException ex;
14491
 
14492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14493
    public enum _Fields implements TFieldIdEnum {
14494
      SUCCESS((short)0, "success"),
14495
      EX((short)1, "ex");
14496
 
14497
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14498
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14499
 
14500
      static {
14501
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14502
          byId.put((int)field._thriftId, field);
14503
          byName.put(field.getFieldName(), field);
14504
        }
14505
      }
14506
 
14507
      /**
14508
       * Find the _Fields constant that matches fieldId, or null if its not found.
14509
       */
14510
      public static _Fields findByThriftId(int fieldId) {
14511
        return byId.get(fieldId);
14512
      }
14513
 
14514
      /**
14515
       * Find the _Fields constant that matches fieldId, throwing an exception
14516
       * if it is not found.
14517
       */
14518
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14519
        _Fields fields = findByThriftId(fieldId);
14520
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14521
        return fields;
14522
      }
14523
 
14524
      /**
14525
       * Find the _Fields constant that matches name, or null if its not found.
14526
       */
14527
      public static _Fields findByName(String name) {
14528
        return byName.get(name);
14529
      }
14530
 
14531
      private final short _thriftId;
14532
      private final String _fieldName;
14533
 
14534
      _Fields(short thriftId, String fieldName) {
14535
        _thriftId = thriftId;
14536
        _fieldName = fieldName;
14537
      }
14538
 
14539
      public short getThriftFieldId() {
14540
        return _thriftId;
14541
      }
14542
 
14543
      public String getFieldName() {
14544
        return _fieldName;
14545
      }
14546
    }
14547
 
14548
    // isset id assignments
14549
    private static final int __SUCCESS_ISSET_ID = 0;
14550
    private BitSet __isset_bit_vector = new BitSet(1);
14551
 
14552
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14553
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14554
          new FieldValueMetaData(TType.BOOL)));
14555
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14556
          new FieldValueMetaData(TType.STRUCT)));
14557
    }});
14558
 
14559
    static {
14560
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
14561
    }
14562
 
14563
    public addJacketNumber_result() {
14564
    }
14565
 
14566
    public addJacketNumber_result(
14567
      boolean success,
14568
      TransactionServiceException ex)
14569
    {
14570
      this();
14571
      this.success = success;
14572
      setSuccessIsSet(true);
14573
      this.ex = ex;
14574
    }
14575
 
14576
    /**
14577
     * Performs a deep copy on <i>other</i>.
14578
     */
14579
    public addJacketNumber_result(addJacketNumber_result other) {
14580
      __isset_bit_vector.clear();
14581
      __isset_bit_vector.or(other.__isset_bit_vector);
14582
      this.success = other.success;
14583
      if (other.isSetEx()) {
14584
        this.ex = new TransactionServiceException(other.ex);
14585
      }
14586
    }
14587
 
14588
    public addJacketNumber_result deepCopy() {
14589
      return new addJacketNumber_result(this);
14590
    }
14591
 
14592
    @Deprecated
14593
    public addJacketNumber_result clone() {
14594
      return new addJacketNumber_result(this);
14595
    }
14596
 
14597
    public boolean isSuccess() {
14598
      return this.success;
14599
    }
14600
 
14601
    public addJacketNumber_result setSuccess(boolean success) {
14602
      this.success = success;
14603
      setSuccessIsSet(true);
14604
      return this;
14605
    }
14606
 
14607
    public void unsetSuccess() {
14608
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14609
    }
14610
 
14611
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14612
    public boolean isSetSuccess() {
14613
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14614
    }
14615
 
14616
    public void setSuccessIsSet(boolean value) {
14617
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14618
    }
14619
 
14620
    public TransactionServiceException getEx() {
14621
      return this.ex;
14622
    }
14623
 
14624
    public addJacketNumber_result setEx(TransactionServiceException ex) {
14625
      this.ex = ex;
14626
      return this;
14627
    }
14628
 
14629
    public void unsetEx() {
14630
      this.ex = null;
14631
    }
14632
 
14633
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14634
    public boolean isSetEx() {
14635
      return this.ex != null;
14636
    }
14637
 
14638
    public void setExIsSet(boolean value) {
14639
      if (!value) {
14640
        this.ex = null;
14641
      }
14642
    }
14643
 
14644
    public void setFieldValue(_Fields field, Object value) {
14645
      switch (field) {
14646
      case SUCCESS:
14647
        if (value == null) {
14648
          unsetSuccess();
14649
        } else {
14650
          setSuccess((Boolean)value);
14651
        }
14652
        break;
14653
 
14654
      case EX:
14655
        if (value == null) {
14656
          unsetEx();
14657
        } else {
14658
          setEx((TransactionServiceException)value);
14659
        }
14660
        break;
14661
 
14662
      }
14663
    }
14664
 
14665
    public void setFieldValue(int fieldID, Object value) {
14666
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14667
    }
14668
 
14669
    public Object getFieldValue(_Fields field) {
14670
      switch (field) {
14671
      case SUCCESS:
14672
        return new Boolean(isSuccess());
14673
 
14674
      case EX:
14675
        return getEx();
14676
 
14677
      }
14678
      throw new IllegalStateException();
14679
    }
14680
 
14681
    public Object getFieldValue(int fieldId) {
14682
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14683
    }
14684
 
14685
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14686
    public boolean isSet(_Fields field) {
14687
      switch (field) {
14688
      case SUCCESS:
14689
        return isSetSuccess();
14690
      case EX:
14691
        return isSetEx();
14692
      }
14693
      throw new IllegalStateException();
14694
    }
14695
 
14696
    public boolean isSet(int fieldID) {
14697
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14698
    }
14699
 
14700
    @Override
14701
    public boolean equals(Object that) {
14702
      if (that == null)
14703
        return false;
14704
      if (that instanceof addJacketNumber_result)
14705
        return this.equals((addJacketNumber_result)that);
14706
      return false;
14707
    }
14708
 
14709
    public boolean equals(addJacketNumber_result that) {
14710
      if (that == null)
14711
        return false;
14712
 
14713
      boolean this_present_success = true;
14714
      boolean that_present_success = true;
14715
      if (this_present_success || that_present_success) {
14716
        if (!(this_present_success && that_present_success))
14717
          return false;
14718
        if (this.success != that.success)
14719
          return false;
14720
      }
14721
 
14722
      boolean this_present_ex = true && this.isSetEx();
14723
      boolean that_present_ex = true && that.isSetEx();
14724
      if (this_present_ex || that_present_ex) {
14725
        if (!(this_present_ex && that_present_ex))
14726
          return false;
14727
        if (!this.ex.equals(that.ex))
14728
          return false;
14729
      }
14730
 
14731
      return true;
14732
    }
14733
 
14734
    @Override
14735
    public int hashCode() {
14736
      return 0;
14737
    }
14738
 
14739
    public int compareTo(addJacketNumber_result other) {
14740
      if (!getClass().equals(other.getClass())) {
14741
        return getClass().getName().compareTo(other.getClass().getName());
14742
      }
14743
 
14744
      int lastComparison = 0;
14745
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
14746
 
14747
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14748
      if (lastComparison != 0) {
14749
        return lastComparison;
14750
      }
14751
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14752
      if (lastComparison != 0) {
14753
        return lastComparison;
14754
      }
14755
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14756
      if (lastComparison != 0) {
14757
        return lastComparison;
14758
      }
14759
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14760
      if (lastComparison != 0) {
14761
        return lastComparison;
14762
      }
14763
      return 0;
14764
    }
14765
 
14766
    public void read(TProtocol iprot) throws TException {
14767
      TField field;
14768
      iprot.readStructBegin();
14769
      while (true)
14770
      {
14771
        field = iprot.readFieldBegin();
14772
        if (field.type == TType.STOP) { 
14773
          break;
14774
        }
14775
        _Fields fieldId = _Fields.findByThriftId(field.id);
14776
        if (fieldId == null) {
14777
          TProtocolUtil.skip(iprot, field.type);
14778
        } else {
14779
          switch (fieldId) {
14780
            case SUCCESS:
14781
              if (field.type == TType.BOOL) {
14782
                this.success = iprot.readBool();
14783
                setSuccessIsSet(true);
14784
              } else { 
14785
                TProtocolUtil.skip(iprot, field.type);
14786
              }
14787
              break;
14788
            case EX:
14789
              if (field.type == TType.STRUCT) {
14790
                this.ex = new TransactionServiceException();
14791
                this.ex.read(iprot);
14792
              } else { 
14793
                TProtocolUtil.skip(iprot, field.type);
14794
              }
14795
              break;
14796
          }
14797
          iprot.readFieldEnd();
14798
        }
14799
      }
14800
      iprot.readStructEnd();
14801
      validate();
14802
    }
14803
 
14804
    public void write(TProtocol oprot) throws TException {
14805
      oprot.writeStructBegin(STRUCT_DESC);
14806
 
14807
      if (this.isSetSuccess()) {
14808
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14809
        oprot.writeBool(this.success);
14810
        oprot.writeFieldEnd();
14811
      } else if (this.isSetEx()) {
14812
        oprot.writeFieldBegin(EX_FIELD_DESC);
14813
        this.ex.write(oprot);
14814
        oprot.writeFieldEnd();
14815
      }
14816
      oprot.writeFieldStop();
14817
      oprot.writeStructEnd();
14818
    }
14819
 
14820
    @Override
14821
    public String toString() {
14822
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
14823
      boolean first = true;
14824
 
14825
      sb.append("success:");
14826
      sb.append(this.success);
14827
      first = false;
14828
      if (!first) sb.append(", ");
14829
      sb.append("ex:");
14830
      if (this.ex == null) {
14831
        sb.append("null");
14832
      } else {
14833
        sb.append(this.ex);
14834
      }
14835
      first = false;
14836
      sb.append(")");
14837
      return sb.toString();
14838
    }
14839
 
14840
    public void validate() throws TException {
14841
      // check for required fields
14842
    }
14843
 
14844
  }
14845
 
923 rajveer 14846
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
14847
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
14848
 
14849
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14850
 
14851
    private long orderId;
14852
 
14853
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14854
    public enum _Fields implements TFieldIdEnum {
14855
      ORDER_ID((short)1, "orderId");
14856
 
14857
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14859
 
14860
      static {
14861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14862
          byId.put((int)field._thriftId, field);
14863
          byName.put(field.getFieldName(), field);
14864
        }
14865
      }
14866
 
14867
      /**
14868
       * Find the _Fields constant that matches fieldId, or null if its not found.
14869
       */
14870
      public static _Fields findByThriftId(int fieldId) {
14871
        return byId.get(fieldId);
14872
      }
14873
 
14874
      /**
14875
       * Find the _Fields constant that matches fieldId, throwing an exception
14876
       * if it is not found.
14877
       */
14878
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14879
        _Fields fields = findByThriftId(fieldId);
14880
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14881
        return fields;
14882
      }
14883
 
14884
      /**
14885
       * Find the _Fields constant that matches name, or null if its not found.
14886
       */
14887
      public static _Fields findByName(String name) {
14888
        return byName.get(name);
14889
      }
14890
 
14891
      private final short _thriftId;
14892
      private final String _fieldName;
14893
 
14894
      _Fields(short thriftId, String fieldName) {
14895
        _thriftId = thriftId;
14896
        _fieldName = fieldName;
14897
      }
14898
 
14899
      public short getThriftFieldId() {
14900
        return _thriftId;
14901
      }
14902
 
14903
      public String getFieldName() {
14904
        return _fieldName;
14905
      }
14906
    }
14907
 
14908
    // isset id assignments
14909
    private static final int __ORDERID_ISSET_ID = 0;
14910
    private BitSet __isset_bit_vector = new BitSet(1);
14911
 
14912
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14913
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14914
          new FieldValueMetaData(TType.I64)));
14915
    }});
14916
 
14917
    static {
14918
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
14919
    }
14920
 
14921
    public acceptOrder_args() {
14922
    }
14923
 
14924
    public acceptOrder_args(
14925
      long orderId)
14926
    {
14927
      this();
14928
      this.orderId = orderId;
14929
      setOrderIdIsSet(true);
14930
    }
14931
 
14932
    /**
14933
     * Performs a deep copy on <i>other</i>.
14934
     */
14935
    public acceptOrder_args(acceptOrder_args other) {
14936
      __isset_bit_vector.clear();
14937
      __isset_bit_vector.or(other.__isset_bit_vector);
14938
      this.orderId = other.orderId;
14939
    }
14940
 
14941
    public acceptOrder_args deepCopy() {
14942
      return new acceptOrder_args(this);
14943
    }
14944
 
14945
    @Deprecated
14946
    public acceptOrder_args clone() {
14947
      return new acceptOrder_args(this);
14948
    }
14949
 
14950
    public long getOrderId() {
14951
      return this.orderId;
14952
    }
14953
 
14954
    public acceptOrder_args setOrderId(long orderId) {
14955
      this.orderId = orderId;
14956
      setOrderIdIsSet(true);
14957
      return this;
14958
    }
14959
 
14960
    public void unsetOrderId() {
14961
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14962
    }
14963
 
14964
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14965
    public boolean isSetOrderId() {
14966
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14967
    }
14968
 
14969
    public void setOrderIdIsSet(boolean value) {
14970
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14971
    }
14972
 
14973
    public void setFieldValue(_Fields field, Object value) {
14974
      switch (field) {
14975
      case ORDER_ID:
14976
        if (value == null) {
14977
          unsetOrderId();
14978
        } else {
14979
          setOrderId((Long)value);
14980
        }
14981
        break;
14982
 
14983
      }
14984
    }
14985
 
14986
    public void setFieldValue(int fieldID, Object value) {
14987
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14988
    }
14989
 
14990
    public Object getFieldValue(_Fields field) {
14991
      switch (field) {
14992
      case ORDER_ID:
14993
        return new Long(getOrderId());
14994
 
14995
      }
14996
      throw new IllegalStateException();
14997
    }
14998
 
14999
    public Object getFieldValue(int fieldId) {
15000
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15001
    }
15002
 
15003
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15004
    public boolean isSet(_Fields field) {
15005
      switch (field) {
15006
      case ORDER_ID:
15007
        return isSetOrderId();
15008
      }
15009
      throw new IllegalStateException();
15010
    }
15011
 
15012
    public boolean isSet(int fieldID) {
15013
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15014
    }
15015
 
15016
    @Override
15017
    public boolean equals(Object that) {
15018
      if (that == null)
15019
        return false;
15020
      if (that instanceof acceptOrder_args)
15021
        return this.equals((acceptOrder_args)that);
15022
      return false;
15023
    }
15024
 
15025
    public boolean equals(acceptOrder_args that) {
15026
      if (that == null)
15027
        return false;
15028
 
15029
      boolean this_present_orderId = true;
15030
      boolean that_present_orderId = true;
15031
      if (this_present_orderId || that_present_orderId) {
15032
        if (!(this_present_orderId && that_present_orderId))
15033
          return false;
15034
        if (this.orderId != that.orderId)
15035
          return false;
15036
      }
15037
 
15038
      return true;
15039
    }
15040
 
15041
    @Override
15042
    public int hashCode() {
15043
      return 0;
15044
    }
15045
 
15046
    public int compareTo(acceptOrder_args other) {
15047
      if (!getClass().equals(other.getClass())) {
15048
        return getClass().getName().compareTo(other.getClass().getName());
15049
      }
15050
 
15051
      int lastComparison = 0;
15052
      acceptOrder_args typedOther = (acceptOrder_args)other;
15053
 
15054
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
15055
      if (lastComparison != 0) {
15056
        return lastComparison;
15057
      }
15058
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
15059
      if (lastComparison != 0) {
15060
        return lastComparison;
15061
      }
15062
      return 0;
15063
    }
15064
 
15065
    public void read(TProtocol iprot) throws TException {
15066
      TField field;
15067
      iprot.readStructBegin();
15068
      while (true)
15069
      {
15070
        field = iprot.readFieldBegin();
15071
        if (field.type == TType.STOP) { 
15072
          break;
15073
        }
15074
        _Fields fieldId = _Fields.findByThriftId(field.id);
15075
        if (fieldId == null) {
15076
          TProtocolUtil.skip(iprot, field.type);
15077
        } else {
15078
          switch (fieldId) {
15079
            case ORDER_ID:
15080
              if (field.type == TType.I64) {
15081
                this.orderId = iprot.readI64();
15082
                setOrderIdIsSet(true);
15083
              } else { 
15084
                TProtocolUtil.skip(iprot, field.type);
15085
              }
15086
              break;
15087
          }
15088
          iprot.readFieldEnd();
15089
        }
15090
      }
15091
      iprot.readStructEnd();
15092
      validate();
15093
    }
15094
 
15095
    public void write(TProtocol oprot) throws TException {
15096
      validate();
15097
 
15098
      oprot.writeStructBegin(STRUCT_DESC);
15099
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15100
      oprot.writeI64(this.orderId);
15101
      oprot.writeFieldEnd();
15102
      oprot.writeFieldStop();
15103
      oprot.writeStructEnd();
15104
    }
15105
 
15106
    @Override
15107
    public String toString() {
15108
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
15109
      boolean first = true;
15110
 
15111
      sb.append("orderId:");
15112
      sb.append(this.orderId);
15113
      first = false;
15114
      sb.append(")");
15115
      return sb.toString();
15116
    }
15117
 
15118
    public void validate() throws TException {
15119
      // check for required fields
15120
    }
15121
 
15122
  }
15123
 
15124
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
15125
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
15126
 
15127
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15128
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15129
 
15130
    private boolean success;
15131
    private TransactionServiceException ex;
15132
 
15133
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15134
    public enum _Fields implements TFieldIdEnum {
15135
      SUCCESS((short)0, "success"),
15136
      EX((short)1, "ex");
15137
 
15138
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15139
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15140
 
15141
      static {
15142
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15143
          byId.put((int)field._thriftId, field);
15144
          byName.put(field.getFieldName(), field);
15145
        }
15146
      }
15147
 
15148
      /**
15149
       * Find the _Fields constant that matches fieldId, or null if its not found.
15150
       */
15151
      public static _Fields findByThriftId(int fieldId) {
15152
        return byId.get(fieldId);
15153
      }
15154
 
15155
      /**
15156
       * Find the _Fields constant that matches fieldId, throwing an exception
15157
       * if it is not found.
15158
       */
15159
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15160
        _Fields fields = findByThriftId(fieldId);
15161
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15162
        return fields;
15163
      }
15164
 
15165
      /**
15166
       * Find the _Fields constant that matches name, or null if its not found.
15167
       */
15168
      public static _Fields findByName(String name) {
15169
        return byName.get(name);
15170
      }
15171
 
15172
      private final short _thriftId;
15173
      private final String _fieldName;
15174
 
15175
      _Fields(short thriftId, String fieldName) {
15176
        _thriftId = thriftId;
15177
        _fieldName = fieldName;
15178
      }
15179
 
15180
      public short getThriftFieldId() {
15181
        return _thriftId;
15182
      }
15183
 
15184
      public String getFieldName() {
15185
        return _fieldName;
15186
      }
15187
    }
15188
 
15189
    // isset id assignments
15190
    private static final int __SUCCESS_ISSET_ID = 0;
15191
    private BitSet __isset_bit_vector = new BitSet(1);
15192
 
15193
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15194
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15195
          new FieldValueMetaData(TType.BOOL)));
15196
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15197
          new FieldValueMetaData(TType.STRUCT)));
15198
    }});
15199
 
15200
    static {
15201
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
15202
    }
15203
 
15204
    public acceptOrder_result() {
15205
    }
15206
 
15207
    public acceptOrder_result(
15208
      boolean success,
15209
      TransactionServiceException ex)
15210
    {
15211
      this();
15212
      this.success = success;
15213
      setSuccessIsSet(true);
15214
      this.ex = ex;
15215
    }
15216
 
15217
    /**
15218
     * Performs a deep copy on <i>other</i>.
15219
     */
15220
    public acceptOrder_result(acceptOrder_result other) {
15221
      __isset_bit_vector.clear();
15222
      __isset_bit_vector.or(other.__isset_bit_vector);
15223
      this.success = other.success;
15224
      if (other.isSetEx()) {
15225
        this.ex = new TransactionServiceException(other.ex);
15226
      }
15227
    }
15228
 
15229
    public acceptOrder_result deepCopy() {
15230
      return new acceptOrder_result(this);
15231
    }
15232
 
15233
    @Deprecated
15234
    public acceptOrder_result clone() {
15235
      return new acceptOrder_result(this);
15236
    }
15237
 
15238
    public boolean isSuccess() {
15239
      return this.success;
15240
    }
15241
 
15242
    public acceptOrder_result setSuccess(boolean success) {
15243
      this.success = success;
15244
      setSuccessIsSet(true);
15245
      return this;
15246
    }
15247
 
15248
    public void unsetSuccess() {
15249
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15250
    }
15251
 
15252
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15253
    public boolean isSetSuccess() {
15254
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15255
    }
15256
 
15257
    public void setSuccessIsSet(boolean value) {
15258
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15259
    }
15260
 
15261
    public TransactionServiceException getEx() {
15262
      return this.ex;
15263
    }
15264
 
15265
    public acceptOrder_result setEx(TransactionServiceException ex) {
15266
      this.ex = ex;
15267
      return this;
15268
    }
15269
 
15270
    public void unsetEx() {
15271
      this.ex = null;
15272
    }
15273
 
15274
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15275
    public boolean isSetEx() {
15276
      return this.ex != null;
15277
    }
15278
 
15279
    public void setExIsSet(boolean value) {
15280
      if (!value) {
15281
        this.ex = null;
15282
      }
15283
    }
15284
 
15285
    public void setFieldValue(_Fields field, Object value) {
15286
      switch (field) {
15287
      case SUCCESS:
15288
        if (value == null) {
15289
          unsetSuccess();
15290
        } else {
15291
          setSuccess((Boolean)value);
15292
        }
15293
        break;
15294
 
15295
      case EX:
15296
        if (value == null) {
15297
          unsetEx();
15298
        } else {
15299
          setEx((TransactionServiceException)value);
15300
        }
15301
        break;
15302
 
15303
      }
15304
    }
15305
 
15306
    public void setFieldValue(int fieldID, Object value) {
15307
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15308
    }
15309
 
15310
    public Object getFieldValue(_Fields field) {
15311
      switch (field) {
15312
      case SUCCESS:
15313
        return new Boolean(isSuccess());
15314
 
15315
      case EX:
15316
        return getEx();
15317
 
15318
      }
15319
      throw new IllegalStateException();
15320
    }
15321
 
15322
    public Object getFieldValue(int fieldId) {
15323
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15324
    }
15325
 
15326
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15327
    public boolean isSet(_Fields field) {
15328
      switch (field) {
15329
      case SUCCESS:
15330
        return isSetSuccess();
15331
      case EX:
15332
        return isSetEx();
15333
      }
15334
      throw new IllegalStateException();
15335
    }
15336
 
15337
    public boolean isSet(int fieldID) {
15338
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15339
    }
15340
 
15341
    @Override
15342
    public boolean equals(Object that) {
15343
      if (that == null)
15344
        return false;
15345
      if (that instanceof acceptOrder_result)
15346
        return this.equals((acceptOrder_result)that);
15347
      return false;
15348
    }
15349
 
15350
    public boolean equals(acceptOrder_result that) {
15351
      if (that == null)
15352
        return false;
15353
 
15354
      boolean this_present_success = true;
15355
      boolean that_present_success = true;
15356
      if (this_present_success || that_present_success) {
15357
        if (!(this_present_success && that_present_success))
15358
          return false;
15359
        if (this.success != that.success)
15360
          return false;
15361
      }
15362
 
15363
      boolean this_present_ex = true && this.isSetEx();
15364
      boolean that_present_ex = true && that.isSetEx();
15365
      if (this_present_ex || that_present_ex) {
15366
        if (!(this_present_ex && that_present_ex))
15367
          return false;
15368
        if (!this.ex.equals(that.ex))
15369
          return false;
15370
      }
15371
 
15372
      return true;
15373
    }
15374
 
15375
    @Override
15376
    public int hashCode() {
15377
      return 0;
15378
    }
15379
 
15380
    public int compareTo(acceptOrder_result other) {
15381
      if (!getClass().equals(other.getClass())) {
15382
        return getClass().getName().compareTo(other.getClass().getName());
15383
      }
15384
 
15385
      int lastComparison = 0;
15386
      acceptOrder_result typedOther = (acceptOrder_result)other;
15387
 
15388
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15389
      if (lastComparison != 0) {
15390
        return lastComparison;
15391
      }
15392
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15393
      if (lastComparison != 0) {
15394
        return lastComparison;
15395
      }
15396
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15397
      if (lastComparison != 0) {
15398
        return lastComparison;
15399
      }
15400
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15401
      if (lastComparison != 0) {
15402
        return lastComparison;
15403
      }
15404
      return 0;
15405
    }
15406
 
15407
    public void read(TProtocol iprot) throws TException {
15408
      TField field;
15409
      iprot.readStructBegin();
15410
      while (true)
15411
      {
15412
        field = iprot.readFieldBegin();
15413
        if (field.type == TType.STOP) { 
15414
          break;
15415
        }
15416
        _Fields fieldId = _Fields.findByThriftId(field.id);
15417
        if (fieldId == null) {
15418
          TProtocolUtil.skip(iprot, field.type);
15419
        } else {
15420
          switch (fieldId) {
15421
            case SUCCESS:
15422
              if (field.type == TType.BOOL) {
15423
                this.success = iprot.readBool();
15424
                setSuccessIsSet(true);
15425
              } else { 
15426
                TProtocolUtil.skip(iprot, field.type);
15427
              }
15428
              break;
15429
            case EX:
15430
              if (field.type == TType.STRUCT) {
15431
                this.ex = new TransactionServiceException();
15432
                this.ex.read(iprot);
15433
              } else { 
15434
                TProtocolUtil.skip(iprot, field.type);
15435
              }
15436
              break;
15437
          }
15438
          iprot.readFieldEnd();
15439
        }
15440
      }
15441
      iprot.readStructEnd();
15442
      validate();
15443
    }
15444
 
15445
    public void write(TProtocol oprot) throws TException {
15446
      oprot.writeStructBegin(STRUCT_DESC);
15447
 
15448
      if (this.isSetSuccess()) {
15449
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15450
        oprot.writeBool(this.success);
15451
        oprot.writeFieldEnd();
15452
      } else if (this.isSetEx()) {
15453
        oprot.writeFieldBegin(EX_FIELD_DESC);
15454
        this.ex.write(oprot);
15455
        oprot.writeFieldEnd();
15456
      }
15457
      oprot.writeFieldStop();
15458
      oprot.writeStructEnd();
15459
    }
15460
 
15461
    @Override
15462
    public String toString() {
15463
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
15464
      boolean first = true;
15465
 
15466
      sb.append("success:");
15467
      sb.append(this.success);
15468
      first = false;
15469
      if (!first) sb.append(", ");
15470
      sb.append("ex:");
15471
      if (this.ex == null) {
15472
        sb.append("null");
15473
      } else {
15474
        sb.append(this.ex);
15475
      }
15476
      first = false;
15477
      sb.append(")");
15478
      return sb.toString();
15479
    }
15480
 
15481
    public void validate() throws TException {
15482
      // check for required fields
15483
    }
15484
 
15485
  }
15486
 
15487
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
15488
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
15489
 
15490
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
15491
 
15492
    private long orderId;
15493
 
15494
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15495
    public enum _Fields implements TFieldIdEnum {
15496
      ORDER_ID((short)1, "orderId");
15497
 
15498
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15499
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15500
 
15501
      static {
15502
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15503
          byId.put((int)field._thriftId, field);
15504
          byName.put(field.getFieldName(), field);
15505
        }
15506
      }
15507
 
15508
      /**
15509
       * Find the _Fields constant that matches fieldId, or null if its not found.
15510
       */
15511
      public static _Fields findByThriftId(int fieldId) {
15512
        return byId.get(fieldId);
15513
      }
15514
 
15515
      /**
15516
       * Find the _Fields constant that matches fieldId, throwing an exception
15517
       * if it is not found.
15518
       */
15519
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15520
        _Fields fields = findByThriftId(fieldId);
15521
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15522
        return fields;
15523
      }
15524
 
15525
      /**
15526
       * Find the _Fields constant that matches name, or null if its not found.
15527
       */
15528
      public static _Fields findByName(String name) {
15529
        return byName.get(name);
15530
      }
15531
 
15532
      private final short _thriftId;
15533
      private final String _fieldName;
15534
 
15535
      _Fields(short thriftId, String fieldName) {
15536
        _thriftId = thriftId;
15537
        _fieldName = fieldName;
15538
      }
15539
 
15540
      public short getThriftFieldId() {
15541
        return _thriftId;
15542
      }
15543
 
15544
      public String getFieldName() {
15545
        return _fieldName;
15546
      }
15547
    }
15548
 
15549
    // isset id assignments
15550
    private static final int __ORDERID_ISSET_ID = 0;
15551
    private BitSet __isset_bit_vector = new BitSet(1);
15552
 
15553
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15554
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
15555
          new FieldValueMetaData(TType.I64)));
15556
    }});
15557
 
15558
    static {
15559
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
15560
    }
15561
 
15562
    public billOrder_args() {
15563
    }
15564
 
15565
    public billOrder_args(
15566
      long orderId)
15567
    {
15568
      this();
15569
      this.orderId = orderId;
15570
      setOrderIdIsSet(true);
15571
    }
15572
 
15573
    /**
15574
     * Performs a deep copy on <i>other</i>.
15575
     */
15576
    public billOrder_args(billOrder_args other) {
15577
      __isset_bit_vector.clear();
15578
      __isset_bit_vector.or(other.__isset_bit_vector);
15579
      this.orderId = other.orderId;
15580
    }
15581
 
15582
    public billOrder_args deepCopy() {
15583
      return new billOrder_args(this);
15584
    }
15585
 
15586
    @Deprecated
15587
    public billOrder_args clone() {
15588
      return new billOrder_args(this);
15589
    }
15590
 
15591
    public long getOrderId() {
15592
      return this.orderId;
15593
    }
15594
 
15595
    public billOrder_args setOrderId(long orderId) {
15596
      this.orderId = orderId;
15597
      setOrderIdIsSet(true);
15598
      return this;
15599
    }
15600
 
15601
    public void unsetOrderId() {
15602
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
15603
    }
15604
 
15605
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15606
    public boolean isSetOrderId() {
15607
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
15608
    }
15609
 
15610
    public void setOrderIdIsSet(boolean value) {
15611
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
15612
    }
15613
 
15614
    public void setFieldValue(_Fields field, Object value) {
15615
      switch (field) {
15616
      case ORDER_ID:
15617
        if (value == null) {
15618
          unsetOrderId();
15619
        } else {
15620
          setOrderId((Long)value);
15621
        }
15622
        break;
15623
 
15624
      }
15625
    }
15626
 
15627
    public void setFieldValue(int fieldID, Object value) {
15628
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15629
    }
15630
 
15631
    public Object getFieldValue(_Fields field) {
15632
      switch (field) {
15633
      case ORDER_ID:
15634
        return new Long(getOrderId());
15635
 
15636
      }
15637
      throw new IllegalStateException();
15638
    }
15639
 
15640
    public Object getFieldValue(int fieldId) {
15641
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15642
    }
15643
 
15644
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15645
    public boolean isSet(_Fields field) {
15646
      switch (field) {
15647
      case ORDER_ID:
15648
        return isSetOrderId();
15649
      }
15650
      throw new IllegalStateException();
15651
    }
15652
 
15653
    public boolean isSet(int fieldID) {
15654
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15655
    }
15656
 
15657
    @Override
15658
    public boolean equals(Object that) {
15659
      if (that == null)
15660
        return false;
15661
      if (that instanceof billOrder_args)
15662
        return this.equals((billOrder_args)that);
15663
      return false;
15664
    }
15665
 
15666
    public boolean equals(billOrder_args that) {
15667
      if (that == null)
15668
        return false;
15669
 
15670
      boolean this_present_orderId = true;
15671
      boolean that_present_orderId = true;
15672
      if (this_present_orderId || that_present_orderId) {
15673
        if (!(this_present_orderId && that_present_orderId))
15674
          return false;
15675
        if (this.orderId != that.orderId)
15676
          return false;
15677
      }
15678
 
15679
      return true;
15680
    }
15681
 
15682
    @Override
15683
    public int hashCode() {
15684
      return 0;
15685
    }
15686
 
15687
    public int compareTo(billOrder_args other) {
15688
      if (!getClass().equals(other.getClass())) {
15689
        return getClass().getName().compareTo(other.getClass().getName());
15690
      }
15691
 
15692
      int lastComparison = 0;
15693
      billOrder_args typedOther = (billOrder_args)other;
15694
 
15695
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
15696
      if (lastComparison != 0) {
15697
        return lastComparison;
15698
      }
15699
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
15700
      if (lastComparison != 0) {
15701
        return lastComparison;
15702
      }
15703
      return 0;
15704
    }
15705
 
15706
    public void read(TProtocol iprot) throws TException {
15707
      TField field;
15708
      iprot.readStructBegin();
15709
      while (true)
15710
      {
15711
        field = iprot.readFieldBegin();
15712
        if (field.type == TType.STOP) { 
15713
          break;
15714
        }
15715
        _Fields fieldId = _Fields.findByThriftId(field.id);
15716
        if (fieldId == null) {
15717
          TProtocolUtil.skip(iprot, field.type);
15718
        } else {
15719
          switch (fieldId) {
15720
            case ORDER_ID:
15721
              if (field.type == TType.I64) {
15722
                this.orderId = iprot.readI64();
15723
                setOrderIdIsSet(true);
15724
              } else { 
15725
                TProtocolUtil.skip(iprot, field.type);
15726
              }
15727
              break;
15728
          }
15729
          iprot.readFieldEnd();
15730
        }
15731
      }
15732
      iprot.readStructEnd();
15733
      validate();
15734
    }
15735
 
15736
    public void write(TProtocol oprot) throws TException {
15737
      validate();
15738
 
15739
      oprot.writeStructBegin(STRUCT_DESC);
15740
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15741
      oprot.writeI64(this.orderId);
15742
      oprot.writeFieldEnd();
15743
      oprot.writeFieldStop();
15744
      oprot.writeStructEnd();
15745
    }
15746
 
15747
    @Override
15748
    public String toString() {
15749
      StringBuilder sb = new StringBuilder("billOrder_args(");
15750
      boolean first = true;
15751
 
15752
      sb.append("orderId:");
15753
      sb.append(this.orderId);
15754
      first = false;
15755
      sb.append(")");
15756
      return sb.toString();
15757
    }
15758
 
15759
    public void validate() throws TException {
15760
      // check for required fields
15761
    }
15762
 
15763
  }
15764
 
15765
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
15766
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
15767
 
15768
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15769
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15770
 
15771
    private boolean success;
15772
    private TransactionServiceException ex;
15773
 
15774
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15775
    public enum _Fields implements TFieldIdEnum {
15776
      SUCCESS((short)0, "success"),
15777
      EX((short)1, "ex");
15778
 
15779
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15780
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15781
 
15782
      static {
15783
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15784
          byId.put((int)field._thriftId, field);
15785
          byName.put(field.getFieldName(), field);
15786
        }
15787
      }
15788
 
15789
      /**
15790
       * Find the _Fields constant that matches fieldId, or null if its not found.
15791
       */
15792
      public static _Fields findByThriftId(int fieldId) {
15793
        return byId.get(fieldId);
15794
      }
15795
 
15796
      /**
15797
       * Find the _Fields constant that matches fieldId, throwing an exception
15798
       * if it is not found.
15799
       */
15800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15801
        _Fields fields = findByThriftId(fieldId);
15802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15803
        return fields;
15804
      }
15805
 
15806
      /**
15807
       * Find the _Fields constant that matches name, or null if its not found.
15808
       */
15809
      public static _Fields findByName(String name) {
15810
        return byName.get(name);
15811
      }
15812
 
15813
      private final short _thriftId;
15814
      private final String _fieldName;
15815
 
15816
      _Fields(short thriftId, String fieldName) {
15817
        _thriftId = thriftId;
15818
        _fieldName = fieldName;
15819
      }
15820
 
15821
      public short getThriftFieldId() {
15822
        return _thriftId;
15823
      }
15824
 
15825
      public String getFieldName() {
15826
        return _fieldName;
15827
      }
15828
    }
15829
 
15830
    // isset id assignments
15831
    private static final int __SUCCESS_ISSET_ID = 0;
15832
    private BitSet __isset_bit_vector = new BitSet(1);
15833
 
15834
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15835
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15836
          new FieldValueMetaData(TType.BOOL)));
15837
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15838
          new FieldValueMetaData(TType.STRUCT)));
15839
    }});
15840
 
15841
    static {
15842
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
15843
    }
15844
 
15845
    public billOrder_result() {
15846
    }
15847
 
15848
    public billOrder_result(
15849
      boolean success,
15850
      TransactionServiceException ex)
15851
    {
15852
      this();
15853
      this.success = success;
15854
      setSuccessIsSet(true);
15855
      this.ex = ex;
15856
    }
15857
 
15858
    /**
15859
     * Performs a deep copy on <i>other</i>.
15860
     */
15861
    public billOrder_result(billOrder_result other) {
15862
      __isset_bit_vector.clear();
15863
      __isset_bit_vector.or(other.__isset_bit_vector);
15864
      this.success = other.success;
15865
      if (other.isSetEx()) {
15866
        this.ex = new TransactionServiceException(other.ex);
15867
      }
15868
    }
15869
 
15870
    public billOrder_result deepCopy() {
15871
      return new billOrder_result(this);
15872
    }
15873
 
15874
    @Deprecated
15875
    public billOrder_result clone() {
15876
      return new billOrder_result(this);
15877
    }
15878
 
15879
    public boolean isSuccess() {
15880
      return this.success;
15881
    }
15882
 
15883
    public billOrder_result setSuccess(boolean success) {
15884
      this.success = success;
15885
      setSuccessIsSet(true);
15886
      return this;
15887
    }
15888
 
15889
    public void unsetSuccess() {
15890
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15891
    }
15892
 
15893
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15894
    public boolean isSetSuccess() {
15895
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15896
    }
15897
 
15898
    public void setSuccessIsSet(boolean value) {
15899
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15900
    }
15901
 
15902
    public TransactionServiceException getEx() {
15903
      return this.ex;
15904
    }
15905
 
15906
    public billOrder_result setEx(TransactionServiceException ex) {
15907
      this.ex = ex;
15908
      return this;
15909
    }
15910
 
15911
    public void unsetEx() {
15912
      this.ex = null;
15913
    }
15914
 
15915
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15916
    public boolean isSetEx() {
15917
      return this.ex != null;
15918
    }
15919
 
15920
    public void setExIsSet(boolean value) {
15921
      if (!value) {
15922
        this.ex = null;
15923
      }
15924
    }
15925
 
15926
    public void setFieldValue(_Fields field, Object value) {
15927
      switch (field) {
15928
      case SUCCESS:
15929
        if (value == null) {
15930
          unsetSuccess();
15931
        } else {
15932
          setSuccess((Boolean)value);
15933
        }
15934
        break;
15935
 
15936
      case EX:
15937
        if (value == null) {
15938
          unsetEx();
15939
        } else {
15940
          setEx((TransactionServiceException)value);
15941
        }
15942
        break;
15943
 
15944
      }
15945
    }
15946
 
15947
    public void setFieldValue(int fieldID, Object value) {
15948
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15949
    }
15950
 
15951
    public Object getFieldValue(_Fields field) {
15952
      switch (field) {
15953
      case SUCCESS:
15954
        return new Boolean(isSuccess());
15955
 
15956
      case EX:
15957
        return getEx();
15958
 
15959
      }
15960
      throw new IllegalStateException();
15961
    }
15962
 
15963
    public Object getFieldValue(int fieldId) {
15964
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15965
    }
15966
 
15967
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15968
    public boolean isSet(_Fields field) {
15969
      switch (field) {
15970
      case SUCCESS:
15971
        return isSetSuccess();
15972
      case EX:
15973
        return isSetEx();
15974
      }
15975
      throw new IllegalStateException();
15976
    }
15977
 
15978
    public boolean isSet(int fieldID) {
15979
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15980
    }
15981
 
15982
    @Override
15983
    public boolean equals(Object that) {
15984
      if (that == null)
15985
        return false;
15986
      if (that instanceof billOrder_result)
15987
        return this.equals((billOrder_result)that);
15988
      return false;
15989
    }
15990
 
15991
    public boolean equals(billOrder_result that) {
15992
      if (that == null)
15993
        return false;
15994
 
15995
      boolean this_present_success = true;
15996
      boolean that_present_success = true;
15997
      if (this_present_success || that_present_success) {
15998
        if (!(this_present_success && that_present_success))
15999
          return false;
16000
        if (this.success != that.success)
16001
          return false;
16002
      }
16003
 
16004
      boolean this_present_ex = true && this.isSetEx();
16005
      boolean that_present_ex = true && that.isSetEx();
16006
      if (this_present_ex || that_present_ex) {
16007
        if (!(this_present_ex && that_present_ex))
16008
          return false;
16009
        if (!this.ex.equals(that.ex))
16010
          return false;
16011
      }
16012
 
16013
      return true;
16014
    }
16015
 
16016
    @Override
16017
    public int hashCode() {
16018
      return 0;
16019
    }
16020
 
16021
    public int compareTo(billOrder_result other) {
16022
      if (!getClass().equals(other.getClass())) {
16023
        return getClass().getName().compareTo(other.getClass().getName());
16024
      }
16025
 
16026
      int lastComparison = 0;
16027
      billOrder_result typedOther = (billOrder_result)other;
16028
 
16029
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16030
      if (lastComparison != 0) {
16031
        return lastComparison;
16032
      }
16033
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16034
      if (lastComparison != 0) {
16035
        return lastComparison;
16036
      }
16037
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16038
      if (lastComparison != 0) {
16039
        return lastComparison;
16040
      }
16041
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16042
      if (lastComparison != 0) {
16043
        return lastComparison;
16044
      }
16045
      return 0;
16046
    }
16047
 
16048
    public void read(TProtocol iprot) throws TException {
16049
      TField field;
16050
      iprot.readStructBegin();
16051
      while (true)
16052
      {
16053
        field = iprot.readFieldBegin();
16054
        if (field.type == TType.STOP) { 
16055
          break;
16056
        }
16057
        _Fields fieldId = _Fields.findByThriftId(field.id);
16058
        if (fieldId == null) {
16059
          TProtocolUtil.skip(iprot, field.type);
16060
        } else {
16061
          switch (fieldId) {
16062
            case SUCCESS:
16063
              if (field.type == TType.BOOL) {
16064
                this.success = iprot.readBool();
16065
                setSuccessIsSet(true);
16066
              } else { 
16067
                TProtocolUtil.skip(iprot, field.type);
16068
              }
16069
              break;
16070
            case EX:
16071
              if (field.type == TType.STRUCT) {
16072
                this.ex = new TransactionServiceException();
16073
                this.ex.read(iprot);
16074
              } else { 
16075
                TProtocolUtil.skip(iprot, field.type);
16076
              }
16077
              break;
16078
          }
16079
          iprot.readFieldEnd();
16080
        }
16081
      }
16082
      iprot.readStructEnd();
16083
      validate();
16084
    }
16085
 
16086
    public void write(TProtocol oprot) throws TException {
16087
      oprot.writeStructBegin(STRUCT_DESC);
16088
 
16089
      if (this.isSetSuccess()) {
16090
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16091
        oprot.writeBool(this.success);
16092
        oprot.writeFieldEnd();
16093
      } else if (this.isSetEx()) {
16094
        oprot.writeFieldBegin(EX_FIELD_DESC);
16095
        this.ex.write(oprot);
16096
        oprot.writeFieldEnd();
16097
      }
16098
      oprot.writeFieldStop();
16099
      oprot.writeStructEnd();
16100
    }
16101
 
16102
    @Override
16103
    public String toString() {
16104
      StringBuilder sb = new StringBuilder("billOrder_result(");
16105
      boolean first = true;
16106
 
16107
      sb.append("success:");
16108
      sb.append(this.success);
16109
      first = false;
16110
      if (!first) sb.append(", ");
16111
      sb.append("ex:");
16112
      if (this.ex == null) {
16113
        sb.append("null");
16114
      } else {
16115
        sb.append(this.ex);
16116
      }
16117
      first = false;
16118
      sb.append(")");
16119
      return sb.toString();
16120
    }
16121
 
16122
    public void validate() throws TException {
16123
      // check for required fields
16124
    }
16125
 
16126
  }
16127
 
483 rajveer 16128
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
16129
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 16130
 
16131
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 16132
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 16133
 
16134
    private long transactionId;
1529 ankur.sing 16135
    private long customerId;
68 ashish 16136
 
16137
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16138
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 16139
      TRANSACTION_ID((short)1, "transactionId"),
16140
      CUSTOMER_ID((short)2, "customerId");
68 ashish 16141
 
16142
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16143
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16144
 
16145
      static {
16146
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16147
          byId.put((int)field._thriftId, field);
16148
          byName.put(field.getFieldName(), field);
16149
        }
16150
      }
16151
 
16152
      /**
16153
       * Find the _Fields constant that matches fieldId, or null if its not found.
16154
       */
16155
      public static _Fields findByThriftId(int fieldId) {
16156
        return byId.get(fieldId);
16157
      }
16158
 
16159
      /**
16160
       * Find the _Fields constant that matches fieldId, throwing an exception
16161
       * if it is not found.
16162
       */
16163
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16164
        _Fields fields = findByThriftId(fieldId);
16165
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16166
        return fields;
16167
      }
16168
 
16169
      /**
16170
       * Find the _Fields constant that matches name, or null if its not found.
16171
       */
16172
      public static _Fields findByName(String name) {
16173
        return byName.get(name);
16174
      }
16175
 
16176
      private final short _thriftId;
16177
      private final String _fieldName;
16178
 
16179
      _Fields(short thriftId, String fieldName) {
16180
        _thriftId = thriftId;
16181
        _fieldName = fieldName;
16182
      }
16183
 
16184
      public short getThriftFieldId() {
16185
        return _thriftId;
16186
      }
16187
 
16188
      public String getFieldName() {
16189
        return _fieldName;
16190
      }
16191
    }
16192
 
16193
    // isset id assignments
16194
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 16195
    private static final int __CUSTOMERID_ISSET_ID = 1;
16196
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 16197
 
16198
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16199
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
16200
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 16201
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
16202
          new FieldValueMetaData(TType.I64)));
68 ashish 16203
    }});
16204
 
16205
    static {
483 rajveer 16206
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 16207
    }
16208
 
483 rajveer 16209
    public getOrdersForTransaction_args() {
68 ashish 16210
    }
16211
 
483 rajveer 16212
    public getOrdersForTransaction_args(
1529 ankur.sing 16213
      long transactionId,
16214
      long customerId)
68 ashish 16215
    {
16216
      this();
16217
      this.transactionId = transactionId;
16218
      setTransactionIdIsSet(true);
1529 ankur.sing 16219
      this.customerId = customerId;
16220
      setCustomerIdIsSet(true);
68 ashish 16221
    }
16222
 
16223
    /**
16224
     * Performs a deep copy on <i>other</i>.
16225
     */
483 rajveer 16226
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 16227
      __isset_bit_vector.clear();
16228
      __isset_bit_vector.or(other.__isset_bit_vector);
16229
      this.transactionId = other.transactionId;
1529 ankur.sing 16230
      this.customerId = other.customerId;
68 ashish 16231
    }
16232
 
483 rajveer 16233
    public getOrdersForTransaction_args deepCopy() {
16234
      return new getOrdersForTransaction_args(this);
68 ashish 16235
    }
16236
 
16237
    @Deprecated
483 rajveer 16238
    public getOrdersForTransaction_args clone() {
16239
      return new getOrdersForTransaction_args(this);
68 ashish 16240
    }
16241
 
16242
    public long getTransactionId() {
16243
      return this.transactionId;
16244
    }
16245
 
483 rajveer 16246
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 16247
      this.transactionId = transactionId;
16248
      setTransactionIdIsSet(true);
16249
      return this;
16250
    }
16251
 
16252
    public void unsetTransactionId() {
16253
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
16254
    }
16255
 
16256
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
16257
    public boolean isSetTransactionId() {
16258
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
16259
    }
16260
 
16261
    public void setTransactionIdIsSet(boolean value) {
16262
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
16263
    }
16264
 
1529 ankur.sing 16265
    public long getCustomerId() {
16266
      return this.customerId;
16267
    }
16268
 
16269
    public getOrdersForTransaction_args setCustomerId(long customerId) {
16270
      this.customerId = customerId;
16271
      setCustomerIdIsSet(true);
16272
      return this;
16273
    }
16274
 
16275
    public void unsetCustomerId() {
16276
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
16277
    }
16278
 
16279
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
16280
    public boolean isSetCustomerId() {
16281
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
16282
    }
16283
 
16284
    public void setCustomerIdIsSet(boolean value) {
16285
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
16286
    }
16287
 
68 ashish 16288
    public void setFieldValue(_Fields field, Object value) {
16289
      switch (field) {
16290
      case TRANSACTION_ID:
16291
        if (value == null) {
16292
          unsetTransactionId();
16293
        } else {
16294
          setTransactionId((Long)value);
16295
        }
16296
        break;
16297
 
1529 ankur.sing 16298
      case CUSTOMER_ID:
16299
        if (value == null) {
16300
          unsetCustomerId();
16301
        } else {
16302
          setCustomerId((Long)value);
16303
        }
16304
        break;
16305
 
68 ashish 16306
      }
16307
    }
16308
 
16309
    public void setFieldValue(int fieldID, Object value) {
16310
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16311
    }
16312
 
16313
    public Object getFieldValue(_Fields field) {
16314
      switch (field) {
16315
      case TRANSACTION_ID:
16316
        return new Long(getTransactionId());
16317
 
1529 ankur.sing 16318
      case CUSTOMER_ID:
16319
        return new Long(getCustomerId());
16320
 
68 ashish 16321
      }
16322
      throw new IllegalStateException();
16323
    }
16324
 
16325
    public Object getFieldValue(int fieldId) {
16326
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16327
    }
16328
 
16329
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16330
    public boolean isSet(_Fields field) {
16331
      switch (field) {
16332
      case TRANSACTION_ID:
16333
        return isSetTransactionId();
1529 ankur.sing 16334
      case CUSTOMER_ID:
16335
        return isSetCustomerId();
68 ashish 16336
      }
16337
      throw new IllegalStateException();
16338
    }
16339
 
16340
    public boolean isSet(int fieldID) {
16341
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16342
    }
16343
 
16344
    @Override
16345
    public boolean equals(Object that) {
16346
      if (that == null)
16347
        return false;
483 rajveer 16348
      if (that instanceof getOrdersForTransaction_args)
16349
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 16350
      return false;
16351
    }
16352
 
483 rajveer 16353
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 16354
      if (that == null)
16355
        return false;
16356
 
16357
      boolean this_present_transactionId = true;
16358
      boolean that_present_transactionId = true;
16359
      if (this_present_transactionId || that_present_transactionId) {
16360
        if (!(this_present_transactionId && that_present_transactionId))
16361
          return false;
16362
        if (this.transactionId != that.transactionId)
16363
          return false;
16364
      }
16365
 
1529 ankur.sing 16366
      boolean this_present_customerId = true;
16367
      boolean that_present_customerId = true;
16368
      if (this_present_customerId || that_present_customerId) {
16369
        if (!(this_present_customerId && that_present_customerId))
16370
          return false;
16371
        if (this.customerId != that.customerId)
16372
          return false;
16373
      }
16374
 
68 ashish 16375
      return true;
16376
    }
16377
 
16378
    @Override
16379
    public int hashCode() {
16380
      return 0;
16381
    }
16382
 
483 rajveer 16383
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 16384
      if (!getClass().equals(other.getClass())) {
16385
        return getClass().getName().compareTo(other.getClass().getName());
16386
      }
16387
 
16388
      int lastComparison = 0;
483 rajveer 16389
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 16390
 
16391
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
16392
      if (lastComparison != 0) {
16393
        return lastComparison;
16394
      }
16395
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
16396
      if (lastComparison != 0) {
16397
        return lastComparison;
16398
      }
1529 ankur.sing 16399
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
16400
      if (lastComparison != 0) {
16401
        return lastComparison;
16402
      }
16403
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
16404
      if (lastComparison != 0) {
16405
        return lastComparison;
16406
      }
68 ashish 16407
      return 0;
16408
    }
16409
 
16410
    public void read(TProtocol iprot) throws TException {
16411
      TField field;
16412
      iprot.readStructBegin();
16413
      while (true)
16414
      {
16415
        field = iprot.readFieldBegin();
16416
        if (field.type == TType.STOP) { 
16417
          break;
16418
        }
16419
        _Fields fieldId = _Fields.findByThriftId(field.id);
16420
        if (fieldId == null) {
16421
          TProtocolUtil.skip(iprot, field.type);
16422
        } else {
16423
          switch (fieldId) {
16424
            case TRANSACTION_ID:
16425
              if (field.type == TType.I64) {
16426
                this.transactionId = iprot.readI64();
16427
                setTransactionIdIsSet(true);
16428
              } else { 
16429
                TProtocolUtil.skip(iprot, field.type);
16430
              }
16431
              break;
1529 ankur.sing 16432
            case CUSTOMER_ID:
16433
              if (field.type == TType.I64) {
16434
                this.customerId = iprot.readI64();
16435
                setCustomerIdIsSet(true);
16436
              } else { 
16437
                TProtocolUtil.skip(iprot, field.type);
16438
              }
16439
              break;
68 ashish 16440
          }
16441
          iprot.readFieldEnd();
16442
        }
16443
      }
16444
      iprot.readStructEnd();
16445
      validate();
16446
    }
16447
 
16448
    public void write(TProtocol oprot) throws TException {
16449
      validate();
16450
 
16451
      oprot.writeStructBegin(STRUCT_DESC);
16452
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
16453
      oprot.writeI64(this.transactionId);
16454
      oprot.writeFieldEnd();
1529 ankur.sing 16455
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16456
      oprot.writeI64(this.customerId);
16457
      oprot.writeFieldEnd();
68 ashish 16458
      oprot.writeFieldStop();
16459
      oprot.writeStructEnd();
16460
    }
16461
 
16462
    @Override
16463
    public String toString() {
483 rajveer 16464
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 16465
      boolean first = true;
16466
 
16467
      sb.append("transactionId:");
16468
      sb.append(this.transactionId);
16469
      first = false;
1529 ankur.sing 16470
      if (!first) sb.append(", ");
16471
      sb.append("customerId:");
16472
      sb.append(this.customerId);
16473
      first = false;
68 ashish 16474
      sb.append(")");
16475
      return sb.toString();
16476
    }
16477
 
16478
    public void validate() throws TException {
16479
      // check for required fields
16480
    }
16481
 
16482
  }
16483
 
483 rajveer 16484
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
16485
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 16486
 
483 rajveer 16487
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16488
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16489
 
483 rajveer 16490
    private List<Order> success;
68 ashish 16491
    private TransactionServiceException ex;
16492
 
16493
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16494
    public enum _Fields implements TFieldIdEnum {
16495
      SUCCESS((short)0, "success"),
16496
      EX((short)1, "ex");
16497
 
16498
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16499
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16500
 
16501
      static {
16502
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16503
          byId.put((int)field._thriftId, field);
16504
          byName.put(field.getFieldName(), field);
16505
        }
16506
      }
16507
 
16508
      /**
16509
       * Find the _Fields constant that matches fieldId, or null if its not found.
16510
       */
16511
      public static _Fields findByThriftId(int fieldId) {
16512
        return byId.get(fieldId);
16513
      }
16514
 
16515
      /**
16516
       * Find the _Fields constant that matches fieldId, throwing an exception
16517
       * if it is not found.
16518
       */
16519
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16520
        _Fields fields = findByThriftId(fieldId);
16521
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16522
        return fields;
16523
      }
16524
 
16525
      /**
16526
       * Find the _Fields constant that matches name, or null if its not found.
16527
       */
16528
      public static _Fields findByName(String name) {
16529
        return byName.get(name);
16530
      }
16531
 
16532
      private final short _thriftId;
16533
      private final String _fieldName;
16534
 
16535
      _Fields(short thriftId, String fieldName) {
16536
        _thriftId = thriftId;
16537
        _fieldName = fieldName;
16538
      }
16539
 
16540
      public short getThriftFieldId() {
16541
        return _thriftId;
16542
      }
16543
 
16544
      public String getFieldName() {
16545
        return _fieldName;
16546
      }
16547
    }
16548
 
16549
    // isset id assignments
16550
 
16551
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16552
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16553
          new ListMetaData(TType.LIST, 
16554
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16555
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16556
          new FieldValueMetaData(TType.STRUCT)));
16557
    }});
16558
 
16559
    static {
483 rajveer 16560
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 16561
    }
16562
 
483 rajveer 16563
    public getOrdersForTransaction_result() {
68 ashish 16564
    }
16565
 
483 rajveer 16566
    public getOrdersForTransaction_result(
16567
      List<Order> success,
68 ashish 16568
      TransactionServiceException ex)
16569
    {
16570
      this();
16571
      this.success = success;
16572
      this.ex = ex;
16573
    }
16574
 
16575
    /**
16576
     * Performs a deep copy on <i>other</i>.
16577
     */
483 rajveer 16578
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
16579
      if (other.isSetSuccess()) {
16580
        List<Order> __this__success = new ArrayList<Order>();
16581
        for (Order other_element : other.success) {
16582
          __this__success.add(new Order(other_element));
16583
        }
16584
        this.success = __this__success;
16585
      }
68 ashish 16586
      if (other.isSetEx()) {
16587
        this.ex = new TransactionServiceException(other.ex);
16588
      }
16589
    }
16590
 
483 rajveer 16591
    public getOrdersForTransaction_result deepCopy() {
16592
      return new getOrdersForTransaction_result(this);
68 ashish 16593
    }
16594
 
16595
    @Deprecated
483 rajveer 16596
    public getOrdersForTransaction_result clone() {
16597
      return new getOrdersForTransaction_result(this);
68 ashish 16598
    }
16599
 
483 rajveer 16600
    public int getSuccessSize() {
16601
      return (this.success == null) ? 0 : this.success.size();
16602
    }
16603
 
16604
    public java.util.Iterator<Order> getSuccessIterator() {
16605
      return (this.success == null) ? null : this.success.iterator();
16606
    }
16607
 
16608
    public void addToSuccess(Order elem) {
16609
      if (this.success == null) {
16610
        this.success = new ArrayList<Order>();
16611
      }
16612
      this.success.add(elem);
16613
    }
16614
 
16615
    public List<Order> getSuccess() {
68 ashish 16616
      return this.success;
16617
    }
16618
 
483 rajveer 16619
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 16620
      this.success = success;
16621
      return this;
16622
    }
16623
 
16624
    public void unsetSuccess() {
483 rajveer 16625
      this.success = null;
68 ashish 16626
    }
16627
 
16628
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16629
    public boolean isSetSuccess() {
483 rajveer 16630
      return this.success != null;
68 ashish 16631
    }
16632
 
16633
    public void setSuccessIsSet(boolean value) {
483 rajveer 16634
      if (!value) {
16635
        this.success = null;
16636
      }
68 ashish 16637
    }
16638
 
16639
    public TransactionServiceException getEx() {
16640
      return this.ex;
16641
    }
16642
 
483 rajveer 16643
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 16644
      this.ex = ex;
16645
      return this;
16646
    }
16647
 
16648
    public void unsetEx() {
16649
      this.ex = null;
16650
    }
16651
 
16652
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16653
    public boolean isSetEx() {
16654
      return this.ex != null;
16655
    }
16656
 
16657
    public void setExIsSet(boolean value) {
16658
      if (!value) {
16659
        this.ex = null;
16660
      }
16661
    }
16662
 
16663
    public void setFieldValue(_Fields field, Object value) {
16664
      switch (field) {
16665
      case SUCCESS:
16666
        if (value == null) {
16667
          unsetSuccess();
16668
        } else {
483 rajveer 16669
          setSuccess((List<Order>)value);
68 ashish 16670
        }
16671
        break;
16672
 
16673
      case EX:
16674
        if (value == null) {
16675
          unsetEx();
16676
        } else {
16677
          setEx((TransactionServiceException)value);
16678
        }
16679
        break;
16680
 
16681
      }
16682
    }
16683
 
16684
    public void setFieldValue(int fieldID, Object value) {
16685
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16686
    }
16687
 
16688
    public Object getFieldValue(_Fields field) {
16689
      switch (field) {
16690
      case SUCCESS:
483 rajveer 16691
        return getSuccess();
68 ashish 16692
 
16693
      case EX:
16694
        return getEx();
16695
 
16696
      }
16697
      throw new IllegalStateException();
16698
    }
16699
 
16700
    public Object getFieldValue(int fieldId) {
16701
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16702
    }
16703
 
16704
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16705
    public boolean isSet(_Fields field) {
16706
      switch (field) {
16707
      case SUCCESS:
16708
        return isSetSuccess();
16709
      case EX:
16710
        return isSetEx();
16711
      }
16712
      throw new IllegalStateException();
16713
    }
16714
 
16715
    public boolean isSet(int fieldID) {
16716
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16717
    }
16718
 
16719
    @Override
16720
    public boolean equals(Object that) {
16721
      if (that == null)
16722
        return false;
483 rajveer 16723
      if (that instanceof getOrdersForTransaction_result)
16724
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 16725
      return false;
16726
    }
16727
 
483 rajveer 16728
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 16729
      if (that == null)
16730
        return false;
16731
 
483 rajveer 16732
      boolean this_present_success = true && this.isSetSuccess();
16733
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16734
      if (this_present_success || that_present_success) {
16735
        if (!(this_present_success && that_present_success))
16736
          return false;
483 rajveer 16737
        if (!this.success.equals(that.success))
68 ashish 16738
          return false;
16739
      }
16740
 
16741
      boolean this_present_ex = true && this.isSetEx();
16742
      boolean that_present_ex = true && that.isSetEx();
16743
      if (this_present_ex || that_present_ex) {
16744
        if (!(this_present_ex && that_present_ex))
16745
          return false;
16746
        if (!this.ex.equals(that.ex))
16747
          return false;
16748
      }
16749
 
16750
      return true;
16751
    }
16752
 
16753
    @Override
16754
    public int hashCode() {
16755
      return 0;
16756
    }
16757
 
483 rajveer 16758
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 16759
      if (!getClass().equals(other.getClass())) {
16760
        return getClass().getName().compareTo(other.getClass().getName());
16761
      }
16762
 
16763
      int lastComparison = 0;
483 rajveer 16764
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 16765
 
16766
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16767
      if (lastComparison != 0) {
16768
        return lastComparison;
16769
      }
16770
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16771
      if (lastComparison != 0) {
16772
        return lastComparison;
16773
      }
16774
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16775
      if (lastComparison != 0) {
16776
        return lastComparison;
16777
      }
16778
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16779
      if (lastComparison != 0) {
16780
        return lastComparison;
16781
      }
16782
      return 0;
16783
    }
16784
 
16785
    public void read(TProtocol iprot) throws TException {
16786
      TField field;
16787
      iprot.readStructBegin();
16788
      while (true)
16789
      {
16790
        field = iprot.readFieldBegin();
16791
        if (field.type == TType.STOP) { 
16792
          break;
16793
        }
16794
        _Fields fieldId = _Fields.findByThriftId(field.id);
16795
        if (fieldId == null) {
16796
          TProtocolUtil.skip(iprot, field.type);
16797
        } else {
16798
          switch (fieldId) {
16799
            case SUCCESS:
483 rajveer 16800
              if (field.type == TType.LIST) {
16801
                {
1382 varun.gupt 16802
                  TList _list32 = iprot.readListBegin();
16803
                  this.success = new ArrayList<Order>(_list32.size);
16804
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 16805
                  {
1382 varun.gupt 16806
                    Order _elem34;
16807
                    _elem34 = new Order();
16808
                    _elem34.read(iprot);
16809
                    this.success.add(_elem34);
483 rajveer 16810
                  }
16811
                  iprot.readListEnd();
16812
                }
68 ashish 16813
              } else { 
16814
                TProtocolUtil.skip(iprot, field.type);
16815
              }
16816
              break;
16817
            case EX:
16818
              if (field.type == TType.STRUCT) {
16819
                this.ex = new TransactionServiceException();
16820
                this.ex.read(iprot);
16821
              } else { 
16822
                TProtocolUtil.skip(iprot, field.type);
16823
              }
16824
              break;
16825
          }
16826
          iprot.readFieldEnd();
16827
        }
16828
      }
16829
      iprot.readStructEnd();
16830
      validate();
16831
    }
16832
 
16833
    public void write(TProtocol oprot) throws TException {
16834
      oprot.writeStructBegin(STRUCT_DESC);
16835
 
16836
      if (this.isSetSuccess()) {
16837
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16838
        {
16839
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16840
          for (Order _iter35 : this.success)
483 rajveer 16841
          {
1382 varun.gupt 16842
            _iter35.write(oprot);
483 rajveer 16843
          }
16844
          oprot.writeListEnd();
16845
        }
68 ashish 16846
        oprot.writeFieldEnd();
16847
      } else if (this.isSetEx()) {
16848
        oprot.writeFieldBegin(EX_FIELD_DESC);
16849
        this.ex.write(oprot);
16850
        oprot.writeFieldEnd();
16851
      }
16852
      oprot.writeFieldStop();
16853
      oprot.writeStructEnd();
16854
    }
16855
 
16856
    @Override
16857
    public String toString() {
483 rajveer 16858
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 16859
      boolean first = true;
16860
 
16861
      sb.append("success:");
483 rajveer 16862
      if (this.success == null) {
16863
        sb.append("null");
16864
      } else {
16865
        sb.append(this.success);
16866
      }
68 ashish 16867
      first = false;
16868
      if (!first) sb.append(", ");
16869
      sb.append("ex:");
16870
      if (this.ex == null) {
16871
        sb.append("null");
16872
      } else {
16873
        sb.append(this.ex);
16874
      }
16875
      first = false;
16876
      sb.append(")");
16877
      return sb.toString();
16878
    }
16879
 
16880
    public void validate() throws TException {
16881
      // check for required fields
16882
    }
16883
 
16884
  }
16885
 
483 rajveer 16886
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
16887
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 16888
 
483 rajveer 16889
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
16890
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
16891
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
16892
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 16893
 
483 rajveer 16894
    private long customerId;
16895
    private long from_date;
16896
    private long to_date;
16897
    private OrderStatus status;
68 ashish 16898
 
16899
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16900
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16901
      CUSTOMER_ID((short)1, "customerId"),
16902
      FROM_DATE((short)2, "from_date"),
16903
      TO_DATE((short)3, "to_date"),
16904
      /**
16905
       * 
16906
       * @see OrderStatus
16907
       */
16908
      STATUS((short)4, "status");
68 ashish 16909
 
16910
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16912
 
16913
      static {
16914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16915
          byId.put((int)field._thriftId, field);
16916
          byName.put(field.getFieldName(), field);
16917
        }
16918
      }
16919
 
16920
      /**
16921
       * Find the _Fields constant that matches fieldId, or null if its not found.
16922
       */
16923
      public static _Fields findByThriftId(int fieldId) {
16924
        return byId.get(fieldId);
16925
      }
16926
 
16927
      /**
16928
       * Find the _Fields constant that matches fieldId, throwing an exception
16929
       * if it is not found.
16930
       */
16931
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16932
        _Fields fields = findByThriftId(fieldId);
16933
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16934
        return fields;
16935
      }
16936
 
16937
      /**
16938
       * Find the _Fields constant that matches name, or null if its not found.
16939
       */
16940
      public static _Fields findByName(String name) {
16941
        return byName.get(name);
16942
      }
16943
 
16944
      private final short _thriftId;
16945
      private final String _fieldName;
16946
 
16947
      _Fields(short thriftId, String fieldName) {
16948
        _thriftId = thriftId;
16949
        _fieldName = fieldName;
16950
      }
16951
 
16952
      public short getThriftFieldId() {
16953
        return _thriftId;
16954
      }
16955
 
16956
      public String getFieldName() {
16957
        return _fieldName;
16958
      }
16959
    }
16960
 
16961
    // isset id assignments
483 rajveer 16962
    private static final int __CUSTOMERID_ISSET_ID = 0;
16963
    private static final int __FROM_DATE_ISSET_ID = 1;
16964
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 16965
    private BitSet __isset_bit_vector = new BitSet(3);
16966
 
16967
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16968
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 16969
          new FieldValueMetaData(TType.I64)));
483 rajveer 16970
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 16971
          new FieldValueMetaData(TType.I64)));
483 rajveer 16972
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 16973
          new FieldValueMetaData(TType.I64)));
483 rajveer 16974
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16975
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 16976
    }});
16977
 
16978
    static {
483 rajveer 16979
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 16980
    }
16981
 
483 rajveer 16982
    public getOrdersForCustomer_args() {
68 ashish 16983
    }
16984
 
483 rajveer 16985
    public getOrdersForCustomer_args(
16986
      long customerId,
16987
      long from_date,
16988
      long to_date,
16989
      OrderStatus status)
68 ashish 16990
    {
16991
      this();
483 rajveer 16992
      this.customerId = customerId;
16993
      setCustomerIdIsSet(true);
16994
      this.from_date = from_date;
16995
      setFrom_dateIsSet(true);
16996
      this.to_date = to_date;
16997
      setTo_dateIsSet(true);
16998
      this.status = status;
68 ashish 16999
    }
17000
 
17001
    /**
17002
     * Performs a deep copy on <i>other</i>.
17003
     */
483 rajveer 17004
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 17005
      __isset_bit_vector.clear();
17006
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17007
      this.customerId = other.customerId;
17008
      this.from_date = other.from_date;
17009
      this.to_date = other.to_date;
17010
      if (other.isSetStatus()) {
17011
        this.status = other.status;
17012
      }
68 ashish 17013
    }
17014
 
483 rajveer 17015
    public getOrdersForCustomer_args deepCopy() {
17016
      return new getOrdersForCustomer_args(this);
68 ashish 17017
    }
17018
 
17019
    @Deprecated
483 rajveer 17020
    public getOrdersForCustomer_args clone() {
17021
      return new getOrdersForCustomer_args(this);
68 ashish 17022
    }
17023
 
483 rajveer 17024
    public long getCustomerId() {
17025
      return this.customerId;
68 ashish 17026
    }
17027
 
483 rajveer 17028
    public getOrdersForCustomer_args setCustomerId(long customerId) {
17029
      this.customerId = customerId;
17030
      setCustomerIdIsSet(true);
68 ashish 17031
      return this;
17032
    }
17033
 
483 rajveer 17034
    public void unsetCustomerId() {
17035
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 17036
    }
17037
 
483 rajveer 17038
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
17039
    public boolean isSetCustomerId() {
17040
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 17041
    }
17042
 
483 rajveer 17043
    public void setCustomerIdIsSet(boolean value) {
17044
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 17045
    }
17046
 
483 rajveer 17047
    public long getFrom_date() {
17048
      return this.from_date;
68 ashish 17049
    }
17050
 
483 rajveer 17051
    public getOrdersForCustomer_args setFrom_date(long from_date) {
17052
      this.from_date = from_date;
17053
      setFrom_dateIsSet(true);
68 ashish 17054
      return this;
17055
    }
17056
 
483 rajveer 17057
    public void unsetFrom_date() {
17058
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 17059
    }
17060
 
483 rajveer 17061
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
17062
    public boolean isSetFrom_date() {
17063
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 17064
    }
17065
 
483 rajveer 17066
    public void setFrom_dateIsSet(boolean value) {
17067
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 17068
    }
17069
 
483 rajveer 17070
    public long getTo_date() {
17071
      return this.to_date;
68 ashish 17072
    }
17073
 
483 rajveer 17074
    public getOrdersForCustomer_args setTo_date(long to_date) {
17075
      this.to_date = to_date;
17076
      setTo_dateIsSet(true);
68 ashish 17077
      return this;
17078
    }
17079
 
483 rajveer 17080
    public void unsetTo_date() {
17081
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 17082
    }
17083
 
483 rajveer 17084
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
17085
    public boolean isSetTo_date() {
17086
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 17087
    }
17088
 
483 rajveer 17089
    public void setTo_dateIsSet(boolean value) {
17090
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 17091
    }
17092
 
483 rajveer 17093
    /**
17094
     * 
17095
     * @see OrderStatus
17096
     */
17097
    public OrderStatus getStatus() {
17098
      return this.status;
17099
    }
17100
 
17101
    /**
17102
     * 
17103
     * @see OrderStatus
17104
     */
17105
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
17106
      this.status = status;
17107
      return this;
17108
    }
17109
 
17110
    public void unsetStatus() {
17111
      this.status = null;
17112
    }
17113
 
17114
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17115
    public boolean isSetStatus() {
17116
      return this.status != null;
17117
    }
17118
 
17119
    public void setStatusIsSet(boolean value) {
17120
      if (!value) {
17121
        this.status = null;
17122
      }
17123
    }
17124
 
68 ashish 17125
    public void setFieldValue(_Fields field, Object value) {
17126
      switch (field) {
483 rajveer 17127
      case CUSTOMER_ID:
68 ashish 17128
        if (value == null) {
483 rajveer 17129
          unsetCustomerId();
68 ashish 17130
        } else {
483 rajveer 17131
          setCustomerId((Long)value);
68 ashish 17132
        }
17133
        break;
17134
 
483 rajveer 17135
      case FROM_DATE:
68 ashish 17136
        if (value == null) {
483 rajveer 17137
          unsetFrom_date();
68 ashish 17138
        } else {
483 rajveer 17139
          setFrom_date((Long)value);
68 ashish 17140
        }
17141
        break;
17142
 
483 rajveer 17143
      case TO_DATE:
68 ashish 17144
        if (value == null) {
483 rajveer 17145
          unsetTo_date();
68 ashish 17146
        } else {
483 rajveer 17147
          setTo_date((Long)value);
68 ashish 17148
        }
17149
        break;
17150
 
483 rajveer 17151
      case STATUS:
17152
        if (value == null) {
17153
          unsetStatus();
17154
        } else {
17155
          setStatus((OrderStatus)value);
17156
        }
17157
        break;
17158
 
68 ashish 17159
      }
17160
    }
17161
 
17162
    public void setFieldValue(int fieldID, Object value) {
17163
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17164
    }
17165
 
17166
    public Object getFieldValue(_Fields field) {
17167
      switch (field) {
483 rajveer 17168
      case CUSTOMER_ID:
17169
        return new Long(getCustomerId());
68 ashish 17170
 
483 rajveer 17171
      case FROM_DATE:
17172
        return new Long(getFrom_date());
68 ashish 17173
 
483 rajveer 17174
      case TO_DATE:
17175
        return new Long(getTo_date());
68 ashish 17176
 
483 rajveer 17177
      case STATUS:
17178
        return getStatus();
17179
 
68 ashish 17180
      }
17181
      throw new IllegalStateException();
17182
    }
17183
 
17184
    public Object getFieldValue(int fieldId) {
17185
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17186
    }
17187
 
17188
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17189
    public boolean isSet(_Fields field) {
17190
      switch (field) {
483 rajveer 17191
      case CUSTOMER_ID:
17192
        return isSetCustomerId();
17193
      case FROM_DATE:
17194
        return isSetFrom_date();
17195
      case TO_DATE:
17196
        return isSetTo_date();
17197
      case STATUS:
17198
        return isSetStatus();
68 ashish 17199
      }
17200
      throw new IllegalStateException();
17201
    }
17202
 
17203
    public boolean isSet(int fieldID) {
17204
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17205
    }
17206
 
17207
    @Override
17208
    public boolean equals(Object that) {
17209
      if (that == null)
17210
        return false;
483 rajveer 17211
      if (that instanceof getOrdersForCustomer_args)
17212
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 17213
      return false;
17214
    }
17215
 
483 rajveer 17216
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 17217
      if (that == null)
17218
        return false;
17219
 
483 rajveer 17220
      boolean this_present_customerId = true;
17221
      boolean that_present_customerId = true;
17222
      if (this_present_customerId || that_present_customerId) {
17223
        if (!(this_present_customerId && that_present_customerId))
68 ashish 17224
          return false;
483 rajveer 17225
        if (this.customerId != that.customerId)
68 ashish 17226
          return false;
17227
      }
17228
 
483 rajveer 17229
      boolean this_present_from_date = true;
17230
      boolean that_present_from_date = true;
17231
      if (this_present_from_date || that_present_from_date) {
17232
        if (!(this_present_from_date && that_present_from_date))
68 ashish 17233
          return false;
483 rajveer 17234
        if (this.from_date != that.from_date)
68 ashish 17235
          return false;
17236
      }
17237
 
483 rajveer 17238
      boolean this_present_to_date = true;
17239
      boolean that_present_to_date = true;
17240
      if (this_present_to_date || that_present_to_date) {
17241
        if (!(this_present_to_date && that_present_to_date))
68 ashish 17242
          return false;
483 rajveer 17243
        if (this.to_date != that.to_date)
68 ashish 17244
          return false;
17245
      }
17246
 
483 rajveer 17247
      boolean this_present_status = true && this.isSetStatus();
17248
      boolean that_present_status = true && that.isSetStatus();
17249
      if (this_present_status || that_present_status) {
17250
        if (!(this_present_status && that_present_status))
17251
          return false;
17252
        if (!this.status.equals(that.status))
17253
          return false;
17254
      }
17255
 
68 ashish 17256
      return true;
17257
    }
17258
 
17259
    @Override
17260
    public int hashCode() {
17261
      return 0;
17262
    }
17263
 
483 rajveer 17264
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 17265
      if (!getClass().equals(other.getClass())) {
17266
        return getClass().getName().compareTo(other.getClass().getName());
17267
      }
17268
 
17269
      int lastComparison = 0;
483 rajveer 17270
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 17271
 
483 rajveer 17272
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 17273
      if (lastComparison != 0) {
17274
        return lastComparison;
17275
      }
483 rajveer 17276
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 17277
      if (lastComparison != 0) {
17278
        return lastComparison;
17279
      }
483 rajveer 17280
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 17281
      if (lastComparison != 0) {
17282
        return lastComparison;
17283
      }
483 rajveer 17284
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 17285
      if (lastComparison != 0) {
17286
        return lastComparison;
17287
      }
483 rajveer 17288
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 17289
      if (lastComparison != 0) {
17290
        return lastComparison;
17291
      }
483 rajveer 17292
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 17293
      if (lastComparison != 0) {
17294
        return lastComparison;
17295
      }
483 rajveer 17296
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
17297
      if (lastComparison != 0) {
17298
        return lastComparison;
17299
      }
17300
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
17301
      if (lastComparison != 0) {
17302
        return lastComparison;
17303
      }
68 ashish 17304
      return 0;
17305
    }
17306
 
17307
    public void read(TProtocol iprot) throws TException {
17308
      TField field;
17309
      iprot.readStructBegin();
17310
      while (true)
17311
      {
17312
        field = iprot.readFieldBegin();
17313
        if (field.type == TType.STOP) { 
17314
          break;
17315
        }
17316
        _Fields fieldId = _Fields.findByThriftId(field.id);
17317
        if (fieldId == null) {
17318
          TProtocolUtil.skip(iprot, field.type);
17319
        } else {
17320
          switch (fieldId) {
483 rajveer 17321
            case CUSTOMER_ID:
68 ashish 17322
              if (field.type == TType.I64) {
483 rajveer 17323
                this.customerId = iprot.readI64();
17324
                setCustomerIdIsSet(true);
68 ashish 17325
              } else { 
17326
                TProtocolUtil.skip(iprot, field.type);
17327
              }
17328
              break;
483 rajveer 17329
            case FROM_DATE:
68 ashish 17330
              if (field.type == TType.I64) {
483 rajveer 17331
                this.from_date = iprot.readI64();
17332
                setFrom_dateIsSet(true);
68 ashish 17333
              } else { 
17334
                TProtocolUtil.skip(iprot, field.type);
17335
              }
17336
              break;
483 rajveer 17337
            case TO_DATE:
68 ashish 17338
              if (field.type == TType.I64) {
483 rajveer 17339
                this.to_date = iprot.readI64();
17340
                setTo_dateIsSet(true);
68 ashish 17341
              } else { 
17342
                TProtocolUtil.skip(iprot, field.type);
17343
              }
17344
              break;
483 rajveer 17345
            case STATUS:
17346
              if (field.type == TType.I32) {
17347
                this.status = OrderStatus.findByValue(iprot.readI32());
17348
              } else { 
17349
                TProtocolUtil.skip(iprot, field.type);
17350
              }
17351
              break;
68 ashish 17352
          }
17353
          iprot.readFieldEnd();
17354
        }
17355
      }
17356
      iprot.readStructEnd();
17357
      validate();
17358
    }
17359
 
17360
    public void write(TProtocol oprot) throws TException {
17361
      validate();
17362
 
17363
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17364
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
17365
      oprot.writeI64(this.customerId);
68 ashish 17366
      oprot.writeFieldEnd();
483 rajveer 17367
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
17368
      oprot.writeI64(this.from_date);
68 ashish 17369
      oprot.writeFieldEnd();
483 rajveer 17370
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
17371
      oprot.writeI64(this.to_date);
68 ashish 17372
      oprot.writeFieldEnd();
483 rajveer 17373
      if (this.status != null) {
17374
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17375
        oprot.writeI32(this.status.getValue());
17376
        oprot.writeFieldEnd();
17377
      }
68 ashish 17378
      oprot.writeFieldStop();
17379
      oprot.writeStructEnd();
17380
    }
17381
 
17382
    @Override
17383
    public String toString() {
483 rajveer 17384
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 17385
      boolean first = true;
17386
 
483 rajveer 17387
      sb.append("customerId:");
17388
      sb.append(this.customerId);
68 ashish 17389
      first = false;
17390
      if (!first) sb.append(", ");
483 rajveer 17391
      sb.append("from_date:");
17392
      sb.append(this.from_date);
68 ashish 17393
      first = false;
17394
      if (!first) sb.append(", ");
483 rajveer 17395
      sb.append("to_date:");
17396
      sb.append(this.to_date);
68 ashish 17397
      first = false;
483 rajveer 17398
      if (!first) sb.append(", ");
17399
      sb.append("status:");
17400
      if (this.status == null) {
17401
        sb.append("null");
17402
      } else {
17403
        String status_name = status.name();
17404
        if (status_name != null) {
17405
          sb.append(status_name);
17406
          sb.append(" (");
17407
        }
17408
        sb.append(this.status);
17409
        if (status_name != null) {
17410
          sb.append(")");
17411
        }
17412
      }
17413
      first = false;
68 ashish 17414
      sb.append(")");
17415
      return sb.toString();
17416
    }
17417
 
17418
    public void validate() throws TException {
17419
      // check for required fields
17420
    }
17421
 
17422
  }
17423
 
483 rajveer 17424
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
17425
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 17426
 
483 rajveer 17427
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 17428
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17429
 
483 rajveer 17430
    private List<Order> success;
68 ashish 17431
    private TransactionServiceException ex;
17432
 
17433
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17434
    public enum _Fields implements TFieldIdEnum {
17435
      SUCCESS((short)0, "success"),
17436
      EX((short)1, "ex");
17437
 
17438
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17439
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17440
 
17441
      static {
17442
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17443
          byId.put((int)field._thriftId, field);
17444
          byName.put(field.getFieldName(), field);
17445
        }
17446
      }
17447
 
17448
      /**
17449
       * Find the _Fields constant that matches fieldId, or null if its not found.
17450
       */
17451
      public static _Fields findByThriftId(int fieldId) {
17452
        return byId.get(fieldId);
17453
      }
17454
 
17455
      /**
17456
       * Find the _Fields constant that matches fieldId, throwing an exception
17457
       * if it is not found.
17458
       */
17459
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17460
        _Fields fields = findByThriftId(fieldId);
17461
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17462
        return fields;
17463
      }
17464
 
17465
      /**
17466
       * Find the _Fields constant that matches name, or null if its not found.
17467
       */
17468
      public static _Fields findByName(String name) {
17469
        return byName.get(name);
17470
      }
17471
 
17472
      private final short _thriftId;
17473
      private final String _fieldName;
17474
 
17475
      _Fields(short thriftId, String fieldName) {
17476
        _thriftId = thriftId;
17477
        _fieldName = fieldName;
17478
      }
17479
 
17480
      public short getThriftFieldId() {
17481
        return _thriftId;
17482
      }
17483
 
17484
      public String getFieldName() {
17485
        return _fieldName;
17486
      }
17487
    }
17488
 
17489
    // isset id assignments
17490
 
17491
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17492
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17493
          new ListMetaData(TType.LIST, 
17494
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 17495
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17496
          new FieldValueMetaData(TType.STRUCT)));
17497
    }});
17498
 
17499
    static {
483 rajveer 17500
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 17501
    }
17502
 
483 rajveer 17503
    public getOrdersForCustomer_result() {
68 ashish 17504
    }
17505
 
483 rajveer 17506
    public getOrdersForCustomer_result(
17507
      List<Order> success,
68 ashish 17508
      TransactionServiceException ex)
17509
    {
17510
      this();
17511
      this.success = success;
17512
      this.ex = ex;
17513
    }
17514
 
17515
    /**
17516
     * Performs a deep copy on <i>other</i>.
17517
     */
483 rajveer 17518
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
17519
      if (other.isSetSuccess()) {
17520
        List<Order> __this__success = new ArrayList<Order>();
17521
        for (Order other_element : other.success) {
17522
          __this__success.add(new Order(other_element));
17523
        }
17524
        this.success = __this__success;
17525
      }
68 ashish 17526
      if (other.isSetEx()) {
17527
        this.ex = new TransactionServiceException(other.ex);
17528
      }
17529
    }
17530
 
483 rajveer 17531
    public getOrdersForCustomer_result deepCopy() {
17532
      return new getOrdersForCustomer_result(this);
68 ashish 17533
    }
17534
 
17535
    @Deprecated
483 rajveer 17536
    public getOrdersForCustomer_result clone() {
17537
      return new getOrdersForCustomer_result(this);
68 ashish 17538
    }
17539
 
483 rajveer 17540
    public int getSuccessSize() {
17541
      return (this.success == null) ? 0 : this.success.size();
17542
    }
17543
 
17544
    public java.util.Iterator<Order> getSuccessIterator() {
17545
      return (this.success == null) ? null : this.success.iterator();
17546
    }
17547
 
17548
    public void addToSuccess(Order elem) {
17549
      if (this.success == null) {
17550
        this.success = new ArrayList<Order>();
17551
      }
17552
      this.success.add(elem);
17553
    }
17554
 
17555
    public List<Order> getSuccess() {
68 ashish 17556
      return this.success;
17557
    }
17558
 
483 rajveer 17559
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 17560
      this.success = success;
17561
      return this;
17562
    }
17563
 
17564
    public void unsetSuccess() {
483 rajveer 17565
      this.success = null;
68 ashish 17566
    }
17567
 
17568
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17569
    public boolean isSetSuccess() {
483 rajveer 17570
      return this.success != null;
68 ashish 17571
    }
17572
 
17573
    public void setSuccessIsSet(boolean value) {
483 rajveer 17574
      if (!value) {
17575
        this.success = null;
17576
      }
68 ashish 17577
    }
17578
 
17579
    public TransactionServiceException getEx() {
17580
      return this.ex;
17581
    }
17582
 
483 rajveer 17583
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 17584
      this.ex = ex;
17585
      return this;
17586
    }
17587
 
17588
    public void unsetEx() {
17589
      this.ex = null;
17590
    }
17591
 
17592
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17593
    public boolean isSetEx() {
17594
      return this.ex != null;
17595
    }
17596
 
17597
    public void setExIsSet(boolean value) {
17598
      if (!value) {
17599
        this.ex = null;
17600
      }
17601
    }
17602
 
17603
    public void setFieldValue(_Fields field, Object value) {
17604
      switch (field) {
17605
      case SUCCESS:
17606
        if (value == null) {
17607
          unsetSuccess();
17608
        } else {
483 rajveer 17609
          setSuccess((List<Order>)value);
68 ashish 17610
        }
17611
        break;
17612
 
17613
      case EX:
17614
        if (value == null) {
17615
          unsetEx();
17616
        } else {
17617
          setEx((TransactionServiceException)value);
17618
        }
17619
        break;
17620
 
17621
      }
17622
    }
17623
 
17624
    public void setFieldValue(int fieldID, Object value) {
17625
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17626
    }
17627
 
17628
    public Object getFieldValue(_Fields field) {
17629
      switch (field) {
17630
      case SUCCESS:
483 rajveer 17631
        return getSuccess();
68 ashish 17632
 
17633
      case EX:
17634
        return getEx();
17635
 
17636
      }
17637
      throw new IllegalStateException();
17638
    }
17639
 
17640
    public Object getFieldValue(int fieldId) {
17641
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17642
    }
17643
 
17644
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17645
    public boolean isSet(_Fields field) {
17646
      switch (field) {
17647
      case SUCCESS:
17648
        return isSetSuccess();
17649
      case EX:
17650
        return isSetEx();
17651
      }
17652
      throw new IllegalStateException();
17653
    }
17654
 
17655
    public boolean isSet(int fieldID) {
17656
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17657
    }
17658
 
17659
    @Override
17660
    public boolean equals(Object that) {
17661
      if (that == null)
17662
        return false;
483 rajveer 17663
      if (that instanceof getOrdersForCustomer_result)
17664
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 17665
      return false;
17666
    }
17667
 
483 rajveer 17668
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 17669
      if (that == null)
17670
        return false;
17671
 
483 rajveer 17672
      boolean this_present_success = true && this.isSetSuccess();
17673
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17674
      if (this_present_success || that_present_success) {
17675
        if (!(this_present_success && that_present_success))
17676
          return false;
483 rajveer 17677
        if (!this.success.equals(that.success))
68 ashish 17678
          return false;
17679
      }
17680
 
17681
      boolean this_present_ex = true && this.isSetEx();
17682
      boolean that_present_ex = true && that.isSetEx();
17683
      if (this_present_ex || that_present_ex) {
17684
        if (!(this_present_ex && that_present_ex))
17685
          return false;
17686
        if (!this.ex.equals(that.ex))
17687
          return false;
17688
      }
17689
 
17690
      return true;
17691
    }
17692
 
17693
    @Override
17694
    public int hashCode() {
17695
      return 0;
17696
    }
17697
 
483 rajveer 17698
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 17699
      if (!getClass().equals(other.getClass())) {
17700
        return getClass().getName().compareTo(other.getClass().getName());
17701
      }
17702
 
17703
      int lastComparison = 0;
483 rajveer 17704
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 17705
 
17706
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17707
      if (lastComparison != 0) {
17708
        return lastComparison;
17709
      }
17710
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17711
      if (lastComparison != 0) {
17712
        return lastComparison;
17713
      }
17714
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17715
      if (lastComparison != 0) {
17716
        return lastComparison;
17717
      }
17718
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17719
      if (lastComparison != 0) {
17720
        return lastComparison;
17721
      }
17722
      return 0;
17723
    }
17724
 
17725
    public void read(TProtocol iprot) throws TException {
17726
      TField field;
17727
      iprot.readStructBegin();
17728
      while (true)
17729
      {
17730
        field = iprot.readFieldBegin();
17731
        if (field.type == TType.STOP) { 
17732
          break;
17733
        }
17734
        _Fields fieldId = _Fields.findByThriftId(field.id);
17735
        if (fieldId == null) {
17736
          TProtocolUtil.skip(iprot, field.type);
17737
        } else {
17738
          switch (fieldId) {
17739
            case SUCCESS:
483 rajveer 17740
              if (field.type == TType.LIST) {
17741
                {
1382 varun.gupt 17742
                  TList _list36 = iprot.readListBegin();
17743
                  this.success = new ArrayList<Order>(_list36.size);
17744
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 17745
                  {
1382 varun.gupt 17746
                    Order _elem38;
17747
                    _elem38 = new Order();
17748
                    _elem38.read(iprot);
17749
                    this.success.add(_elem38);
483 rajveer 17750
                  }
17751
                  iprot.readListEnd();
17752
                }
68 ashish 17753
              } else { 
17754
                TProtocolUtil.skip(iprot, field.type);
17755
              }
17756
              break;
17757
            case EX:
17758
              if (field.type == TType.STRUCT) {
17759
                this.ex = new TransactionServiceException();
17760
                this.ex.read(iprot);
17761
              } else { 
17762
                TProtocolUtil.skip(iprot, field.type);
17763
              }
17764
              break;
17765
          }
17766
          iprot.readFieldEnd();
17767
        }
17768
      }
17769
      iprot.readStructEnd();
17770
      validate();
17771
    }
17772
 
17773
    public void write(TProtocol oprot) throws TException {
17774
      oprot.writeStructBegin(STRUCT_DESC);
17775
 
17776
      if (this.isSetSuccess()) {
17777
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17778
        {
17779
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 17780
          for (Order _iter39 : this.success)
483 rajveer 17781
          {
1382 varun.gupt 17782
            _iter39.write(oprot);
483 rajveer 17783
          }
17784
          oprot.writeListEnd();
17785
        }
68 ashish 17786
        oprot.writeFieldEnd();
17787
      } else if (this.isSetEx()) {
17788
        oprot.writeFieldBegin(EX_FIELD_DESC);
17789
        this.ex.write(oprot);
17790
        oprot.writeFieldEnd();
17791
      }
17792
      oprot.writeFieldStop();
17793
      oprot.writeStructEnd();
17794
    }
17795
 
17796
    @Override
17797
    public String toString() {
483 rajveer 17798
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 17799
      boolean first = true;
17800
 
17801
      sb.append("success:");
483 rajveer 17802
      if (this.success == null) {
17803
        sb.append("null");
17804
      } else {
17805
        sb.append(this.success);
17806
      }
68 ashish 17807
      first = false;
17808
      if (!first) sb.append(", ");
17809
      sb.append("ex:");
17810
      if (this.ex == null) {
17811
        sb.append("null");
17812
      } else {
17813
        sb.append(this.ex);
17814
      }
17815
      first = false;
17816
      sb.append(")");
17817
      return sb.toString();
17818
    }
17819
 
17820
    public void validate() throws TException {
17821
      // check for required fields
17822
    }
17823
 
17824
  }
17825
 
483 rajveer 17826
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
17827
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 17828
 
483 rajveer 17829
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 17830
 
483 rajveer 17831
    private Order order;
68 ashish 17832
 
17833
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17834
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17835
      ORDER((short)1, "order");
68 ashish 17836
 
17837
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17838
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17839
 
17840
      static {
17841
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17842
          byId.put((int)field._thriftId, field);
17843
          byName.put(field.getFieldName(), field);
17844
        }
17845
      }
17846
 
17847
      /**
17848
       * Find the _Fields constant that matches fieldId, or null if its not found.
17849
       */
17850
      public static _Fields findByThriftId(int fieldId) {
17851
        return byId.get(fieldId);
17852
      }
17853
 
17854
      /**
17855
       * Find the _Fields constant that matches fieldId, throwing an exception
17856
       * if it is not found.
17857
       */
17858
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17859
        _Fields fields = findByThriftId(fieldId);
17860
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17861
        return fields;
17862
      }
17863
 
17864
      /**
17865
       * Find the _Fields constant that matches name, or null if its not found.
17866
       */
17867
      public static _Fields findByName(String name) {
17868
        return byName.get(name);
17869
      }
17870
 
17871
      private final short _thriftId;
17872
      private final String _fieldName;
17873
 
17874
      _Fields(short thriftId, String fieldName) {
17875
        _thriftId = thriftId;
17876
        _fieldName = fieldName;
17877
      }
17878
 
17879
      public short getThriftFieldId() {
17880
        return _thriftId;
17881
      }
17882
 
17883
      public String getFieldName() {
17884
        return _fieldName;
17885
      }
17886
    }
17887
 
17888
    // isset id assignments
17889
 
17890
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17891
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
17892
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17893
    }});
17894
 
17895
    static {
483 rajveer 17896
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 17897
    }
17898
 
483 rajveer 17899
    public createOrder_args() {
68 ashish 17900
    }
17901
 
483 rajveer 17902
    public createOrder_args(
17903
      Order order)
68 ashish 17904
    {
17905
      this();
483 rajveer 17906
      this.order = order;
68 ashish 17907
    }
17908
 
17909
    /**
17910
     * Performs a deep copy on <i>other</i>.
17911
     */
483 rajveer 17912
    public createOrder_args(createOrder_args other) {
17913
      if (other.isSetOrder()) {
17914
        this.order = new Order(other.order);
17915
      }
68 ashish 17916
    }
17917
 
483 rajveer 17918
    public createOrder_args deepCopy() {
17919
      return new createOrder_args(this);
68 ashish 17920
    }
17921
 
17922
    @Deprecated
483 rajveer 17923
    public createOrder_args clone() {
17924
      return new createOrder_args(this);
68 ashish 17925
    }
17926
 
483 rajveer 17927
    public Order getOrder() {
17928
      return this.order;
68 ashish 17929
    }
17930
 
483 rajveer 17931
    public createOrder_args setOrder(Order order) {
17932
      this.order = order;
68 ashish 17933
      return this;
17934
    }
17935
 
483 rajveer 17936
    public void unsetOrder() {
17937
      this.order = null;
68 ashish 17938
    }
17939
 
483 rajveer 17940
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
17941
    public boolean isSetOrder() {
17942
      return this.order != null;
68 ashish 17943
    }
17944
 
483 rajveer 17945
    public void setOrderIsSet(boolean value) {
17946
      if (!value) {
17947
        this.order = null;
17948
      }
68 ashish 17949
    }
17950
 
17951
    public void setFieldValue(_Fields field, Object value) {
17952
      switch (field) {
483 rajveer 17953
      case ORDER:
68 ashish 17954
        if (value == null) {
483 rajveer 17955
          unsetOrder();
68 ashish 17956
        } else {
483 rajveer 17957
          setOrder((Order)value);
68 ashish 17958
        }
17959
        break;
17960
 
17961
      }
17962
    }
17963
 
17964
    public void setFieldValue(int fieldID, Object value) {
17965
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17966
    }
17967
 
17968
    public Object getFieldValue(_Fields field) {
17969
      switch (field) {
483 rajveer 17970
      case ORDER:
17971
        return getOrder();
68 ashish 17972
 
17973
      }
17974
      throw new IllegalStateException();
17975
    }
17976
 
17977
    public Object getFieldValue(int fieldId) {
17978
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17979
    }
17980
 
17981
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17982
    public boolean isSet(_Fields field) {
17983
      switch (field) {
483 rajveer 17984
      case ORDER:
17985
        return isSetOrder();
68 ashish 17986
      }
17987
      throw new IllegalStateException();
17988
    }
17989
 
17990
    public boolean isSet(int fieldID) {
17991
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17992
    }
17993
 
17994
    @Override
17995
    public boolean equals(Object that) {
17996
      if (that == null)
17997
        return false;
483 rajveer 17998
      if (that instanceof createOrder_args)
17999
        return this.equals((createOrder_args)that);
68 ashish 18000
      return false;
18001
    }
18002
 
483 rajveer 18003
    public boolean equals(createOrder_args that) {
68 ashish 18004
      if (that == null)
18005
        return false;
18006
 
483 rajveer 18007
      boolean this_present_order = true && this.isSetOrder();
18008
      boolean that_present_order = true && that.isSetOrder();
18009
      if (this_present_order || that_present_order) {
18010
        if (!(this_present_order && that_present_order))
68 ashish 18011
          return false;
483 rajveer 18012
        if (!this.order.equals(that.order))
68 ashish 18013
          return false;
18014
      }
18015
 
18016
      return true;
18017
    }
18018
 
18019
    @Override
18020
    public int hashCode() {
18021
      return 0;
18022
    }
18023
 
483 rajveer 18024
    public int compareTo(createOrder_args other) {
68 ashish 18025
      if (!getClass().equals(other.getClass())) {
18026
        return getClass().getName().compareTo(other.getClass().getName());
18027
      }
18028
 
18029
      int lastComparison = 0;
483 rajveer 18030
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 18031
 
483 rajveer 18032
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 18033
      if (lastComparison != 0) {
18034
        return lastComparison;
18035
      }
483 rajveer 18036
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 18037
      if (lastComparison != 0) {
18038
        return lastComparison;
18039
      }
18040
      return 0;
18041
    }
18042
 
18043
    public void read(TProtocol iprot) throws TException {
18044
      TField field;
18045
      iprot.readStructBegin();
18046
      while (true)
18047
      {
18048
        field = iprot.readFieldBegin();
18049
        if (field.type == TType.STOP) { 
18050
          break;
18051
        }
18052
        _Fields fieldId = _Fields.findByThriftId(field.id);
18053
        if (fieldId == null) {
18054
          TProtocolUtil.skip(iprot, field.type);
18055
        } else {
18056
          switch (fieldId) {
483 rajveer 18057
            case ORDER:
18058
              if (field.type == TType.STRUCT) {
18059
                this.order = new Order();
18060
                this.order.read(iprot);
68 ashish 18061
              } else { 
18062
                TProtocolUtil.skip(iprot, field.type);
18063
              }
18064
              break;
18065
          }
18066
          iprot.readFieldEnd();
18067
        }
18068
      }
18069
      iprot.readStructEnd();
18070
      validate();
18071
    }
18072
 
18073
    public void write(TProtocol oprot) throws TException {
18074
      validate();
18075
 
18076
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18077
      if (this.order != null) {
18078
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
18079
        this.order.write(oprot);
18080
        oprot.writeFieldEnd();
18081
      }
68 ashish 18082
      oprot.writeFieldStop();
18083
      oprot.writeStructEnd();
18084
    }
18085
 
18086
    @Override
18087
    public String toString() {
483 rajveer 18088
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 18089
      boolean first = true;
18090
 
483 rajveer 18091
      sb.append("order:");
18092
      if (this.order == null) {
18093
        sb.append("null");
18094
      } else {
18095
        sb.append(this.order);
18096
      }
68 ashish 18097
      first = false;
18098
      sb.append(")");
18099
      return sb.toString();
18100
    }
18101
 
18102
    public void validate() throws TException {
18103
      // check for required fields
18104
    }
18105
 
18106
  }
18107
 
483 rajveer 18108
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
18109
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 18110
 
483 rajveer 18111
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 18112
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18113
 
483 rajveer 18114
    private long success;
68 ashish 18115
    private TransactionServiceException ex;
18116
 
18117
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18118
    public enum _Fields implements TFieldIdEnum {
18119
      SUCCESS((short)0, "success"),
18120
      EX((short)1, "ex");
18121
 
18122
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18123
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18124
 
18125
      static {
18126
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18127
          byId.put((int)field._thriftId, field);
18128
          byName.put(field.getFieldName(), field);
18129
        }
18130
      }
18131
 
18132
      /**
18133
       * Find the _Fields constant that matches fieldId, or null if its not found.
18134
       */
18135
      public static _Fields findByThriftId(int fieldId) {
18136
        return byId.get(fieldId);
18137
      }
18138
 
18139
      /**
18140
       * Find the _Fields constant that matches fieldId, throwing an exception
18141
       * if it is not found.
18142
       */
18143
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18144
        _Fields fields = findByThriftId(fieldId);
18145
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18146
        return fields;
18147
      }
18148
 
18149
      /**
18150
       * Find the _Fields constant that matches name, or null if its not found.
18151
       */
18152
      public static _Fields findByName(String name) {
18153
        return byName.get(name);
18154
      }
18155
 
18156
      private final short _thriftId;
18157
      private final String _fieldName;
18158
 
18159
      _Fields(short thriftId, String fieldName) {
18160
        _thriftId = thriftId;
18161
        _fieldName = fieldName;
18162
      }
18163
 
18164
      public short getThriftFieldId() {
18165
        return _thriftId;
18166
      }
18167
 
18168
      public String getFieldName() {
18169
        return _fieldName;
18170
      }
18171
    }
18172
 
18173
    // isset id assignments
18174
    private static final int __SUCCESS_ISSET_ID = 0;
18175
    private BitSet __isset_bit_vector = new BitSet(1);
18176
 
18177
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18178
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18179
          new FieldValueMetaData(TType.I64)));
68 ashish 18180
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18181
          new FieldValueMetaData(TType.STRUCT)));
18182
    }});
18183
 
18184
    static {
483 rajveer 18185
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 18186
    }
18187
 
483 rajveer 18188
    public createOrder_result() {
68 ashish 18189
    }
18190
 
483 rajveer 18191
    public createOrder_result(
18192
      long success,
68 ashish 18193
      TransactionServiceException ex)
18194
    {
18195
      this();
18196
      this.success = success;
18197
      setSuccessIsSet(true);
18198
      this.ex = ex;
18199
    }
18200
 
18201
    /**
18202
     * Performs a deep copy on <i>other</i>.
18203
     */
483 rajveer 18204
    public createOrder_result(createOrder_result other) {
68 ashish 18205
      __isset_bit_vector.clear();
18206
      __isset_bit_vector.or(other.__isset_bit_vector);
18207
      this.success = other.success;
18208
      if (other.isSetEx()) {
18209
        this.ex = new TransactionServiceException(other.ex);
18210
      }
18211
    }
18212
 
483 rajveer 18213
    public createOrder_result deepCopy() {
18214
      return new createOrder_result(this);
68 ashish 18215
    }
18216
 
18217
    @Deprecated
483 rajveer 18218
    public createOrder_result clone() {
18219
      return new createOrder_result(this);
68 ashish 18220
    }
18221
 
483 rajveer 18222
    public long getSuccess() {
68 ashish 18223
      return this.success;
18224
    }
18225
 
483 rajveer 18226
    public createOrder_result setSuccess(long success) {
68 ashish 18227
      this.success = success;
18228
      setSuccessIsSet(true);
18229
      return this;
18230
    }
18231
 
18232
    public void unsetSuccess() {
18233
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18234
    }
18235
 
18236
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18237
    public boolean isSetSuccess() {
18238
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18239
    }
18240
 
18241
    public void setSuccessIsSet(boolean value) {
18242
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18243
    }
18244
 
18245
    public TransactionServiceException getEx() {
18246
      return this.ex;
18247
    }
18248
 
483 rajveer 18249
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 18250
      this.ex = ex;
18251
      return this;
18252
    }
18253
 
18254
    public void unsetEx() {
18255
      this.ex = null;
18256
    }
18257
 
18258
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18259
    public boolean isSetEx() {
18260
      return this.ex != null;
18261
    }
18262
 
18263
    public void setExIsSet(boolean value) {
18264
      if (!value) {
18265
        this.ex = null;
18266
      }
18267
    }
18268
 
18269
    public void setFieldValue(_Fields field, Object value) {
18270
      switch (field) {
18271
      case SUCCESS:
18272
        if (value == null) {
18273
          unsetSuccess();
18274
        } else {
483 rajveer 18275
          setSuccess((Long)value);
68 ashish 18276
        }
18277
        break;
18278
 
18279
      case EX:
18280
        if (value == null) {
18281
          unsetEx();
18282
        } else {
18283
          setEx((TransactionServiceException)value);
18284
        }
18285
        break;
18286
 
18287
      }
18288
    }
18289
 
18290
    public void setFieldValue(int fieldID, Object value) {
18291
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18292
    }
18293
 
18294
    public Object getFieldValue(_Fields field) {
18295
      switch (field) {
18296
      case SUCCESS:
483 rajveer 18297
        return new Long(getSuccess());
68 ashish 18298
 
18299
      case EX:
18300
        return getEx();
18301
 
18302
      }
18303
      throw new IllegalStateException();
18304
    }
18305
 
18306
    public Object getFieldValue(int fieldId) {
18307
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18308
    }
18309
 
18310
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18311
    public boolean isSet(_Fields field) {
18312
      switch (field) {
18313
      case SUCCESS:
18314
        return isSetSuccess();
18315
      case EX:
18316
        return isSetEx();
18317
      }
18318
      throw new IllegalStateException();
18319
    }
18320
 
18321
    public boolean isSet(int fieldID) {
18322
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18323
    }
18324
 
18325
    @Override
18326
    public boolean equals(Object that) {
18327
      if (that == null)
18328
        return false;
483 rajveer 18329
      if (that instanceof createOrder_result)
18330
        return this.equals((createOrder_result)that);
68 ashish 18331
      return false;
18332
    }
18333
 
483 rajveer 18334
    public boolean equals(createOrder_result that) {
68 ashish 18335
      if (that == null)
18336
        return false;
18337
 
18338
      boolean this_present_success = true;
18339
      boolean that_present_success = true;
18340
      if (this_present_success || that_present_success) {
18341
        if (!(this_present_success && that_present_success))
18342
          return false;
18343
        if (this.success != that.success)
18344
          return false;
18345
      }
18346
 
18347
      boolean this_present_ex = true && this.isSetEx();
18348
      boolean that_present_ex = true && that.isSetEx();
18349
      if (this_present_ex || that_present_ex) {
18350
        if (!(this_present_ex && that_present_ex))
18351
          return false;
18352
        if (!this.ex.equals(that.ex))
18353
          return false;
18354
      }
18355
 
18356
      return true;
18357
    }
18358
 
18359
    @Override
18360
    public int hashCode() {
18361
      return 0;
18362
    }
18363
 
483 rajveer 18364
    public int compareTo(createOrder_result other) {
68 ashish 18365
      if (!getClass().equals(other.getClass())) {
18366
        return getClass().getName().compareTo(other.getClass().getName());
18367
      }
18368
 
18369
      int lastComparison = 0;
483 rajveer 18370
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 18371
 
18372
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18373
      if (lastComparison != 0) {
18374
        return lastComparison;
18375
      }
18376
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18377
      if (lastComparison != 0) {
18378
        return lastComparison;
18379
      }
18380
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18381
      if (lastComparison != 0) {
18382
        return lastComparison;
18383
      }
18384
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18385
      if (lastComparison != 0) {
18386
        return lastComparison;
18387
      }
18388
      return 0;
18389
    }
18390
 
18391
    public void read(TProtocol iprot) throws TException {
18392
      TField field;
18393
      iprot.readStructBegin();
18394
      while (true)
18395
      {
18396
        field = iprot.readFieldBegin();
18397
        if (field.type == TType.STOP) { 
18398
          break;
18399
        }
18400
        _Fields fieldId = _Fields.findByThriftId(field.id);
18401
        if (fieldId == null) {
18402
          TProtocolUtil.skip(iprot, field.type);
18403
        } else {
18404
          switch (fieldId) {
18405
            case SUCCESS:
483 rajveer 18406
              if (field.type == TType.I64) {
18407
                this.success = iprot.readI64();
68 ashish 18408
                setSuccessIsSet(true);
18409
              } else { 
18410
                TProtocolUtil.skip(iprot, field.type);
18411
              }
18412
              break;
18413
            case EX:
18414
              if (field.type == TType.STRUCT) {
18415
                this.ex = new TransactionServiceException();
18416
                this.ex.read(iprot);
18417
              } else { 
18418
                TProtocolUtil.skip(iprot, field.type);
18419
              }
18420
              break;
18421
          }
18422
          iprot.readFieldEnd();
18423
        }
18424
      }
18425
      iprot.readStructEnd();
18426
      validate();
18427
    }
18428
 
18429
    public void write(TProtocol oprot) throws TException {
18430
      oprot.writeStructBegin(STRUCT_DESC);
18431
 
18432
      if (this.isSetSuccess()) {
18433
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18434
        oprot.writeI64(this.success);
68 ashish 18435
        oprot.writeFieldEnd();
18436
      } else if (this.isSetEx()) {
18437
        oprot.writeFieldBegin(EX_FIELD_DESC);
18438
        this.ex.write(oprot);
18439
        oprot.writeFieldEnd();
18440
      }
18441
      oprot.writeFieldStop();
18442
      oprot.writeStructEnd();
18443
    }
18444
 
18445
    @Override
18446
    public String toString() {
483 rajveer 18447
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 18448
      boolean first = true;
18449
 
18450
      sb.append("success:");
18451
      sb.append(this.success);
18452
      first = false;
18453
      if (!first) sb.append(", ");
18454
      sb.append("ex:");
18455
      if (this.ex == null) {
18456
        sb.append("null");
18457
      } else {
18458
        sb.append(this.ex);
18459
      }
18460
      first = false;
18461
      sb.append(")");
18462
      return sb.toString();
18463
    }
18464
 
18465
    public void validate() throws TException {
18466
      // check for required fields
18467
    }
18468
 
18469
  }
18470
 
483 rajveer 18471
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
18472
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 18473
 
483 rajveer 18474
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 18475
 
483 rajveer 18476
    private long id;
68 ashish 18477
 
18478
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18479
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18480
      ID((short)1, "id");
68 ashish 18481
 
18482
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18483
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18484
 
18485
      static {
18486
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18487
          byId.put((int)field._thriftId, field);
18488
          byName.put(field.getFieldName(), field);
18489
        }
18490
      }
18491
 
18492
      /**
18493
       * Find the _Fields constant that matches fieldId, or null if its not found.
18494
       */
18495
      public static _Fields findByThriftId(int fieldId) {
18496
        return byId.get(fieldId);
18497
      }
18498
 
18499
      /**
18500
       * Find the _Fields constant that matches fieldId, throwing an exception
18501
       * if it is not found.
18502
       */
18503
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18504
        _Fields fields = findByThriftId(fieldId);
18505
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18506
        return fields;
18507
      }
18508
 
18509
      /**
18510
       * Find the _Fields constant that matches name, or null if its not found.
18511
       */
18512
      public static _Fields findByName(String name) {
18513
        return byName.get(name);
18514
      }
18515
 
18516
      private final short _thriftId;
18517
      private final String _fieldName;
18518
 
18519
      _Fields(short thriftId, String fieldName) {
18520
        _thriftId = thriftId;
18521
        _fieldName = fieldName;
18522
      }
18523
 
18524
      public short getThriftFieldId() {
18525
        return _thriftId;
18526
      }
18527
 
18528
      public String getFieldName() {
18529
        return _fieldName;
18530
      }
18531
    }
18532
 
18533
    // isset id assignments
483 rajveer 18534
    private static final int __ID_ISSET_ID = 0;
18535
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 18536
 
18537
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18538
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 18539
          new FieldValueMetaData(TType.I64)));
18540
    }});
18541
 
18542
    static {
483 rajveer 18543
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 18544
    }
18545
 
483 rajveer 18546
    public getOrder_args() {
68 ashish 18547
    }
18548
 
483 rajveer 18549
    public getOrder_args(
18550
      long id)
68 ashish 18551
    {
18552
      this();
483 rajveer 18553
      this.id = id;
18554
      setIdIsSet(true);
68 ashish 18555
    }
18556
 
18557
    /**
18558
     * Performs a deep copy on <i>other</i>.
18559
     */
483 rajveer 18560
    public getOrder_args(getOrder_args other) {
68 ashish 18561
      __isset_bit_vector.clear();
18562
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18563
      this.id = other.id;
68 ashish 18564
    }
18565
 
483 rajveer 18566
    public getOrder_args deepCopy() {
18567
      return new getOrder_args(this);
68 ashish 18568
    }
18569
 
18570
    @Deprecated
483 rajveer 18571
    public getOrder_args clone() {
18572
      return new getOrder_args(this);
68 ashish 18573
    }
18574
 
483 rajveer 18575
    public long getId() {
18576
      return this.id;
68 ashish 18577
    }
18578
 
483 rajveer 18579
    public getOrder_args setId(long id) {
18580
      this.id = id;
18581
      setIdIsSet(true);
68 ashish 18582
      return this;
18583
    }
18584
 
483 rajveer 18585
    public void unsetId() {
18586
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 18587
    }
18588
 
483 rajveer 18589
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
18590
    public boolean isSetId() {
18591
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 18592
    }
18593
 
483 rajveer 18594
    public void setIdIsSet(boolean value) {
18595
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 18596
    }
18597
 
18598
    public void setFieldValue(_Fields field, Object value) {
18599
      switch (field) {
483 rajveer 18600
      case ID:
68 ashish 18601
        if (value == null) {
483 rajveer 18602
          unsetId();
68 ashish 18603
        } else {
483 rajveer 18604
          setId((Long)value);
68 ashish 18605
        }
18606
        break;
18607
 
18608
      }
18609
    }
18610
 
18611
    public void setFieldValue(int fieldID, Object value) {
18612
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18613
    }
18614
 
18615
    public Object getFieldValue(_Fields field) {
18616
      switch (field) {
483 rajveer 18617
      case ID:
18618
        return new Long(getId());
68 ashish 18619
 
18620
      }
18621
      throw new IllegalStateException();
18622
    }
18623
 
18624
    public Object getFieldValue(int fieldId) {
18625
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18626
    }
18627
 
18628
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18629
    public boolean isSet(_Fields field) {
18630
      switch (field) {
483 rajveer 18631
      case ID:
18632
        return isSetId();
68 ashish 18633
      }
18634
      throw new IllegalStateException();
18635
    }
18636
 
18637
    public boolean isSet(int fieldID) {
18638
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18639
    }
18640
 
18641
    @Override
18642
    public boolean equals(Object that) {
18643
      if (that == null)
18644
        return false;
483 rajveer 18645
      if (that instanceof getOrder_args)
18646
        return this.equals((getOrder_args)that);
68 ashish 18647
      return false;
18648
    }
18649
 
483 rajveer 18650
    public boolean equals(getOrder_args that) {
68 ashish 18651
      if (that == null)
18652
        return false;
18653
 
483 rajveer 18654
      boolean this_present_id = true;
18655
      boolean that_present_id = true;
18656
      if (this_present_id || that_present_id) {
18657
        if (!(this_present_id && that_present_id))
68 ashish 18658
          return false;
483 rajveer 18659
        if (this.id != that.id)
68 ashish 18660
          return false;
18661
      }
18662
 
18663
      return true;
18664
    }
18665
 
18666
    @Override
18667
    public int hashCode() {
18668
      return 0;
18669
    }
18670
 
483 rajveer 18671
    public int compareTo(getOrder_args other) {
68 ashish 18672
      if (!getClass().equals(other.getClass())) {
18673
        return getClass().getName().compareTo(other.getClass().getName());
18674
      }
18675
 
18676
      int lastComparison = 0;
483 rajveer 18677
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 18678
 
483 rajveer 18679
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 18680
      if (lastComparison != 0) {
18681
        return lastComparison;
18682
      }
483 rajveer 18683
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 18684
      if (lastComparison != 0) {
18685
        return lastComparison;
18686
      }
18687
      return 0;
18688
    }
18689
 
18690
    public void read(TProtocol iprot) throws TException {
18691
      TField field;
18692
      iprot.readStructBegin();
18693
      while (true)
18694
      {
18695
        field = iprot.readFieldBegin();
18696
        if (field.type == TType.STOP) { 
18697
          break;
18698
        }
18699
        _Fields fieldId = _Fields.findByThriftId(field.id);
18700
        if (fieldId == null) {
18701
          TProtocolUtil.skip(iprot, field.type);
18702
        } else {
18703
          switch (fieldId) {
483 rajveer 18704
            case ID:
68 ashish 18705
              if (field.type == TType.I64) {
483 rajveer 18706
                this.id = iprot.readI64();
18707
                setIdIsSet(true);
68 ashish 18708
              } else { 
18709
                TProtocolUtil.skip(iprot, field.type);
18710
              }
18711
              break;
18712
          }
18713
          iprot.readFieldEnd();
18714
        }
18715
      }
18716
      iprot.readStructEnd();
18717
      validate();
18718
    }
18719
 
18720
    public void write(TProtocol oprot) throws TException {
18721
      validate();
18722
 
18723
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18724
      oprot.writeFieldBegin(ID_FIELD_DESC);
18725
      oprot.writeI64(this.id);
68 ashish 18726
      oprot.writeFieldEnd();
18727
      oprot.writeFieldStop();
18728
      oprot.writeStructEnd();
18729
    }
18730
 
18731
    @Override
18732
    public String toString() {
483 rajveer 18733
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 18734
      boolean first = true;
18735
 
483 rajveer 18736
      sb.append("id:");
18737
      sb.append(this.id);
68 ashish 18738
      first = false;
18739
      sb.append(")");
18740
      return sb.toString();
18741
    }
18742
 
18743
    public void validate() throws TException {
18744
      // check for required fields
18745
    }
18746
 
18747
  }
18748
 
483 rajveer 18749
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
18750
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 18751
 
483 rajveer 18752
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 18753
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18754
 
483 rajveer 18755
    private Order success;
68 ashish 18756
    private TransactionServiceException ex;
18757
 
18758
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18759
    public enum _Fields implements TFieldIdEnum {
18760
      SUCCESS((short)0, "success"),
18761
      EX((short)1, "ex");
18762
 
18763
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18764
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18765
 
18766
      static {
18767
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18768
          byId.put((int)field._thriftId, field);
18769
          byName.put(field.getFieldName(), field);
18770
        }
18771
      }
18772
 
18773
      /**
18774
       * Find the _Fields constant that matches fieldId, or null if its not found.
18775
       */
18776
      public static _Fields findByThriftId(int fieldId) {
18777
        return byId.get(fieldId);
18778
      }
18779
 
18780
      /**
18781
       * Find the _Fields constant that matches fieldId, throwing an exception
18782
       * if it is not found.
18783
       */
18784
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18785
        _Fields fields = findByThriftId(fieldId);
18786
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18787
        return fields;
18788
      }
18789
 
18790
      /**
18791
       * Find the _Fields constant that matches name, or null if its not found.
18792
       */
18793
      public static _Fields findByName(String name) {
18794
        return byName.get(name);
18795
      }
18796
 
18797
      private final short _thriftId;
18798
      private final String _fieldName;
18799
 
18800
      _Fields(short thriftId, String fieldName) {
18801
        _thriftId = thriftId;
18802
        _fieldName = fieldName;
18803
      }
18804
 
18805
      public short getThriftFieldId() {
18806
        return _thriftId;
18807
      }
18808
 
18809
      public String getFieldName() {
18810
        return _fieldName;
18811
      }
18812
    }
18813
 
18814
    // isset id assignments
18815
 
18816
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18817
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18818
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 18819
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18820
          new FieldValueMetaData(TType.STRUCT)));
18821
    }});
18822
 
18823
    static {
483 rajveer 18824
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 18825
    }
18826
 
483 rajveer 18827
    public getOrder_result() {
68 ashish 18828
    }
18829
 
483 rajveer 18830
    public getOrder_result(
18831
      Order success,
68 ashish 18832
      TransactionServiceException ex)
18833
    {
18834
      this();
18835
      this.success = success;
18836
      this.ex = ex;
18837
    }
18838
 
18839
    /**
18840
     * Performs a deep copy on <i>other</i>.
18841
     */
483 rajveer 18842
    public getOrder_result(getOrder_result other) {
18843
      if (other.isSetSuccess()) {
18844
        this.success = new Order(other.success);
18845
      }
68 ashish 18846
      if (other.isSetEx()) {
18847
        this.ex = new TransactionServiceException(other.ex);
18848
      }
18849
    }
18850
 
483 rajveer 18851
    public getOrder_result deepCopy() {
18852
      return new getOrder_result(this);
68 ashish 18853
    }
18854
 
18855
    @Deprecated
483 rajveer 18856
    public getOrder_result clone() {
18857
      return new getOrder_result(this);
68 ashish 18858
    }
18859
 
483 rajveer 18860
    public Order getSuccess() {
68 ashish 18861
      return this.success;
18862
    }
18863
 
483 rajveer 18864
    public getOrder_result setSuccess(Order success) {
68 ashish 18865
      this.success = success;
18866
      return this;
18867
    }
18868
 
18869
    public void unsetSuccess() {
483 rajveer 18870
      this.success = null;
68 ashish 18871
    }
18872
 
18873
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18874
    public boolean isSetSuccess() {
483 rajveer 18875
      return this.success != null;
68 ashish 18876
    }
18877
 
18878
    public void setSuccessIsSet(boolean value) {
483 rajveer 18879
      if (!value) {
18880
        this.success = null;
18881
      }
68 ashish 18882
    }
18883
 
18884
    public TransactionServiceException getEx() {
18885
      return this.ex;
18886
    }
18887
 
483 rajveer 18888
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 18889
      this.ex = ex;
18890
      return this;
18891
    }
18892
 
18893
    public void unsetEx() {
18894
      this.ex = null;
18895
    }
18896
 
18897
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18898
    public boolean isSetEx() {
18899
      return this.ex != null;
18900
    }
18901
 
18902
    public void setExIsSet(boolean value) {
18903
      if (!value) {
18904
        this.ex = null;
18905
      }
18906
    }
18907
 
18908
    public void setFieldValue(_Fields field, Object value) {
18909
      switch (field) {
18910
      case SUCCESS:
18911
        if (value == null) {
18912
          unsetSuccess();
18913
        } else {
483 rajveer 18914
          setSuccess((Order)value);
68 ashish 18915
        }
18916
        break;
18917
 
18918
      case EX:
18919
        if (value == null) {
18920
          unsetEx();
18921
        } else {
18922
          setEx((TransactionServiceException)value);
18923
        }
18924
        break;
18925
 
18926
      }
18927
    }
18928
 
18929
    public void setFieldValue(int fieldID, Object value) {
18930
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18931
    }
18932
 
18933
    public Object getFieldValue(_Fields field) {
18934
      switch (field) {
18935
      case SUCCESS:
483 rajveer 18936
        return getSuccess();
68 ashish 18937
 
18938
      case EX:
18939
        return getEx();
18940
 
18941
      }
18942
      throw new IllegalStateException();
18943
    }
18944
 
18945
    public Object getFieldValue(int fieldId) {
18946
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18947
    }
18948
 
18949
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18950
    public boolean isSet(_Fields field) {
18951
      switch (field) {
18952
      case SUCCESS:
18953
        return isSetSuccess();
18954
      case EX:
18955
        return isSetEx();
18956
      }
18957
      throw new IllegalStateException();
18958
    }
18959
 
18960
    public boolean isSet(int fieldID) {
18961
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18962
    }
18963
 
18964
    @Override
18965
    public boolean equals(Object that) {
18966
      if (that == null)
18967
        return false;
483 rajveer 18968
      if (that instanceof getOrder_result)
18969
        return this.equals((getOrder_result)that);
68 ashish 18970
      return false;
18971
    }
18972
 
483 rajveer 18973
    public boolean equals(getOrder_result that) {
68 ashish 18974
      if (that == null)
18975
        return false;
18976
 
483 rajveer 18977
      boolean this_present_success = true && this.isSetSuccess();
18978
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18979
      if (this_present_success || that_present_success) {
18980
        if (!(this_present_success && that_present_success))
18981
          return false;
483 rajveer 18982
        if (!this.success.equals(that.success))
68 ashish 18983
          return false;
18984
      }
18985
 
18986
      boolean this_present_ex = true && this.isSetEx();
18987
      boolean that_present_ex = true && that.isSetEx();
18988
      if (this_present_ex || that_present_ex) {
18989
        if (!(this_present_ex && that_present_ex))
18990
          return false;
18991
        if (!this.ex.equals(that.ex))
18992
          return false;
18993
      }
18994
 
18995
      return true;
18996
    }
18997
 
18998
    @Override
18999
    public int hashCode() {
19000
      return 0;
19001
    }
19002
 
483 rajveer 19003
    public int compareTo(getOrder_result other) {
68 ashish 19004
      if (!getClass().equals(other.getClass())) {
19005
        return getClass().getName().compareTo(other.getClass().getName());
19006
      }
19007
 
19008
      int lastComparison = 0;
483 rajveer 19009
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 19010
 
19011
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19012
      if (lastComparison != 0) {
19013
        return lastComparison;
19014
      }
19015
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19016
      if (lastComparison != 0) {
19017
        return lastComparison;
19018
      }
19019
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19020
      if (lastComparison != 0) {
19021
        return lastComparison;
19022
      }
19023
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19024
      if (lastComparison != 0) {
19025
        return lastComparison;
19026
      }
19027
      return 0;
19028
    }
19029
 
19030
    public void read(TProtocol iprot) throws TException {
19031
      TField field;
19032
      iprot.readStructBegin();
19033
      while (true)
19034
      {
19035
        field = iprot.readFieldBegin();
19036
        if (field.type == TType.STOP) { 
19037
          break;
19038
        }
19039
        _Fields fieldId = _Fields.findByThriftId(field.id);
19040
        if (fieldId == null) {
19041
          TProtocolUtil.skip(iprot, field.type);
19042
        } else {
19043
          switch (fieldId) {
19044
            case SUCCESS:
483 rajveer 19045
              if (field.type == TType.STRUCT) {
19046
                this.success = new Order();
19047
                this.success.read(iprot);
68 ashish 19048
              } else { 
19049
                TProtocolUtil.skip(iprot, field.type);
19050
              }
19051
              break;
19052
            case EX:
19053
              if (field.type == TType.STRUCT) {
19054
                this.ex = new TransactionServiceException();
19055
                this.ex.read(iprot);
19056
              } else { 
19057
                TProtocolUtil.skip(iprot, field.type);
19058
              }
19059
              break;
19060
          }
19061
          iprot.readFieldEnd();
19062
        }
19063
      }
19064
      iprot.readStructEnd();
19065
      validate();
19066
    }
19067
 
19068
    public void write(TProtocol oprot) throws TException {
19069
      oprot.writeStructBegin(STRUCT_DESC);
19070
 
19071
      if (this.isSetSuccess()) {
19072
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 19073
        this.success.write(oprot);
68 ashish 19074
        oprot.writeFieldEnd();
19075
      } else if (this.isSetEx()) {
19076
        oprot.writeFieldBegin(EX_FIELD_DESC);
19077
        this.ex.write(oprot);
19078
        oprot.writeFieldEnd();
19079
      }
19080
      oprot.writeFieldStop();
19081
      oprot.writeStructEnd();
19082
    }
19083
 
19084
    @Override
19085
    public String toString() {
483 rajveer 19086
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 19087
      boolean first = true;
19088
 
19089
      sb.append("success:");
483 rajveer 19090
      if (this.success == null) {
19091
        sb.append("null");
19092
      } else {
19093
        sb.append(this.success);
19094
      }
68 ashish 19095
      first = false;
19096
      if (!first) sb.append(", ");
19097
      sb.append("ex:");
19098
      if (this.ex == null) {
19099
        sb.append("null");
19100
      } else {
19101
        sb.append(this.ex);
19102
      }
19103
      first = false;
19104
      sb.append(")");
19105
      return sb.toString();
19106
    }
19107
 
19108
    public void validate() throws TException {
19109
      // check for required fields
19110
    }
19111
 
19112
  }
19113
 
483 rajveer 19114
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
19115
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 19116
 
483 rajveer 19117
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 19118
 
483 rajveer 19119
    private long orderId;
68 ashish 19120
 
19121
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19122
    public enum _Fields implements TFieldIdEnum {
483 rajveer 19123
      ORDER_ID((short)1, "orderId");
68 ashish 19124
 
19125
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19126
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19127
 
19128
      static {
19129
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19130
          byId.put((int)field._thriftId, field);
19131
          byName.put(field.getFieldName(), field);
19132
        }
19133
      }
19134
 
19135
      /**
19136
       * Find the _Fields constant that matches fieldId, or null if its not found.
19137
       */
19138
      public static _Fields findByThriftId(int fieldId) {
19139
        return byId.get(fieldId);
19140
      }
19141
 
19142
      /**
19143
       * Find the _Fields constant that matches fieldId, throwing an exception
19144
       * if it is not found.
19145
       */
19146
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19147
        _Fields fields = findByThriftId(fieldId);
19148
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19149
        return fields;
19150
      }
19151
 
19152
      /**
19153
       * Find the _Fields constant that matches name, or null if its not found.
19154
       */
19155
      public static _Fields findByName(String name) {
19156
        return byName.get(name);
19157
      }
19158
 
19159
      private final short _thriftId;
19160
      private final String _fieldName;
19161
 
19162
      _Fields(short thriftId, String fieldName) {
19163
        _thriftId = thriftId;
19164
        _fieldName = fieldName;
19165
      }
19166
 
19167
      public short getThriftFieldId() {
19168
        return _thriftId;
19169
      }
19170
 
19171
      public String getFieldName() {
19172
        return _fieldName;
19173
      }
19174
    }
19175
 
19176
    // isset id assignments
483 rajveer 19177
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 19178
    private BitSet __isset_bit_vector = new BitSet(1);
19179
 
19180
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 19181
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 19182
          new FieldValueMetaData(TType.I64)));
19183
    }});
19184
 
19185
    static {
483 rajveer 19186
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 19187
    }
19188
 
483 rajveer 19189
    public getLineItemsForOrder_args() {
68 ashish 19190
    }
19191
 
483 rajveer 19192
    public getLineItemsForOrder_args(
19193
      long orderId)
68 ashish 19194
    {
19195
      this();
483 rajveer 19196
      this.orderId = orderId;
19197
      setOrderIdIsSet(true);
68 ashish 19198
    }
19199
 
19200
    /**
19201
     * Performs a deep copy on <i>other</i>.
19202
     */
483 rajveer 19203
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 19204
      __isset_bit_vector.clear();
19205
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 19206
      this.orderId = other.orderId;
68 ashish 19207
    }
19208
 
483 rajveer 19209
    public getLineItemsForOrder_args deepCopy() {
19210
      return new getLineItemsForOrder_args(this);
68 ashish 19211
    }
19212
 
19213
    @Deprecated
483 rajveer 19214
    public getLineItemsForOrder_args clone() {
19215
      return new getLineItemsForOrder_args(this);
68 ashish 19216
    }
19217
 
483 rajveer 19218
    public long getOrderId() {
19219
      return this.orderId;
68 ashish 19220
    }
19221
 
483 rajveer 19222
    public getLineItemsForOrder_args setOrderId(long orderId) {
19223
      this.orderId = orderId;
19224
      setOrderIdIsSet(true);
68 ashish 19225
      return this;
19226
    }
19227
 
483 rajveer 19228
    public void unsetOrderId() {
19229
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 19230
    }
19231
 
483 rajveer 19232
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19233
    public boolean isSetOrderId() {
19234
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 19235
    }
19236
 
483 rajveer 19237
    public void setOrderIdIsSet(boolean value) {
19238
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 19239
    }
19240
 
19241
    public void setFieldValue(_Fields field, Object value) {
19242
      switch (field) {
483 rajveer 19243
      case ORDER_ID:
68 ashish 19244
        if (value == null) {
483 rajveer 19245
          unsetOrderId();
68 ashish 19246
        } else {
483 rajveer 19247
          setOrderId((Long)value);
68 ashish 19248
        }
19249
        break;
19250
 
19251
      }
19252
    }
19253
 
19254
    public void setFieldValue(int fieldID, Object value) {
19255
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19256
    }
19257
 
19258
    public Object getFieldValue(_Fields field) {
19259
      switch (field) {
483 rajveer 19260
      case ORDER_ID:
19261
        return new Long(getOrderId());
68 ashish 19262
 
19263
      }
19264
      throw new IllegalStateException();
19265
    }
19266
 
19267
    public Object getFieldValue(int fieldId) {
19268
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19269
    }
19270
 
19271
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19272
    public boolean isSet(_Fields field) {
19273
      switch (field) {
483 rajveer 19274
      case ORDER_ID:
19275
        return isSetOrderId();
68 ashish 19276
      }
19277
      throw new IllegalStateException();
19278
    }
19279
 
19280
    public boolean isSet(int fieldID) {
19281
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19282
    }
19283
 
19284
    @Override
19285
    public boolean equals(Object that) {
19286
      if (that == null)
19287
        return false;
483 rajveer 19288
      if (that instanceof getLineItemsForOrder_args)
19289
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 19290
      return false;
19291
    }
19292
 
483 rajveer 19293
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 19294
      if (that == null)
19295
        return false;
19296
 
483 rajveer 19297
      boolean this_present_orderId = true;
19298
      boolean that_present_orderId = true;
19299
      if (this_present_orderId || that_present_orderId) {
19300
        if (!(this_present_orderId && that_present_orderId))
68 ashish 19301
          return false;
483 rajveer 19302
        if (this.orderId != that.orderId)
68 ashish 19303
          return false;
19304
      }
19305
 
19306
      return true;
19307
    }
19308
 
19309
    @Override
19310
    public int hashCode() {
19311
      return 0;
19312
    }
19313
 
483 rajveer 19314
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 19315
      if (!getClass().equals(other.getClass())) {
19316
        return getClass().getName().compareTo(other.getClass().getName());
19317
      }
19318
 
19319
      int lastComparison = 0;
483 rajveer 19320
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 19321
 
483 rajveer 19322
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 19323
      if (lastComparison != 0) {
19324
        return lastComparison;
19325
      }
483 rajveer 19326
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 19327
      if (lastComparison != 0) {
19328
        return lastComparison;
19329
      }
19330
      return 0;
19331
    }
19332
 
19333
    public void read(TProtocol iprot) throws TException {
19334
      TField field;
19335
      iprot.readStructBegin();
19336
      while (true)
19337
      {
19338
        field = iprot.readFieldBegin();
19339
        if (field.type == TType.STOP) { 
19340
          break;
19341
        }
19342
        _Fields fieldId = _Fields.findByThriftId(field.id);
19343
        if (fieldId == null) {
19344
          TProtocolUtil.skip(iprot, field.type);
19345
        } else {
19346
          switch (fieldId) {
483 rajveer 19347
            case ORDER_ID:
68 ashish 19348
              if (field.type == TType.I64) {
483 rajveer 19349
                this.orderId = iprot.readI64();
19350
                setOrderIdIsSet(true);
68 ashish 19351
              } else { 
19352
                TProtocolUtil.skip(iprot, field.type);
19353
              }
19354
              break;
19355
          }
19356
          iprot.readFieldEnd();
19357
        }
19358
      }
19359
      iprot.readStructEnd();
19360
      validate();
19361
    }
19362
 
19363
    public void write(TProtocol oprot) throws TException {
19364
      validate();
19365
 
19366
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 19367
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19368
      oprot.writeI64(this.orderId);
68 ashish 19369
      oprot.writeFieldEnd();
19370
      oprot.writeFieldStop();
19371
      oprot.writeStructEnd();
19372
    }
19373
 
19374
    @Override
19375
    public String toString() {
483 rajveer 19376
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 19377
      boolean first = true;
19378
 
483 rajveer 19379
      sb.append("orderId:");
19380
      sb.append(this.orderId);
68 ashish 19381
      first = false;
19382
      sb.append(")");
19383
      return sb.toString();
19384
    }
19385
 
19386
    public void validate() throws TException {
19387
      // check for required fields
19388
    }
19389
 
19390
  }
19391
 
483 rajveer 19392
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
19393
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 19394
 
483 rajveer 19395
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 19396
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19397
 
483 rajveer 19398
    private List<LineItem> success;
68 ashish 19399
    private TransactionServiceException ex;
19400
 
19401
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19402
    public enum _Fields implements TFieldIdEnum {
19403
      SUCCESS((short)0, "success"),
19404
      EX((short)1, "ex");
19405
 
19406
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19407
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19408
 
19409
      static {
19410
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19411
          byId.put((int)field._thriftId, field);
19412
          byName.put(field.getFieldName(), field);
19413
        }
19414
      }
19415
 
19416
      /**
19417
       * Find the _Fields constant that matches fieldId, or null if its not found.
19418
       */
19419
      public static _Fields findByThriftId(int fieldId) {
19420
        return byId.get(fieldId);
19421
      }
19422
 
19423
      /**
19424
       * Find the _Fields constant that matches fieldId, throwing an exception
19425
       * if it is not found.
19426
       */
19427
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19428
        _Fields fields = findByThriftId(fieldId);
19429
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19430
        return fields;
19431
      }
19432
 
19433
      /**
19434
       * Find the _Fields constant that matches name, or null if its not found.
19435
       */
19436
      public static _Fields findByName(String name) {
19437
        return byName.get(name);
19438
      }
19439
 
19440
      private final short _thriftId;
19441
      private final String _fieldName;
19442
 
19443
      _Fields(short thriftId, String fieldName) {
19444
        _thriftId = thriftId;
19445
        _fieldName = fieldName;
19446
      }
19447
 
19448
      public short getThriftFieldId() {
19449
        return _thriftId;
19450
      }
19451
 
19452
      public String getFieldName() {
19453
        return _fieldName;
19454
      }
19455
    }
19456
 
19457
    // isset id assignments
19458
 
19459
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19460
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 19461
          new ListMetaData(TType.LIST, 
19462
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 19463
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19464
          new FieldValueMetaData(TType.STRUCT)));
19465
    }});
19466
 
19467
    static {
483 rajveer 19468
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 19469
    }
19470
 
483 rajveer 19471
    public getLineItemsForOrder_result() {
68 ashish 19472
    }
19473
 
483 rajveer 19474
    public getLineItemsForOrder_result(
19475
      List<LineItem> success,
68 ashish 19476
      TransactionServiceException ex)
19477
    {
19478
      this();
19479
      this.success = success;
19480
      this.ex = ex;
19481
    }
19482
 
19483
    /**
19484
     * Performs a deep copy on <i>other</i>.
19485
     */
483 rajveer 19486
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
19487
      if (other.isSetSuccess()) {
19488
        List<LineItem> __this__success = new ArrayList<LineItem>();
19489
        for (LineItem other_element : other.success) {
19490
          __this__success.add(new LineItem(other_element));
19491
        }
19492
        this.success = __this__success;
19493
      }
68 ashish 19494
      if (other.isSetEx()) {
19495
        this.ex = new TransactionServiceException(other.ex);
19496
      }
19497
    }
19498
 
483 rajveer 19499
    public getLineItemsForOrder_result deepCopy() {
19500
      return new getLineItemsForOrder_result(this);
68 ashish 19501
    }
19502
 
19503
    @Deprecated
483 rajveer 19504
    public getLineItemsForOrder_result clone() {
19505
      return new getLineItemsForOrder_result(this);
68 ashish 19506
    }
19507
 
483 rajveer 19508
    public int getSuccessSize() {
19509
      return (this.success == null) ? 0 : this.success.size();
19510
    }
19511
 
19512
    public java.util.Iterator<LineItem> getSuccessIterator() {
19513
      return (this.success == null) ? null : this.success.iterator();
19514
    }
19515
 
19516
    public void addToSuccess(LineItem elem) {
19517
      if (this.success == null) {
19518
        this.success = new ArrayList<LineItem>();
19519
      }
19520
      this.success.add(elem);
19521
    }
19522
 
19523
    public List<LineItem> getSuccess() {
68 ashish 19524
      return this.success;
19525
    }
19526
 
483 rajveer 19527
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 19528
      this.success = success;
19529
      return this;
19530
    }
19531
 
19532
    public void unsetSuccess() {
483 rajveer 19533
      this.success = null;
68 ashish 19534
    }
19535
 
19536
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19537
    public boolean isSetSuccess() {
483 rajveer 19538
      return this.success != null;
68 ashish 19539
    }
19540
 
19541
    public void setSuccessIsSet(boolean value) {
483 rajveer 19542
      if (!value) {
19543
        this.success = null;
19544
      }
68 ashish 19545
    }
19546
 
19547
    public TransactionServiceException getEx() {
19548
      return this.ex;
19549
    }
19550
 
483 rajveer 19551
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 19552
      this.ex = ex;
19553
      return this;
19554
    }
19555
 
19556
    public void unsetEx() {
19557
      this.ex = null;
19558
    }
19559
 
19560
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19561
    public boolean isSetEx() {
19562
      return this.ex != null;
19563
    }
19564
 
19565
    public void setExIsSet(boolean value) {
19566
      if (!value) {
19567
        this.ex = null;
19568
      }
19569
    }
19570
 
19571
    public void setFieldValue(_Fields field, Object value) {
19572
      switch (field) {
19573
      case SUCCESS:
19574
        if (value == null) {
19575
          unsetSuccess();
19576
        } else {
483 rajveer 19577
          setSuccess((List<LineItem>)value);
68 ashish 19578
        }
19579
        break;
19580
 
19581
      case EX:
19582
        if (value == null) {
19583
          unsetEx();
19584
        } else {
19585
          setEx((TransactionServiceException)value);
19586
        }
19587
        break;
19588
 
19589
      }
19590
    }
19591
 
19592
    public void setFieldValue(int fieldID, Object value) {
19593
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19594
    }
19595
 
19596
    public Object getFieldValue(_Fields field) {
19597
      switch (field) {
19598
      case SUCCESS:
483 rajveer 19599
        return getSuccess();
68 ashish 19600
 
19601
      case EX:
19602
        return getEx();
19603
 
19604
      }
19605
      throw new IllegalStateException();
19606
    }
19607
 
19608
    public Object getFieldValue(int fieldId) {
19609
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19610
    }
19611
 
19612
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19613
    public boolean isSet(_Fields field) {
19614
      switch (field) {
19615
      case SUCCESS:
19616
        return isSetSuccess();
19617
      case EX:
19618
        return isSetEx();
19619
      }
19620
      throw new IllegalStateException();
19621
    }
19622
 
19623
    public boolean isSet(int fieldID) {
19624
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19625
    }
19626
 
19627
    @Override
19628
    public boolean equals(Object that) {
19629
      if (that == null)
19630
        return false;
483 rajveer 19631
      if (that instanceof getLineItemsForOrder_result)
19632
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 19633
      return false;
19634
    }
19635
 
483 rajveer 19636
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 19637
      if (that == null)
19638
        return false;
19639
 
483 rajveer 19640
      boolean this_present_success = true && this.isSetSuccess();
19641
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 19642
      if (this_present_success || that_present_success) {
19643
        if (!(this_present_success && that_present_success))
19644
          return false;
483 rajveer 19645
        if (!this.success.equals(that.success))
68 ashish 19646
          return false;
19647
      }
19648
 
19649
      boolean this_present_ex = true && this.isSetEx();
19650
      boolean that_present_ex = true && that.isSetEx();
19651
      if (this_present_ex || that_present_ex) {
19652
        if (!(this_present_ex && that_present_ex))
19653
          return false;
19654
        if (!this.ex.equals(that.ex))
19655
          return false;
19656
      }
19657
 
19658
      return true;
19659
    }
19660
 
19661
    @Override
19662
    public int hashCode() {
19663
      return 0;
19664
    }
19665
 
483 rajveer 19666
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 19667
      if (!getClass().equals(other.getClass())) {
19668
        return getClass().getName().compareTo(other.getClass().getName());
19669
      }
19670
 
19671
      int lastComparison = 0;
483 rajveer 19672
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 19673
 
19674
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19675
      if (lastComparison != 0) {
19676
        return lastComparison;
19677
      }
19678
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19679
      if (lastComparison != 0) {
19680
        return lastComparison;
19681
      }
19682
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19683
      if (lastComparison != 0) {
19684
        return lastComparison;
19685
      }
19686
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19687
      if (lastComparison != 0) {
19688
        return lastComparison;
19689
      }
19690
      return 0;
19691
    }
19692
 
19693
    public void read(TProtocol iprot) throws TException {
19694
      TField field;
19695
      iprot.readStructBegin();
19696
      while (true)
19697
      {
19698
        field = iprot.readFieldBegin();
19699
        if (field.type == TType.STOP) { 
19700
          break;
19701
        }
19702
        _Fields fieldId = _Fields.findByThriftId(field.id);
19703
        if (fieldId == null) {
19704
          TProtocolUtil.skip(iprot, field.type);
19705
        } else {
19706
          switch (fieldId) {
19707
            case SUCCESS:
483 rajveer 19708
              if (field.type == TType.LIST) {
19709
                {
1382 varun.gupt 19710
                  TList _list40 = iprot.readListBegin();
19711
                  this.success = new ArrayList<LineItem>(_list40.size);
19712
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 19713
                  {
1382 varun.gupt 19714
                    LineItem _elem42;
19715
                    _elem42 = new LineItem();
19716
                    _elem42.read(iprot);
19717
                    this.success.add(_elem42);
483 rajveer 19718
                  }
19719
                  iprot.readListEnd();
19720
                }
68 ashish 19721
              } else { 
19722
                TProtocolUtil.skip(iprot, field.type);
19723
              }
19724
              break;
19725
            case EX:
19726
              if (field.type == TType.STRUCT) {
19727
                this.ex = new TransactionServiceException();
19728
                this.ex.read(iprot);
19729
              } else { 
19730
                TProtocolUtil.skip(iprot, field.type);
19731
              }
19732
              break;
19733
          }
19734
          iprot.readFieldEnd();
19735
        }
19736
      }
19737
      iprot.readStructEnd();
19738
      validate();
19739
    }
19740
 
19741
    public void write(TProtocol oprot) throws TException {
19742
      oprot.writeStructBegin(STRUCT_DESC);
19743
 
19744
      if (this.isSetSuccess()) {
19745
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 19746
        {
19747
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 19748
          for (LineItem _iter43 : this.success)
483 rajveer 19749
          {
1382 varun.gupt 19750
            _iter43.write(oprot);
483 rajveer 19751
          }
19752
          oprot.writeListEnd();
19753
        }
68 ashish 19754
        oprot.writeFieldEnd();
19755
      } else if (this.isSetEx()) {
19756
        oprot.writeFieldBegin(EX_FIELD_DESC);
19757
        this.ex.write(oprot);
19758
        oprot.writeFieldEnd();
19759
      }
19760
      oprot.writeFieldStop();
19761
      oprot.writeStructEnd();
19762
    }
19763
 
19764
    @Override
19765
    public String toString() {
483 rajveer 19766
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 19767
      boolean first = true;
19768
 
19769
      sb.append("success:");
483 rajveer 19770
      if (this.success == null) {
19771
        sb.append("null");
19772
      } else {
19773
        sb.append(this.success);
19774
      }
68 ashish 19775
      first = false;
19776
      if (!first) sb.append(", ");
19777
      sb.append("ex:");
19778
      if (this.ex == null) {
19779
        sb.append("null");
19780
      } else {
19781
        sb.append(this.ex);
19782
      }
19783
      first = false;
19784
      sb.append(")");
19785
      return sb.toString();
19786
    }
19787
 
19788
    public void validate() throws TException {
19789
      // check for required fields
19790
    }
19791
 
19792
  }
19793
 
1529 ankur.sing 19794
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
19795
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
19796
 
19797
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
19798
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
19799
 
19800
    private long orderId;
19801
    private long customerId;
19802
 
19803
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19804
    public enum _Fields implements TFieldIdEnum {
19805
      ORDER_ID((short)1, "orderId"),
19806
      CUSTOMER_ID((short)2, "customerId");
19807
 
19808
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19809
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19810
 
19811
      static {
19812
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19813
          byId.put((int)field._thriftId, field);
19814
          byName.put(field.getFieldName(), field);
19815
        }
19816
      }
19817
 
19818
      /**
19819
       * Find the _Fields constant that matches fieldId, or null if its not found.
19820
       */
19821
      public static _Fields findByThriftId(int fieldId) {
19822
        return byId.get(fieldId);
19823
      }
19824
 
19825
      /**
19826
       * Find the _Fields constant that matches fieldId, throwing an exception
19827
       * if it is not found.
19828
       */
19829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19830
        _Fields fields = findByThriftId(fieldId);
19831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19832
        return fields;
19833
      }
19834
 
19835
      /**
19836
       * Find the _Fields constant that matches name, or null if its not found.
19837
       */
19838
      public static _Fields findByName(String name) {
19839
        return byName.get(name);
19840
      }
19841
 
19842
      private final short _thriftId;
19843
      private final String _fieldName;
19844
 
19845
      _Fields(short thriftId, String fieldName) {
19846
        _thriftId = thriftId;
19847
        _fieldName = fieldName;
19848
      }
19849
 
19850
      public short getThriftFieldId() {
19851
        return _thriftId;
19852
      }
19853
 
19854
      public String getFieldName() {
19855
        return _fieldName;
19856
      }
19857
    }
19858
 
19859
    // isset id assignments
19860
    private static final int __ORDERID_ISSET_ID = 0;
19861
    private static final int __CUSTOMERID_ISSET_ID = 1;
19862
    private BitSet __isset_bit_vector = new BitSet(2);
19863
 
19864
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19865
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
19866
          new FieldValueMetaData(TType.I64)));
19867
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
19868
          new FieldValueMetaData(TType.I64)));
19869
    }});
19870
 
19871
    static {
19872
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
19873
    }
19874
 
19875
    public getOrderForCustomer_args() {
19876
    }
19877
 
19878
    public getOrderForCustomer_args(
19879
      long orderId,
19880
      long customerId)
19881
    {
19882
      this();
19883
      this.orderId = orderId;
19884
      setOrderIdIsSet(true);
19885
      this.customerId = customerId;
19886
      setCustomerIdIsSet(true);
19887
    }
19888
 
19889
    /**
19890
     * Performs a deep copy on <i>other</i>.
19891
     */
19892
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
19893
      __isset_bit_vector.clear();
19894
      __isset_bit_vector.or(other.__isset_bit_vector);
19895
      this.orderId = other.orderId;
19896
      this.customerId = other.customerId;
19897
    }
19898
 
19899
    public getOrderForCustomer_args deepCopy() {
19900
      return new getOrderForCustomer_args(this);
19901
    }
19902
 
19903
    @Deprecated
19904
    public getOrderForCustomer_args clone() {
19905
      return new getOrderForCustomer_args(this);
19906
    }
19907
 
19908
    public long getOrderId() {
19909
      return this.orderId;
19910
    }
19911
 
19912
    public getOrderForCustomer_args setOrderId(long orderId) {
19913
      this.orderId = orderId;
19914
      setOrderIdIsSet(true);
19915
      return this;
19916
    }
19917
 
19918
    public void unsetOrderId() {
19919
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19920
    }
19921
 
19922
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19923
    public boolean isSetOrderId() {
19924
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19925
    }
19926
 
19927
    public void setOrderIdIsSet(boolean value) {
19928
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19929
    }
19930
 
19931
    public long getCustomerId() {
19932
      return this.customerId;
19933
    }
19934
 
19935
    public getOrderForCustomer_args setCustomerId(long customerId) {
19936
      this.customerId = customerId;
19937
      setCustomerIdIsSet(true);
19938
      return this;
19939
    }
19940
 
19941
    public void unsetCustomerId() {
19942
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
19943
    }
19944
 
19945
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
19946
    public boolean isSetCustomerId() {
19947
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
19948
    }
19949
 
19950
    public void setCustomerIdIsSet(boolean value) {
19951
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
19952
    }
19953
 
19954
    public void setFieldValue(_Fields field, Object value) {
19955
      switch (field) {
19956
      case ORDER_ID:
19957
        if (value == null) {
19958
          unsetOrderId();
19959
        } else {
19960
          setOrderId((Long)value);
19961
        }
19962
        break;
19963
 
19964
      case CUSTOMER_ID:
19965
        if (value == null) {
19966
          unsetCustomerId();
19967
        } else {
19968
          setCustomerId((Long)value);
19969
        }
19970
        break;
19971
 
19972
      }
19973
    }
19974
 
19975
    public void setFieldValue(int fieldID, Object value) {
19976
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19977
    }
19978
 
19979
    public Object getFieldValue(_Fields field) {
19980
      switch (field) {
19981
      case ORDER_ID:
19982
        return new Long(getOrderId());
19983
 
19984
      case CUSTOMER_ID:
19985
        return new Long(getCustomerId());
19986
 
19987
      }
19988
      throw new IllegalStateException();
19989
    }
19990
 
19991
    public Object getFieldValue(int fieldId) {
19992
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19993
    }
19994
 
19995
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19996
    public boolean isSet(_Fields field) {
19997
      switch (field) {
19998
      case ORDER_ID:
19999
        return isSetOrderId();
20000
      case CUSTOMER_ID:
20001
        return isSetCustomerId();
20002
      }
20003
      throw new IllegalStateException();
20004
    }
20005
 
20006
    public boolean isSet(int fieldID) {
20007
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20008
    }
20009
 
20010
    @Override
20011
    public boolean equals(Object that) {
20012
      if (that == null)
20013
        return false;
20014
      if (that instanceof getOrderForCustomer_args)
20015
        return this.equals((getOrderForCustomer_args)that);
20016
      return false;
20017
    }
20018
 
20019
    public boolean equals(getOrderForCustomer_args that) {
20020
      if (that == null)
20021
        return false;
20022
 
20023
      boolean this_present_orderId = true;
20024
      boolean that_present_orderId = true;
20025
      if (this_present_orderId || that_present_orderId) {
20026
        if (!(this_present_orderId && that_present_orderId))
20027
          return false;
20028
        if (this.orderId != that.orderId)
20029
          return false;
20030
      }
20031
 
20032
      boolean this_present_customerId = true;
20033
      boolean that_present_customerId = true;
20034
      if (this_present_customerId || that_present_customerId) {
20035
        if (!(this_present_customerId && that_present_customerId))
20036
          return false;
20037
        if (this.customerId != that.customerId)
20038
          return false;
20039
      }
20040
 
20041
      return true;
20042
    }
20043
 
20044
    @Override
20045
    public int hashCode() {
20046
      return 0;
20047
    }
20048
 
20049
    public int compareTo(getOrderForCustomer_args other) {
20050
      if (!getClass().equals(other.getClass())) {
20051
        return getClass().getName().compareTo(other.getClass().getName());
20052
      }
20053
 
20054
      int lastComparison = 0;
20055
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
20056
 
20057
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20058
      if (lastComparison != 0) {
20059
        return lastComparison;
20060
      }
20061
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20062
      if (lastComparison != 0) {
20063
        return lastComparison;
20064
      }
20065
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
20066
      if (lastComparison != 0) {
20067
        return lastComparison;
20068
      }
20069
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
20070
      if (lastComparison != 0) {
20071
        return lastComparison;
20072
      }
20073
      return 0;
20074
    }
20075
 
20076
    public void read(TProtocol iprot) throws TException {
20077
      TField field;
20078
      iprot.readStructBegin();
20079
      while (true)
20080
      {
20081
        field = iprot.readFieldBegin();
20082
        if (field.type == TType.STOP) { 
20083
          break;
20084
        }
20085
        _Fields fieldId = _Fields.findByThriftId(field.id);
20086
        if (fieldId == null) {
20087
          TProtocolUtil.skip(iprot, field.type);
20088
        } else {
20089
          switch (fieldId) {
20090
            case ORDER_ID:
20091
              if (field.type == TType.I64) {
20092
                this.orderId = iprot.readI64();
20093
                setOrderIdIsSet(true);
20094
              } else { 
20095
                TProtocolUtil.skip(iprot, field.type);
20096
              }
20097
              break;
20098
            case CUSTOMER_ID:
20099
              if (field.type == TType.I64) {
20100
                this.customerId = iprot.readI64();
20101
                setCustomerIdIsSet(true);
20102
              } else { 
20103
                TProtocolUtil.skip(iprot, field.type);
20104
              }
20105
              break;
20106
          }
20107
          iprot.readFieldEnd();
20108
        }
20109
      }
20110
      iprot.readStructEnd();
20111
      validate();
20112
    }
20113
 
20114
    public void write(TProtocol oprot) throws TException {
20115
      validate();
20116
 
20117
      oprot.writeStructBegin(STRUCT_DESC);
20118
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20119
      oprot.writeI64(this.orderId);
20120
      oprot.writeFieldEnd();
20121
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
20122
      oprot.writeI64(this.customerId);
20123
      oprot.writeFieldEnd();
20124
      oprot.writeFieldStop();
20125
      oprot.writeStructEnd();
20126
    }
20127
 
20128
    @Override
20129
    public String toString() {
20130
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
20131
      boolean first = true;
20132
 
20133
      sb.append("orderId:");
20134
      sb.append(this.orderId);
20135
      first = false;
20136
      if (!first) sb.append(", ");
20137
      sb.append("customerId:");
20138
      sb.append(this.customerId);
20139
      first = false;
20140
      sb.append(")");
20141
      return sb.toString();
20142
    }
20143
 
20144
    public void validate() throws TException {
20145
      // check for required fields
20146
    }
20147
 
20148
  }
20149
 
20150
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
20151
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
20152
 
20153
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
20154
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20155
 
20156
    private Order success;
20157
    private TransactionServiceException ex;
20158
 
20159
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20160
    public enum _Fields implements TFieldIdEnum {
20161
      SUCCESS((short)0, "success"),
20162
      EX((short)1, "ex");
20163
 
20164
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20165
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20166
 
20167
      static {
20168
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20169
          byId.put((int)field._thriftId, field);
20170
          byName.put(field.getFieldName(), field);
20171
        }
20172
      }
20173
 
20174
      /**
20175
       * Find the _Fields constant that matches fieldId, or null if its not found.
20176
       */
20177
      public static _Fields findByThriftId(int fieldId) {
20178
        return byId.get(fieldId);
20179
      }
20180
 
20181
      /**
20182
       * Find the _Fields constant that matches fieldId, throwing an exception
20183
       * if it is not found.
20184
       */
20185
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20186
        _Fields fields = findByThriftId(fieldId);
20187
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20188
        return fields;
20189
      }
20190
 
20191
      /**
20192
       * Find the _Fields constant that matches name, or null if its not found.
20193
       */
20194
      public static _Fields findByName(String name) {
20195
        return byName.get(name);
20196
      }
20197
 
20198
      private final short _thriftId;
20199
      private final String _fieldName;
20200
 
20201
      _Fields(short thriftId, String fieldName) {
20202
        _thriftId = thriftId;
20203
        _fieldName = fieldName;
20204
      }
20205
 
20206
      public short getThriftFieldId() {
20207
        return _thriftId;
20208
      }
20209
 
20210
      public String getFieldName() {
20211
        return _fieldName;
20212
      }
20213
    }
20214
 
20215
    // isset id assignments
20216
 
20217
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20218
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20219
          new StructMetaData(TType.STRUCT, Order.class)));
20220
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20221
          new FieldValueMetaData(TType.STRUCT)));
20222
    }});
20223
 
20224
    static {
20225
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
20226
    }
20227
 
20228
    public getOrderForCustomer_result() {
20229
    }
20230
 
20231
    public getOrderForCustomer_result(
20232
      Order success,
20233
      TransactionServiceException ex)
20234
    {
20235
      this();
20236
      this.success = success;
20237
      this.ex = ex;
20238
    }
20239
 
20240
    /**
20241
     * Performs a deep copy on <i>other</i>.
20242
     */
20243
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
20244
      if (other.isSetSuccess()) {
20245
        this.success = new Order(other.success);
20246
      }
20247
      if (other.isSetEx()) {
20248
        this.ex = new TransactionServiceException(other.ex);
20249
      }
20250
    }
20251
 
20252
    public getOrderForCustomer_result deepCopy() {
20253
      return new getOrderForCustomer_result(this);
20254
    }
20255
 
20256
    @Deprecated
20257
    public getOrderForCustomer_result clone() {
20258
      return new getOrderForCustomer_result(this);
20259
    }
20260
 
20261
    public Order getSuccess() {
20262
      return this.success;
20263
    }
20264
 
20265
    public getOrderForCustomer_result setSuccess(Order success) {
20266
      this.success = success;
20267
      return this;
20268
    }
20269
 
20270
    public void unsetSuccess() {
20271
      this.success = null;
20272
    }
20273
 
20274
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20275
    public boolean isSetSuccess() {
20276
      return this.success != null;
20277
    }
20278
 
20279
    public void setSuccessIsSet(boolean value) {
20280
      if (!value) {
20281
        this.success = null;
20282
      }
20283
    }
20284
 
20285
    public TransactionServiceException getEx() {
20286
      return this.ex;
20287
    }
20288
 
20289
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
20290
      this.ex = ex;
20291
      return this;
20292
    }
20293
 
20294
    public void unsetEx() {
20295
      this.ex = null;
20296
    }
20297
 
20298
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20299
    public boolean isSetEx() {
20300
      return this.ex != null;
20301
    }
20302
 
20303
    public void setExIsSet(boolean value) {
20304
      if (!value) {
20305
        this.ex = null;
20306
      }
20307
    }
20308
 
20309
    public void setFieldValue(_Fields field, Object value) {
20310
      switch (field) {
20311
      case SUCCESS:
20312
        if (value == null) {
20313
          unsetSuccess();
20314
        } else {
20315
          setSuccess((Order)value);
20316
        }
20317
        break;
20318
 
20319
      case EX:
20320
        if (value == null) {
20321
          unsetEx();
20322
        } else {
20323
          setEx((TransactionServiceException)value);
20324
        }
20325
        break;
20326
 
20327
      }
20328
    }
20329
 
20330
    public void setFieldValue(int fieldID, Object value) {
20331
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20332
    }
20333
 
20334
    public Object getFieldValue(_Fields field) {
20335
      switch (field) {
20336
      case SUCCESS:
20337
        return getSuccess();
20338
 
20339
      case EX:
20340
        return getEx();
20341
 
20342
      }
20343
      throw new IllegalStateException();
20344
    }
20345
 
20346
    public Object getFieldValue(int fieldId) {
20347
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20348
    }
20349
 
20350
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20351
    public boolean isSet(_Fields field) {
20352
      switch (field) {
20353
      case SUCCESS:
20354
        return isSetSuccess();
20355
      case EX:
20356
        return isSetEx();
20357
      }
20358
      throw new IllegalStateException();
20359
    }
20360
 
20361
    public boolean isSet(int fieldID) {
20362
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20363
    }
20364
 
20365
    @Override
20366
    public boolean equals(Object that) {
20367
      if (that == null)
20368
        return false;
20369
      if (that instanceof getOrderForCustomer_result)
20370
        return this.equals((getOrderForCustomer_result)that);
20371
      return false;
20372
    }
20373
 
20374
    public boolean equals(getOrderForCustomer_result that) {
20375
      if (that == null)
20376
        return false;
20377
 
20378
      boolean this_present_success = true && this.isSetSuccess();
20379
      boolean that_present_success = true && that.isSetSuccess();
20380
      if (this_present_success || that_present_success) {
20381
        if (!(this_present_success && that_present_success))
20382
          return false;
20383
        if (!this.success.equals(that.success))
20384
          return false;
20385
      }
20386
 
20387
      boolean this_present_ex = true && this.isSetEx();
20388
      boolean that_present_ex = true && that.isSetEx();
20389
      if (this_present_ex || that_present_ex) {
20390
        if (!(this_present_ex && that_present_ex))
20391
          return false;
20392
        if (!this.ex.equals(that.ex))
20393
          return false;
20394
      }
20395
 
20396
      return true;
20397
    }
20398
 
20399
    @Override
20400
    public int hashCode() {
20401
      return 0;
20402
    }
20403
 
20404
    public int compareTo(getOrderForCustomer_result other) {
20405
      if (!getClass().equals(other.getClass())) {
20406
        return getClass().getName().compareTo(other.getClass().getName());
20407
      }
20408
 
20409
      int lastComparison = 0;
20410
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
20411
 
20412
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20413
      if (lastComparison != 0) {
20414
        return lastComparison;
20415
      }
20416
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20417
      if (lastComparison != 0) {
20418
        return lastComparison;
20419
      }
20420
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20421
      if (lastComparison != 0) {
20422
        return lastComparison;
20423
      }
20424
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20425
      if (lastComparison != 0) {
20426
        return lastComparison;
20427
      }
20428
      return 0;
20429
    }
20430
 
20431
    public void read(TProtocol iprot) throws TException {
20432
      TField field;
20433
      iprot.readStructBegin();
20434
      while (true)
20435
      {
20436
        field = iprot.readFieldBegin();
20437
        if (field.type == TType.STOP) { 
20438
          break;
20439
        }
20440
        _Fields fieldId = _Fields.findByThriftId(field.id);
20441
        if (fieldId == null) {
20442
          TProtocolUtil.skip(iprot, field.type);
20443
        } else {
20444
          switch (fieldId) {
20445
            case SUCCESS:
20446
              if (field.type == TType.STRUCT) {
20447
                this.success = new Order();
20448
                this.success.read(iprot);
20449
              } else { 
20450
                TProtocolUtil.skip(iprot, field.type);
20451
              }
20452
              break;
20453
            case EX:
20454
              if (field.type == TType.STRUCT) {
20455
                this.ex = new TransactionServiceException();
20456
                this.ex.read(iprot);
20457
              } else { 
20458
                TProtocolUtil.skip(iprot, field.type);
20459
              }
20460
              break;
20461
          }
20462
          iprot.readFieldEnd();
20463
        }
20464
      }
20465
      iprot.readStructEnd();
20466
      validate();
20467
    }
20468
 
20469
    public void write(TProtocol oprot) throws TException {
20470
      oprot.writeStructBegin(STRUCT_DESC);
20471
 
20472
      if (this.isSetSuccess()) {
20473
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20474
        this.success.write(oprot);
20475
        oprot.writeFieldEnd();
20476
      } else if (this.isSetEx()) {
20477
        oprot.writeFieldBegin(EX_FIELD_DESC);
20478
        this.ex.write(oprot);
20479
        oprot.writeFieldEnd();
20480
      }
20481
      oprot.writeFieldStop();
20482
      oprot.writeStructEnd();
20483
    }
20484
 
20485
    @Override
20486
    public String toString() {
20487
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
20488
      boolean first = true;
20489
 
20490
      sb.append("success:");
20491
      if (this.success == null) {
20492
        sb.append("null");
20493
      } else {
20494
        sb.append(this.success);
20495
      }
20496
      first = false;
20497
      if (!first) sb.append(", ");
20498
      sb.append("ex:");
20499
      if (this.ex == null) {
20500
        sb.append("null");
20501
      } else {
20502
        sb.append(this.ex);
20503
      }
20504
      first = false;
20505
      sb.append(")");
20506
      return sb.toString();
20507
    }
20508
 
20509
    public void validate() throws TException {
20510
      // check for required fields
20511
    }
20512
 
20513
  }
20514
 
1221 chandransh 20515
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
20516
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
20517
 
20518
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
20519
 
20520
    private long warehouseId;
20521
 
20522
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20523
    public enum _Fields implements TFieldIdEnum {
20524
      WAREHOUSE_ID((short)1, "warehouseId");
20525
 
20526
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20527
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20528
 
20529
      static {
20530
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20531
          byId.put((int)field._thriftId, field);
20532
          byName.put(field.getFieldName(), field);
20533
        }
20534
      }
20535
 
20536
      /**
20537
       * Find the _Fields constant that matches fieldId, or null if its not found.
20538
       */
20539
      public static _Fields findByThriftId(int fieldId) {
20540
        return byId.get(fieldId);
20541
      }
20542
 
20543
      /**
20544
       * Find the _Fields constant that matches fieldId, throwing an exception
20545
       * if it is not found.
20546
       */
20547
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20548
        _Fields fields = findByThriftId(fieldId);
20549
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20550
        return fields;
20551
      }
20552
 
20553
      /**
20554
       * Find the _Fields constant that matches name, or null if its not found.
20555
       */
20556
      public static _Fields findByName(String name) {
20557
        return byName.get(name);
20558
      }
20559
 
20560
      private final short _thriftId;
20561
      private final String _fieldName;
20562
 
20563
      _Fields(short thriftId, String fieldName) {
20564
        _thriftId = thriftId;
20565
        _fieldName = fieldName;
20566
      }
20567
 
20568
      public short getThriftFieldId() {
20569
        return _thriftId;
20570
      }
20571
 
20572
      public String getFieldName() {
20573
        return _fieldName;
20574
      }
20575
    }
20576
 
20577
    // isset id assignments
20578
    private static final int __WAREHOUSEID_ISSET_ID = 0;
20579
    private BitSet __isset_bit_vector = new BitSet(1);
20580
 
20581
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20582
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
20583
          new FieldValueMetaData(TType.I64)));
20584
    }});
20585
 
20586
    static {
20587
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
20588
    }
20589
 
20590
    public batchOrders_args() {
20591
    }
20592
 
20593
    public batchOrders_args(
20594
      long warehouseId)
20595
    {
20596
      this();
20597
      this.warehouseId = warehouseId;
20598
      setWarehouseIdIsSet(true);
20599
    }
20600
 
20601
    /**
20602
     * Performs a deep copy on <i>other</i>.
20603
     */
20604
    public batchOrders_args(batchOrders_args other) {
20605
      __isset_bit_vector.clear();
20606
      __isset_bit_vector.or(other.__isset_bit_vector);
20607
      this.warehouseId = other.warehouseId;
20608
    }
20609
 
20610
    public batchOrders_args deepCopy() {
20611
      return new batchOrders_args(this);
20612
    }
20613
 
20614
    @Deprecated
20615
    public batchOrders_args clone() {
20616
      return new batchOrders_args(this);
20617
    }
20618
 
20619
    public long getWarehouseId() {
20620
      return this.warehouseId;
20621
    }
20622
 
20623
    public batchOrders_args setWarehouseId(long warehouseId) {
20624
      this.warehouseId = warehouseId;
20625
      setWarehouseIdIsSet(true);
20626
      return this;
20627
    }
20628
 
20629
    public void unsetWarehouseId() {
20630
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20631
    }
20632
 
20633
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
20634
    public boolean isSetWarehouseId() {
20635
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20636
    }
20637
 
20638
    public void setWarehouseIdIsSet(boolean value) {
20639
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20640
    }
20641
 
20642
    public void setFieldValue(_Fields field, Object value) {
20643
      switch (field) {
20644
      case WAREHOUSE_ID:
20645
        if (value == null) {
20646
          unsetWarehouseId();
20647
        } else {
20648
          setWarehouseId((Long)value);
20649
        }
20650
        break;
20651
 
20652
      }
20653
    }
20654
 
20655
    public void setFieldValue(int fieldID, Object value) {
20656
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20657
    }
20658
 
20659
    public Object getFieldValue(_Fields field) {
20660
      switch (field) {
20661
      case WAREHOUSE_ID:
20662
        return new Long(getWarehouseId());
20663
 
20664
      }
20665
      throw new IllegalStateException();
20666
    }
20667
 
20668
    public Object getFieldValue(int fieldId) {
20669
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20670
    }
20671
 
20672
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20673
    public boolean isSet(_Fields field) {
20674
      switch (field) {
20675
      case WAREHOUSE_ID:
20676
        return isSetWarehouseId();
20677
      }
20678
      throw new IllegalStateException();
20679
    }
20680
 
20681
    public boolean isSet(int fieldID) {
20682
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20683
    }
20684
 
20685
    @Override
20686
    public boolean equals(Object that) {
20687
      if (that == null)
20688
        return false;
20689
      if (that instanceof batchOrders_args)
20690
        return this.equals((batchOrders_args)that);
20691
      return false;
20692
    }
20693
 
20694
    public boolean equals(batchOrders_args that) {
20695
      if (that == null)
20696
        return false;
20697
 
20698
      boolean this_present_warehouseId = true;
20699
      boolean that_present_warehouseId = true;
20700
      if (this_present_warehouseId || that_present_warehouseId) {
20701
        if (!(this_present_warehouseId && that_present_warehouseId))
20702
          return false;
20703
        if (this.warehouseId != that.warehouseId)
20704
          return false;
20705
      }
20706
 
20707
      return true;
20708
    }
20709
 
20710
    @Override
20711
    public int hashCode() {
20712
      return 0;
20713
    }
20714
 
20715
    public int compareTo(batchOrders_args other) {
20716
      if (!getClass().equals(other.getClass())) {
20717
        return getClass().getName().compareTo(other.getClass().getName());
20718
      }
20719
 
20720
      int lastComparison = 0;
20721
      batchOrders_args typedOther = (batchOrders_args)other;
20722
 
20723
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
20724
      if (lastComparison != 0) {
20725
        return lastComparison;
20726
      }
20727
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
20728
      if (lastComparison != 0) {
20729
        return lastComparison;
20730
      }
20731
      return 0;
20732
    }
20733
 
20734
    public void read(TProtocol iprot) throws TException {
20735
      TField field;
20736
      iprot.readStructBegin();
20737
      while (true)
20738
      {
20739
        field = iprot.readFieldBegin();
20740
        if (field.type == TType.STOP) { 
20741
          break;
20742
        }
20743
        _Fields fieldId = _Fields.findByThriftId(field.id);
20744
        if (fieldId == null) {
20745
          TProtocolUtil.skip(iprot, field.type);
20746
        } else {
20747
          switch (fieldId) {
20748
            case WAREHOUSE_ID:
20749
              if (field.type == TType.I64) {
20750
                this.warehouseId = iprot.readI64();
20751
                setWarehouseIdIsSet(true);
20752
              } else { 
20753
                TProtocolUtil.skip(iprot, field.type);
20754
              }
20755
              break;
20756
          }
20757
          iprot.readFieldEnd();
20758
        }
20759
      }
20760
      iprot.readStructEnd();
20761
      validate();
20762
    }
20763
 
20764
    public void write(TProtocol oprot) throws TException {
20765
      validate();
20766
 
20767
      oprot.writeStructBegin(STRUCT_DESC);
20768
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20769
      oprot.writeI64(this.warehouseId);
20770
      oprot.writeFieldEnd();
20771
      oprot.writeFieldStop();
20772
      oprot.writeStructEnd();
20773
    }
20774
 
20775
    @Override
20776
    public String toString() {
20777
      StringBuilder sb = new StringBuilder("batchOrders_args(");
20778
      boolean first = true;
20779
 
20780
      sb.append("warehouseId:");
20781
      sb.append(this.warehouseId);
20782
      first = false;
20783
      sb.append(")");
20784
      return sb.toString();
20785
    }
20786
 
20787
    public void validate() throws TException {
20788
      // check for required fields
20789
    }
20790
 
20791
  }
20792
 
20793
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
20794
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
20795
 
20796
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20797
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20798
 
20799
    private List<Order> success;
20800
    private TransactionServiceException ex;
20801
 
20802
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20803
    public enum _Fields implements TFieldIdEnum {
20804
      SUCCESS((short)0, "success"),
20805
      EX((short)1, "ex");
20806
 
20807
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20808
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20809
 
20810
      static {
20811
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20812
          byId.put((int)field._thriftId, field);
20813
          byName.put(field.getFieldName(), field);
20814
        }
20815
      }
20816
 
20817
      /**
20818
       * Find the _Fields constant that matches fieldId, or null if its not found.
20819
       */
20820
      public static _Fields findByThriftId(int fieldId) {
20821
        return byId.get(fieldId);
20822
      }
20823
 
20824
      /**
20825
       * Find the _Fields constant that matches fieldId, throwing an exception
20826
       * if it is not found.
20827
       */
20828
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20829
        _Fields fields = findByThriftId(fieldId);
20830
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20831
        return fields;
20832
      }
20833
 
20834
      /**
20835
       * Find the _Fields constant that matches name, or null if its not found.
20836
       */
20837
      public static _Fields findByName(String name) {
20838
        return byName.get(name);
20839
      }
20840
 
20841
      private final short _thriftId;
20842
      private final String _fieldName;
20843
 
20844
      _Fields(short thriftId, String fieldName) {
20845
        _thriftId = thriftId;
20846
        _fieldName = fieldName;
20847
      }
20848
 
20849
      public short getThriftFieldId() {
20850
        return _thriftId;
20851
      }
20852
 
20853
      public String getFieldName() {
20854
        return _fieldName;
20855
      }
20856
    }
20857
 
20858
    // isset id assignments
20859
 
20860
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20861
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20862
          new ListMetaData(TType.LIST, 
20863
              new StructMetaData(TType.STRUCT, Order.class))));
20864
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20865
          new FieldValueMetaData(TType.STRUCT)));
20866
    }});
20867
 
20868
    static {
20869
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
20870
    }
20871
 
20872
    public batchOrders_result() {
20873
    }
20874
 
20875
    public batchOrders_result(
20876
      List<Order> success,
20877
      TransactionServiceException ex)
20878
    {
20879
      this();
20880
      this.success = success;
20881
      this.ex = ex;
20882
    }
20883
 
20884
    /**
20885
     * Performs a deep copy on <i>other</i>.
20886
     */
20887
    public batchOrders_result(batchOrders_result other) {
20888
      if (other.isSetSuccess()) {
20889
        List<Order> __this__success = new ArrayList<Order>();
20890
        for (Order other_element : other.success) {
20891
          __this__success.add(new Order(other_element));
20892
        }
20893
        this.success = __this__success;
20894
      }
20895
      if (other.isSetEx()) {
20896
        this.ex = new TransactionServiceException(other.ex);
20897
      }
20898
    }
20899
 
20900
    public batchOrders_result deepCopy() {
20901
      return new batchOrders_result(this);
20902
    }
20903
 
20904
    @Deprecated
20905
    public batchOrders_result clone() {
20906
      return new batchOrders_result(this);
20907
    }
20908
 
20909
    public int getSuccessSize() {
20910
      return (this.success == null) ? 0 : this.success.size();
20911
    }
20912
 
20913
    public java.util.Iterator<Order> getSuccessIterator() {
20914
      return (this.success == null) ? null : this.success.iterator();
20915
    }
20916
 
20917
    public void addToSuccess(Order elem) {
20918
      if (this.success == null) {
20919
        this.success = new ArrayList<Order>();
20920
      }
20921
      this.success.add(elem);
20922
    }
20923
 
20924
    public List<Order> getSuccess() {
20925
      return this.success;
20926
    }
20927
 
20928
    public batchOrders_result setSuccess(List<Order> success) {
20929
      this.success = success;
20930
      return this;
20931
    }
20932
 
20933
    public void unsetSuccess() {
20934
      this.success = null;
20935
    }
20936
 
20937
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20938
    public boolean isSetSuccess() {
20939
      return this.success != null;
20940
    }
20941
 
20942
    public void setSuccessIsSet(boolean value) {
20943
      if (!value) {
20944
        this.success = null;
20945
      }
20946
    }
20947
 
20948
    public TransactionServiceException getEx() {
20949
      return this.ex;
20950
    }
20951
 
20952
    public batchOrders_result setEx(TransactionServiceException ex) {
20953
      this.ex = ex;
20954
      return this;
20955
    }
20956
 
20957
    public void unsetEx() {
20958
      this.ex = null;
20959
    }
20960
 
20961
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20962
    public boolean isSetEx() {
20963
      return this.ex != null;
20964
    }
20965
 
20966
    public void setExIsSet(boolean value) {
20967
      if (!value) {
20968
        this.ex = null;
20969
      }
20970
    }
20971
 
20972
    public void setFieldValue(_Fields field, Object value) {
20973
      switch (field) {
20974
      case SUCCESS:
20975
        if (value == null) {
20976
          unsetSuccess();
20977
        } else {
20978
          setSuccess((List<Order>)value);
20979
        }
20980
        break;
20981
 
20982
      case EX:
20983
        if (value == null) {
20984
          unsetEx();
20985
        } else {
20986
          setEx((TransactionServiceException)value);
20987
        }
20988
        break;
20989
 
20990
      }
20991
    }
20992
 
20993
    public void setFieldValue(int fieldID, Object value) {
20994
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20995
    }
20996
 
20997
    public Object getFieldValue(_Fields field) {
20998
      switch (field) {
20999
      case SUCCESS:
21000
        return getSuccess();
21001
 
21002
      case EX:
21003
        return getEx();
21004
 
21005
      }
21006
      throw new IllegalStateException();
21007
    }
21008
 
21009
    public Object getFieldValue(int fieldId) {
21010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21011
    }
21012
 
21013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21014
    public boolean isSet(_Fields field) {
21015
      switch (field) {
21016
      case SUCCESS:
21017
        return isSetSuccess();
21018
      case EX:
21019
        return isSetEx();
21020
      }
21021
      throw new IllegalStateException();
21022
    }
21023
 
21024
    public boolean isSet(int fieldID) {
21025
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21026
    }
21027
 
21028
    @Override
21029
    public boolean equals(Object that) {
21030
      if (that == null)
21031
        return false;
21032
      if (that instanceof batchOrders_result)
21033
        return this.equals((batchOrders_result)that);
21034
      return false;
21035
    }
21036
 
21037
    public boolean equals(batchOrders_result that) {
21038
      if (that == null)
21039
        return false;
21040
 
21041
      boolean this_present_success = true && this.isSetSuccess();
21042
      boolean that_present_success = true && that.isSetSuccess();
21043
      if (this_present_success || that_present_success) {
21044
        if (!(this_present_success && that_present_success))
21045
          return false;
21046
        if (!this.success.equals(that.success))
21047
          return false;
21048
      }
21049
 
21050
      boolean this_present_ex = true && this.isSetEx();
21051
      boolean that_present_ex = true && that.isSetEx();
21052
      if (this_present_ex || that_present_ex) {
21053
        if (!(this_present_ex && that_present_ex))
21054
          return false;
21055
        if (!this.ex.equals(that.ex))
21056
          return false;
21057
      }
21058
 
21059
      return true;
21060
    }
21061
 
21062
    @Override
21063
    public int hashCode() {
21064
      return 0;
21065
    }
21066
 
21067
    public int compareTo(batchOrders_result other) {
21068
      if (!getClass().equals(other.getClass())) {
21069
        return getClass().getName().compareTo(other.getClass().getName());
21070
      }
21071
 
21072
      int lastComparison = 0;
21073
      batchOrders_result typedOther = (batchOrders_result)other;
21074
 
21075
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21076
      if (lastComparison != 0) {
21077
        return lastComparison;
21078
      }
21079
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21080
      if (lastComparison != 0) {
21081
        return lastComparison;
21082
      }
21083
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21084
      if (lastComparison != 0) {
21085
        return lastComparison;
21086
      }
21087
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21088
      if (lastComparison != 0) {
21089
        return lastComparison;
21090
      }
21091
      return 0;
21092
    }
21093
 
21094
    public void read(TProtocol iprot) throws TException {
21095
      TField field;
21096
      iprot.readStructBegin();
21097
      while (true)
21098
      {
21099
        field = iprot.readFieldBegin();
21100
        if (field.type == TType.STOP) { 
21101
          break;
21102
        }
21103
        _Fields fieldId = _Fields.findByThriftId(field.id);
21104
        if (fieldId == null) {
21105
          TProtocolUtil.skip(iprot, field.type);
21106
        } else {
21107
          switch (fieldId) {
21108
            case SUCCESS:
21109
              if (field.type == TType.LIST) {
21110
                {
1382 varun.gupt 21111
                  TList _list44 = iprot.readListBegin();
21112
                  this.success = new ArrayList<Order>(_list44.size);
21113
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 21114
                  {
1382 varun.gupt 21115
                    Order _elem46;
21116
                    _elem46 = new Order();
21117
                    _elem46.read(iprot);
21118
                    this.success.add(_elem46);
1221 chandransh 21119
                  }
21120
                  iprot.readListEnd();
21121
                }
21122
              } else { 
21123
                TProtocolUtil.skip(iprot, field.type);
21124
              }
21125
              break;
21126
            case EX:
21127
              if (field.type == TType.STRUCT) {
21128
                this.ex = new TransactionServiceException();
21129
                this.ex.read(iprot);
21130
              } else { 
21131
                TProtocolUtil.skip(iprot, field.type);
21132
              }
21133
              break;
21134
          }
21135
          iprot.readFieldEnd();
21136
        }
21137
      }
21138
      iprot.readStructEnd();
21139
      validate();
21140
    }
21141
 
21142
    public void write(TProtocol oprot) throws TException {
21143
      oprot.writeStructBegin(STRUCT_DESC);
21144
 
21145
      if (this.isSetSuccess()) {
21146
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21147
        {
21148
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 21149
          for (Order _iter47 : this.success)
1221 chandransh 21150
          {
1382 varun.gupt 21151
            _iter47.write(oprot);
1221 chandransh 21152
          }
21153
          oprot.writeListEnd();
21154
        }
21155
        oprot.writeFieldEnd();
21156
      } else if (this.isSetEx()) {
21157
        oprot.writeFieldBegin(EX_FIELD_DESC);
21158
        this.ex.write(oprot);
21159
        oprot.writeFieldEnd();
21160
      }
21161
      oprot.writeFieldStop();
21162
      oprot.writeStructEnd();
21163
    }
21164
 
21165
    @Override
21166
    public String toString() {
21167
      StringBuilder sb = new StringBuilder("batchOrders_result(");
21168
      boolean first = true;
21169
 
21170
      sb.append("success:");
21171
      if (this.success == null) {
21172
        sb.append("null");
21173
      } else {
21174
        sb.append(this.success);
21175
      }
21176
      first = false;
21177
      if (!first) sb.append(", ");
21178
      sb.append("ex:");
21179
      if (this.ex == null) {
21180
        sb.append("null");
21181
      } else {
21182
        sb.append(this.ex);
21183
      }
21184
      first = false;
21185
      sb.append(")");
21186
      return sb.toString();
21187
    }
21188
 
21189
    public void validate() throws TException {
21190
      // check for required fields
21191
    }
21192
 
21193
  }
21194
 
1209 chandransh 21195
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
21196
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
21197
 
21198
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
21199
 
21200
    private long orderId;
21201
 
21202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21203
    public enum _Fields implements TFieldIdEnum {
21204
      ORDER_ID((short)1, "orderId");
21205
 
21206
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21207
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21208
 
21209
      static {
21210
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21211
          byId.put((int)field._thriftId, field);
21212
          byName.put(field.getFieldName(), field);
21213
        }
21214
      }
21215
 
21216
      /**
21217
       * Find the _Fields constant that matches fieldId, or null if its not found.
21218
       */
21219
      public static _Fields findByThriftId(int fieldId) {
21220
        return byId.get(fieldId);
21221
      }
21222
 
21223
      /**
21224
       * Find the _Fields constant that matches fieldId, throwing an exception
21225
       * if it is not found.
21226
       */
21227
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21228
        _Fields fields = findByThriftId(fieldId);
21229
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21230
        return fields;
21231
      }
21232
 
21233
      /**
21234
       * Find the _Fields constant that matches name, or null if its not found.
21235
       */
21236
      public static _Fields findByName(String name) {
21237
        return byName.get(name);
21238
      }
21239
 
21240
      private final short _thriftId;
21241
      private final String _fieldName;
21242
 
21243
      _Fields(short thriftId, String fieldName) {
21244
        _thriftId = thriftId;
21245
        _fieldName = fieldName;
21246
      }
21247
 
21248
      public short getThriftFieldId() {
21249
        return _thriftId;
21250
      }
21251
 
21252
      public String getFieldName() {
21253
        return _fieldName;
21254
      }
21255
    }
21256
 
21257
    // isset id assignments
21258
    private static final int __ORDERID_ISSET_ID = 0;
21259
    private BitSet __isset_bit_vector = new BitSet(1);
21260
 
21261
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21262
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
21263
          new FieldValueMetaData(TType.I64)));
21264
    }});
21265
 
21266
    static {
21267
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
21268
    }
21269
 
21270
    public markOrderAsOutOfStock_args() {
21271
    }
21272
 
21273
    public markOrderAsOutOfStock_args(
21274
      long orderId)
21275
    {
21276
      this();
21277
      this.orderId = orderId;
21278
      setOrderIdIsSet(true);
21279
    }
21280
 
21281
    /**
21282
     * Performs a deep copy on <i>other</i>.
21283
     */
21284
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
21285
      __isset_bit_vector.clear();
21286
      __isset_bit_vector.or(other.__isset_bit_vector);
21287
      this.orderId = other.orderId;
21288
    }
21289
 
21290
    public markOrderAsOutOfStock_args deepCopy() {
21291
      return new markOrderAsOutOfStock_args(this);
21292
    }
21293
 
21294
    @Deprecated
21295
    public markOrderAsOutOfStock_args clone() {
21296
      return new markOrderAsOutOfStock_args(this);
21297
    }
21298
 
21299
    public long getOrderId() {
21300
      return this.orderId;
21301
    }
21302
 
21303
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
21304
      this.orderId = orderId;
21305
      setOrderIdIsSet(true);
21306
      return this;
21307
    }
21308
 
21309
    public void unsetOrderId() {
21310
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
21311
    }
21312
 
21313
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
21314
    public boolean isSetOrderId() {
21315
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
21316
    }
21317
 
21318
    public void setOrderIdIsSet(boolean value) {
21319
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
21320
    }
21321
 
21322
    public void setFieldValue(_Fields field, Object value) {
21323
      switch (field) {
21324
      case ORDER_ID:
21325
        if (value == null) {
21326
          unsetOrderId();
21327
        } else {
21328
          setOrderId((Long)value);
21329
        }
21330
        break;
21331
 
21332
      }
21333
    }
21334
 
21335
    public void setFieldValue(int fieldID, Object value) {
21336
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21337
    }
21338
 
21339
    public Object getFieldValue(_Fields field) {
21340
      switch (field) {
21341
      case ORDER_ID:
21342
        return new Long(getOrderId());
21343
 
21344
      }
21345
      throw new IllegalStateException();
21346
    }
21347
 
21348
    public Object getFieldValue(int fieldId) {
21349
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21350
    }
21351
 
21352
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21353
    public boolean isSet(_Fields field) {
21354
      switch (field) {
21355
      case ORDER_ID:
21356
        return isSetOrderId();
21357
      }
21358
      throw new IllegalStateException();
21359
    }
21360
 
21361
    public boolean isSet(int fieldID) {
21362
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21363
    }
21364
 
21365
    @Override
21366
    public boolean equals(Object that) {
21367
      if (that == null)
21368
        return false;
21369
      if (that instanceof markOrderAsOutOfStock_args)
21370
        return this.equals((markOrderAsOutOfStock_args)that);
21371
      return false;
21372
    }
21373
 
21374
    public boolean equals(markOrderAsOutOfStock_args that) {
21375
      if (that == null)
21376
        return false;
21377
 
21378
      boolean this_present_orderId = true;
21379
      boolean that_present_orderId = true;
21380
      if (this_present_orderId || that_present_orderId) {
21381
        if (!(this_present_orderId && that_present_orderId))
21382
          return false;
21383
        if (this.orderId != that.orderId)
21384
          return false;
21385
      }
21386
 
21387
      return true;
21388
    }
21389
 
21390
    @Override
21391
    public int hashCode() {
21392
      return 0;
21393
    }
21394
 
21395
    public int compareTo(markOrderAsOutOfStock_args other) {
21396
      if (!getClass().equals(other.getClass())) {
21397
        return getClass().getName().compareTo(other.getClass().getName());
21398
      }
21399
 
21400
      int lastComparison = 0;
21401
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
21402
 
21403
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
21404
      if (lastComparison != 0) {
21405
        return lastComparison;
21406
      }
21407
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
21408
      if (lastComparison != 0) {
21409
        return lastComparison;
21410
      }
21411
      return 0;
21412
    }
21413
 
21414
    public void read(TProtocol iprot) throws TException {
21415
      TField field;
21416
      iprot.readStructBegin();
21417
      while (true)
21418
      {
21419
        field = iprot.readFieldBegin();
21420
        if (field.type == TType.STOP) { 
21421
          break;
21422
        }
21423
        _Fields fieldId = _Fields.findByThriftId(field.id);
21424
        if (fieldId == null) {
21425
          TProtocolUtil.skip(iprot, field.type);
21426
        } else {
21427
          switch (fieldId) {
21428
            case ORDER_ID:
21429
              if (field.type == TType.I64) {
21430
                this.orderId = iprot.readI64();
21431
                setOrderIdIsSet(true);
21432
              } else { 
21433
                TProtocolUtil.skip(iprot, field.type);
21434
              }
21435
              break;
21436
          }
21437
          iprot.readFieldEnd();
21438
        }
21439
      }
21440
      iprot.readStructEnd();
21441
      validate();
21442
    }
21443
 
21444
    public void write(TProtocol oprot) throws TException {
21445
      validate();
21446
 
21447
      oprot.writeStructBegin(STRUCT_DESC);
21448
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
21449
      oprot.writeI64(this.orderId);
21450
      oprot.writeFieldEnd();
21451
      oprot.writeFieldStop();
21452
      oprot.writeStructEnd();
21453
    }
21454
 
21455
    @Override
21456
    public String toString() {
21457
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
21458
      boolean first = true;
21459
 
21460
      sb.append("orderId:");
21461
      sb.append(this.orderId);
21462
      first = false;
21463
      sb.append(")");
21464
      return sb.toString();
21465
    }
21466
 
21467
    public void validate() throws TException {
21468
      // check for required fields
21469
    }
21470
 
21471
  }
21472
 
21473
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
21474
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
21475
 
21476
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21477
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21478
 
21479
    private boolean success;
21480
    private TransactionServiceException ex;
21481
 
21482
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21483
    public enum _Fields implements TFieldIdEnum {
21484
      SUCCESS((short)0, "success"),
21485
      EX((short)1, "ex");
21486
 
21487
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21488
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21489
 
21490
      static {
21491
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21492
          byId.put((int)field._thriftId, field);
21493
          byName.put(field.getFieldName(), field);
21494
        }
21495
      }
21496
 
21497
      /**
21498
       * Find the _Fields constant that matches fieldId, or null if its not found.
21499
       */
21500
      public static _Fields findByThriftId(int fieldId) {
21501
        return byId.get(fieldId);
21502
      }
21503
 
21504
      /**
21505
       * Find the _Fields constant that matches fieldId, throwing an exception
21506
       * if it is not found.
21507
       */
21508
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21509
        _Fields fields = findByThriftId(fieldId);
21510
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21511
        return fields;
21512
      }
21513
 
21514
      /**
21515
       * Find the _Fields constant that matches name, or null if its not found.
21516
       */
21517
      public static _Fields findByName(String name) {
21518
        return byName.get(name);
21519
      }
21520
 
21521
      private final short _thriftId;
21522
      private final String _fieldName;
21523
 
21524
      _Fields(short thriftId, String fieldName) {
21525
        _thriftId = thriftId;
21526
        _fieldName = fieldName;
21527
      }
21528
 
21529
      public short getThriftFieldId() {
21530
        return _thriftId;
21531
      }
21532
 
21533
      public String getFieldName() {
21534
        return _fieldName;
21535
      }
21536
    }
21537
 
21538
    // isset id assignments
21539
    private static final int __SUCCESS_ISSET_ID = 0;
21540
    private BitSet __isset_bit_vector = new BitSet(1);
21541
 
21542
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21543
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21544
          new FieldValueMetaData(TType.BOOL)));
21545
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21546
          new FieldValueMetaData(TType.STRUCT)));
21547
    }});
21548
 
21549
    static {
21550
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
21551
    }
21552
 
21553
    public markOrderAsOutOfStock_result() {
21554
    }
21555
 
21556
    public markOrderAsOutOfStock_result(
21557
      boolean success,
21558
      TransactionServiceException ex)
21559
    {
21560
      this();
21561
      this.success = success;
21562
      setSuccessIsSet(true);
21563
      this.ex = ex;
21564
    }
21565
 
21566
    /**
21567
     * Performs a deep copy on <i>other</i>.
21568
     */
21569
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
21570
      __isset_bit_vector.clear();
21571
      __isset_bit_vector.or(other.__isset_bit_vector);
21572
      this.success = other.success;
21573
      if (other.isSetEx()) {
21574
        this.ex = new TransactionServiceException(other.ex);
21575
      }
21576
    }
21577
 
21578
    public markOrderAsOutOfStock_result deepCopy() {
21579
      return new markOrderAsOutOfStock_result(this);
21580
    }
21581
 
21582
    @Deprecated
21583
    public markOrderAsOutOfStock_result clone() {
21584
      return new markOrderAsOutOfStock_result(this);
21585
    }
21586
 
21587
    public boolean isSuccess() {
21588
      return this.success;
21589
    }
21590
 
21591
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
21592
      this.success = success;
21593
      setSuccessIsSet(true);
21594
      return this;
21595
    }
21596
 
21597
    public void unsetSuccess() {
21598
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21599
    }
21600
 
21601
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21602
    public boolean isSetSuccess() {
21603
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21604
    }
21605
 
21606
    public void setSuccessIsSet(boolean value) {
21607
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21608
    }
21609
 
21610
    public TransactionServiceException getEx() {
21611
      return this.ex;
21612
    }
21613
 
21614
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
21615
      this.ex = ex;
21616
      return this;
21617
    }
21618
 
21619
    public void unsetEx() {
21620
      this.ex = null;
21621
    }
21622
 
21623
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21624
    public boolean isSetEx() {
21625
      return this.ex != null;
21626
    }
21627
 
21628
    public void setExIsSet(boolean value) {
21629
      if (!value) {
21630
        this.ex = null;
21631
      }
21632
    }
21633
 
21634
    public void setFieldValue(_Fields field, Object value) {
21635
      switch (field) {
21636
      case SUCCESS:
21637
        if (value == null) {
21638
          unsetSuccess();
21639
        } else {
21640
          setSuccess((Boolean)value);
21641
        }
21642
        break;
21643
 
21644
      case EX:
21645
        if (value == null) {
21646
          unsetEx();
21647
        } else {
21648
          setEx((TransactionServiceException)value);
21649
        }
21650
        break;
21651
 
21652
      }
21653
    }
21654
 
21655
    public void setFieldValue(int fieldID, Object value) {
21656
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21657
    }
21658
 
21659
    public Object getFieldValue(_Fields field) {
21660
      switch (field) {
21661
      case SUCCESS:
21662
        return new Boolean(isSuccess());
21663
 
21664
      case EX:
21665
        return getEx();
21666
 
21667
      }
21668
      throw new IllegalStateException();
21669
    }
21670
 
21671
    public Object getFieldValue(int fieldId) {
21672
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21673
    }
21674
 
21675
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21676
    public boolean isSet(_Fields field) {
21677
      switch (field) {
21678
      case SUCCESS:
21679
        return isSetSuccess();
21680
      case EX:
21681
        return isSetEx();
21682
      }
21683
      throw new IllegalStateException();
21684
    }
21685
 
21686
    public boolean isSet(int fieldID) {
21687
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21688
    }
21689
 
21690
    @Override
21691
    public boolean equals(Object that) {
21692
      if (that == null)
21693
        return false;
21694
      if (that instanceof markOrderAsOutOfStock_result)
21695
        return this.equals((markOrderAsOutOfStock_result)that);
21696
      return false;
21697
    }
21698
 
21699
    public boolean equals(markOrderAsOutOfStock_result that) {
21700
      if (that == null)
21701
        return false;
21702
 
21703
      boolean this_present_success = true;
21704
      boolean that_present_success = true;
21705
      if (this_present_success || that_present_success) {
21706
        if (!(this_present_success && that_present_success))
21707
          return false;
21708
        if (this.success != that.success)
21709
          return false;
21710
      }
21711
 
21712
      boolean this_present_ex = true && this.isSetEx();
21713
      boolean that_present_ex = true && that.isSetEx();
21714
      if (this_present_ex || that_present_ex) {
21715
        if (!(this_present_ex && that_present_ex))
21716
          return false;
21717
        if (!this.ex.equals(that.ex))
21718
          return false;
21719
      }
21720
 
21721
      return true;
21722
    }
21723
 
21724
    @Override
21725
    public int hashCode() {
21726
      return 0;
21727
    }
21728
 
21729
    public int compareTo(markOrderAsOutOfStock_result other) {
21730
      if (!getClass().equals(other.getClass())) {
21731
        return getClass().getName().compareTo(other.getClass().getName());
21732
      }
21733
 
21734
      int lastComparison = 0;
21735
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
21736
 
21737
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21738
      if (lastComparison != 0) {
21739
        return lastComparison;
21740
      }
21741
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21742
      if (lastComparison != 0) {
21743
        return lastComparison;
21744
      }
21745
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21746
      if (lastComparison != 0) {
21747
        return lastComparison;
21748
      }
21749
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21750
      if (lastComparison != 0) {
21751
        return lastComparison;
21752
      }
21753
      return 0;
21754
    }
21755
 
21756
    public void read(TProtocol iprot) throws TException {
21757
      TField field;
21758
      iprot.readStructBegin();
21759
      while (true)
21760
      {
21761
        field = iprot.readFieldBegin();
21762
        if (field.type == TType.STOP) { 
21763
          break;
21764
        }
21765
        _Fields fieldId = _Fields.findByThriftId(field.id);
21766
        if (fieldId == null) {
21767
          TProtocolUtil.skip(iprot, field.type);
21768
        } else {
21769
          switch (fieldId) {
21770
            case SUCCESS:
21771
              if (field.type == TType.BOOL) {
21772
                this.success = iprot.readBool();
21773
                setSuccessIsSet(true);
21774
              } else { 
21775
                TProtocolUtil.skip(iprot, field.type);
21776
              }
21777
              break;
21778
            case EX:
21779
              if (field.type == TType.STRUCT) {
21780
                this.ex = new TransactionServiceException();
21781
                this.ex.read(iprot);
21782
              } else { 
21783
                TProtocolUtil.skip(iprot, field.type);
21784
              }
21785
              break;
21786
          }
21787
          iprot.readFieldEnd();
21788
        }
21789
      }
21790
      iprot.readStructEnd();
21791
      validate();
21792
    }
21793
 
21794
    public void write(TProtocol oprot) throws TException {
21795
      oprot.writeStructBegin(STRUCT_DESC);
21796
 
21797
      if (this.isSetSuccess()) {
21798
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21799
        oprot.writeBool(this.success);
21800
        oprot.writeFieldEnd();
21801
      } else if (this.isSetEx()) {
21802
        oprot.writeFieldBegin(EX_FIELD_DESC);
21803
        this.ex.write(oprot);
21804
        oprot.writeFieldEnd();
21805
      }
21806
      oprot.writeFieldStop();
21807
      oprot.writeStructEnd();
21808
    }
21809
 
21810
    @Override
21811
    public String toString() {
21812
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
21813
      boolean first = true;
21814
 
21815
      sb.append("success:");
21816
      sb.append(this.success);
21817
      first = false;
21818
      if (!first) sb.append(", ");
21819
      sb.append("ex:");
21820
      if (this.ex == null) {
21821
        sb.append("null");
21822
      } else {
21823
        sb.append(this.ex);
21824
      }
21825
      first = false;
21826
      sb.append(")");
21827
      return sb.toString();
21828
    }
21829
 
21830
    public void validate() throws TException {
21831
      // check for required fields
21832
    }
21833
 
21834
  }
21835
 
758 chandransh 21836
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
21837
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
21838
 
21839
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
21840
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
21841
 
21842
    private long warehouseId;
21843
    private long providerId;
21844
 
21845
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21846
    public enum _Fields implements TFieldIdEnum {
21847
      WAREHOUSE_ID((short)1, "warehouseId"),
21848
      PROVIDER_ID((short)2, "providerId");
21849
 
21850
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21851
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21852
 
21853
      static {
21854
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21855
          byId.put((int)field._thriftId, field);
21856
          byName.put(field.getFieldName(), field);
21857
        }
21858
      }
21859
 
21860
      /**
21861
       * Find the _Fields constant that matches fieldId, or null if its not found.
21862
       */
21863
      public static _Fields findByThriftId(int fieldId) {
21864
        return byId.get(fieldId);
21865
      }
21866
 
21867
      /**
21868
       * Find the _Fields constant that matches fieldId, throwing an exception
21869
       * if it is not found.
21870
       */
21871
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21872
        _Fields fields = findByThriftId(fieldId);
21873
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21874
        return fields;
21875
      }
21876
 
21877
      /**
21878
       * Find the _Fields constant that matches name, or null if its not found.
21879
       */
21880
      public static _Fields findByName(String name) {
21881
        return byName.get(name);
21882
      }
21883
 
21884
      private final short _thriftId;
21885
      private final String _fieldName;
21886
 
21887
      _Fields(short thriftId, String fieldName) {
21888
        _thriftId = thriftId;
21889
        _fieldName = fieldName;
21890
      }
21891
 
21892
      public short getThriftFieldId() {
21893
        return _thriftId;
21894
      }
21895
 
21896
      public String getFieldName() {
21897
        return _fieldName;
21898
      }
21899
    }
21900
 
21901
    // isset id assignments
21902
    private static final int __WAREHOUSEID_ISSET_ID = 0;
21903
    private static final int __PROVIDERID_ISSET_ID = 1;
21904
    private BitSet __isset_bit_vector = new BitSet(2);
21905
 
21906
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21907
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
21908
          new FieldValueMetaData(TType.I64)));
21909
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21910
          new FieldValueMetaData(TType.I64)));
21911
    }});
21912
 
21913
    static {
21914
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
21915
    }
21916
 
21917
    public markOrdersAsManifested_args() {
21918
    }
21919
 
21920
    public markOrdersAsManifested_args(
21921
      long warehouseId,
21922
      long providerId)
21923
    {
21924
      this();
21925
      this.warehouseId = warehouseId;
21926
      setWarehouseIdIsSet(true);
21927
      this.providerId = providerId;
21928
      setProviderIdIsSet(true);
21929
    }
21930
 
21931
    /**
21932
     * Performs a deep copy on <i>other</i>.
21933
     */
21934
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
21935
      __isset_bit_vector.clear();
21936
      __isset_bit_vector.or(other.__isset_bit_vector);
21937
      this.warehouseId = other.warehouseId;
21938
      this.providerId = other.providerId;
21939
    }
21940
 
21941
    public markOrdersAsManifested_args deepCopy() {
21942
      return new markOrdersAsManifested_args(this);
21943
    }
21944
 
21945
    @Deprecated
21946
    public markOrdersAsManifested_args clone() {
21947
      return new markOrdersAsManifested_args(this);
21948
    }
21949
 
21950
    public long getWarehouseId() {
21951
      return this.warehouseId;
21952
    }
21953
 
21954
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
21955
      this.warehouseId = warehouseId;
21956
      setWarehouseIdIsSet(true);
21957
      return this;
21958
    }
21959
 
21960
    public void unsetWarehouseId() {
21961
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
21962
    }
21963
 
21964
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
21965
    public boolean isSetWarehouseId() {
21966
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
21967
    }
21968
 
21969
    public void setWarehouseIdIsSet(boolean value) {
21970
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
21971
    }
21972
 
21973
    public long getProviderId() {
21974
      return this.providerId;
21975
    }
21976
 
21977
    public markOrdersAsManifested_args setProviderId(long providerId) {
21978
      this.providerId = providerId;
21979
      setProviderIdIsSet(true);
21980
      return this;
21981
    }
21982
 
21983
    public void unsetProviderId() {
21984
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21985
    }
21986
 
21987
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21988
    public boolean isSetProviderId() {
21989
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21990
    }
21991
 
21992
    public void setProviderIdIsSet(boolean value) {
21993
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21994
    }
21995
 
21996
    public void setFieldValue(_Fields field, Object value) {
21997
      switch (field) {
21998
      case WAREHOUSE_ID:
21999
        if (value == null) {
22000
          unsetWarehouseId();
22001
        } else {
22002
          setWarehouseId((Long)value);
22003
        }
22004
        break;
22005
 
22006
      case PROVIDER_ID:
22007
        if (value == null) {
22008
          unsetProviderId();
22009
        } else {
22010
          setProviderId((Long)value);
22011
        }
22012
        break;
22013
 
22014
      }
22015
    }
22016
 
22017
    public void setFieldValue(int fieldID, Object value) {
22018
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22019
    }
22020
 
22021
    public Object getFieldValue(_Fields field) {
22022
      switch (field) {
22023
      case WAREHOUSE_ID:
22024
        return new Long(getWarehouseId());
22025
 
22026
      case PROVIDER_ID:
22027
        return new Long(getProviderId());
22028
 
22029
      }
22030
      throw new IllegalStateException();
22031
    }
22032
 
22033
    public Object getFieldValue(int fieldId) {
22034
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22035
    }
22036
 
22037
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22038
    public boolean isSet(_Fields field) {
22039
      switch (field) {
22040
      case WAREHOUSE_ID:
22041
        return isSetWarehouseId();
22042
      case PROVIDER_ID:
22043
        return isSetProviderId();
22044
      }
22045
      throw new IllegalStateException();
22046
    }
22047
 
22048
    public boolean isSet(int fieldID) {
22049
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22050
    }
22051
 
22052
    @Override
22053
    public boolean equals(Object that) {
22054
      if (that == null)
22055
        return false;
22056
      if (that instanceof markOrdersAsManifested_args)
22057
        return this.equals((markOrdersAsManifested_args)that);
22058
      return false;
22059
    }
22060
 
22061
    public boolean equals(markOrdersAsManifested_args that) {
22062
      if (that == null)
22063
        return false;
22064
 
22065
      boolean this_present_warehouseId = true;
22066
      boolean that_present_warehouseId = true;
22067
      if (this_present_warehouseId || that_present_warehouseId) {
22068
        if (!(this_present_warehouseId && that_present_warehouseId))
22069
          return false;
22070
        if (this.warehouseId != that.warehouseId)
22071
          return false;
22072
      }
22073
 
22074
      boolean this_present_providerId = true;
22075
      boolean that_present_providerId = true;
22076
      if (this_present_providerId || that_present_providerId) {
22077
        if (!(this_present_providerId && that_present_providerId))
22078
          return false;
22079
        if (this.providerId != that.providerId)
22080
          return false;
22081
      }
22082
 
22083
      return true;
22084
    }
22085
 
22086
    @Override
22087
    public int hashCode() {
22088
      return 0;
22089
    }
22090
 
22091
    public int compareTo(markOrdersAsManifested_args other) {
22092
      if (!getClass().equals(other.getClass())) {
22093
        return getClass().getName().compareTo(other.getClass().getName());
22094
      }
22095
 
22096
      int lastComparison = 0;
22097
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
22098
 
22099
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
22100
      if (lastComparison != 0) {
22101
        return lastComparison;
22102
      }
22103
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
22104
      if (lastComparison != 0) {
22105
        return lastComparison;
22106
      }
22107
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
22108
      if (lastComparison != 0) {
22109
        return lastComparison;
22110
      }
22111
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
22112
      if (lastComparison != 0) {
22113
        return lastComparison;
22114
      }
22115
      return 0;
22116
    }
22117
 
22118
    public void read(TProtocol iprot) throws TException {
22119
      TField field;
22120
      iprot.readStructBegin();
22121
      while (true)
22122
      {
22123
        field = iprot.readFieldBegin();
22124
        if (field.type == TType.STOP) { 
22125
          break;
22126
        }
22127
        _Fields fieldId = _Fields.findByThriftId(field.id);
22128
        if (fieldId == null) {
22129
          TProtocolUtil.skip(iprot, field.type);
22130
        } else {
22131
          switch (fieldId) {
22132
            case WAREHOUSE_ID:
22133
              if (field.type == TType.I64) {
22134
                this.warehouseId = iprot.readI64();
22135
                setWarehouseIdIsSet(true);
22136
              } else { 
22137
                TProtocolUtil.skip(iprot, field.type);
22138
              }
22139
              break;
22140
            case PROVIDER_ID:
22141
              if (field.type == TType.I64) {
22142
                this.providerId = iprot.readI64();
22143
                setProviderIdIsSet(true);
22144
              } else { 
22145
                TProtocolUtil.skip(iprot, field.type);
22146
              }
22147
              break;
22148
          }
22149
          iprot.readFieldEnd();
22150
        }
22151
      }
22152
      iprot.readStructEnd();
22153
      validate();
22154
    }
22155
 
22156
    public void write(TProtocol oprot) throws TException {
22157
      validate();
22158
 
22159
      oprot.writeStructBegin(STRUCT_DESC);
22160
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
22161
      oprot.writeI64(this.warehouseId);
22162
      oprot.writeFieldEnd();
22163
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22164
      oprot.writeI64(this.providerId);
22165
      oprot.writeFieldEnd();
22166
      oprot.writeFieldStop();
22167
      oprot.writeStructEnd();
22168
    }
22169
 
22170
    @Override
22171
    public String toString() {
22172
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
22173
      boolean first = true;
22174
 
22175
      sb.append("warehouseId:");
22176
      sb.append(this.warehouseId);
22177
      first = false;
22178
      if (!first) sb.append(", ");
22179
      sb.append("providerId:");
22180
      sb.append(this.providerId);
22181
      first = false;
22182
      sb.append(")");
22183
      return sb.toString();
22184
    }
22185
 
22186
    public void validate() throws TException {
22187
      // check for required fields
22188
    }
22189
 
22190
  }
22191
 
22192
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
22193
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
22194
 
22195
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
22196
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22197
 
22198
    private boolean success;
22199
    private TransactionServiceException ex;
22200
 
22201
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22202
    public enum _Fields implements TFieldIdEnum {
22203
      SUCCESS((short)0, "success"),
22204
      EX((short)1, "ex");
22205
 
22206
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22207
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22208
 
22209
      static {
22210
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22211
          byId.put((int)field._thriftId, field);
22212
          byName.put(field.getFieldName(), field);
22213
        }
22214
      }
22215
 
22216
      /**
22217
       * Find the _Fields constant that matches fieldId, or null if its not found.
22218
       */
22219
      public static _Fields findByThriftId(int fieldId) {
22220
        return byId.get(fieldId);
22221
      }
22222
 
22223
      /**
22224
       * Find the _Fields constant that matches fieldId, throwing an exception
22225
       * if it is not found.
22226
       */
22227
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22228
        _Fields fields = findByThriftId(fieldId);
22229
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22230
        return fields;
22231
      }
22232
 
22233
      /**
22234
       * Find the _Fields constant that matches name, or null if its not found.
22235
       */
22236
      public static _Fields findByName(String name) {
22237
        return byName.get(name);
22238
      }
22239
 
22240
      private final short _thriftId;
22241
      private final String _fieldName;
22242
 
22243
      _Fields(short thriftId, String fieldName) {
22244
        _thriftId = thriftId;
22245
        _fieldName = fieldName;
22246
      }
22247
 
22248
      public short getThriftFieldId() {
22249
        return _thriftId;
22250
      }
22251
 
22252
      public String getFieldName() {
22253
        return _fieldName;
22254
      }
22255
    }
22256
 
22257
    // isset id assignments
22258
    private static final int __SUCCESS_ISSET_ID = 0;
22259
    private BitSet __isset_bit_vector = new BitSet(1);
22260
 
22261
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22262
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
22263
          new FieldValueMetaData(TType.BOOL)));
22264
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22265
          new FieldValueMetaData(TType.STRUCT)));
22266
    }});
22267
 
22268
    static {
22269
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
22270
    }
22271
 
22272
    public markOrdersAsManifested_result() {
22273
    }
22274
 
22275
    public markOrdersAsManifested_result(
22276
      boolean success,
22277
      TransactionServiceException ex)
22278
    {
22279
      this();
22280
      this.success = success;
22281
      setSuccessIsSet(true);
22282
      this.ex = ex;
22283
    }
22284
 
22285
    /**
22286
     * Performs a deep copy on <i>other</i>.
22287
     */
22288
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
22289
      __isset_bit_vector.clear();
22290
      __isset_bit_vector.or(other.__isset_bit_vector);
22291
      this.success = other.success;
22292
      if (other.isSetEx()) {
22293
        this.ex = new TransactionServiceException(other.ex);
22294
      }
22295
    }
22296
 
22297
    public markOrdersAsManifested_result deepCopy() {
22298
      return new markOrdersAsManifested_result(this);
22299
    }
22300
 
22301
    @Deprecated
22302
    public markOrdersAsManifested_result clone() {
22303
      return new markOrdersAsManifested_result(this);
22304
    }
22305
 
22306
    public boolean isSuccess() {
22307
      return this.success;
22308
    }
22309
 
22310
    public markOrdersAsManifested_result setSuccess(boolean success) {
22311
      this.success = success;
22312
      setSuccessIsSet(true);
22313
      return this;
22314
    }
22315
 
22316
    public void unsetSuccess() {
22317
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
22318
    }
22319
 
22320
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22321
    public boolean isSetSuccess() {
22322
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
22323
    }
22324
 
22325
    public void setSuccessIsSet(boolean value) {
22326
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
22327
    }
22328
 
22329
    public TransactionServiceException getEx() {
22330
      return this.ex;
22331
    }
22332
 
22333
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
22334
      this.ex = ex;
22335
      return this;
22336
    }
22337
 
22338
    public void unsetEx() {
22339
      this.ex = null;
22340
    }
22341
 
22342
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22343
    public boolean isSetEx() {
22344
      return this.ex != null;
22345
    }
22346
 
22347
    public void setExIsSet(boolean value) {
22348
      if (!value) {
22349
        this.ex = null;
22350
      }
22351
    }
22352
 
22353
    public void setFieldValue(_Fields field, Object value) {
22354
      switch (field) {
22355
      case SUCCESS:
22356
        if (value == null) {
22357
          unsetSuccess();
22358
        } else {
22359
          setSuccess((Boolean)value);
22360
        }
22361
        break;
22362
 
22363
      case EX:
22364
        if (value == null) {
22365
          unsetEx();
22366
        } else {
22367
          setEx((TransactionServiceException)value);
22368
        }
22369
        break;
22370
 
22371
      }
22372
    }
22373
 
22374
    public void setFieldValue(int fieldID, Object value) {
22375
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22376
    }
22377
 
22378
    public Object getFieldValue(_Fields field) {
22379
      switch (field) {
22380
      case SUCCESS:
22381
        return new Boolean(isSuccess());
22382
 
22383
      case EX:
22384
        return getEx();
22385
 
22386
      }
22387
      throw new IllegalStateException();
22388
    }
22389
 
22390
    public Object getFieldValue(int fieldId) {
22391
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22392
    }
22393
 
22394
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22395
    public boolean isSet(_Fields field) {
22396
      switch (field) {
22397
      case SUCCESS:
22398
        return isSetSuccess();
22399
      case EX:
22400
        return isSetEx();
22401
      }
22402
      throw new IllegalStateException();
22403
    }
22404
 
22405
    public boolean isSet(int fieldID) {
22406
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22407
    }
22408
 
22409
    @Override
22410
    public boolean equals(Object that) {
22411
      if (that == null)
22412
        return false;
22413
      if (that instanceof markOrdersAsManifested_result)
22414
        return this.equals((markOrdersAsManifested_result)that);
22415
      return false;
22416
    }
22417
 
22418
    public boolean equals(markOrdersAsManifested_result that) {
22419
      if (that == null)
22420
        return false;
22421
 
22422
      boolean this_present_success = true;
22423
      boolean that_present_success = true;
22424
      if (this_present_success || that_present_success) {
22425
        if (!(this_present_success && that_present_success))
22426
          return false;
22427
        if (this.success != that.success)
22428
          return false;
22429
      }
22430
 
22431
      boolean this_present_ex = true && this.isSetEx();
22432
      boolean that_present_ex = true && that.isSetEx();
22433
      if (this_present_ex || that_present_ex) {
22434
        if (!(this_present_ex && that_present_ex))
22435
          return false;
22436
        if (!this.ex.equals(that.ex))
22437
          return false;
22438
      }
22439
 
22440
      return true;
22441
    }
22442
 
22443
    @Override
22444
    public int hashCode() {
22445
      return 0;
22446
    }
22447
 
22448
    public int compareTo(markOrdersAsManifested_result other) {
22449
      if (!getClass().equals(other.getClass())) {
22450
        return getClass().getName().compareTo(other.getClass().getName());
22451
      }
22452
 
22453
      int lastComparison = 0;
22454
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
22455
 
22456
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22457
      if (lastComparison != 0) {
22458
        return lastComparison;
22459
      }
22460
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22461
      if (lastComparison != 0) {
22462
        return lastComparison;
22463
      }
22464
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22465
      if (lastComparison != 0) {
22466
        return lastComparison;
22467
      }
22468
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22469
      if (lastComparison != 0) {
22470
        return lastComparison;
22471
      }
22472
      return 0;
22473
    }
22474
 
22475
    public void read(TProtocol iprot) throws TException {
22476
      TField field;
22477
      iprot.readStructBegin();
22478
      while (true)
22479
      {
22480
        field = iprot.readFieldBegin();
22481
        if (field.type == TType.STOP) { 
22482
          break;
22483
        }
22484
        _Fields fieldId = _Fields.findByThriftId(field.id);
22485
        if (fieldId == null) {
22486
          TProtocolUtil.skip(iprot, field.type);
22487
        } else {
22488
          switch (fieldId) {
22489
            case SUCCESS:
22490
              if (field.type == TType.BOOL) {
22491
                this.success = iprot.readBool();
22492
                setSuccessIsSet(true);
22493
              } else { 
22494
                TProtocolUtil.skip(iprot, field.type);
22495
              }
22496
              break;
22497
            case EX:
22498
              if (field.type == TType.STRUCT) {
22499
                this.ex = new TransactionServiceException();
22500
                this.ex.read(iprot);
22501
              } else { 
22502
                TProtocolUtil.skip(iprot, field.type);
22503
              }
22504
              break;
22505
          }
22506
          iprot.readFieldEnd();
22507
        }
22508
      }
22509
      iprot.readStructEnd();
22510
      validate();
22511
    }
22512
 
22513
    public void write(TProtocol oprot) throws TException {
22514
      oprot.writeStructBegin(STRUCT_DESC);
22515
 
22516
      if (this.isSetSuccess()) {
22517
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22518
        oprot.writeBool(this.success);
22519
        oprot.writeFieldEnd();
22520
      } else if (this.isSetEx()) {
22521
        oprot.writeFieldBegin(EX_FIELD_DESC);
22522
        this.ex.write(oprot);
22523
        oprot.writeFieldEnd();
22524
      }
22525
      oprot.writeFieldStop();
22526
      oprot.writeStructEnd();
22527
    }
22528
 
22529
    @Override
22530
    public String toString() {
22531
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
22532
      boolean first = true;
22533
 
22534
      sb.append("success:");
22535
      sb.append(this.success);
22536
      first = false;
22537
      if (!first) sb.append(", ");
22538
      sb.append("ex:");
22539
      if (this.ex == null) {
22540
        sb.append("null");
22541
      } else {
22542
        sb.append(this.ex);
22543
      }
22544
      first = false;
22545
      sb.append(")");
22546
      return sb.toString();
22547
    }
22548
 
22549
    public void validate() throws TException {
22550
      // check for required fields
22551
    }
22552
 
22553
  }
22554
 
1114 chandransh 22555
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
22556
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
22557
 
22558
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22559
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
22560
 
22561
    private long providerId;
1245 chandransh 22562
    private Map<String,String> pickupDetails;
1114 chandransh 22563
 
22564
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22565
    public enum _Fields implements TFieldIdEnum {
22566
      PROVIDER_ID((short)1, "providerId"),
22567
      PICKUP_DETAILS((short)2, "pickupDetails");
22568
 
22569
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22570
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22571
 
22572
      static {
22573
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22574
          byId.put((int)field._thriftId, field);
22575
          byName.put(field.getFieldName(), field);
22576
        }
22577
      }
22578
 
22579
      /**
22580
       * Find the _Fields constant that matches fieldId, or null if its not found.
22581
       */
22582
      public static _Fields findByThriftId(int fieldId) {
22583
        return byId.get(fieldId);
22584
      }
22585
 
22586
      /**
22587
       * Find the _Fields constant that matches fieldId, throwing an exception
22588
       * if it is not found.
22589
       */
22590
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22591
        _Fields fields = findByThriftId(fieldId);
22592
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22593
        return fields;
22594
      }
22595
 
22596
      /**
22597
       * Find the _Fields constant that matches name, or null if its not found.
22598
       */
22599
      public static _Fields findByName(String name) {
22600
        return byName.get(name);
22601
      }
22602
 
22603
      private final short _thriftId;
22604
      private final String _fieldName;
22605
 
22606
      _Fields(short thriftId, String fieldName) {
22607
        _thriftId = thriftId;
22608
        _fieldName = fieldName;
22609
      }
22610
 
22611
      public short getThriftFieldId() {
22612
        return _thriftId;
22613
      }
22614
 
22615
      public String getFieldName() {
22616
        return _fieldName;
22617
      }
22618
    }
22619
 
22620
    // isset id assignments
22621
    private static final int __PROVIDERID_ISSET_ID = 0;
22622
    private BitSet __isset_bit_vector = new BitSet(1);
22623
 
22624
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22625
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22626
          new FieldValueMetaData(TType.I64)));
22627
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
22628
          new MapMetaData(TType.MAP, 
22629
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 22630
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 22631
    }});
22632
 
22633
    static {
22634
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
22635
    }
22636
 
22637
    public markOrdersAsPickedUp_args() {
22638
    }
22639
 
22640
    public markOrdersAsPickedUp_args(
22641
      long providerId,
1245 chandransh 22642
      Map<String,String> pickupDetails)
1114 chandransh 22643
    {
22644
      this();
22645
      this.providerId = providerId;
22646
      setProviderIdIsSet(true);
22647
      this.pickupDetails = pickupDetails;
22648
    }
22649
 
22650
    /**
22651
     * Performs a deep copy on <i>other</i>.
22652
     */
22653
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
22654
      __isset_bit_vector.clear();
22655
      __isset_bit_vector.or(other.__isset_bit_vector);
22656
      this.providerId = other.providerId;
22657
      if (other.isSetPickupDetails()) {
1245 chandransh 22658
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
22659
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 22660
 
22661
          String other_element_key = other_element.getKey();
1245 chandransh 22662
          String other_element_value = other_element.getValue();
1114 chandransh 22663
 
22664
          String __this__pickupDetails_copy_key = other_element_key;
22665
 
1245 chandransh 22666
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 22667
 
22668
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
22669
        }
22670
        this.pickupDetails = __this__pickupDetails;
22671
      }
22672
    }
22673
 
22674
    public markOrdersAsPickedUp_args deepCopy() {
22675
      return new markOrdersAsPickedUp_args(this);
22676
    }
22677
 
22678
    @Deprecated
22679
    public markOrdersAsPickedUp_args clone() {
22680
      return new markOrdersAsPickedUp_args(this);
22681
    }
22682
 
22683
    public long getProviderId() {
22684
      return this.providerId;
22685
    }
22686
 
22687
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
22688
      this.providerId = providerId;
22689
      setProviderIdIsSet(true);
22690
      return this;
22691
    }
22692
 
22693
    public void unsetProviderId() {
22694
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22695
    }
22696
 
22697
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22698
    public boolean isSetProviderId() {
22699
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22700
    }
22701
 
22702
    public void setProviderIdIsSet(boolean value) {
22703
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22704
    }
22705
 
22706
    public int getPickupDetailsSize() {
22707
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
22708
    }
22709
 
1245 chandransh 22710
    public void putToPickupDetails(String key, String val) {
1114 chandransh 22711
      if (this.pickupDetails == null) {
1245 chandransh 22712
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 22713
      }
22714
      this.pickupDetails.put(key, val);
22715
    }
22716
 
1245 chandransh 22717
    public Map<String,String> getPickupDetails() {
1114 chandransh 22718
      return this.pickupDetails;
22719
    }
22720
 
1245 chandransh 22721
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 22722
      this.pickupDetails = pickupDetails;
22723
      return this;
22724
    }
22725
 
22726
    public void unsetPickupDetails() {
22727
      this.pickupDetails = null;
22728
    }
22729
 
22730
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
22731
    public boolean isSetPickupDetails() {
22732
      return this.pickupDetails != null;
22733
    }
22734
 
22735
    public void setPickupDetailsIsSet(boolean value) {
22736
      if (!value) {
22737
        this.pickupDetails = null;
22738
      }
22739
    }
22740
 
22741
    public void setFieldValue(_Fields field, Object value) {
22742
      switch (field) {
22743
      case PROVIDER_ID:
22744
        if (value == null) {
22745
          unsetProviderId();
22746
        } else {
22747
          setProviderId((Long)value);
22748
        }
22749
        break;
22750
 
22751
      case PICKUP_DETAILS:
22752
        if (value == null) {
22753
          unsetPickupDetails();
22754
        } else {
1245 chandransh 22755
          setPickupDetails((Map<String,String>)value);
1114 chandransh 22756
        }
22757
        break;
22758
 
22759
      }
22760
    }
22761
 
22762
    public void setFieldValue(int fieldID, Object value) {
22763
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22764
    }
22765
 
22766
    public Object getFieldValue(_Fields field) {
22767
      switch (field) {
22768
      case PROVIDER_ID:
22769
        return new Long(getProviderId());
22770
 
22771
      case PICKUP_DETAILS:
22772
        return getPickupDetails();
22773
 
22774
      }
22775
      throw new IllegalStateException();
22776
    }
22777
 
22778
    public Object getFieldValue(int fieldId) {
22779
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22780
    }
22781
 
22782
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22783
    public boolean isSet(_Fields field) {
22784
      switch (field) {
22785
      case PROVIDER_ID:
22786
        return isSetProviderId();
22787
      case PICKUP_DETAILS:
22788
        return isSetPickupDetails();
22789
      }
22790
      throw new IllegalStateException();
22791
    }
22792
 
22793
    public boolean isSet(int fieldID) {
22794
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22795
    }
22796
 
22797
    @Override
22798
    public boolean equals(Object that) {
22799
      if (that == null)
22800
        return false;
22801
      if (that instanceof markOrdersAsPickedUp_args)
22802
        return this.equals((markOrdersAsPickedUp_args)that);
22803
      return false;
22804
    }
22805
 
22806
    public boolean equals(markOrdersAsPickedUp_args that) {
22807
      if (that == null)
22808
        return false;
22809
 
22810
      boolean this_present_providerId = true;
22811
      boolean that_present_providerId = true;
22812
      if (this_present_providerId || that_present_providerId) {
22813
        if (!(this_present_providerId && that_present_providerId))
22814
          return false;
22815
        if (this.providerId != that.providerId)
22816
          return false;
22817
      }
22818
 
22819
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
22820
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
22821
      if (this_present_pickupDetails || that_present_pickupDetails) {
22822
        if (!(this_present_pickupDetails && that_present_pickupDetails))
22823
          return false;
22824
        if (!this.pickupDetails.equals(that.pickupDetails))
22825
          return false;
22826
      }
22827
 
22828
      return true;
22829
    }
22830
 
22831
    @Override
22832
    public int hashCode() {
22833
      return 0;
22834
    }
22835
 
22836
    public void read(TProtocol iprot) throws TException {
22837
      TField field;
22838
      iprot.readStructBegin();
22839
      while (true)
22840
      {
22841
        field = iprot.readFieldBegin();
22842
        if (field.type == TType.STOP) { 
22843
          break;
22844
        }
22845
        _Fields fieldId = _Fields.findByThriftId(field.id);
22846
        if (fieldId == null) {
22847
          TProtocolUtil.skip(iprot, field.type);
22848
        } else {
22849
          switch (fieldId) {
22850
            case PROVIDER_ID:
22851
              if (field.type == TType.I64) {
22852
                this.providerId = iprot.readI64();
22853
                setProviderIdIsSet(true);
22854
              } else { 
22855
                TProtocolUtil.skip(iprot, field.type);
22856
              }
22857
              break;
22858
            case PICKUP_DETAILS:
22859
              if (field.type == TType.MAP) {
22860
                {
1382 varun.gupt 22861
                  TMap _map48 = iprot.readMapBegin();
22862
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
22863
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 22864
                  {
1382 varun.gupt 22865
                    String _key50;
22866
                    String _val51;
22867
                    _key50 = iprot.readString();
22868
                    _val51 = iprot.readString();
22869
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 22870
                  }
22871
                  iprot.readMapEnd();
22872
                }
22873
              } else { 
22874
                TProtocolUtil.skip(iprot, field.type);
22875
              }
22876
              break;
22877
          }
22878
          iprot.readFieldEnd();
22879
        }
22880
      }
22881
      iprot.readStructEnd();
22882
      validate();
22883
    }
22884
 
22885
    public void write(TProtocol oprot) throws TException {
22886
      validate();
22887
 
22888
      oprot.writeStructBegin(STRUCT_DESC);
22889
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22890
      oprot.writeI64(this.providerId);
22891
      oprot.writeFieldEnd();
22892
      if (this.pickupDetails != null) {
22893
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
22894
        {
1245 chandransh 22895
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 22896
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 22897
          {
1382 varun.gupt 22898
            oprot.writeString(_iter52.getKey());
22899
            oprot.writeString(_iter52.getValue());
1114 chandransh 22900
          }
22901
          oprot.writeMapEnd();
22902
        }
22903
        oprot.writeFieldEnd();
22904
      }
22905
      oprot.writeFieldStop();
22906
      oprot.writeStructEnd();
22907
    }
22908
 
22909
    @Override
22910
    public String toString() {
22911
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
22912
      boolean first = true;
22913
 
22914
      sb.append("providerId:");
22915
      sb.append(this.providerId);
22916
      first = false;
22917
      if (!first) sb.append(", ");
22918
      sb.append("pickupDetails:");
22919
      if (this.pickupDetails == null) {
22920
        sb.append("null");
22921
      } else {
22922
        sb.append(this.pickupDetails);
22923
      }
22924
      first = false;
22925
      sb.append(")");
22926
      return sb.toString();
22927
    }
22928
 
22929
    public void validate() throws TException {
22930
      // check for required fields
22931
    }
22932
 
22933
  }
22934
 
22935
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
22936
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
22937
 
22938
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
22939
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22940
 
22941
    private List<Order> success;
22942
    private TransactionServiceException ex;
22943
 
22944
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22945
    public enum _Fields implements TFieldIdEnum {
22946
      SUCCESS((short)0, "success"),
22947
      EX((short)1, "ex");
22948
 
22949
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22950
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22951
 
22952
      static {
22953
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22954
          byId.put((int)field._thriftId, field);
22955
          byName.put(field.getFieldName(), field);
22956
        }
22957
      }
22958
 
22959
      /**
22960
       * Find the _Fields constant that matches fieldId, or null if its not found.
22961
       */
22962
      public static _Fields findByThriftId(int fieldId) {
22963
        return byId.get(fieldId);
22964
      }
22965
 
22966
      /**
22967
       * Find the _Fields constant that matches fieldId, throwing an exception
22968
       * if it is not found.
22969
       */
22970
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22971
        _Fields fields = findByThriftId(fieldId);
22972
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22973
        return fields;
22974
      }
22975
 
22976
      /**
22977
       * Find the _Fields constant that matches name, or null if its not found.
22978
       */
22979
      public static _Fields findByName(String name) {
22980
        return byName.get(name);
22981
      }
22982
 
22983
      private final short _thriftId;
22984
      private final String _fieldName;
22985
 
22986
      _Fields(short thriftId, String fieldName) {
22987
        _thriftId = thriftId;
22988
        _fieldName = fieldName;
22989
      }
22990
 
22991
      public short getThriftFieldId() {
22992
        return _thriftId;
22993
      }
22994
 
22995
      public String getFieldName() {
22996
        return _fieldName;
22997
      }
22998
    }
22999
 
23000
    // isset id assignments
23001
 
23002
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23003
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
23004
          new ListMetaData(TType.LIST, 
23005
              new StructMetaData(TType.STRUCT, Order.class))));
23006
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23007
          new FieldValueMetaData(TType.STRUCT)));
23008
    }});
23009
 
23010
    static {
23011
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
23012
    }
23013
 
23014
    public markOrdersAsPickedUp_result() {
23015
    }
23016
 
23017
    public markOrdersAsPickedUp_result(
23018
      List<Order> success,
23019
      TransactionServiceException ex)
23020
    {
23021
      this();
23022
      this.success = success;
23023
      this.ex = ex;
23024
    }
23025
 
23026
    /**
23027
     * Performs a deep copy on <i>other</i>.
23028
     */
23029
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
23030
      if (other.isSetSuccess()) {
23031
        List<Order> __this__success = new ArrayList<Order>();
23032
        for (Order other_element : other.success) {
23033
          __this__success.add(new Order(other_element));
23034
        }
23035
        this.success = __this__success;
23036
      }
23037
      if (other.isSetEx()) {
23038
        this.ex = new TransactionServiceException(other.ex);
23039
      }
23040
    }
23041
 
23042
    public markOrdersAsPickedUp_result deepCopy() {
23043
      return new markOrdersAsPickedUp_result(this);
23044
    }
23045
 
23046
    @Deprecated
23047
    public markOrdersAsPickedUp_result clone() {
23048
      return new markOrdersAsPickedUp_result(this);
23049
    }
23050
 
23051
    public int getSuccessSize() {
23052
      return (this.success == null) ? 0 : this.success.size();
23053
    }
23054
 
23055
    public java.util.Iterator<Order> getSuccessIterator() {
23056
      return (this.success == null) ? null : this.success.iterator();
23057
    }
23058
 
23059
    public void addToSuccess(Order elem) {
23060
      if (this.success == null) {
23061
        this.success = new ArrayList<Order>();
23062
      }
23063
      this.success.add(elem);
23064
    }
23065
 
23066
    public List<Order> getSuccess() {
23067
      return this.success;
23068
    }
23069
 
23070
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
23071
      this.success = success;
23072
      return this;
23073
    }
23074
 
23075
    public void unsetSuccess() {
23076
      this.success = null;
23077
    }
23078
 
23079
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23080
    public boolean isSetSuccess() {
23081
      return this.success != null;
23082
    }
23083
 
23084
    public void setSuccessIsSet(boolean value) {
23085
      if (!value) {
23086
        this.success = null;
23087
      }
23088
    }
23089
 
23090
    public TransactionServiceException getEx() {
23091
      return this.ex;
23092
    }
23093
 
23094
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
23095
      this.ex = ex;
23096
      return this;
23097
    }
23098
 
23099
    public void unsetEx() {
23100
      this.ex = null;
23101
    }
23102
 
23103
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23104
    public boolean isSetEx() {
23105
      return this.ex != null;
23106
    }
23107
 
23108
    public void setExIsSet(boolean value) {
23109
      if (!value) {
23110
        this.ex = null;
23111
      }
23112
    }
23113
 
23114
    public void setFieldValue(_Fields field, Object value) {
23115
      switch (field) {
23116
      case SUCCESS:
23117
        if (value == null) {
23118
          unsetSuccess();
23119
        } else {
23120
          setSuccess((List<Order>)value);
23121
        }
23122
        break;
23123
 
23124
      case EX:
23125
        if (value == null) {
23126
          unsetEx();
23127
        } else {
23128
          setEx((TransactionServiceException)value);
23129
        }
23130
        break;
23131
 
23132
      }
23133
    }
23134
 
23135
    public void setFieldValue(int fieldID, Object value) {
23136
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23137
    }
23138
 
23139
    public Object getFieldValue(_Fields field) {
23140
      switch (field) {
23141
      case SUCCESS:
23142
        return getSuccess();
23143
 
23144
      case EX:
23145
        return getEx();
23146
 
23147
      }
23148
      throw new IllegalStateException();
23149
    }
23150
 
23151
    public Object getFieldValue(int fieldId) {
23152
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23153
    }
23154
 
23155
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23156
    public boolean isSet(_Fields field) {
23157
      switch (field) {
23158
      case SUCCESS:
23159
        return isSetSuccess();
23160
      case EX:
23161
        return isSetEx();
23162
      }
23163
      throw new IllegalStateException();
23164
    }
23165
 
23166
    public boolean isSet(int fieldID) {
23167
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23168
    }
23169
 
23170
    @Override
23171
    public boolean equals(Object that) {
23172
      if (that == null)
23173
        return false;
23174
      if (that instanceof markOrdersAsPickedUp_result)
23175
        return this.equals((markOrdersAsPickedUp_result)that);
23176
      return false;
23177
    }
23178
 
23179
    public boolean equals(markOrdersAsPickedUp_result that) {
23180
      if (that == null)
23181
        return false;
23182
 
23183
      boolean this_present_success = true && this.isSetSuccess();
23184
      boolean that_present_success = true && that.isSetSuccess();
23185
      if (this_present_success || that_present_success) {
23186
        if (!(this_present_success && that_present_success))
23187
          return false;
23188
        if (!this.success.equals(that.success))
23189
          return false;
23190
      }
23191
 
23192
      boolean this_present_ex = true && this.isSetEx();
23193
      boolean that_present_ex = true && that.isSetEx();
23194
      if (this_present_ex || that_present_ex) {
23195
        if (!(this_present_ex && that_present_ex))
23196
          return false;
23197
        if (!this.ex.equals(that.ex))
23198
          return false;
23199
      }
23200
 
23201
      return true;
23202
    }
23203
 
23204
    @Override
23205
    public int hashCode() {
23206
      return 0;
23207
    }
23208
 
23209
    public int compareTo(markOrdersAsPickedUp_result other) {
23210
      if (!getClass().equals(other.getClass())) {
23211
        return getClass().getName().compareTo(other.getClass().getName());
23212
      }
23213
 
23214
      int lastComparison = 0;
23215
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
23216
 
23217
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23218
      if (lastComparison != 0) {
23219
        return lastComparison;
23220
      }
23221
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23222
      if (lastComparison != 0) {
23223
        return lastComparison;
23224
      }
23225
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23226
      if (lastComparison != 0) {
23227
        return lastComparison;
23228
      }
23229
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23230
      if (lastComparison != 0) {
23231
        return lastComparison;
23232
      }
23233
      return 0;
23234
    }
23235
 
23236
    public void read(TProtocol iprot) throws TException {
23237
      TField field;
23238
      iprot.readStructBegin();
23239
      while (true)
23240
      {
23241
        field = iprot.readFieldBegin();
23242
        if (field.type == TType.STOP) { 
23243
          break;
23244
        }
23245
        _Fields fieldId = _Fields.findByThriftId(field.id);
23246
        if (fieldId == null) {
23247
          TProtocolUtil.skip(iprot, field.type);
23248
        } else {
23249
          switch (fieldId) {
23250
            case SUCCESS:
23251
              if (field.type == TType.LIST) {
23252
                {
1382 varun.gupt 23253
                  TList _list53 = iprot.readListBegin();
23254
                  this.success = new ArrayList<Order>(_list53.size);
23255
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 23256
                  {
1382 varun.gupt 23257
                    Order _elem55;
23258
                    _elem55 = new Order();
23259
                    _elem55.read(iprot);
23260
                    this.success.add(_elem55);
1114 chandransh 23261
                  }
23262
                  iprot.readListEnd();
23263
                }
23264
              } else { 
23265
                TProtocolUtil.skip(iprot, field.type);
23266
              }
23267
              break;
23268
            case EX:
23269
              if (field.type == TType.STRUCT) {
23270
                this.ex = new TransactionServiceException();
23271
                this.ex.read(iprot);
23272
              } else { 
23273
                TProtocolUtil.skip(iprot, field.type);
23274
              }
23275
              break;
23276
          }
23277
          iprot.readFieldEnd();
23278
        }
23279
      }
23280
      iprot.readStructEnd();
23281
      validate();
23282
    }
23283
 
23284
    public void write(TProtocol oprot) throws TException {
23285
      oprot.writeStructBegin(STRUCT_DESC);
23286
 
23287
      if (this.isSetSuccess()) {
23288
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23289
        {
23290
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 23291
          for (Order _iter56 : this.success)
1114 chandransh 23292
          {
1382 varun.gupt 23293
            _iter56.write(oprot);
1114 chandransh 23294
          }
23295
          oprot.writeListEnd();
23296
        }
23297
        oprot.writeFieldEnd();
23298
      } else if (this.isSetEx()) {
23299
        oprot.writeFieldBegin(EX_FIELD_DESC);
23300
        this.ex.write(oprot);
23301
        oprot.writeFieldEnd();
23302
      }
23303
      oprot.writeFieldStop();
23304
      oprot.writeStructEnd();
23305
    }
23306
 
23307
    @Override
23308
    public String toString() {
23309
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
23310
      boolean first = true;
23311
 
23312
      sb.append("success:");
23313
      if (this.success == null) {
23314
        sb.append("null");
23315
      } else {
23316
        sb.append(this.success);
23317
      }
23318
      first = false;
23319
      if (!first) sb.append(", ");
23320
      sb.append("ex:");
23321
      if (this.ex == null) {
23322
        sb.append("null");
23323
      } else {
23324
        sb.append(this.ex);
23325
      }
23326
      first = false;
23327
      sb.append(")");
23328
      return sb.toString();
23329
    }
23330
 
23331
    public void validate() throws TException {
23332
      // check for required fields
23333
    }
23334
 
23335
  }
23336
 
1133 chandransh 23337
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
23338
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
23339
 
23340
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23341
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
23342
 
23343
    private long providerId;
23344
    private Map<String,String> deliveredOrders;
23345
 
23346
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23347
    public enum _Fields implements TFieldIdEnum {
23348
      PROVIDER_ID((short)1, "providerId"),
23349
      DELIVERED_ORDERS((short)2, "deliveredOrders");
23350
 
23351
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23352
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23353
 
23354
      static {
23355
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23356
          byId.put((int)field._thriftId, field);
23357
          byName.put(field.getFieldName(), field);
23358
        }
23359
      }
23360
 
23361
      /**
23362
       * Find the _Fields constant that matches fieldId, or null if its not found.
23363
       */
23364
      public static _Fields findByThriftId(int fieldId) {
23365
        return byId.get(fieldId);
23366
      }
23367
 
23368
      /**
23369
       * Find the _Fields constant that matches fieldId, throwing an exception
23370
       * if it is not found.
23371
       */
23372
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23373
        _Fields fields = findByThriftId(fieldId);
23374
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23375
        return fields;
23376
      }
23377
 
23378
      /**
23379
       * Find the _Fields constant that matches name, or null if its not found.
23380
       */
23381
      public static _Fields findByName(String name) {
23382
        return byName.get(name);
23383
      }
23384
 
23385
      private final short _thriftId;
23386
      private final String _fieldName;
23387
 
23388
      _Fields(short thriftId, String fieldName) {
23389
        _thriftId = thriftId;
23390
        _fieldName = fieldName;
23391
      }
23392
 
23393
      public short getThriftFieldId() {
23394
        return _thriftId;
23395
      }
23396
 
23397
      public String getFieldName() {
23398
        return _fieldName;
23399
      }
23400
    }
23401
 
23402
    // isset id assignments
23403
    private static final int __PROVIDERID_ISSET_ID = 0;
23404
    private BitSet __isset_bit_vector = new BitSet(1);
23405
 
23406
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23407
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23408
          new FieldValueMetaData(TType.I64)));
23409
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
23410
          new MapMetaData(TType.MAP, 
23411
              new FieldValueMetaData(TType.STRING), 
23412
              new FieldValueMetaData(TType.STRING))));
23413
    }});
23414
 
23415
    static {
23416
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
23417
    }
23418
 
23419
    public markOrdersAsDelivered_args() {
23420
    }
23421
 
23422
    public markOrdersAsDelivered_args(
23423
      long providerId,
23424
      Map<String,String> deliveredOrders)
23425
    {
23426
      this();
23427
      this.providerId = providerId;
23428
      setProviderIdIsSet(true);
23429
      this.deliveredOrders = deliveredOrders;
23430
    }
23431
 
23432
    /**
23433
     * Performs a deep copy on <i>other</i>.
23434
     */
23435
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
23436
      __isset_bit_vector.clear();
23437
      __isset_bit_vector.or(other.__isset_bit_vector);
23438
      this.providerId = other.providerId;
23439
      if (other.isSetDeliveredOrders()) {
23440
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
23441
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
23442
 
23443
          String other_element_key = other_element.getKey();
23444
          String other_element_value = other_element.getValue();
23445
 
23446
          String __this__deliveredOrders_copy_key = other_element_key;
23447
 
23448
          String __this__deliveredOrders_copy_value = other_element_value;
23449
 
23450
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
23451
        }
23452
        this.deliveredOrders = __this__deliveredOrders;
23453
      }
23454
    }
23455
 
23456
    public markOrdersAsDelivered_args deepCopy() {
23457
      return new markOrdersAsDelivered_args(this);
23458
    }
23459
 
23460
    @Deprecated
23461
    public markOrdersAsDelivered_args clone() {
23462
      return new markOrdersAsDelivered_args(this);
23463
    }
23464
 
23465
    public long getProviderId() {
23466
      return this.providerId;
23467
    }
23468
 
23469
    public markOrdersAsDelivered_args setProviderId(long providerId) {
23470
      this.providerId = providerId;
23471
      setProviderIdIsSet(true);
23472
      return this;
23473
    }
23474
 
23475
    public void unsetProviderId() {
23476
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23477
    }
23478
 
23479
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23480
    public boolean isSetProviderId() {
23481
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23482
    }
23483
 
23484
    public void setProviderIdIsSet(boolean value) {
23485
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23486
    }
23487
 
23488
    public int getDeliveredOrdersSize() {
23489
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
23490
    }
23491
 
23492
    public void putToDeliveredOrders(String key, String val) {
23493
      if (this.deliveredOrders == null) {
23494
        this.deliveredOrders = new HashMap<String,String>();
23495
      }
23496
      this.deliveredOrders.put(key, val);
23497
    }
23498
 
23499
    public Map<String,String> getDeliveredOrders() {
23500
      return this.deliveredOrders;
23501
    }
23502
 
23503
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
23504
      this.deliveredOrders = deliveredOrders;
23505
      return this;
23506
    }
23507
 
23508
    public void unsetDeliveredOrders() {
23509
      this.deliveredOrders = null;
23510
    }
23511
 
23512
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
23513
    public boolean isSetDeliveredOrders() {
23514
      return this.deliveredOrders != null;
23515
    }
23516
 
23517
    public void setDeliveredOrdersIsSet(boolean value) {
23518
      if (!value) {
23519
        this.deliveredOrders = null;
23520
      }
23521
    }
23522
 
23523
    public void setFieldValue(_Fields field, Object value) {
23524
      switch (field) {
23525
      case PROVIDER_ID:
23526
        if (value == null) {
23527
          unsetProviderId();
23528
        } else {
23529
          setProviderId((Long)value);
23530
        }
23531
        break;
23532
 
23533
      case DELIVERED_ORDERS:
23534
        if (value == null) {
23535
          unsetDeliveredOrders();
23536
        } else {
23537
          setDeliveredOrders((Map<String,String>)value);
23538
        }
23539
        break;
23540
 
23541
      }
23542
    }
23543
 
23544
    public void setFieldValue(int fieldID, Object value) {
23545
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23546
    }
23547
 
23548
    public Object getFieldValue(_Fields field) {
23549
      switch (field) {
23550
      case PROVIDER_ID:
23551
        return new Long(getProviderId());
23552
 
23553
      case DELIVERED_ORDERS:
23554
        return getDeliveredOrders();
23555
 
23556
      }
23557
      throw new IllegalStateException();
23558
    }
23559
 
23560
    public Object getFieldValue(int fieldId) {
23561
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23562
    }
23563
 
23564
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23565
    public boolean isSet(_Fields field) {
23566
      switch (field) {
23567
      case PROVIDER_ID:
23568
        return isSetProviderId();
23569
      case DELIVERED_ORDERS:
23570
        return isSetDeliveredOrders();
23571
      }
23572
      throw new IllegalStateException();
23573
    }
23574
 
23575
    public boolean isSet(int fieldID) {
23576
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23577
    }
23578
 
23579
    @Override
23580
    public boolean equals(Object that) {
23581
      if (that == null)
23582
        return false;
23583
      if (that instanceof markOrdersAsDelivered_args)
23584
        return this.equals((markOrdersAsDelivered_args)that);
23585
      return false;
23586
    }
23587
 
23588
    public boolean equals(markOrdersAsDelivered_args that) {
23589
      if (that == null)
23590
        return false;
23591
 
23592
      boolean this_present_providerId = true;
23593
      boolean that_present_providerId = true;
23594
      if (this_present_providerId || that_present_providerId) {
23595
        if (!(this_present_providerId && that_present_providerId))
23596
          return false;
23597
        if (this.providerId != that.providerId)
23598
          return false;
23599
      }
23600
 
23601
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
23602
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
23603
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
23604
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
23605
          return false;
23606
        if (!this.deliveredOrders.equals(that.deliveredOrders))
23607
          return false;
23608
      }
23609
 
23610
      return true;
23611
    }
23612
 
23613
    @Override
23614
    public int hashCode() {
23615
      return 0;
23616
    }
23617
 
23618
    public void read(TProtocol iprot) throws TException {
23619
      TField field;
23620
      iprot.readStructBegin();
23621
      while (true)
23622
      {
23623
        field = iprot.readFieldBegin();
23624
        if (field.type == TType.STOP) { 
23625
          break;
23626
        }
23627
        _Fields fieldId = _Fields.findByThriftId(field.id);
23628
        if (fieldId == null) {
23629
          TProtocolUtil.skip(iprot, field.type);
23630
        } else {
23631
          switch (fieldId) {
23632
            case PROVIDER_ID:
23633
              if (field.type == TType.I64) {
23634
                this.providerId = iprot.readI64();
23635
                setProviderIdIsSet(true);
23636
              } else { 
23637
                TProtocolUtil.skip(iprot, field.type);
23638
              }
23639
              break;
23640
            case DELIVERED_ORDERS:
23641
              if (field.type == TType.MAP) {
23642
                {
1382 varun.gupt 23643
                  TMap _map57 = iprot.readMapBegin();
23644
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
23645
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 23646
                  {
1382 varun.gupt 23647
                    String _key59;
23648
                    String _val60;
23649
                    _key59 = iprot.readString();
23650
                    _val60 = iprot.readString();
23651
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 23652
                  }
23653
                  iprot.readMapEnd();
23654
                }
23655
              } else { 
23656
                TProtocolUtil.skip(iprot, field.type);
23657
              }
23658
              break;
23659
          }
23660
          iprot.readFieldEnd();
23661
        }
23662
      }
23663
      iprot.readStructEnd();
23664
      validate();
23665
    }
23666
 
23667
    public void write(TProtocol oprot) throws TException {
23668
      validate();
23669
 
23670
      oprot.writeStructBegin(STRUCT_DESC);
23671
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23672
      oprot.writeI64(this.providerId);
23673
      oprot.writeFieldEnd();
23674
      if (this.deliveredOrders != null) {
23675
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
23676
        {
23677
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 23678
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 23679
          {
1382 varun.gupt 23680
            oprot.writeString(_iter61.getKey());
23681
            oprot.writeString(_iter61.getValue());
1133 chandransh 23682
          }
23683
          oprot.writeMapEnd();
23684
        }
23685
        oprot.writeFieldEnd();
23686
      }
23687
      oprot.writeFieldStop();
23688
      oprot.writeStructEnd();
23689
    }
23690
 
23691
    @Override
23692
    public String toString() {
23693
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
23694
      boolean first = true;
23695
 
23696
      sb.append("providerId:");
23697
      sb.append(this.providerId);
23698
      first = false;
23699
      if (!first) sb.append(", ");
23700
      sb.append("deliveredOrders:");
23701
      if (this.deliveredOrders == null) {
23702
        sb.append("null");
23703
      } else {
23704
        sb.append(this.deliveredOrders);
23705
      }
23706
      first = false;
23707
      sb.append(")");
23708
      return sb.toString();
23709
    }
23710
 
23711
    public void validate() throws TException {
23712
      // check for required fields
23713
    }
23714
 
23715
  }
23716
 
23717
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
23718
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
23719
 
23720
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23721
 
23722
    private TransactionServiceException ex;
23723
 
23724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23725
    public enum _Fields implements TFieldIdEnum {
23726
      EX((short)1, "ex");
23727
 
23728
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23729
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23730
 
23731
      static {
23732
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23733
          byId.put((int)field._thriftId, field);
23734
          byName.put(field.getFieldName(), field);
23735
        }
23736
      }
23737
 
23738
      /**
23739
       * Find the _Fields constant that matches fieldId, or null if its not found.
23740
       */
23741
      public static _Fields findByThriftId(int fieldId) {
23742
        return byId.get(fieldId);
23743
      }
23744
 
23745
      /**
23746
       * Find the _Fields constant that matches fieldId, throwing an exception
23747
       * if it is not found.
23748
       */
23749
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23750
        _Fields fields = findByThriftId(fieldId);
23751
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23752
        return fields;
23753
      }
23754
 
23755
      /**
23756
       * Find the _Fields constant that matches name, or null if its not found.
23757
       */
23758
      public static _Fields findByName(String name) {
23759
        return byName.get(name);
23760
      }
23761
 
23762
      private final short _thriftId;
23763
      private final String _fieldName;
23764
 
23765
      _Fields(short thriftId, String fieldName) {
23766
        _thriftId = thriftId;
23767
        _fieldName = fieldName;
23768
      }
23769
 
23770
      public short getThriftFieldId() {
23771
        return _thriftId;
23772
      }
23773
 
23774
      public String getFieldName() {
23775
        return _fieldName;
23776
      }
23777
    }
23778
 
23779
    // isset id assignments
23780
 
23781
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23782
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23783
          new FieldValueMetaData(TType.STRUCT)));
23784
    }});
23785
 
23786
    static {
23787
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
23788
    }
23789
 
23790
    public markOrdersAsDelivered_result() {
23791
    }
23792
 
23793
    public markOrdersAsDelivered_result(
23794
      TransactionServiceException ex)
23795
    {
23796
      this();
23797
      this.ex = ex;
23798
    }
23799
 
23800
    /**
23801
     * Performs a deep copy on <i>other</i>.
23802
     */
23803
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
23804
      if (other.isSetEx()) {
23805
        this.ex = new TransactionServiceException(other.ex);
23806
      }
23807
    }
23808
 
23809
    public markOrdersAsDelivered_result deepCopy() {
23810
      return new markOrdersAsDelivered_result(this);
23811
    }
23812
 
23813
    @Deprecated
23814
    public markOrdersAsDelivered_result clone() {
23815
      return new markOrdersAsDelivered_result(this);
23816
    }
23817
 
23818
    public TransactionServiceException getEx() {
23819
      return this.ex;
23820
    }
23821
 
23822
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
23823
      this.ex = ex;
23824
      return this;
23825
    }
23826
 
23827
    public void unsetEx() {
23828
      this.ex = null;
23829
    }
23830
 
23831
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23832
    public boolean isSetEx() {
23833
      return this.ex != null;
23834
    }
23835
 
23836
    public void setExIsSet(boolean value) {
23837
      if (!value) {
23838
        this.ex = null;
23839
      }
23840
    }
23841
 
23842
    public void setFieldValue(_Fields field, Object value) {
23843
      switch (field) {
23844
      case EX:
23845
        if (value == null) {
23846
          unsetEx();
23847
        } else {
23848
          setEx((TransactionServiceException)value);
23849
        }
23850
        break;
23851
 
23852
      }
23853
    }
23854
 
23855
    public void setFieldValue(int fieldID, Object value) {
23856
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23857
    }
23858
 
23859
    public Object getFieldValue(_Fields field) {
23860
      switch (field) {
23861
      case EX:
23862
        return getEx();
23863
 
23864
      }
23865
      throw new IllegalStateException();
23866
    }
23867
 
23868
    public Object getFieldValue(int fieldId) {
23869
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23870
    }
23871
 
23872
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23873
    public boolean isSet(_Fields field) {
23874
      switch (field) {
23875
      case EX:
23876
        return isSetEx();
23877
      }
23878
      throw new IllegalStateException();
23879
    }
23880
 
23881
    public boolean isSet(int fieldID) {
23882
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23883
    }
23884
 
23885
    @Override
23886
    public boolean equals(Object that) {
23887
      if (that == null)
23888
        return false;
23889
      if (that instanceof markOrdersAsDelivered_result)
23890
        return this.equals((markOrdersAsDelivered_result)that);
23891
      return false;
23892
    }
23893
 
23894
    public boolean equals(markOrdersAsDelivered_result that) {
23895
      if (that == null)
23896
        return false;
23897
 
23898
      boolean this_present_ex = true && this.isSetEx();
23899
      boolean that_present_ex = true && that.isSetEx();
23900
      if (this_present_ex || that_present_ex) {
23901
        if (!(this_present_ex && that_present_ex))
23902
          return false;
23903
        if (!this.ex.equals(that.ex))
23904
          return false;
23905
      }
23906
 
23907
      return true;
23908
    }
23909
 
23910
    @Override
23911
    public int hashCode() {
23912
      return 0;
23913
    }
23914
 
23915
    public int compareTo(markOrdersAsDelivered_result other) {
23916
      if (!getClass().equals(other.getClass())) {
23917
        return getClass().getName().compareTo(other.getClass().getName());
23918
      }
23919
 
23920
      int lastComparison = 0;
23921
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
23922
 
23923
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23924
      if (lastComparison != 0) {
23925
        return lastComparison;
23926
      }
23927
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23928
      if (lastComparison != 0) {
23929
        return lastComparison;
23930
      }
23931
      return 0;
23932
    }
23933
 
23934
    public void read(TProtocol iprot) throws TException {
23935
      TField field;
23936
      iprot.readStructBegin();
23937
      while (true)
23938
      {
23939
        field = iprot.readFieldBegin();
23940
        if (field.type == TType.STOP) { 
23941
          break;
23942
        }
23943
        _Fields fieldId = _Fields.findByThriftId(field.id);
23944
        if (fieldId == null) {
23945
          TProtocolUtil.skip(iprot, field.type);
23946
        } else {
23947
          switch (fieldId) {
23948
            case EX:
23949
              if (field.type == TType.STRUCT) {
23950
                this.ex = new TransactionServiceException();
23951
                this.ex.read(iprot);
23952
              } else { 
23953
                TProtocolUtil.skip(iprot, field.type);
23954
              }
23955
              break;
23956
          }
23957
          iprot.readFieldEnd();
23958
        }
23959
      }
23960
      iprot.readStructEnd();
23961
      validate();
23962
    }
23963
 
23964
    public void write(TProtocol oprot) throws TException {
23965
      oprot.writeStructBegin(STRUCT_DESC);
23966
 
23967
      if (this.isSetEx()) {
23968
        oprot.writeFieldBegin(EX_FIELD_DESC);
23969
        this.ex.write(oprot);
23970
        oprot.writeFieldEnd();
23971
      }
23972
      oprot.writeFieldStop();
23973
      oprot.writeStructEnd();
23974
    }
23975
 
23976
    @Override
23977
    public String toString() {
23978
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
23979
      boolean first = true;
23980
 
23981
      sb.append("ex:");
23982
      if (this.ex == null) {
23983
        sb.append("null");
23984
      } else {
23985
        sb.append(this.ex);
23986
      }
23987
      first = false;
23988
      sb.append(")");
23989
      return sb.toString();
23990
    }
23991
 
23992
    public void validate() throws TException {
23993
      // check for required fields
23994
    }
23995
 
23996
  }
23997
 
23998
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
23999
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
24000
 
24001
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24002
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
24003
 
24004
    private long providerId;
24005
    private Map<String,String> returnedOrders;
24006
 
24007
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24008
    public enum _Fields implements TFieldIdEnum {
24009
      PROVIDER_ID((short)1, "providerId"),
24010
      RETURNED_ORDERS((short)2, "returnedOrders");
24011
 
24012
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24013
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24014
 
24015
      static {
24016
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24017
          byId.put((int)field._thriftId, field);
24018
          byName.put(field.getFieldName(), field);
24019
        }
24020
      }
24021
 
24022
      /**
24023
       * Find the _Fields constant that matches fieldId, or null if its not found.
24024
       */
24025
      public static _Fields findByThriftId(int fieldId) {
24026
        return byId.get(fieldId);
24027
      }
24028
 
24029
      /**
24030
       * Find the _Fields constant that matches fieldId, throwing an exception
24031
       * if it is not found.
24032
       */
24033
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24034
        _Fields fields = findByThriftId(fieldId);
24035
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24036
        return fields;
24037
      }
24038
 
24039
      /**
24040
       * Find the _Fields constant that matches name, or null if its not found.
24041
       */
24042
      public static _Fields findByName(String name) {
24043
        return byName.get(name);
24044
      }
24045
 
24046
      private final short _thriftId;
24047
      private final String _fieldName;
24048
 
24049
      _Fields(short thriftId, String fieldName) {
24050
        _thriftId = thriftId;
24051
        _fieldName = fieldName;
24052
      }
24053
 
24054
      public short getThriftFieldId() {
24055
        return _thriftId;
24056
      }
24057
 
24058
      public String getFieldName() {
24059
        return _fieldName;
24060
      }
24061
    }
24062
 
24063
    // isset id assignments
24064
    private static final int __PROVIDERID_ISSET_ID = 0;
24065
    private BitSet __isset_bit_vector = new BitSet(1);
24066
 
24067
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24068
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24069
          new FieldValueMetaData(TType.I64)));
24070
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
24071
          new MapMetaData(TType.MAP, 
24072
              new FieldValueMetaData(TType.STRING), 
24073
              new FieldValueMetaData(TType.STRING))));
24074
    }});
24075
 
24076
    static {
24077
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
24078
    }
24079
 
24080
    public markOrdersAsFailed_args() {
24081
    }
24082
 
24083
    public markOrdersAsFailed_args(
24084
      long providerId,
24085
      Map<String,String> returnedOrders)
24086
    {
24087
      this();
24088
      this.providerId = providerId;
24089
      setProviderIdIsSet(true);
24090
      this.returnedOrders = returnedOrders;
24091
    }
24092
 
24093
    /**
24094
     * Performs a deep copy on <i>other</i>.
24095
     */
24096
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
24097
      __isset_bit_vector.clear();
24098
      __isset_bit_vector.or(other.__isset_bit_vector);
24099
      this.providerId = other.providerId;
24100
      if (other.isSetReturnedOrders()) {
24101
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
24102
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
24103
 
24104
          String other_element_key = other_element.getKey();
24105
          String other_element_value = other_element.getValue();
24106
 
24107
          String __this__returnedOrders_copy_key = other_element_key;
24108
 
24109
          String __this__returnedOrders_copy_value = other_element_value;
24110
 
24111
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
24112
        }
24113
        this.returnedOrders = __this__returnedOrders;
24114
      }
24115
    }
24116
 
24117
    public markOrdersAsFailed_args deepCopy() {
24118
      return new markOrdersAsFailed_args(this);
24119
    }
24120
 
24121
    @Deprecated
24122
    public markOrdersAsFailed_args clone() {
24123
      return new markOrdersAsFailed_args(this);
24124
    }
24125
 
24126
    public long getProviderId() {
24127
      return this.providerId;
24128
    }
24129
 
24130
    public markOrdersAsFailed_args setProviderId(long providerId) {
24131
      this.providerId = providerId;
24132
      setProviderIdIsSet(true);
24133
      return this;
24134
    }
24135
 
24136
    public void unsetProviderId() {
24137
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24138
    }
24139
 
24140
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24141
    public boolean isSetProviderId() {
24142
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24143
    }
24144
 
24145
    public void setProviderIdIsSet(boolean value) {
24146
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24147
    }
24148
 
24149
    public int getReturnedOrdersSize() {
24150
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
24151
    }
24152
 
24153
    public void putToReturnedOrders(String key, String val) {
24154
      if (this.returnedOrders == null) {
24155
        this.returnedOrders = new HashMap<String,String>();
24156
      }
24157
      this.returnedOrders.put(key, val);
24158
    }
24159
 
24160
    public Map<String,String> getReturnedOrders() {
24161
      return this.returnedOrders;
24162
    }
24163
 
24164
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
24165
      this.returnedOrders = returnedOrders;
24166
      return this;
24167
    }
24168
 
24169
    public void unsetReturnedOrders() {
24170
      this.returnedOrders = null;
24171
    }
24172
 
24173
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
24174
    public boolean isSetReturnedOrders() {
24175
      return this.returnedOrders != null;
24176
    }
24177
 
24178
    public void setReturnedOrdersIsSet(boolean value) {
24179
      if (!value) {
24180
        this.returnedOrders = null;
24181
      }
24182
    }
24183
 
24184
    public void setFieldValue(_Fields field, Object value) {
24185
      switch (field) {
24186
      case PROVIDER_ID:
24187
        if (value == null) {
24188
          unsetProviderId();
24189
        } else {
24190
          setProviderId((Long)value);
24191
        }
24192
        break;
24193
 
24194
      case RETURNED_ORDERS:
24195
        if (value == null) {
24196
          unsetReturnedOrders();
24197
        } else {
24198
          setReturnedOrders((Map<String,String>)value);
24199
        }
24200
        break;
24201
 
24202
      }
24203
    }
24204
 
24205
    public void setFieldValue(int fieldID, Object value) {
24206
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24207
    }
24208
 
24209
    public Object getFieldValue(_Fields field) {
24210
      switch (field) {
24211
      case PROVIDER_ID:
24212
        return new Long(getProviderId());
24213
 
24214
      case RETURNED_ORDERS:
24215
        return getReturnedOrders();
24216
 
24217
      }
24218
      throw new IllegalStateException();
24219
    }
24220
 
24221
    public Object getFieldValue(int fieldId) {
24222
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24223
    }
24224
 
24225
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24226
    public boolean isSet(_Fields field) {
24227
      switch (field) {
24228
      case PROVIDER_ID:
24229
        return isSetProviderId();
24230
      case RETURNED_ORDERS:
24231
        return isSetReturnedOrders();
24232
      }
24233
      throw new IllegalStateException();
24234
    }
24235
 
24236
    public boolean isSet(int fieldID) {
24237
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24238
    }
24239
 
24240
    @Override
24241
    public boolean equals(Object that) {
24242
      if (that == null)
24243
        return false;
24244
      if (that instanceof markOrdersAsFailed_args)
24245
        return this.equals((markOrdersAsFailed_args)that);
24246
      return false;
24247
    }
24248
 
24249
    public boolean equals(markOrdersAsFailed_args that) {
24250
      if (that == null)
24251
        return false;
24252
 
24253
      boolean this_present_providerId = true;
24254
      boolean that_present_providerId = true;
24255
      if (this_present_providerId || that_present_providerId) {
24256
        if (!(this_present_providerId && that_present_providerId))
24257
          return false;
24258
        if (this.providerId != that.providerId)
24259
          return false;
24260
      }
24261
 
24262
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
24263
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
24264
      if (this_present_returnedOrders || that_present_returnedOrders) {
24265
        if (!(this_present_returnedOrders && that_present_returnedOrders))
24266
          return false;
24267
        if (!this.returnedOrders.equals(that.returnedOrders))
24268
          return false;
24269
      }
24270
 
24271
      return true;
24272
    }
24273
 
24274
    @Override
24275
    public int hashCode() {
24276
      return 0;
24277
    }
24278
 
24279
    public void read(TProtocol iprot) throws TException {
24280
      TField field;
24281
      iprot.readStructBegin();
24282
      while (true)
24283
      {
24284
        field = iprot.readFieldBegin();
24285
        if (field.type == TType.STOP) { 
24286
          break;
24287
        }
24288
        _Fields fieldId = _Fields.findByThriftId(field.id);
24289
        if (fieldId == null) {
24290
          TProtocolUtil.skip(iprot, field.type);
24291
        } else {
24292
          switch (fieldId) {
24293
            case PROVIDER_ID:
24294
              if (field.type == TType.I64) {
24295
                this.providerId = iprot.readI64();
24296
                setProviderIdIsSet(true);
24297
              } else { 
24298
                TProtocolUtil.skip(iprot, field.type);
24299
              }
24300
              break;
24301
            case RETURNED_ORDERS:
24302
              if (field.type == TType.MAP) {
24303
                {
1382 varun.gupt 24304
                  TMap _map62 = iprot.readMapBegin();
24305
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
24306
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 24307
                  {
1382 varun.gupt 24308
                    String _key64;
24309
                    String _val65;
24310
                    _key64 = iprot.readString();
24311
                    _val65 = iprot.readString();
24312
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 24313
                  }
24314
                  iprot.readMapEnd();
24315
                }
24316
              } else { 
24317
                TProtocolUtil.skip(iprot, field.type);
24318
              }
24319
              break;
24320
          }
24321
          iprot.readFieldEnd();
24322
        }
24323
      }
24324
      iprot.readStructEnd();
24325
      validate();
24326
    }
24327
 
24328
    public void write(TProtocol oprot) throws TException {
24329
      validate();
24330
 
24331
      oprot.writeStructBegin(STRUCT_DESC);
24332
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24333
      oprot.writeI64(this.providerId);
24334
      oprot.writeFieldEnd();
24335
      if (this.returnedOrders != null) {
24336
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
24337
        {
24338
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 24339
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 24340
          {
1382 varun.gupt 24341
            oprot.writeString(_iter66.getKey());
24342
            oprot.writeString(_iter66.getValue());
1133 chandransh 24343
          }
24344
          oprot.writeMapEnd();
24345
        }
24346
        oprot.writeFieldEnd();
24347
      }
24348
      oprot.writeFieldStop();
24349
      oprot.writeStructEnd();
24350
    }
24351
 
24352
    @Override
24353
    public String toString() {
24354
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
24355
      boolean first = true;
24356
 
24357
      sb.append("providerId:");
24358
      sb.append(this.providerId);
24359
      first = false;
24360
      if (!first) sb.append(", ");
24361
      sb.append("returnedOrders:");
24362
      if (this.returnedOrders == null) {
24363
        sb.append("null");
24364
      } else {
24365
        sb.append(this.returnedOrders);
24366
      }
24367
      first = false;
24368
      sb.append(")");
24369
      return sb.toString();
24370
    }
24371
 
24372
    public void validate() throws TException {
24373
      // check for required fields
24374
    }
24375
 
24376
  }
24377
 
24378
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
24379
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
24380
 
24381
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
24382
 
24383
    private TransactionServiceException ex;
24384
 
24385
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24386
    public enum _Fields implements TFieldIdEnum {
24387
      EX((short)1, "ex");
24388
 
24389
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24390
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24391
 
24392
      static {
24393
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24394
          byId.put((int)field._thriftId, field);
24395
          byName.put(field.getFieldName(), field);
24396
        }
24397
      }
24398
 
24399
      /**
24400
       * Find the _Fields constant that matches fieldId, or null if its not found.
24401
       */
24402
      public static _Fields findByThriftId(int fieldId) {
24403
        return byId.get(fieldId);
24404
      }
24405
 
24406
      /**
24407
       * Find the _Fields constant that matches fieldId, throwing an exception
24408
       * if it is not found.
24409
       */
24410
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24411
        _Fields fields = findByThriftId(fieldId);
24412
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24413
        return fields;
24414
      }
24415
 
24416
      /**
24417
       * Find the _Fields constant that matches name, or null if its not found.
24418
       */
24419
      public static _Fields findByName(String name) {
24420
        return byName.get(name);
24421
      }
24422
 
24423
      private final short _thriftId;
24424
      private final String _fieldName;
24425
 
24426
      _Fields(short thriftId, String fieldName) {
24427
        _thriftId = thriftId;
24428
        _fieldName = fieldName;
24429
      }
24430
 
24431
      public short getThriftFieldId() {
24432
        return _thriftId;
24433
      }
24434
 
24435
      public String getFieldName() {
24436
        return _fieldName;
24437
      }
24438
    }
24439
 
24440
    // isset id assignments
24441
 
24442
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24443
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
24444
          new FieldValueMetaData(TType.STRUCT)));
24445
    }});
24446
 
24447
    static {
24448
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
24449
    }
24450
 
24451
    public markOrdersAsFailed_result() {
24452
    }
24453
 
24454
    public markOrdersAsFailed_result(
24455
      TransactionServiceException ex)
24456
    {
24457
      this();
24458
      this.ex = ex;
24459
    }
24460
 
24461
    /**
24462
     * Performs a deep copy on <i>other</i>.
24463
     */
24464
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
24465
      if (other.isSetEx()) {
24466
        this.ex = new TransactionServiceException(other.ex);
24467
      }
24468
    }
24469
 
24470
    public markOrdersAsFailed_result deepCopy() {
24471
      return new markOrdersAsFailed_result(this);
24472
    }
24473
 
24474
    @Deprecated
24475
    public markOrdersAsFailed_result clone() {
24476
      return new markOrdersAsFailed_result(this);
24477
    }
24478
 
24479
    public TransactionServiceException getEx() {
24480
      return this.ex;
24481
    }
24482
 
24483
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
24484
      this.ex = ex;
24485
      return this;
24486
    }
24487
 
24488
    public void unsetEx() {
24489
      this.ex = null;
24490
    }
24491
 
24492
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
24493
    public boolean isSetEx() {
24494
      return this.ex != null;
24495
    }
24496
 
24497
    public void setExIsSet(boolean value) {
24498
      if (!value) {
24499
        this.ex = null;
24500
      }
24501
    }
24502
 
24503
    public void setFieldValue(_Fields field, Object value) {
24504
      switch (field) {
24505
      case EX:
24506
        if (value == null) {
24507
          unsetEx();
24508
        } else {
24509
          setEx((TransactionServiceException)value);
24510
        }
24511
        break;
24512
 
24513
      }
24514
    }
24515
 
24516
    public void setFieldValue(int fieldID, Object value) {
24517
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24518
    }
24519
 
24520
    public Object getFieldValue(_Fields field) {
24521
      switch (field) {
24522
      case EX:
24523
        return getEx();
24524
 
24525
      }
24526
      throw new IllegalStateException();
24527
    }
24528
 
24529
    public Object getFieldValue(int fieldId) {
24530
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24531
    }
24532
 
24533
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24534
    public boolean isSet(_Fields field) {
24535
      switch (field) {
24536
      case EX:
24537
        return isSetEx();
24538
      }
24539
      throw new IllegalStateException();
24540
    }
24541
 
24542
    public boolean isSet(int fieldID) {
24543
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24544
    }
24545
 
24546
    @Override
24547
    public boolean equals(Object that) {
24548
      if (that == null)
24549
        return false;
24550
      if (that instanceof markOrdersAsFailed_result)
24551
        return this.equals((markOrdersAsFailed_result)that);
24552
      return false;
24553
    }
24554
 
24555
    public boolean equals(markOrdersAsFailed_result that) {
24556
      if (that == null)
24557
        return false;
24558
 
24559
      boolean this_present_ex = true && this.isSetEx();
24560
      boolean that_present_ex = true && that.isSetEx();
24561
      if (this_present_ex || that_present_ex) {
24562
        if (!(this_present_ex && that_present_ex))
24563
          return false;
24564
        if (!this.ex.equals(that.ex))
24565
          return false;
24566
      }
24567
 
24568
      return true;
24569
    }
24570
 
24571
    @Override
24572
    public int hashCode() {
24573
      return 0;
24574
    }
24575
 
24576
    public int compareTo(markOrdersAsFailed_result other) {
24577
      if (!getClass().equals(other.getClass())) {
24578
        return getClass().getName().compareTo(other.getClass().getName());
24579
      }
24580
 
24581
      int lastComparison = 0;
24582
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
24583
 
24584
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24585
      if (lastComparison != 0) {
24586
        return lastComparison;
24587
      }
24588
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24589
      if (lastComparison != 0) {
24590
        return lastComparison;
24591
      }
24592
      return 0;
24593
    }
24594
 
24595
    public void read(TProtocol iprot) throws TException {
24596
      TField field;
24597
      iprot.readStructBegin();
24598
      while (true)
24599
      {
24600
        field = iprot.readFieldBegin();
24601
        if (field.type == TType.STOP) { 
24602
          break;
24603
        }
24604
        _Fields fieldId = _Fields.findByThriftId(field.id);
24605
        if (fieldId == null) {
24606
          TProtocolUtil.skip(iprot, field.type);
24607
        } else {
24608
          switch (fieldId) {
24609
            case EX:
24610
              if (field.type == TType.STRUCT) {
24611
                this.ex = new TransactionServiceException();
24612
                this.ex.read(iprot);
24613
              } else { 
24614
                TProtocolUtil.skip(iprot, field.type);
24615
              }
24616
              break;
24617
          }
24618
          iprot.readFieldEnd();
24619
        }
24620
      }
24621
      iprot.readStructEnd();
24622
      validate();
24623
    }
24624
 
24625
    public void write(TProtocol oprot) throws TException {
24626
      oprot.writeStructBegin(STRUCT_DESC);
24627
 
24628
      if (this.isSetEx()) {
24629
        oprot.writeFieldBegin(EX_FIELD_DESC);
24630
        this.ex.write(oprot);
24631
        oprot.writeFieldEnd();
24632
      }
24633
      oprot.writeFieldStop();
24634
      oprot.writeStructEnd();
24635
    }
24636
 
24637
    @Override
24638
    public String toString() {
24639
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
24640
      boolean first = true;
24641
 
24642
      sb.append("ex:");
24643
      if (this.ex == null) {
24644
        sb.append("null");
24645
      } else {
24646
        sb.append(this.ex);
24647
      }
24648
      first = false;
24649
      sb.append(")");
24650
      return sb.toString();
24651
    }
24652
 
24653
    public void validate() throws TException {
24654
      // check for required fields
24655
    }
24656
 
24657
  }
24658
 
1245 chandransh 24659
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
24660
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
24661
 
24662
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24663
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
24664
 
24665
    private long providerId;
24666
    private Map<String,String> undeliveredOrders;
24667
 
24668
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24669
    public enum _Fields implements TFieldIdEnum {
24670
      PROVIDER_ID((short)1, "providerId"),
24671
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
24672
 
24673
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24674
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24675
 
24676
      static {
24677
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24678
          byId.put((int)field._thriftId, field);
24679
          byName.put(field.getFieldName(), field);
24680
        }
24681
      }
24682
 
24683
      /**
24684
       * Find the _Fields constant that matches fieldId, or null if its not found.
24685
       */
24686
      public static _Fields findByThriftId(int fieldId) {
24687
        return byId.get(fieldId);
24688
      }
24689
 
24690
      /**
24691
       * Find the _Fields constant that matches fieldId, throwing an exception
24692
       * if it is not found.
24693
       */
24694
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24695
        _Fields fields = findByThriftId(fieldId);
24696
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24697
        return fields;
24698
      }
24699
 
24700
      /**
24701
       * Find the _Fields constant that matches name, or null if its not found.
24702
       */
24703
      public static _Fields findByName(String name) {
24704
        return byName.get(name);
24705
      }
24706
 
24707
      private final short _thriftId;
24708
      private final String _fieldName;
24709
 
24710
      _Fields(short thriftId, String fieldName) {
24711
        _thriftId = thriftId;
24712
        _fieldName = fieldName;
24713
      }
24714
 
24715
      public short getThriftFieldId() {
24716
        return _thriftId;
24717
      }
24718
 
24719
      public String getFieldName() {
24720
        return _fieldName;
24721
      }
24722
    }
24723
 
24724
    // isset id assignments
24725
    private static final int __PROVIDERID_ISSET_ID = 0;
24726
    private BitSet __isset_bit_vector = new BitSet(1);
24727
 
24728
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24729
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24730
          new FieldValueMetaData(TType.I64)));
24731
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
24732
          new MapMetaData(TType.MAP, 
24733
              new FieldValueMetaData(TType.STRING), 
24734
              new FieldValueMetaData(TType.STRING))));
24735
    }});
24736
 
24737
    static {
24738
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
24739
    }
24740
 
24741
    public updateNonDeliveryReason_args() {
24742
    }
24743
 
24744
    public updateNonDeliveryReason_args(
24745
      long providerId,
24746
      Map<String,String> undeliveredOrders)
24747
    {
24748
      this();
24749
      this.providerId = providerId;
24750
      setProviderIdIsSet(true);
24751
      this.undeliveredOrders = undeliveredOrders;
24752
    }
24753
 
24754
    /**
24755
     * Performs a deep copy on <i>other</i>.
24756
     */
24757
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
24758
      __isset_bit_vector.clear();
24759
      __isset_bit_vector.or(other.__isset_bit_vector);
24760
      this.providerId = other.providerId;
24761
      if (other.isSetUndeliveredOrders()) {
24762
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
24763
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
24764
 
24765
          String other_element_key = other_element.getKey();
24766
          String other_element_value = other_element.getValue();
24767
 
24768
          String __this__undeliveredOrders_copy_key = other_element_key;
24769
 
24770
          String __this__undeliveredOrders_copy_value = other_element_value;
24771
 
24772
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
24773
        }
24774
        this.undeliveredOrders = __this__undeliveredOrders;
24775
      }
24776
    }
24777
 
24778
    public updateNonDeliveryReason_args deepCopy() {
24779
      return new updateNonDeliveryReason_args(this);
24780
    }
24781
 
24782
    @Deprecated
24783
    public updateNonDeliveryReason_args clone() {
24784
      return new updateNonDeliveryReason_args(this);
24785
    }
24786
 
24787
    public long getProviderId() {
24788
      return this.providerId;
24789
    }
24790
 
24791
    public updateNonDeliveryReason_args setProviderId(long providerId) {
24792
      this.providerId = providerId;
24793
      setProviderIdIsSet(true);
24794
      return this;
24795
    }
24796
 
24797
    public void unsetProviderId() {
24798
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24799
    }
24800
 
24801
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24802
    public boolean isSetProviderId() {
24803
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24804
    }
24805
 
24806
    public void setProviderIdIsSet(boolean value) {
24807
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24808
    }
24809
 
24810
    public int getUndeliveredOrdersSize() {
24811
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
24812
    }
24813
 
24814
    public void putToUndeliveredOrders(String key, String val) {
24815
      if (this.undeliveredOrders == null) {
24816
        this.undeliveredOrders = new HashMap<String,String>();
24817
      }
24818
      this.undeliveredOrders.put(key, val);
24819
    }
24820
 
24821
    public Map<String,String> getUndeliveredOrders() {
24822
      return this.undeliveredOrders;
24823
    }
24824
 
24825
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
24826
      this.undeliveredOrders = undeliveredOrders;
24827
      return this;
24828
    }
24829
 
24830
    public void unsetUndeliveredOrders() {
24831
      this.undeliveredOrders = null;
24832
    }
24833
 
24834
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
24835
    public boolean isSetUndeliveredOrders() {
24836
      return this.undeliveredOrders != null;
24837
    }
24838
 
24839
    public void setUndeliveredOrdersIsSet(boolean value) {
24840
      if (!value) {
24841
        this.undeliveredOrders = null;
24842
      }
24843
    }
24844
 
24845
    public void setFieldValue(_Fields field, Object value) {
24846
      switch (field) {
24847
      case PROVIDER_ID:
24848
        if (value == null) {
24849
          unsetProviderId();
24850
        } else {
24851
          setProviderId((Long)value);
24852
        }
24853
        break;
24854
 
24855
      case UNDELIVERED_ORDERS:
24856
        if (value == null) {
24857
          unsetUndeliveredOrders();
24858
        } else {
24859
          setUndeliveredOrders((Map<String,String>)value);
24860
        }
24861
        break;
24862
 
24863
      }
24864
    }
24865
 
24866
    public void setFieldValue(int fieldID, Object value) {
24867
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24868
    }
24869
 
24870
    public Object getFieldValue(_Fields field) {
24871
      switch (field) {
24872
      case PROVIDER_ID:
24873
        return new Long(getProviderId());
24874
 
24875
      case UNDELIVERED_ORDERS:
24876
        return getUndeliveredOrders();
24877
 
24878
      }
24879
      throw new IllegalStateException();
24880
    }
24881
 
24882
    public Object getFieldValue(int fieldId) {
24883
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24884
    }
24885
 
24886
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24887
    public boolean isSet(_Fields field) {
24888
      switch (field) {
24889
      case PROVIDER_ID:
24890
        return isSetProviderId();
24891
      case UNDELIVERED_ORDERS:
24892
        return isSetUndeliveredOrders();
24893
      }
24894
      throw new IllegalStateException();
24895
    }
24896
 
24897
    public boolean isSet(int fieldID) {
24898
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24899
    }
24900
 
24901
    @Override
24902
    public boolean equals(Object that) {
24903
      if (that == null)
24904
        return false;
24905
      if (that instanceof updateNonDeliveryReason_args)
24906
        return this.equals((updateNonDeliveryReason_args)that);
24907
      return false;
24908
    }
24909
 
24910
    public boolean equals(updateNonDeliveryReason_args that) {
24911
      if (that == null)
24912
        return false;
24913
 
24914
      boolean this_present_providerId = true;
24915
      boolean that_present_providerId = true;
24916
      if (this_present_providerId || that_present_providerId) {
24917
        if (!(this_present_providerId && that_present_providerId))
24918
          return false;
24919
        if (this.providerId != that.providerId)
24920
          return false;
24921
      }
24922
 
24923
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
24924
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
24925
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
24926
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
24927
          return false;
24928
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
24929
          return false;
24930
      }
24931
 
24932
      return true;
24933
    }
24934
 
24935
    @Override
24936
    public int hashCode() {
24937
      return 0;
24938
    }
24939
 
24940
    public void read(TProtocol iprot) throws TException {
24941
      TField field;
24942
      iprot.readStructBegin();
24943
      while (true)
24944
      {
24945
        field = iprot.readFieldBegin();
24946
        if (field.type == TType.STOP) { 
24947
          break;
24948
        }
24949
        _Fields fieldId = _Fields.findByThriftId(field.id);
24950
        if (fieldId == null) {
24951
          TProtocolUtil.skip(iprot, field.type);
24952
        } else {
24953
          switch (fieldId) {
24954
            case PROVIDER_ID:
24955
              if (field.type == TType.I64) {
24956
                this.providerId = iprot.readI64();
24957
                setProviderIdIsSet(true);
24958
              } else { 
24959
                TProtocolUtil.skip(iprot, field.type);
24960
              }
24961
              break;
24962
            case UNDELIVERED_ORDERS:
24963
              if (field.type == TType.MAP) {
24964
                {
1382 varun.gupt 24965
                  TMap _map67 = iprot.readMapBegin();
24966
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
24967
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 24968
                  {
1382 varun.gupt 24969
                    String _key69;
24970
                    String _val70;
24971
                    _key69 = iprot.readString();
24972
                    _val70 = iprot.readString();
24973
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 24974
                  }
24975
                  iprot.readMapEnd();
24976
                }
24977
              } else { 
24978
                TProtocolUtil.skip(iprot, field.type);
24979
              }
24980
              break;
24981
          }
24982
          iprot.readFieldEnd();
24983
        }
24984
      }
24985
      iprot.readStructEnd();
24986
      validate();
24987
    }
24988
 
24989
    public void write(TProtocol oprot) throws TException {
24990
      validate();
24991
 
24992
      oprot.writeStructBegin(STRUCT_DESC);
24993
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24994
      oprot.writeI64(this.providerId);
24995
      oprot.writeFieldEnd();
24996
      if (this.undeliveredOrders != null) {
24997
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
24998
        {
24999
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 25000
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 25001
          {
1382 varun.gupt 25002
            oprot.writeString(_iter71.getKey());
25003
            oprot.writeString(_iter71.getValue());
1245 chandransh 25004
          }
25005
          oprot.writeMapEnd();
25006
        }
25007
        oprot.writeFieldEnd();
25008
      }
25009
      oprot.writeFieldStop();
25010
      oprot.writeStructEnd();
25011
    }
25012
 
25013
    @Override
25014
    public String toString() {
25015
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
25016
      boolean first = true;
25017
 
25018
      sb.append("providerId:");
25019
      sb.append(this.providerId);
25020
      first = false;
25021
      if (!first) sb.append(", ");
25022
      sb.append("undeliveredOrders:");
25023
      if (this.undeliveredOrders == null) {
25024
        sb.append("null");
25025
      } else {
25026
        sb.append(this.undeliveredOrders);
25027
      }
25028
      first = false;
25029
      sb.append(")");
25030
      return sb.toString();
25031
    }
25032
 
25033
    public void validate() throws TException {
25034
      // check for required fields
25035
    }
25036
 
25037
  }
25038
 
25039
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
25040
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
25041
 
25042
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
25043
 
25044
    private TransactionServiceException ex;
25045
 
25046
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25047
    public enum _Fields implements TFieldIdEnum {
25048
      EX((short)1, "ex");
25049
 
25050
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25051
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25052
 
25053
      static {
25054
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25055
          byId.put((int)field._thriftId, field);
25056
          byName.put(field.getFieldName(), field);
25057
        }
25058
      }
25059
 
25060
      /**
25061
       * Find the _Fields constant that matches fieldId, or null if its not found.
25062
       */
25063
      public static _Fields findByThriftId(int fieldId) {
25064
        return byId.get(fieldId);
25065
      }
25066
 
25067
      /**
25068
       * Find the _Fields constant that matches fieldId, throwing an exception
25069
       * if it is not found.
25070
       */
25071
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25072
        _Fields fields = findByThriftId(fieldId);
25073
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25074
        return fields;
25075
      }
25076
 
25077
      /**
25078
       * Find the _Fields constant that matches name, or null if its not found.
25079
       */
25080
      public static _Fields findByName(String name) {
25081
        return byName.get(name);
25082
      }
25083
 
25084
      private final short _thriftId;
25085
      private final String _fieldName;
25086
 
25087
      _Fields(short thriftId, String fieldName) {
25088
        _thriftId = thriftId;
25089
        _fieldName = fieldName;
25090
      }
25091
 
25092
      public short getThriftFieldId() {
25093
        return _thriftId;
25094
      }
25095
 
25096
      public String getFieldName() {
25097
        return _fieldName;
25098
      }
25099
    }
25100
 
25101
    // isset id assignments
25102
 
25103
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25104
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
25105
          new FieldValueMetaData(TType.STRUCT)));
25106
    }});
25107
 
25108
    static {
25109
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
25110
    }
25111
 
25112
    public updateNonDeliveryReason_result() {
25113
    }
25114
 
25115
    public updateNonDeliveryReason_result(
25116
      TransactionServiceException ex)
25117
    {
25118
      this();
25119
      this.ex = ex;
25120
    }
25121
 
25122
    /**
25123
     * Performs a deep copy on <i>other</i>.
25124
     */
25125
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
25126
      if (other.isSetEx()) {
25127
        this.ex = new TransactionServiceException(other.ex);
25128
      }
25129
    }
25130
 
25131
    public updateNonDeliveryReason_result deepCopy() {
25132
      return new updateNonDeliveryReason_result(this);
25133
    }
25134
 
25135
    @Deprecated
25136
    public updateNonDeliveryReason_result clone() {
25137
      return new updateNonDeliveryReason_result(this);
25138
    }
25139
 
25140
    public TransactionServiceException getEx() {
25141
      return this.ex;
25142
    }
25143
 
25144
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
25145
      this.ex = ex;
25146
      return this;
25147
    }
25148
 
25149
    public void unsetEx() {
25150
      this.ex = null;
25151
    }
25152
 
25153
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
25154
    public boolean isSetEx() {
25155
      return this.ex != null;
25156
    }
25157
 
25158
    public void setExIsSet(boolean value) {
25159
      if (!value) {
25160
        this.ex = null;
25161
      }
25162
    }
25163
 
25164
    public void setFieldValue(_Fields field, Object value) {
25165
      switch (field) {
25166
      case EX:
25167
        if (value == null) {
25168
          unsetEx();
25169
        } else {
25170
          setEx((TransactionServiceException)value);
25171
        }
25172
        break;
25173
 
25174
      }
25175
    }
25176
 
25177
    public void setFieldValue(int fieldID, Object value) {
25178
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25179
    }
25180
 
25181
    public Object getFieldValue(_Fields field) {
25182
      switch (field) {
25183
      case EX:
25184
        return getEx();
25185
 
25186
      }
25187
      throw new IllegalStateException();
25188
    }
25189
 
25190
    public Object getFieldValue(int fieldId) {
25191
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25192
    }
25193
 
25194
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25195
    public boolean isSet(_Fields field) {
25196
      switch (field) {
25197
      case EX:
25198
        return isSetEx();
25199
      }
25200
      throw new IllegalStateException();
25201
    }
25202
 
25203
    public boolean isSet(int fieldID) {
25204
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25205
    }
25206
 
25207
    @Override
25208
    public boolean equals(Object that) {
25209
      if (that == null)
25210
        return false;
25211
      if (that instanceof updateNonDeliveryReason_result)
25212
        return this.equals((updateNonDeliveryReason_result)that);
25213
      return false;
25214
    }
25215
 
25216
    public boolean equals(updateNonDeliveryReason_result that) {
25217
      if (that == null)
25218
        return false;
25219
 
25220
      boolean this_present_ex = true && this.isSetEx();
25221
      boolean that_present_ex = true && that.isSetEx();
25222
      if (this_present_ex || that_present_ex) {
25223
        if (!(this_present_ex && that_present_ex))
25224
          return false;
25225
        if (!this.ex.equals(that.ex))
25226
          return false;
25227
      }
25228
 
25229
      return true;
25230
    }
25231
 
25232
    @Override
25233
    public int hashCode() {
25234
      return 0;
25235
    }
25236
 
25237
    public int compareTo(updateNonDeliveryReason_result other) {
25238
      if (!getClass().equals(other.getClass())) {
25239
        return getClass().getName().compareTo(other.getClass().getName());
25240
      }
25241
 
25242
      int lastComparison = 0;
25243
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
25244
 
25245
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
25246
      if (lastComparison != 0) {
25247
        return lastComparison;
25248
      }
25249
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
25250
      if (lastComparison != 0) {
25251
        return lastComparison;
25252
      }
25253
      return 0;
25254
    }
25255
 
25256
    public void read(TProtocol iprot) throws TException {
25257
      TField field;
25258
      iprot.readStructBegin();
25259
      while (true)
25260
      {
25261
        field = iprot.readFieldBegin();
25262
        if (field.type == TType.STOP) { 
25263
          break;
25264
        }
25265
        _Fields fieldId = _Fields.findByThriftId(field.id);
25266
        if (fieldId == null) {
25267
          TProtocolUtil.skip(iprot, field.type);
25268
        } else {
25269
          switch (fieldId) {
25270
            case EX:
25271
              if (field.type == TType.STRUCT) {
25272
                this.ex = new TransactionServiceException();
25273
                this.ex.read(iprot);
25274
              } else { 
25275
                TProtocolUtil.skip(iprot, field.type);
25276
              }
25277
              break;
25278
          }
25279
          iprot.readFieldEnd();
25280
        }
25281
      }
25282
      iprot.readStructEnd();
25283
      validate();
25284
    }
25285
 
25286
    public void write(TProtocol oprot) throws TException {
25287
      oprot.writeStructBegin(STRUCT_DESC);
25288
 
25289
      if (this.isSetEx()) {
25290
        oprot.writeFieldBegin(EX_FIELD_DESC);
25291
        this.ex.write(oprot);
25292
        oprot.writeFieldEnd();
25293
      }
25294
      oprot.writeFieldStop();
25295
      oprot.writeStructEnd();
25296
    }
25297
 
25298
    @Override
25299
    public String toString() {
25300
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
25301
      boolean first = true;
25302
 
25303
      sb.append("ex:");
25304
      if (this.ex == null) {
25305
        sb.append("null");
25306
      } else {
25307
        sb.append(this.ex);
25308
      }
25309
      first = false;
25310
      sb.append(")");
25311
      return sb.toString();
25312
    }
25313
 
25314
    public void validate() throws TException {
25315
      // check for required fields
25316
    }
25317
 
25318
  }
25319
 
1406 ankur.sing 25320
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
25321
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
25322
 
25323
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
25324
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
25325
 
25326
    private long providerId;
25327
    private long warehouseId;
25328
 
25329
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25330
    public enum _Fields implements TFieldIdEnum {
25331
      PROVIDER_ID((short)1, "providerId"),
25332
      WAREHOUSE_ID((short)2, "warehouseId");
25333
 
25334
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25335
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25336
 
25337
      static {
25338
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25339
          byId.put((int)field._thriftId, field);
25340
          byName.put(field.getFieldName(), field);
25341
        }
25342
      }
25343
 
25344
      /**
25345
       * Find the _Fields constant that matches fieldId, or null if its not found.
25346
       */
25347
      public static _Fields findByThriftId(int fieldId) {
25348
        return byId.get(fieldId);
25349
      }
25350
 
25351
      /**
25352
       * Find the _Fields constant that matches fieldId, throwing an exception
25353
       * if it is not found.
25354
       */
25355
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25356
        _Fields fields = findByThriftId(fieldId);
25357
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25358
        return fields;
25359
      }
25360
 
25361
      /**
25362
       * Find the _Fields constant that matches name, or null if its not found.
25363
       */
25364
      public static _Fields findByName(String name) {
25365
        return byName.get(name);
25366
      }
25367
 
25368
      private final short _thriftId;
25369
      private final String _fieldName;
25370
 
25371
      _Fields(short thriftId, String fieldName) {
25372
        _thriftId = thriftId;
25373
        _fieldName = fieldName;
25374
      }
25375
 
25376
      public short getThriftFieldId() {
25377
        return _thriftId;
25378
      }
25379
 
25380
      public String getFieldName() {
25381
        return _fieldName;
25382
      }
25383
    }
25384
 
25385
    // isset id assignments
25386
    private static final int __PROVIDERID_ISSET_ID = 0;
25387
    private static final int __WAREHOUSEID_ISSET_ID = 1;
25388
    private BitSet __isset_bit_vector = new BitSet(2);
25389
 
25390
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25391
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
25392
          new FieldValueMetaData(TType.I64)));
25393
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
25394
          new FieldValueMetaData(TType.I64)));
25395
    }});
25396
 
25397
    static {
25398
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
25399
    }
25400
 
25401
    public getUndeliveredOrders_args() {
25402
    }
25403
 
25404
    public getUndeliveredOrders_args(
25405
      long providerId,
25406
      long warehouseId)
25407
    {
25408
      this();
25409
      this.providerId = providerId;
25410
      setProviderIdIsSet(true);
25411
      this.warehouseId = warehouseId;
25412
      setWarehouseIdIsSet(true);
25413
    }
25414
 
25415
    /**
25416
     * Performs a deep copy on <i>other</i>.
25417
     */
25418
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
25419
      __isset_bit_vector.clear();
25420
      __isset_bit_vector.or(other.__isset_bit_vector);
25421
      this.providerId = other.providerId;
25422
      this.warehouseId = other.warehouseId;
25423
    }
25424
 
25425
    public getUndeliveredOrders_args deepCopy() {
25426
      return new getUndeliveredOrders_args(this);
25427
    }
25428
 
25429
    @Deprecated
25430
    public getUndeliveredOrders_args clone() {
25431
      return new getUndeliveredOrders_args(this);
25432
    }
25433
 
25434
    public long getProviderId() {
25435
      return this.providerId;
25436
    }
25437
 
25438
    public getUndeliveredOrders_args setProviderId(long providerId) {
25439
      this.providerId = providerId;
25440
      setProviderIdIsSet(true);
25441
      return this;
25442
    }
25443
 
25444
    public void unsetProviderId() {
25445
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
25446
    }
25447
 
25448
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
25449
    public boolean isSetProviderId() {
25450
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
25451
    }
25452
 
25453
    public void setProviderIdIsSet(boolean value) {
25454
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
25455
    }
25456
 
25457
    public long getWarehouseId() {
25458
      return this.warehouseId;
25459
    }
25460
 
25461
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
25462
      this.warehouseId = warehouseId;
25463
      setWarehouseIdIsSet(true);
25464
      return this;
25465
    }
25466
 
25467
    public void unsetWarehouseId() {
25468
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
25469
    }
25470
 
25471
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
25472
    public boolean isSetWarehouseId() {
25473
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
25474
    }
25475
 
25476
    public void setWarehouseIdIsSet(boolean value) {
25477
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
25478
    }
25479
 
25480
    public void setFieldValue(_Fields field, Object value) {
25481
      switch (field) {
25482
      case PROVIDER_ID:
25483
        if (value == null) {
25484
          unsetProviderId();
25485
        } else {
25486
          setProviderId((Long)value);
25487
        }
25488
        break;
25489
 
25490
      case WAREHOUSE_ID:
25491
        if (value == null) {
25492
          unsetWarehouseId();
25493
        } else {
25494
          setWarehouseId((Long)value);
25495
        }
25496
        break;
25497
 
25498
      }
25499
    }
25500
 
25501
    public void setFieldValue(int fieldID, Object value) {
25502
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25503
    }
25504
 
25505
    public Object getFieldValue(_Fields field) {
25506
      switch (field) {
25507
      case PROVIDER_ID:
25508
        return new Long(getProviderId());
25509
 
25510
      case WAREHOUSE_ID:
25511
        return new Long(getWarehouseId());
25512
 
25513
      }
25514
      throw new IllegalStateException();
25515
    }
25516
 
25517
    public Object getFieldValue(int fieldId) {
25518
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25519
    }
25520
 
25521
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25522
    public boolean isSet(_Fields field) {
25523
      switch (field) {
25524
      case PROVIDER_ID:
25525
        return isSetProviderId();
25526
      case WAREHOUSE_ID:
25527
        return isSetWarehouseId();
25528
      }
25529
      throw new IllegalStateException();
25530
    }
25531
 
25532
    public boolean isSet(int fieldID) {
25533
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25534
    }
25535
 
25536
    @Override
25537
    public boolean equals(Object that) {
25538
      if (that == null)
25539
        return false;
25540
      if (that instanceof getUndeliveredOrders_args)
25541
        return this.equals((getUndeliveredOrders_args)that);
25542
      return false;
25543
    }
25544
 
25545
    public boolean equals(getUndeliveredOrders_args that) {
25546
      if (that == null)
25547
        return false;
25548
 
25549
      boolean this_present_providerId = true;
25550
      boolean that_present_providerId = true;
25551
      if (this_present_providerId || that_present_providerId) {
25552
        if (!(this_present_providerId && that_present_providerId))
25553
          return false;
25554
        if (this.providerId != that.providerId)
25555
          return false;
25556
      }
25557
 
25558
      boolean this_present_warehouseId = true;
25559
      boolean that_present_warehouseId = true;
25560
      if (this_present_warehouseId || that_present_warehouseId) {
25561
        if (!(this_present_warehouseId && that_present_warehouseId))
25562
          return false;
25563
        if (this.warehouseId != that.warehouseId)
25564
          return false;
25565
      }
25566
 
25567
      return true;
25568
    }
25569
 
25570
    @Override
25571
    public int hashCode() {
25572
      return 0;
25573
    }
25574
 
25575
    public int compareTo(getUndeliveredOrders_args other) {
25576
      if (!getClass().equals(other.getClass())) {
25577
        return getClass().getName().compareTo(other.getClass().getName());
25578
      }
25579
 
25580
      int lastComparison = 0;
25581
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
25582
 
25583
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
25584
      if (lastComparison != 0) {
25585
        return lastComparison;
25586
      }
25587
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
25588
      if (lastComparison != 0) {
25589
        return lastComparison;
25590
      }
25591
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
25592
      if (lastComparison != 0) {
25593
        return lastComparison;
25594
      }
25595
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
25596
      if (lastComparison != 0) {
25597
        return lastComparison;
25598
      }
25599
      return 0;
25600
    }
25601
 
25602
    public void read(TProtocol iprot) throws TException {
25603
      TField field;
25604
      iprot.readStructBegin();
25605
      while (true)
25606
      {
25607
        field = iprot.readFieldBegin();
25608
        if (field.type == TType.STOP) { 
25609
          break;
25610
        }
25611
        _Fields fieldId = _Fields.findByThriftId(field.id);
25612
        if (fieldId == null) {
25613
          TProtocolUtil.skip(iprot, field.type);
25614
        } else {
25615
          switch (fieldId) {
25616
            case PROVIDER_ID:
25617
              if (field.type == TType.I64) {
25618
                this.providerId = iprot.readI64();
25619
                setProviderIdIsSet(true);
25620
              } else { 
25621
                TProtocolUtil.skip(iprot, field.type);
25622
              }
25623
              break;
25624
            case WAREHOUSE_ID:
25625
              if (field.type == TType.I64) {
25626
                this.warehouseId = iprot.readI64();
25627
                setWarehouseIdIsSet(true);
25628
              } else { 
25629
                TProtocolUtil.skip(iprot, field.type);
25630
              }
25631
              break;
25632
          }
25633
          iprot.readFieldEnd();
25634
        }
25635
      }
25636
      iprot.readStructEnd();
25637
      validate();
25638
    }
25639
 
25640
    public void write(TProtocol oprot) throws TException {
25641
      validate();
25642
 
25643
      oprot.writeStructBegin(STRUCT_DESC);
25644
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
25645
      oprot.writeI64(this.providerId);
25646
      oprot.writeFieldEnd();
25647
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
25648
      oprot.writeI64(this.warehouseId);
25649
      oprot.writeFieldEnd();
25650
      oprot.writeFieldStop();
25651
      oprot.writeStructEnd();
25652
    }
25653
 
25654
    @Override
25655
    public String toString() {
25656
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
25657
      boolean first = true;
25658
 
25659
      sb.append("providerId:");
25660
      sb.append(this.providerId);
25661
      first = false;
25662
      if (!first) sb.append(", ");
25663
      sb.append("warehouseId:");
25664
      sb.append(this.warehouseId);
25665
      first = false;
25666
      sb.append(")");
25667
      return sb.toString();
25668
    }
25669
 
25670
    public void validate() throws TException {
25671
      // check for required fields
25672
    }
25673
 
25674
  }
25675
 
25676
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
25677
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
25678
 
25679
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25680
 
25681
    private List<Order> success;
25682
 
25683
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25684
    public enum _Fields implements TFieldIdEnum {
25685
      SUCCESS((short)0, "success");
25686
 
25687
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25688
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25689
 
25690
      static {
25691
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25692
          byId.put((int)field._thriftId, field);
25693
          byName.put(field.getFieldName(), field);
25694
        }
25695
      }
25696
 
25697
      /**
25698
       * Find the _Fields constant that matches fieldId, or null if its not found.
25699
       */
25700
      public static _Fields findByThriftId(int fieldId) {
25701
        return byId.get(fieldId);
25702
      }
25703
 
25704
      /**
25705
       * Find the _Fields constant that matches fieldId, throwing an exception
25706
       * if it is not found.
25707
       */
25708
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25709
        _Fields fields = findByThriftId(fieldId);
25710
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25711
        return fields;
25712
      }
25713
 
25714
      /**
25715
       * Find the _Fields constant that matches name, or null if its not found.
25716
       */
25717
      public static _Fields findByName(String name) {
25718
        return byName.get(name);
25719
      }
25720
 
25721
      private final short _thriftId;
25722
      private final String _fieldName;
25723
 
25724
      _Fields(short thriftId, String fieldName) {
25725
        _thriftId = thriftId;
25726
        _fieldName = fieldName;
25727
      }
25728
 
25729
      public short getThriftFieldId() {
25730
        return _thriftId;
25731
      }
25732
 
25733
      public String getFieldName() {
25734
        return _fieldName;
25735
      }
25736
    }
25737
 
25738
    // isset id assignments
25739
 
25740
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25741
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25742
          new ListMetaData(TType.LIST, 
25743
              new StructMetaData(TType.STRUCT, Order.class))));
25744
    }});
25745
 
25746
    static {
25747
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
25748
    }
25749
 
25750
    public getUndeliveredOrders_result() {
25751
    }
25752
 
25753
    public getUndeliveredOrders_result(
25754
      List<Order> success)
25755
    {
25756
      this();
25757
      this.success = success;
25758
    }
25759
 
25760
    /**
25761
     * Performs a deep copy on <i>other</i>.
25762
     */
25763
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
25764
      if (other.isSetSuccess()) {
25765
        List<Order> __this__success = new ArrayList<Order>();
25766
        for (Order other_element : other.success) {
25767
          __this__success.add(new Order(other_element));
25768
        }
25769
        this.success = __this__success;
25770
      }
25771
    }
25772
 
25773
    public getUndeliveredOrders_result deepCopy() {
25774
      return new getUndeliveredOrders_result(this);
25775
    }
25776
 
25777
    @Deprecated
25778
    public getUndeliveredOrders_result clone() {
25779
      return new getUndeliveredOrders_result(this);
25780
    }
25781
 
25782
    public int getSuccessSize() {
25783
      return (this.success == null) ? 0 : this.success.size();
25784
    }
25785
 
25786
    public java.util.Iterator<Order> getSuccessIterator() {
25787
      return (this.success == null) ? null : this.success.iterator();
25788
    }
25789
 
25790
    public void addToSuccess(Order elem) {
25791
      if (this.success == null) {
25792
        this.success = new ArrayList<Order>();
25793
      }
25794
      this.success.add(elem);
25795
    }
25796
 
25797
    public List<Order> getSuccess() {
25798
      return this.success;
25799
    }
25800
 
25801
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
25802
      this.success = success;
25803
      return this;
25804
    }
25805
 
25806
    public void unsetSuccess() {
25807
      this.success = null;
25808
    }
25809
 
25810
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25811
    public boolean isSetSuccess() {
25812
      return this.success != null;
25813
    }
25814
 
25815
    public void setSuccessIsSet(boolean value) {
25816
      if (!value) {
25817
        this.success = null;
25818
      }
25819
    }
25820
 
25821
    public void setFieldValue(_Fields field, Object value) {
25822
      switch (field) {
25823
      case SUCCESS:
25824
        if (value == null) {
25825
          unsetSuccess();
25826
        } else {
25827
          setSuccess((List<Order>)value);
25828
        }
25829
        break;
25830
 
25831
      }
25832
    }
25833
 
25834
    public void setFieldValue(int fieldID, Object value) {
25835
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25836
    }
25837
 
25838
    public Object getFieldValue(_Fields field) {
25839
      switch (field) {
25840
      case SUCCESS:
25841
        return getSuccess();
25842
 
25843
      }
25844
      throw new IllegalStateException();
25845
    }
25846
 
25847
    public Object getFieldValue(int fieldId) {
25848
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25849
    }
25850
 
25851
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25852
    public boolean isSet(_Fields field) {
25853
      switch (field) {
25854
      case SUCCESS:
25855
        return isSetSuccess();
25856
      }
25857
      throw new IllegalStateException();
25858
    }
25859
 
25860
    public boolean isSet(int fieldID) {
25861
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25862
    }
25863
 
25864
    @Override
25865
    public boolean equals(Object that) {
25866
      if (that == null)
25867
        return false;
25868
      if (that instanceof getUndeliveredOrders_result)
25869
        return this.equals((getUndeliveredOrders_result)that);
25870
      return false;
25871
    }
25872
 
25873
    public boolean equals(getUndeliveredOrders_result that) {
25874
      if (that == null)
25875
        return false;
25876
 
25877
      boolean this_present_success = true && this.isSetSuccess();
25878
      boolean that_present_success = true && that.isSetSuccess();
25879
      if (this_present_success || that_present_success) {
25880
        if (!(this_present_success && that_present_success))
25881
          return false;
25882
        if (!this.success.equals(that.success))
25883
          return false;
25884
      }
25885
 
25886
      return true;
25887
    }
25888
 
25889
    @Override
25890
    public int hashCode() {
25891
      return 0;
25892
    }
25893
 
25894
    public int compareTo(getUndeliveredOrders_result other) {
25895
      if (!getClass().equals(other.getClass())) {
25896
        return getClass().getName().compareTo(other.getClass().getName());
25897
      }
25898
 
25899
      int lastComparison = 0;
25900
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
25901
 
25902
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25903
      if (lastComparison != 0) {
25904
        return lastComparison;
25905
      }
25906
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25907
      if (lastComparison != 0) {
25908
        return lastComparison;
25909
      }
25910
      return 0;
25911
    }
25912
 
25913
    public void read(TProtocol iprot) throws TException {
25914
      TField field;
25915
      iprot.readStructBegin();
25916
      while (true)
25917
      {
25918
        field = iprot.readFieldBegin();
25919
        if (field.type == TType.STOP) { 
25920
          break;
25921
        }
25922
        _Fields fieldId = _Fields.findByThriftId(field.id);
25923
        if (fieldId == null) {
25924
          TProtocolUtil.skip(iprot, field.type);
25925
        } else {
25926
          switch (fieldId) {
25927
            case SUCCESS:
25928
              if (field.type == TType.LIST) {
25929
                {
25930
                  TList _list72 = iprot.readListBegin();
25931
                  this.success = new ArrayList<Order>(_list72.size);
25932
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
25933
                  {
25934
                    Order _elem74;
25935
                    _elem74 = new Order();
25936
                    _elem74.read(iprot);
25937
                    this.success.add(_elem74);
25938
                  }
25939
                  iprot.readListEnd();
25940
                }
25941
              } else { 
25942
                TProtocolUtil.skip(iprot, field.type);
25943
              }
25944
              break;
25945
          }
25946
          iprot.readFieldEnd();
25947
        }
25948
      }
25949
      iprot.readStructEnd();
25950
      validate();
25951
    }
25952
 
25953
    public void write(TProtocol oprot) throws TException {
25954
      oprot.writeStructBegin(STRUCT_DESC);
25955
 
25956
      if (this.isSetSuccess()) {
25957
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25958
        {
25959
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
25960
          for (Order _iter75 : this.success)
25961
          {
25962
            _iter75.write(oprot);
25963
          }
25964
          oprot.writeListEnd();
25965
        }
25966
        oprot.writeFieldEnd();
25967
      }
25968
      oprot.writeFieldStop();
25969
      oprot.writeStructEnd();
25970
    }
25971
 
25972
    @Override
25973
    public String toString() {
25974
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
25975
      boolean first = true;
25976
 
25977
      sb.append("success:");
25978
      if (this.success == null) {
25979
        sb.append("null");
25980
      } else {
25981
        sb.append(this.success);
25982
      }
25983
      first = false;
25984
      sb.append(")");
25985
      return sb.toString();
25986
    }
25987
 
25988
    public void validate() throws TException {
25989
      // check for required fields
25990
    }
25991
 
25992
  }
25993
 
305 ashish 25994
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
25995
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
25996
 
483 rajveer 25997
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25998
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
25999
 
483 rajveer 26000
    private long orderId;
305 ashish 26001
    private boolean valid;
26002
 
26003
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26004
    public enum _Fields implements TFieldIdEnum {
483 rajveer 26005
      ORDER_ID((short)1, "orderId"),
305 ashish 26006
      VALID((short)2, "valid");
26007
 
26008
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26009
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26010
 
26011
      static {
26012
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26013
          byId.put((int)field._thriftId, field);
26014
          byName.put(field.getFieldName(), field);
26015
        }
26016
      }
26017
 
26018
      /**
26019
       * Find the _Fields constant that matches fieldId, or null if its not found.
26020
       */
26021
      public static _Fields findByThriftId(int fieldId) {
26022
        return byId.get(fieldId);
26023
      }
26024
 
26025
      /**
26026
       * Find the _Fields constant that matches fieldId, throwing an exception
26027
       * if it is not found.
26028
       */
26029
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26030
        _Fields fields = findByThriftId(fieldId);
26031
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26032
        return fields;
26033
      }
26034
 
26035
      /**
26036
       * Find the _Fields constant that matches name, or null if its not found.
26037
       */
26038
      public static _Fields findByName(String name) {
26039
        return byName.get(name);
26040
      }
26041
 
26042
      private final short _thriftId;
26043
      private final String _fieldName;
26044
 
26045
      _Fields(short thriftId, String fieldName) {
26046
        _thriftId = thriftId;
26047
        _fieldName = fieldName;
26048
      }
26049
 
26050
      public short getThriftFieldId() {
26051
        return _thriftId;
26052
      }
26053
 
26054
      public String getFieldName() {
26055
        return _fieldName;
26056
      }
26057
    }
26058
 
26059
    // isset id assignments
483 rajveer 26060
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 26061
    private static final int __VALID_ISSET_ID = 1;
26062
    private BitSet __isset_bit_vector = new BitSet(2);
26063
 
26064
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 26065
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 26066
          new FieldValueMetaData(TType.I64)));
26067
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
26068
          new FieldValueMetaData(TType.BOOL)));
26069
    }});
26070
 
26071
    static {
26072
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
26073
    }
26074
 
26075
    public getAlerts_args() {
26076
    }
26077
 
26078
    public getAlerts_args(
483 rajveer 26079
      long orderId,
305 ashish 26080
      boolean valid)
26081
    {
26082
      this();
483 rajveer 26083
      this.orderId = orderId;
26084
      setOrderIdIsSet(true);
305 ashish 26085
      this.valid = valid;
26086
      setValidIsSet(true);
26087
    }
26088
 
26089
    /**
26090
     * Performs a deep copy on <i>other</i>.
26091
     */
26092
    public getAlerts_args(getAlerts_args other) {
26093
      __isset_bit_vector.clear();
26094
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 26095
      this.orderId = other.orderId;
305 ashish 26096
      this.valid = other.valid;
26097
    }
26098
 
26099
    public getAlerts_args deepCopy() {
26100
      return new getAlerts_args(this);
26101
    }
26102
 
26103
    @Deprecated
26104
    public getAlerts_args clone() {
26105
      return new getAlerts_args(this);
26106
    }
26107
 
483 rajveer 26108
    public long getOrderId() {
26109
      return this.orderId;
305 ashish 26110
    }
26111
 
483 rajveer 26112
    public getAlerts_args setOrderId(long orderId) {
26113
      this.orderId = orderId;
26114
      setOrderIdIsSet(true);
305 ashish 26115
      return this;
26116
    }
26117
 
483 rajveer 26118
    public void unsetOrderId() {
26119
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 26120
    }
26121
 
483 rajveer 26122
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
26123
    public boolean isSetOrderId() {
26124
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 26125
    }
26126
 
483 rajveer 26127
    public void setOrderIdIsSet(boolean value) {
26128
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 26129
    }
26130
 
26131
    public boolean isValid() {
26132
      return this.valid;
26133
    }
26134
 
26135
    public getAlerts_args setValid(boolean valid) {
26136
      this.valid = valid;
26137
      setValidIsSet(true);
26138
      return this;
26139
    }
26140
 
26141
    public void unsetValid() {
26142
      __isset_bit_vector.clear(__VALID_ISSET_ID);
26143
    }
26144
 
26145
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
26146
    public boolean isSetValid() {
26147
      return __isset_bit_vector.get(__VALID_ISSET_ID);
26148
    }
26149
 
26150
    public void setValidIsSet(boolean value) {
26151
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
26152
    }
26153
 
26154
    public void setFieldValue(_Fields field, Object value) {
26155
      switch (field) {
483 rajveer 26156
      case ORDER_ID:
305 ashish 26157
        if (value == null) {
483 rajveer 26158
          unsetOrderId();
305 ashish 26159
        } else {
483 rajveer 26160
          setOrderId((Long)value);
305 ashish 26161
        }
26162
        break;
26163
 
26164
      case VALID:
26165
        if (value == null) {
26166
          unsetValid();
26167
        } else {
26168
          setValid((Boolean)value);
26169
        }
26170
        break;
26171
 
26172
      }
26173
    }
26174
 
26175
    public void setFieldValue(int fieldID, Object value) {
26176
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26177
    }
26178
 
26179
    public Object getFieldValue(_Fields field) {
26180
      switch (field) {
483 rajveer 26181
      case ORDER_ID:
26182
        return new Long(getOrderId());
305 ashish 26183
 
26184
      case VALID:
26185
        return new Boolean(isValid());
26186
 
26187
      }
26188
      throw new IllegalStateException();
26189
    }
26190
 
26191
    public Object getFieldValue(int fieldId) {
26192
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26193
    }
26194
 
26195
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26196
    public boolean isSet(_Fields field) {
26197
      switch (field) {
483 rajveer 26198
      case ORDER_ID:
26199
        return isSetOrderId();
305 ashish 26200
      case VALID:
26201
        return isSetValid();
26202
      }
26203
      throw new IllegalStateException();
26204
    }
26205
 
26206
    public boolean isSet(int fieldID) {
26207
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26208
    }
26209
 
26210
    @Override
26211
    public boolean equals(Object that) {
26212
      if (that == null)
26213
        return false;
26214
      if (that instanceof getAlerts_args)
26215
        return this.equals((getAlerts_args)that);
26216
      return false;
26217
    }
26218
 
26219
    public boolean equals(getAlerts_args that) {
26220
      if (that == null)
26221
        return false;
26222
 
483 rajveer 26223
      boolean this_present_orderId = true;
26224
      boolean that_present_orderId = true;
26225
      if (this_present_orderId || that_present_orderId) {
26226
        if (!(this_present_orderId && that_present_orderId))
305 ashish 26227
          return false;
483 rajveer 26228
        if (this.orderId != that.orderId)
305 ashish 26229
          return false;
26230
      }
26231
 
26232
      boolean this_present_valid = true;
26233
      boolean that_present_valid = true;
26234
      if (this_present_valid || that_present_valid) {
26235
        if (!(this_present_valid && that_present_valid))
26236
          return false;
26237
        if (this.valid != that.valid)
26238
          return false;
26239
      }
26240
 
26241
      return true;
26242
    }
26243
 
26244
    @Override
26245
    public int hashCode() {
26246
      return 0;
26247
    }
26248
 
26249
    public int compareTo(getAlerts_args other) {
26250
      if (!getClass().equals(other.getClass())) {
26251
        return getClass().getName().compareTo(other.getClass().getName());
26252
      }
26253
 
26254
      int lastComparison = 0;
26255
      getAlerts_args typedOther = (getAlerts_args)other;
26256
 
483 rajveer 26257
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 26258
      if (lastComparison != 0) {
26259
        return lastComparison;
26260
      }
483 rajveer 26261
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 26262
      if (lastComparison != 0) {
26263
        return lastComparison;
26264
      }
26265
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
26266
      if (lastComparison != 0) {
26267
        return lastComparison;
26268
      }
26269
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
26270
      if (lastComparison != 0) {
26271
        return lastComparison;
26272
      }
26273
      return 0;
26274
    }
26275
 
26276
    public void read(TProtocol iprot) throws TException {
26277
      TField field;
26278
      iprot.readStructBegin();
26279
      while (true)
26280
      {
26281
        field = iprot.readFieldBegin();
26282
        if (field.type == TType.STOP) { 
26283
          break;
26284
        }
26285
        _Fields fieldId = _Fields.findByThriftId(field.id);
26286
        if (fieldId == null) {
26287
          TProtocolUtil.skip(iprot, field.type);
26288
        } else {
26289
          switch (fieldId) {
483 rajveer 26290
            case ORDER_ID:
305 ashish 26291
              if (field.type == TType.I64) {
483 rajveer 26292
                this.orderId = iprot.readI64();
26293
                setOrderIdIsSet(true);
305 ashish 26294
              } else { 
26295
                TProtocolUtil.skip(iprot, field.type);
26296
              }
26297
              break;
26298
            case VALID:
26299
              if (field.type == TType.BOOL) {
26300
                this.valid = iprot.readBool();
26301
                setValidIsSet(true);
26302
              } else { 
26303
                TProtocolUtil.skip(iprot, field.type);
26304
              }
26305
              break;
26306
          }
26307
          iprot.readFieldEnd();
26308
        }
26309
      }
26310
      iprot.readStructEnd();
26311
      validate();
26312
    }
26313
 
26314
    public void write(TProtocol oprot) throws TException {
26315
      validate();
26316
 
26317
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 26318
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
26319
      oprot.writeI64(this.orderId);
305 ashish 26320
      oprot.writeFieldEnd();
26321
      oprot.writeFieldBegin(VALID_FIELD_DESC);
26322
      oprot.writeBool(this.valid);
26323
      oprot.writeFieldEnd();
26324
      oprot.writeFieldStop();
26325
      oprot.writeStructEnd();
26326
    }
26327
 
26328
    @Override
26329
    public String toString() {
26330
      StringBuilder sb = new StringBuilder("getAlerts_args(");
26331
      boolean first = true;
26332
 
483 rajveer 26333
      sb.append("orderId:");
26334
      sb.append(this.orderId);
305 ashish 26335
      first = false;
26336
      if (!first) sb.append(", ");
26337
      sb.append("valid:");
26338
      sb.append(this.valid);
26339
      first = false;
26340
      sb.append(")");
26341
      return sb.toString();
26342
    }
26343
 
26344
    public void validate() throws TException {
26345
      // check for required fields
26346
    }
26347
 
26348
  }
26349
 
26350
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
26351
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
26352
 
26353
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
26354
 
26355
    private List<Alert> success;
26356
 
26357
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26358
    public enum _Fields implements TFieldIdEnum {
26359
      SUCCESS((short)0, "success");
26360
 
26361
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26362
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26363
 
26364
      static {
26365
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26366
          byId.put((int)field._thriftId, field);
26367
          byName.put(field.getFieldName(), field);
26368
        }
26369
      }
26370
 
26371
      /**
26372
       * Find the _Fields constant that matches fieldId, or null if its not found.
26373
       */
26374
      public static _Fields findByThriftId(int fieldId) {
26375
        return byId.get(fieldId);
26376
      }
26377
 
26378
      /**
26379
       * Find the _Fields constant that matches fieldId, throwing an exception
26380
       * if it is not found.
26381
       */
26382
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26383
        _Fields fields = findByThriftId(fieldId);
26384
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26385
        return fields;
26386
      }
26387
 
26388
      /**
26389
       * Find the _Fields constant that matches name, or null if its not found.
26390
       */
26391
      public static _Fields findByName(String name) {
26392
        return byName.get(name);
26393
      }
26394
 
26395
      private final short _thriftId;
26396
      private final String _fieldName;
26397
 
26398
      _Fields(short thriftId, String fieldName) {
26399
        _thriftId = thriftId;
26400
        _fieldName = fieldName;
26401
      }
26402
 
26403
      public short getThriftFieldId() {
26404
        return _thriftId;
26405
      }
26406
 
26407
      public String getFieldName() {
26408
        return _fieldName;
26409
      }
26410
    }
26411
 
26412
    // isset id assignments
26413
 
26414
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26415
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26416
          new ListMetaData(TType.LIST, 
26417
              new StructMetaData(TType.STRUCT, Alert.class))));
26418
    }});
26419
 
26420
    static {
26421
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
26422
    }
26423
 
26424
    public getAlerts_result() {
26425
    }
26426
 
26427
    public getAlerts_result(
26428
      List<Alert> success)
26429
    {
26430
      this();
26431
      this.success = success;
26432
    }
26433
 
26434
    /**
26435
     * Performs a deep copy on <i>other</i>.
26436
     */
26437
    public getAlerts_result(getAlerts_result other) {
26438
      if (other.isSetSuccess()) {
26439
        List<Alert> __this__success = new ArrayList<Alert>();
26440
        for (Alert other_element : other.success) {
26441
          __this__success.add(new Alert(other_element));
26442
        }
26443
        this.success = __this__success;
26444
      }
26445
    }
26446
 
26447
    public getAlerts_result deepCopy() {
26448
      return new getAlerts_result(this);
26449
    }
26450
 
26451
    @Deprecated
26452
    public getAlerts_result clone() {
26453
      return new getAlerts_result(this);
26454
    }
26455
 
26456
    public int getSuccessSize() {
26457
      return (this.success == null) ? 0 : this.success.size();
26458
    }
26459
 
26460
    public java.util.Iterator<Alert> getSuccessIterator() {
26461
      return (this.success == null) ? null : this.success.iterator();
26462
    }
26463
 
26464
    public void addToSuccess(Alert elem) {
26465
      if (this.success == null) {
26466
        this.success = new ArrayList<Alert>();
26467
      }
26468
      this.success.add(elem);
26469
    }
26470
 
26471
    public List<Alert> getSuccess() {
26472
      return this.success;
26473
    }
26474
 
26475
    public getAlerts_result setSuccess(List<Alert> success) {
26476
      this.success = success;
26477
      return this;
26478
    }
26479
 
26480
    public void unsetSuccess() {
26481
      this.success = null;
26482
    }
26483
 
26484
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26485
    public boolean isSetSuccess() {
26486
      return this.success != null;
26487
    }
26488
 
26489
    public void setSuccessIsSet(boolean value) {
26490
      if (!value) {
26491
        this.success = null;
26492
      }
26493
    }
26494
 
26495
    public void setFieldValue(_Fields field, Object value) {
26496
      switch (field) {
26497
      case SUCCESS:
26498
        if (value == null) {
26499
          unsetSuccess();
26500
        } else {
26501
          setSuccess((List<Alert>)value);
26502
        }
26503
        break;
26504
 
26505
      }
26506
    }
26507
 
26508
    public void setFieldValue(int fieldID, Object value) {
26509
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26510
    }
26511
 
26512
    public Object getFieldValue(_Fields field) {
26513
      switch (field) {
26514
      case SUCCESS:
26515
        return getSuccess();
26516
 
26517
      }
26518
      throw new IllegalStateException();
26519
    }
26520
 
26521
    public Object getFieldValue(int fieldId) {
26522
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26523
    }
26524
 
26525
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26526
    public boolean isSet(_Fields field) {
26527
      switch (field) {
26528
      case SUCCESS:
26529
        return isSetSuccess();
26530
      }
26531
      throw new IllegalStateException();
26532
    }
26533
 
26534
    public boolean isSet(int fieldID) {
26535
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26536
    }
26537
 
26538
    @Override
26539
    public boolean equals(Object that) {
26540
      if (that == null)
26541
        return false;
26542
      if (that instanceof getAlerts_result)
26543
        return this.equals((getAlerts_result)that);
26544
      return false;
26545
    }
26546
 
26547
    public boolean equals(getAlerts_result that) {
26548
      if (that == null)
26549
        return false;
26550
 
26551
      boolean this_present_success = true && this.isSetSuccess();
26552
      boolean that_present_success = true && that.isSetSuccess();
26553
      if (this_present_success || that_present_success) {
26554
        if (!(this_present_success && that_present_success))
26555
          return false;
26556
        if (!this.success.equals(that.success))
26557
          return false;
26558
      }
26559
 
26560
      return true;
26561
    }
26562
 
26563
    @Override
26564
    public int hashCode() {
26565
      return 0;
26566
    }
26567
 
26568
    public int compareTo(getAlerts_result other) {
26569
      if (!getClass().equals(other.getClass())) {
26570
        return getClass().getName().compareTo(other.getClass().getName());
26571
      }
26572
 
26573
      int lastComparison = 0;
26574
      getAlerts_result typedOther = (getAlerts_result)other;
26575
 
26576
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26577
      if (lastComparison != 0) {
26578
        return lastComparison;
26579
      }
26580
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26581
      if (lastComparison != 0) {
26582
        return lastComparison;
26583
      }
26584
      return 0;
26585
    }
26586
 
26587
    public void read(TProtocol iprot) throws TException {
26588
      TField field;
26589
      iprot.readStructBegin();
26590
      while (true)
26591
      {
26592
        field = iprot.readFieldBegin();
26593
        if (field.type == TType.STOP) { 
26594
          break;
26595
        }
26596
        _Fields fieldId = _Fields.findByThriftId(field.id);
26597
        if (fieldId == null) {
26598
          TProtocolUtil.skip(iprot, field.type);
26599
        } else {
26600
          switch (fieldId) {
26601
            case SUCCESS:
26602
              if (field.type == TType.LIST) {
26603
                {
1406 ankur.sing 26604
                  TList _list76 = iprot.readListBegin();
26605
                  this.success = new ArrayList<Alert>(_list76.size);
26606
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 26607
                  {
1406 ankur.sing 26608
                    Alert _elem78;
26609
                    _elem78 = new Alert();
26610
                    _elem78.read(iprot);
26611
                    this.success.add(_elem78);
305 ashish 26612
                  }
26613
                  iprot.readListEnd();
26614
                }
26615
              } else { 
26616
                TProtocolUtil.skip(iprot, field.type);
26617
              }
26618
              break;
26619
          }
26620
          iprot.readFieldEnd();
26621
        }
26622
      }
26623
      iprot.readStructEnd();
26624
      validate();
26625
    }
26626
 
26627
    public void write(TProtocol oprot) throws TException {
26628
      oprot.writeStructBegin(STRUCT_DESC);
26629
 
26630
      if (this.isSetSuccess()) {
26631
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26632
        {
26633
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 26634
          for (Alert _iter79 : this.success)
305 ashish 26635
          {
1406 ankur.sing 26636
            _iter79.write(oprot);
305 ashish 26637
          }
26638
          oprot.writeListEnd();
26639
        }
26640
        oprot.writeFieldEnd();
26641
      }
26642
      oprot.writeFieldStop();
26643
      oprot.writeStructEnd();
26644
    }
26645
 
26646
    @Override
26647
    public String toString() {
26648
      StringBuilder sb = new StringBuilder("getAlerts_result(");
26649
      boolean first = true;
26650
 
26651
      sb.append("success:");
26652
      if (this.success == null) {
26653
        sb.append("null");
26654
      } else {
26655
        sb.append(this.success);
26656
      }
26657
      first = false;
26658
      sb.append(")");
26659
      return sb.toString();
26660
    }
26661
 
26662
    public void validate() throws TException {
26663
      // check for required fields
26664
    }
26665
 
26666
  }
26667
 
26668
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
26669
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
26670
 
483 rajveer 26671
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 26672
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
26673
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
26674
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
26675
 
483 rajveer 26676
    private long orderId;
305 ashish 26677
    private boolean unset;
26678
    private long type;
26679
    private String comment;
26680
 
26681
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26682
    public enum _Fields implements TFieldIdEnum {
483 rajveer 26683
      ORDER_ID((short)1, "orderId"),
305 ashish 26684
      UNSET((short)2, "unset"),
26685
      TYPE((short)3, "type"),
26686
      COMMENT((short)4, "comment");
26687
 
26688
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26689
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26690
 
26691
      static {
26692
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26693
          byId.put((int)field._thriftId, field);
26694
          byName.put(field.getFieldName(), field);
26695
        }
26696
      }
26697
 
26698
      /**
26699
       * Find the _Fields constant that matches fieldId, or null if its not found.
26700
       */
26701
      public static _Fields findByThriftId(int fieldId) {
26702
        return byId.get(fieldId);
26703
      }
26704
 
26705
      /**
26706
       * Find the _Fields constant that matches fieldId, throwing an exception
26707
       * if it is not found.
26708
       */
26709
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26710
        _Fields fields = findByThriftId(fieldId);
26711
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26712
        return fields;
26713
      }
26714
 
26715
      /**
26716
       * Find the _Fields constant that matches name, or null if its not found.
26717
       */
26718
      public static _Fields findByName(String name) {
26719
        return byName.get(name);
26720
      }
26721
 
26722
      private final short _thriftId;
26723
      private final String _fieldName;
26724
 
26725
      _Fields(short thriftId, String fieldName) {
26726
        _thriftId = thriftId;
26727
        _fieldName = fieldName;
26728
      }
26729
 
26730
      public short getThriftFieldId() {
26731
        return _thriftId;
26732
      }
26733
 
26734
      public String getFieldName() {
26735
        return _fieldName;
26736
      }
26737
    }
26738
 
26739
    // isset id assignments
483 rajveer 26740
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 26741
    private static final int __UNSET_ISSET_ID = 1;
26742
    private static final int __TYPE_ISSET_ID = 2;
26743
    private BitSet __isset_bit_vector = new BitSet(3);
26744
 
26745
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 26746
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 26747
          new FieldValueMetaData(TType.I64)));
26748
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
26749
          new FieldValueMetaData(TType.BOOL)));
26750
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
26751
          new FieldValueMetaData(TType.I64)));
26752
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
26753
          new FieldValueMetaData(TType.STRING)));
26754
    }});
26755
 
26756
    static {
26757
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
26758
    }
26759
 
26760
    public setAlert_args() {
26761
    }
26762
 
26763
    public setAlert_args(
483 rajveer 26764
      long orderId,
305 ashish 26765
      boolean unset,
26766
      long type,
26767
      String comment)
26768
    {
26769
      this();
483 rajveer 26770
      this.orderId = orderId;
26771
      setOrderIdIsSet(true);
305 ashish 26772
      this.unset = unset;
26773
      setUnsetIsSet(true);
26774
      this.type = type;
26775
      setTypeIsSet(true);
26776
      this.comment = comment;
26777
    }
26778
 
26779
    /**
26780
     * Performs a deep copy on <i>other</i>.
26781
     */
26782
    public setAlert_args(setAlert_args other) {
26783
      __isset_bit_vector.clear();
26784
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 26785
      this.orderId = other.orderId;
305 ashish 26786
      this.unset = other.unset;
26787
      this.type = other.type;
26788
      if (other.isSetComment()) {
26789
        this.comment = other.comment;
26790
      }
26791
    }
26792
 
26793
    public setAlert_args deepCopy() {
26794
      return new setAlert_args(this);
26795
    }
26796
 
26797
    @Deprecated
26798
    public setAlert_args clone() {
26799
      return new setAlert_args(this);
26800
    }
26801
 
483 rajveer 26802
    public long getOrderId() {
26803
      return this.orderId;
305 ashish 26804
    }
26805
 
483 rajveer 26806
    public setAlert_args setOrderId(long orderId) {
26807
      this.orderId = orderId;
26808
      setOrderIdIsSet(true);
305 ashish 26809
      return this;
26810
    }
26811
 
483 rajveer 26812
    public void unsetOrderId() {
26813
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 26814
    }
26815
 
483 rajveer 26816
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
26817
    public boolean isSetOrderId() {
26818
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 26819
    }
26820
 
483 rajveer 26821
    public void setOrderIdIsSet(boolean value) {
26822
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 26823
    }
26824
 
26825
    public boolean isUnset() {
26826
      return this.unset;
26827
    }
26828
 
26829
    public setAlert_args setUnset(boolean unset) {
26830
      this.unset = unset;
26831
      setUnsetIsSet(true);
26832
      return this;
26833
    }
26834
 
26835
    public void unsetUnset() {
26836
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
26837
    }
26838
 
26839
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
26840
    public boolean isSetUnset() {
26841
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
26842
    }
26843
 
26844
    public void setUnsetIsSet(boolean value) {
26845
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
26846
    }
26847
 
26848
    public long getType() {
26849
      return this.type;
26850
    }
26851
 
26852
    public setAlert_args setType(long type) {
26853
      this.type = type;
26854
      setTypeIsSet(true);
26855
      return this;
26856
    }
26857
 
26858
    public void unsetType() {
26859
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
26860
    }
26861
 
26862
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
26863
    public boolean isSetType() {
26864
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
26865
    }
26866
 
26867
    public void setTypeIsSet(boolean value) {
26868
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
26869
    }
26870
 
26871
    public String getComment() {
26872
      return this.comment;
26873
    }
26874
 
26875
    public setAlert_args setComment(String comment) {
26876
      this.comment = comment;
26877
      return this;
26878
    }
26879
 
26880
    public void unsetComment() {
26881
      this.comment = null;
26882
    }
26883
 
26884
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
26885
    public boolean isSetComment() {
26886
      return this.comment != null;
26887
    }
26888
 
26889
    public void setCommentIsSet(boolean value) {
26890
      if (!value) {
26891
        this.comment = null;
26892
      }
26893
    }
26894
 
26895
    public void setFieldValue(_Fields field, Object value) {
26896
      switch (field) {
483 rajveer 26897
      case ORDER_ID:
305 ashish 26898
        if (value == null) {
483 rajveer 26899
          unsetOrderId();
305 ashish 26900
        } else {
483 rajveer 26901
          setOrderId((Long)value);
305 ashish 26902
        }
26903
        break;
26904
 
26905
      case UNSET:
26906
        if (value == null) {
26907
          unsetUnset();
26908
        } else {
26909
          setUnset((Boolean)value);
26910
        }
26911
        break;
26912
 
26913
      case TYPE:
26914
        if (value == null) {
26915
          unsetType();
26916
        } else {
26917
          setType((Long)value);
26918
        }
26919
        break;
26920
 
26921
      case COMMENT:
26922
        if (value == null) {
26923
          unsetComment();
26924
        } else {
26925
          setComment((String)value);
26926
        }
26927
        break;
26928
 
26929
      }
26930
    }
26931
 
26932
    public void setFieldValue(int fieldID, Object value) {
26933
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26934
    }
26935
 
26936
    public Object getFieldValue(_Fields field) {
26937
      switch (field) {
483 rajveer 26938
      case ORDER_ID:
26939
        return new Long(getOrderId());
305 ashish 26940
 
26941
      case UNSET:
26942
        return new Boolean(isUnset());
26943
 
26944
      case TYPE:
26945
        return new Long(getType());
26946
 
26947
      case COMMENT:
26948
        return getComment();
26949
 
26950
      }
26951
      throw new IllegalStateException();
26952
    }
26953
 
26954
    public Object getFieldValue(int fieldId) {
26955
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26956
    }
26957
 
26958
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26959
    public boolean isSet(_Fields field) {
26960
      switch (field) {
483 rajveer 26961
      case ORDER_ID:
26962
        return isSetOrderId();
305 ashish 26963
      case UNSET:
26964
        return isSetUnset();
26965
      case TYPE:
26966
        return isSetType();
26967
      case COMMENT:
26968
        return isSetComment();
26969
      }
26970
      throw new IllegalStateException();
26971
    }
26972
 
26973
    public boolean isSet(int fieldID) {
26974
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26975
    }
26976
 
26977
    @Override
26978
    public boolean equals(Object that) {
26979
      if (that == null)
26980
        return false;
26981
      if (that instanceof setAlert_args)
26982
        return this.equals((setAlert_args)that);
26983
      return false;
26984
    }
26985
 
26986
    public boolean equals(setAlert_args that) {
26987
      if (that == null)
26988
        return false;
26989
 
483 rajveer 26990
      boolean this_present_orderId = true;
26991
      boolean that_present_orderId = true;
26992
      if (this_present_orderId || that_present_orderId) {
26993
        if (!(this_present_orderId && that_present_orderId))
305 ashish 26994
          return false;
483 rajveer 26995
        if (this.orderId != that.orderId)
305 ashish 26996
          return false;
26997
      }
26998
 
26999
      boolean this_present_unset = true;
27000
      boolean that_present_unset = true;
27001
      if (this_present_unset || that_present_unset) {
27002
        if (!(this_present_unset && that_present_unset))
27003
          return false;
27004
        if (this.unset != that.unset)
27005
          return false;
27006
      }
27007
 
27008
      boolean this_present_type = true;
27009
      boolean that_present_type = true;
27010
      if (this_present_type || that_present_type) {
27011
        if (!(this_present_type && that_present_type))
27012
          return false;
27013
        if (this.type != that.type)
27014
          return false;
27015
      }
27016
 
27017
      boolean this_present_comment = true && this.isSetComment();
27018
      boolean that_present_comment = true && that.isSetComment();
27019
      if (this_present_comment || that_present_comment) {
27020
        if (!(this_present_comment && that_present_comment))
27021
          return false;
27022
        if (!this.comment.equals(that.comment))
27023
          return false;
27024
      }
27025
 
27026
      return true;
27027
    }
27028
 
27029
    @Override
27030
    public int hashCode() {
27031
      return 0;
27032
    }
27033
 
27034
    public int compareTo(setAlert_args other) {
27035
      if (!getClass().equals(other.getClass())) {
27036
        return getClass().getName().compareTo(other.getClass().getName());
27037
      }
27038
 
27039
      int lastComparison = 0;
27040
      setAlert_args typedOther = (setAlert_args)other;
27041
 
483 rajveer 27042
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 27043
      if (lastComparison != 0) {
27044
        return lastComparison;
27045
      }
483 rajveer 27046
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 27047
      if (lastComparison != 0) {
27048
        return lastComparison;
27049
      }
27050
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
27051
      if (lastComparison != 0) {
27052
        return lastComparison;
27053
      }
27054
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
27055
      if (lastComparison != 0) {
27056
        return lastComparison;
27057
      }
27058
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
27059
      if (lastComparison != 0) {
27060
        return lastComparison;
27061
      }
27062
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
27063
      if (lastComparison != 0) {
27064
        return lastComparison;
27065
      }
27066
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
27067
      if (lastComparison != 0) {
27068
        return lastComparison;
27069
      }
27070
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
27071
      if (lastComparison != 0) {
27072
        return lastComparison;
27073
      }
27074
      return 0;
27075
    }
27076
 
27077
    public void read(TProtocol iprot) throws TException {
27078
      TField field;
27079
      iprot.readStructBegin();
27080
      while (true)
27081
      {
27082
        field = iprot.readFieldBegin();
27083
        if (field.type == TType.STOP) { 
27084
          break;
27085
        }
27086
        _Fields fieldId = _Fields.findByThriftId(field.id);
27087
        if (fieldId == null) {
27088
          TProtocolUtil.skip(iprot, field.type);
27089
        } else {
27090
          switch (fieldId) {
483 rajveer 27091
            case ORDER_ID:
305 ashish 27092
              if (field.type == TType.I64) {
483 rajveer 27093
                this.orderId = iprot.readI64();
27094
                setOrderIdIsSet(true);
305 ashish 27095
              } else { 
27096
                TProtocolUtil.skip(iprot, field.type);
27097
              }
27098
              break;
27099
            case UNSET:
27100
              if (field.type == TType.BOOL) {
27101
                this.unset = iprot.readBool();
27102
                setUnsetIsSet(true);
27103
              } else { 
27104
                TProtocolUtil.skip(iprot, field.type);
27105
              }
27106
              break;
27107
            case TYPE:
27108
              if (field.type == TType.I64) {
27109
                this.type = iprot.readI64();
27110
                setTypeIsSet(true);
27111
              } else { 
27112
                TProtocolUtil.skip(iprot, field.type);
27113
              }
27114
              break;
27115
            case COMMENT:
27116
              if (field.type == TType.STRING) {
27117
                this.comment = iprot.readString();
27118
              } else { 
27119
                TProtocolUtil.skip(iprot, field.type);
27120
              }
27121
              break;
27122
          }
27123
          iprot.readFieldEnd();
27124
        }
27125
      }
27126
      iprot.readStructEnd();
27127
      validate();
27128
    }
27129
 
27130
    public void write(TProtocol oprot) throws TException {
27131
      validate();
27132
 
27133
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 27134
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
27135
      oprot.writeI64(this.orderId);
305 ashish 27136
      oprot.writeFieldEnd();
27137
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
27138
      oprot.writeBool(this.unset);
27139
      oprot.writeFieldEnd();
27140
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
27141
      oprot.writeI64(this.type);
27142
      oprot.writeFieldEnd();
27143
      if (this.comment != null) {
27144
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
27145
        oprot.writeString(this.comment);
27146
        oprot.writeFieldEnd();
27147
      }
27148
      oprot.writeFieldStop();
27149
      oprot.writeStructEnd();
27150
    }
27151
 
27152
    @Override
27153
    public String toString() {
27154
      StringBuilder sb = new StringBuilder("setAlert_args(");
27155
      boolean first = true;
27156
 
483 rajveer 27157
      sb.append("orderId:");
27158
      sb.append(this.orderId);
305 ashish 27159
      first = false;
27160
      if (!first) sb.append(", ");
27161
      sb.append("unset:");
27162
      sb.append(this.unset);
27163
      first = false;
27164
      if (!first) sb.append(", ");
27165
      sb.append("type:");
27166
      sb.append(this.type);
27167
      first = false;
27168
      if (!first) sb.append(", ");
27169
      sb.append("comment:");
27170
      if (this.comment == null) {
27171
        sb.append("null");
27172
      } else {
27173
        sb.append(this.comment);
27174
      }
27175
      first = false;
27176
      sb.append(")");
27177
      return sb.toString();
27178
    }
27179
 
27180
    public void validate() throws TException {
27181
      // check for required fields
27182
    }
27183
 
27184
  }
27185
 
27186
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
27187
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
27188
 
27189
 
27190
 
27191
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27192
    public enum _Fields implements TFieldIdEnum {
27193
;
27194
 
27195
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27196
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27197
 
27198
      static {
27199
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27200
          byId.put((int)field._thriftId, field);
27201
          byName.put(field.getFieldName(), field);
27202
        }
27203
      }
27204
 
27205
      /**
27206
       * Find the _Fields constant that matches fieldId, or null if its not found.
27207
       */
27208
      public static _Fields findByThriftId(int fieldId) {
27209
        return byId.get(fieldId);
27210
      }
27211
 
27212
      /**
27213
       * Find the _Fields constant that matches fieldId, throwing an exception
27214
       * if it is not found.
27215
       */
27216
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27217
        _Fields fields = findByThriftId(fieldId);
27218
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27219
        return fields;
27220
      }
27221
 
27222
      /**
27223
       * Find the _Fields constant that matches name, or null if its not found.
27224
       */
27225
      public static _Fields findByName(String name) {
27226
        return byName.get(name);
27227
      }
27228
 
27229
      private final short _thriftId;
27230
      private final String _fieldName;
27231
 
27232
      _Fields(short thriftId, String fieldName) {
27233
        _thriftId = thriftId;
27234
        _fieldName = fieldName;
27235
      }
27236
 
27237
      public short getThriftFieldId() {
27238
        return _thriftId;
27239
      }
27240
 
27241
      public String getFieldName() {
27242
        return _fieldName;
27243
      }
27244
    }
27245
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27246
    }});
27247
 
27248
    static {
27249
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
27250
    }
27251
 
27252
    public setAlert_result() {
27253
    }
27254
 
27255
    /**
27256
     * Performs a deep copy on <i>other</i>.
27257
     */
27258
    public setAlert_result(setAlert_result other) {
27259
    }
27260
 
27261
    public setAlert_result deepCopy() {
27262
      return new setAlert_result(this);
27263
    }
27264
 
27265
    @Deprecated
27266
    public setAlert_result clone() {
27267
      return new setAlert_result(this);
27268
    }
27269
 
27270
    public void setFieldValue(_Fields field, Object value) {
27271
      switch (field) {
27272
      }
27273
    }
27274
 
27275
    public void setFieldValue(int fieldID, Object value) {
27276
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27277
    }
27278
 
27279
    public Object getFieldValue(_Fields field) {
27280
      switch (field) {
27281
      }
27282
      throw new IllegalStateException();
27283
    }
27284
 
27285
    public Object getFieldValue(int fieldId) {
27286
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27287
    }
27288
 
27289
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27290
    public boolean isSet(_Fields field) {
27291
      switch (field) {
27292
      }
27293
      throw new IllegalStateException();
27294
    }
27295
 
27296
    public boolean isSet(int fieldID) {
27297
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27298
    }
27299
 
27300
    @Override
27301
    public boolean equals(Object that) {
27302
      if (that == null)
27303
        return false;
27304
      if (that instanceof setAlert_result)
27305
        return this.equals((setAlert_result)that);
27306
      return false;
27307
    }
27308
 
27309
    public boolean equals(setAlert_result that) {
27310
      if (that == null)
27311
        return false;
27312
 
27313
      return true;
27314
    }
27315
 
27316
    @Override
27317
    public int hashCode() {
27318
      return 0;
27319
    }
27320
 
27321
    public int compareTo(setAlert_result other) {
27322
      if (!getClass().equals(other.getClass())) {
27323
        return getClass().getName().compareTo(other.getClass().getName());
27324
      }
27325
 
27326
      int lastComparison = 0;
27327
      setAlert_result typedOther = (setAlert_result)other;
27328
 
27329
      return 0;
27330
    }
27331
 
27332
    public void read(TProtocol iprot) throws TException {
27333
      TField field;
27334
      iprot.readStructBegin();
27335
      while (true)
27336
      {
27337
        field = iprot.readFieldBegin();
27338
        if (field.type == TType.STOP) { 
27339
          break;
27340
        }
27341
        _Fields fieldId = _Fields.findByThriftId(field.id);
27342
        if (fieldId == null) {
27343
          TProtocolUtil.skip(iprot, field.type);
27344
        } else {
27345
          switch (fieldId) {
27346
          }
27347
          iprot.readFieldEnd();
27348
        }
27349
      }
27350
      iprot.readStructEnd();
27351
      validate();
27352
    }
27353
 
27354
    public void write(TProtocol oprot) throws TException {
27355
      oprot.writeStructBegin(STRUCT_DESC);
27356
 
27357
      oprot.writeFieldStop();
27358
      oprot.writeStructEnd();
27359
    }
27360
 
27361
    @Override
27362
    public String toString() {
27363
      StringBuilder sb = new StringBuilder("setAlert_result(");
27364
      boolean first = true;
27365
 
27366
      sb.append(")");
27367
      return sb.toString();
27368
    }
27369
 
27370
    public void validate() throws TException {
27371
      // check for required fields
27372
    }
27373
 
27374
  }
27375
 
1598 ankur.sing 27376
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
27377
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
27378
 
27379
 
27380
 
27381
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27382
    public enum _Fields implements TFieldIdEnum {
27383
;
27384
 
27385
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27386
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27387
 
27388
      static {
27389
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27390
          byId.put((int)field._thriftId, field);
27391
          byName.put(field.getFieldName(), field);
27392
        }
27393
      }
27394
 
27395
      /**
27396
       * Find the _Fields constant that matches fieldId, or null if its not found.
27397
       */
27398
      public static _Fields findByThriftId(int fieldId) {
27399
        return byId.get(fieldId);
27400
      }
27401
 
27402
      /**
27403
       * Find the _Fields constant that matches fieldId, throwing an exception
27404
       * if it is not found.
27405
       */
27406
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27407
        _Fields fields = findByThriftId(fieldId);
27408
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27409
        return fields;
27410
      }
27411
 
27412
      /**
27413
       * Find the _Fields constant that matches name, or null if its not found.
27414
       */
27415
      public static _Fields findByName(String name) {
27416
        return byName.get(name);
27417
      }
27418
 
27419
      private final short _thriftId;
27420
      private final String _fieldName;
27421
 
27422
      _Fields(short thriftId, String fieldName) {
27423
        _thriftId = thriftId;
27424
        _fieldName = fieldName;
27425
      }
27426
 
27427
      public short getThriftFieldId() {
27428
        return _thriftId;
27429
      }
27430
 
27431
      public String getFieldName() {
27432
        return _fieldName;
27433
      }
27434
    }
27435
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27436
    }});
27437
 
27438
    static {
27439
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
27440
    }
27441
 
27442
    public getValidOrderCount_args() {
27443
    }
27444
 
27445
    /**
27446
     * Performs a deep copy on <i>other</i>.
27447
     */
27448
    public getValidOrderCount_args(getValidOrderCount_args other) {
27449
    }
27450
 
27451
    public getValidOrderCount_args deepCopy() {
27452
      return new getValidOrderCount_args(this);
27453
    }
27454
 
27455
    @Deprecated
27456
    public getValidOrderCount_args clone() {
27457
      return new getValidOrderCount_args(this);
27458
    }
27459
 
27460
    public void setFieldValue(_Fields field, Object value) {
27461
      switch (field) {
27462
      }
27463
    }
27464
 
27465
    public void setFieldValue(int fieldID, Object value) {
27466
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27467
    }
27468
 
27469
    public Object getFieldValue(_Fields field) {
27470
      switch (field) {
27471
      }
27472
      throw new IllegalStateException();
27473
    }
27474
 
27475
    public Object getFieldValue(int fieldId) {
27476
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27477
    }
27478
 
27479
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27480
    public boolean isSet(_Fields field) {
27481
      switch (field) {
27482
      }
27483
      throw new IllegalStateException();
27484
    }
27485
 
27486
    public boolean isSet(int fieldID) {
27487
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27488
    }
27489
 
27490
    @Override
27491
    public boolean equals(Object that) {
27492
      if (that == null)
27493
        return false;
27494
      if (that instanceof getValidOrderCount_args)
27495
        return this.equals((getValidOrderCount_args)that);
27496
      return false;
27497
    }
27498
 
27499
    public boolean equals(getValidOrderCount_args that) {
27500
      if (that == null)
27501
        return false;
27502
 
27503
      return true;
27504
    }
27505
 
27506
    @Override
27507
    public int hashCode() {
27508
      return 0;
27509
    }
27510
 
27511
    public int compareTo(getValidOrderCount_args other) {
27512
      if (!getClass().equals(other.getClass())) {
27513
        return getClass().getName().compareTo(other.getClass().getName());
27514
      }
27515
 
27516
      int lastComparison = 0;
27517
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
27518
 
27519
      return 0;
27520
    }
27521
 
27522
    public void read(TProtocol iprot) throws TException {
27523
      TField field;
27524
      iprot.readStructBegin();
27525
      while (true)
27526
      {
27527
        field = iprot.readFieldBegin();
27528
        if (field.type == TType.STOP) { 
27529
          break;
27530
        }
27531
        _Fields fieldId = _Fields.findByThriftId(field.id);
27532
        if (fieldId == null) {
27533
          TProtocolUtil.skip(iprot, field.type);
27534
        } else {
27535
          switch (fieldId) {
27536
          }
27537
          iprot.readFieldEnd();
27538
        }
27539
      }
27540
      iprot.readStructEnd();
27541
      validate();
27542
    }
27543
 
27544
    public void write(TProtocol oprot) throws TException {
27545
      validate();
27546
 
27547
      oprot.writeStructBegin(STRUCT_DESC);
27548
      oprot.writeFieldStop();
27549
      oprot.writeStructEnd();
27550
    }
27551
 
27552
    @Override
27553
    public String toString() {
27554
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
27555
      boolean first = true;
27556
 
27557
      sb.append(")");
27558
      return sb.toString();
27559
    }
27560
 
27561
    public void validate() throws TException {
27562
      // check for required fields
27563
    }
27564
 
27565
  }
27566
 
27567
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
27568
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
27569
 
27570
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
27571
 
27572
    private long success;
27573
 
27574
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27575
    public enum _Fields implements TFieldIdEnum {
27576
      SUCCESS((short)0, "success");
27577
 
27578
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27579
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27580
 
27581
      static {
27582
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27583
          byId.put((int)field._thriftId, field);
27584
          byName.put(field.getFieldName(), field);
27585
        }
27586
      }
27587
 
27588
      /**
27589
       * Find the _Fields constant that matches fieldId, or null if its not found.
27590
       */
27591
      public static _Fields findByThriftId(int fieldId) {
27592
        return byId.get(fieldId);
27593
      }
27594
 
27595
      /**
27596
       * Find the _Fields constant that matches fieldId, throwing an exception
27597
       * if it is not found.
27598
       */
27599
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27600
        _Fields fields = findByThriftId(fieldId);
27601
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27602
        return fields;
27603
      }
27604
 
27605
      /**
27606
       * Find the _Fields constant that matches name, or null if its not found.
27607
       */
27608
      public static _Fields findByName(String name) {
27609
        return byName.get(name);
27610
      }
27611
 
27612
      private final short _thriftId;
27613
      private final String _fieldName;
27614
 
27615
      _Fields(short thriftId, String fieldName) {
27616
        _thriftId = thriftId;
27617
        _fieldName = fieldName;
27618
      }
27619
 
27620
      public short getThriftFieldId() {
27621
        return _thriftId;
27622
      }
27623
 
27624
      public String getFieldName() {
27625
        return _fieldName;
27626
      }
27627
    }
27628
 
27629
    // isset id assignments
27630
    private static final int __SUCCESS_ISSET_ID = 0;
27631
    private BitSet __isset_bit_vector = new BitSet(1);
27632
 
27633
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27634
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27635
          new FieldValueMetaData(TType.I64)));
27636
    }});
27637
 
27638
    static {
27639
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
27640
    }
27641
 
27642
    public getValidOrderCount_result() {
27643
    }
27644
 
27645
    public getValidOrderCount_result(
27646
      long success)
27647
    {
27648
      this();
27649
      this.success = success;
27650
      setSuccessIsSet(true);
27651
    }
27652
 
27653
    /**
27654
     * Performs a deep copy on <i>other</i>.
27655
     */
27656
    public getValidOrderCount_result(getValidOrderCount_result other) {
27657
      __isset_bit_vector.clear();
27658
      __isset_bit_vector.or(other.__isset_bit_vector);
27659
      this.success = other.success;
27660
    }
27661
 
27662
    public getValidOrderCount_result deepCopy() {
27663
      return new getValidOrderCount_result(this);
27664
    }
27665
 
27666
    @Deprecated
27667
    public getValidOrderCount_result clone() {
27668
      return new getValidOrderCount_result(this);
27669
    }
27670
 
27671
    public long getSuccess() {
27672
      return this.success;
27673
    }
27674
 
27675
    public getValidOrderCount_result setSuccess(long success) {
27676
      this.success = success;
27677
      setSuccessIsSet(true);
27678
      return this;
27679
    }
27680
 
27681
    public void unsetSuccess() {
27682
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27683
    }
27684
 
27685
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27686
    public boolean isSetSuccess() {
27687
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27688
    }
27689
 
27690
    public void setSuccessIsSet(boolean value) {
27691
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27692
    }
27693
 
27694
    public void setFieldValue(_Fields field, Object value) {
27695
      switch (field) {
27696
      case SUCCESS:
27697
        if (value == null) {
27698
          unsetSuccess();
27699
        } else {
27700
          setSuccess((Long)value);
27701
        }
27702
        break;
27703
 
27704
      }
27705
    }
27706
 
27707
    public void setFieldValue(int fieldID, Object value) {
27708
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27709
    }
27710
 
27711
    public Object getFieldValue(_Fields field) {
27712
      switch (field) {
27713
      case SUCCESS:
27714
        return new Long(getSuccess());
27715
 
27716
      }
27717
      throw new IllegalStateException();
27718
    }
27719
 
27720
    public Object getFieldValue(int fieldId) {
27721
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27722
    }
27723
 
27724
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27725
    public boolean isSet(_Fields field) {
27726
      switch (field) {
27727
      case SUCCESS:
27728
        return isSetSuccess();
27729
      }
27730
      throw new IllegalStateException();
27731
    }
27732
 
27733
    public boolean isSet(int fieldID) {
27734
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27735
    }
27736
 
27737
    @Override
27738
    public boolean equals(Object that) {
27739
      if (that == null)
27740
        return false;
27741
      if (that instanceof getValidOrderCount_result)
27742
        return this.equals((getValidOrderCount_result)that);
27743
      return false;
27744
    }
27745
 
27746
    public boolean equals(getValidOrderCount_result that) {
27747
      if (that == null)
27748
        return false;
27749
 
27750
      boolean this_present_success = true;
27751
      boolean that_present_success = true;
27752
      if (this_present_success || that_present_success) {
27753
        if (!(this_present_success && that_present_success))
27754
          return false;
27755
        if (this.success != that.success)
27756
          return false;
27757
      }
27758
 
27759
      return true;
27760
    }
27761
 
27762
    @Override
27763
    public int hashCode() {
27764
      return 0;
27765
    }
27766
 
27767
    public int compareTo(getValidOrderCount_result other) {
27768
      if (!getClass().equals(other.getClass())) {
27769
        return getClass().getName().compareTo(other.getClass().getName());
27770
      }
27771
 
27772
      int lastComparison = 0;
27773
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
27774
 
27775
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27776
      if (lastComparison != 0) {
27777
        return lastComparison;
27778
      }
27779
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27780
      if (lastComparison != 0) {
27781
        return lastComparison;
27782
      }
27783
      return 0;
27784
    }
27785
 
27786
    public void read(TProtocol iprot) throws TException {
27787
      TField field;
27788
      iprot.readStructBegin();
27789
      while (true)
27790
      {
27791
        field = iprot.readFieldBegin();
27792
        if (field.type == TType.STOP) { 
27793
          break;
27794
        }
27795
        _Fields fieldId = _Fields.findByThriftId(field.id);
27796
        if (fieldId == null) {
27797
          TProtocolUtil.skip(iprot, field.type);
27798
        } else {
27799
          switch (fieldId) {
27800
            case SUCCESS:
27801
              if (field.type == TType.I64) {
27802
                this.success = iprot.readI64();
27803
                setSuccessIsSet(true);
27804
              } else { 
27805
                TProtocolUtil.skip(iprot, field.type);
27806
              }
27807
              break;
27808
          }
27809
          iprot.readFieldEnd();
27810
        }
27811
      }
27812
      iprot.readStructEnd();
27813
      validate();
27814
    }
27815
 
27816
    public void write(TProtocol oprot) throws TException {
27817
      oprot.writeStructBegin(STRUCT_DESC);
27818
 
27819
      if (this.isSetSuccess()) {
27820
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27821
        oprot.writeI64(this.success);
27822
        oprot.writeFieldEnd();
27823
      }
27824
      oprot.writeFieldStop();
27825
      oprot.writeStructEnd();
27826
    }
27827
 
27828
    @Override
27829
    public String toString() {
27830
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
27831
      boolean first = true;
27832
 
27833
      sb.append("success:");
27834
      sb.append(this.success);
27835
      first = false;
27836
      sb.append(")");
27837
      return sb.toString();
27838
    }
27839
 
27840
    public void validate() throws TException {
27841
      // check for required fields
27842
    }
27843
 
27844
  }
27845
 
1629 ankur.sing 27846
  public static class getNoOfCustomersWithSuccessfulTransaction_args implements TBase<getNoOfCustomersWithSuccessfulTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_args>   {
27847
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_args");
27848
 
27849
 
27850
 
27851
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27852
    public enum _Fields implements TFieldIdEnum {
27853
;
27854
 
27855
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27856
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27857
 
27858
      static {
27859
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27860
          byId.put((int)field._thriftId, field);
27861
          byName.put(field.getFieldName(), field);
27862
        }
27863
      }
27864
 
27865
      /**
27866
       * Find the _Fields constant that matches fieldId, or null if its not found.
27867
       */
27868
      public static _Fields findByThriftId(int fieldId) {
27869
        return byId.get(fieldId);
27870
      }
27871
 
27872
      /**
27873
       * Find the _Fields constant that matches fieldId, throwing an exception
27874
       * if it is not found.
27875
       */
27876
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27877
        _Fields fields = findByThriftId(fieldId);
27878
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27879
        return fields;
27880
      }
27881
 
27882
      /**
27883
       * Find the _Fields constant that matches name, or null if its not found.
27884
       */
27885
      public static _Fields findByName(String name) {
27886
        return byName.get(name);
27887
      }
27888
 
27889
      private final short _thriftId;
27890
      private final String _fieldName;
27891
 
27892
      _Fields(short thriftId, String fieldName) {
27893
        _thriftId = thriftId;
27894
        _fieldName = fieldName;
27895
      }
27896
 
27897
      public short getThriftFieldId() {
27898
        return _thriftId;
27899
      }
27900
 
27901
      public String getFieldName() {
27902
        return _fieldName;
27903
      }
27904
    }
27905
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27906
    }});
27907
 
27908
    static {
27909
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_args.class, metaDataMap);
27910
    }
27911
 
27912
    public getNoOfCustomersWithSuccessfulTransaction_args() {
27913
    }
27914
 
27915
    /**
27916
     * Performs a deep copy on <i>other</i>.
27917
     */
27918
    public getNoOfCustomersWithSuccessfulTransaction_args(getNoOfCustomersWithSuccessfulTransaction_args other) {
27919
    }
27920
 
27921
    public getNoOfCustomersWithSuccessfulTransaction_args deepCopy() {
27922
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27923
    }
27924
 
27925
    @Deprecated
27926
    public getNoOfCustomersWithSuccessfulTransaction_args clone() {
27927
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27928
    }
27929
 
27930
    public void setFieldValue(_Fields field, Object value) {
27931
      switch (field) {
27932
      }
27933
    }
27934
 
27935
    public void setFieldValue(int fieldID, Object value) {
27936
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27937
    }
27938
 
27939
    public Object getFieldValue(_Fields field) {
27940
      switch (field) {
27941
      }
27942
      throw new IllegalStateException();
27943
    }
27944
 
27945
    public Object getFieldValue(int fieldId) {
27946
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27947
    }
27948
 
27949
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27950
    public boolean isSet(_Fields field) {
27951
      switch (field) {
27952
      }
27953
      throw new IllegalStateException();
27954
    }
27955
 
27956
    public boolean isSet(int fieldID) {
27957
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27958
    }
27959
 
27960
    @Override
27961
    public boolean equals(Object that) {
27962
      if (that == null)
27963
        return false;
27964
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_args)
27965
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_args)that);
27966
      return false;
27967
    }
27968
 
27969
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_args that) {
27970
      if (that == null)
27971
        return false;
27972
 
27973
      return true;
27974
    }
27975
 
27976
    @Override
27977
    public int hashCode() {
27978
      return 0;
27979
    }
27980
 
27981
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_args other) {
27982
      if (!getClass().equals(other.getClass())) {
27983
        return getClass().getName().compareTo(other.getClass().getName());
27984
      }
27985
 
27986
      int lastComparison = 0;
27987
      getNoOfCustomersWithSuccessfulTransaction_args typedOther = (getNoOfCustomersWithSuccessfulTransaction_args)other;
27988
 
27989
      return 0;
27990
    }
27991
 
27992
    public void read(TProtocol iprot) throws TException {
27993
      TField field;
27994
      iprot.readStructBegin();
27995
      while (true)
27996
      {
27997
        field = iprot.readFieldBegin();
27998
        if (field.type == TType.STOP) { 
27999
          break;
28000
        }
28001
        _Fields fieldId = _Fields.findByThriftId(field.id);
28002
        if (fieldId == null) {
28003
          TProtocolUtil.skip(iprot, field.type);
28004
        } else {
28005
          switch (fieldId) {
28006
          }
28007
          iprot.readFieldEnd();
28008
        }
28009
      }
28010
      iprot.readStructEnd();
28011
      validate();
28012
    }
28013
 
28014
    public void write(TProtocol oprot) throws TException {
28015
      validate();
28016
 
28017
      oprot.writeStructBegin(STRUCT_DESC);
28018
      oprot.writeFieldStop();
28019
      oprot.writeStructEnd();
28020
    }
28021
 
28022
    @Override
28023
    public String toString() {
28024
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_args(");
28025
      boolean first = true;
28026
 
28027
      sb.append(")");
28028
      return sb.toString();
28029
    }
28030
 
28031
    public void validate() throws TException {
28032
      // check for required fields
28033
    }
28034
 
28035
  }
28036
 
28037
  public static class getNoOfCustomersWithSuccessfulTransaction_result implements TBase<getNoOfCustomersWithSuccessfulTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_result>   {
28038
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_result");
28039
 
28040
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
28041
 
28042
    private long success;
28043
 
28044
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28045
    public enum _Fields implements TFieldIdEnum {
28046
      SUCCESS((short)0, "success");
28047
 
28048
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28049
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28050
 
28051
      static {
28052
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28053
          byId.put((int)field._thriftId, field);
28054
          byName.put(field.getFieldName(), field);
28055
        }
28056
      }
28057
 
28058
      /**
28059
       * Find the _Fields constant that matches fieldId, or null if its not found.
28060
       */
28061
      public static _Fields findByThriftId(int fieldId) {
28062
        return byId.get(fieldId);
28063
      }
28064
 
28065
      /**
28066
       * Find the _Fields constant that matches fieldId, throwing an exception
28067
       * if it is not found.
28068
       */
28069
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28070
        _Fields fields = findByThriftId(fieldId);
28071
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28072
        return fields;
28073
      }
28074
 
28075
      /**
28076
       * Find the _Fields constant that matches name, or null if its not found.
28077
       */
28078
      public static _Fields findByName(String name) {
28079
        return byName.get(name);
28080
      }
28081
 
28082
      private final short _thriftId;
28083
      private final String _fieldName;
28084
 
28085
      _Fields(short thriftId, String fieldName) {
28086
        _thriftId = thriftId;
28087
        _fieldName = fieldName;
28088
      }
28089
 
28090
      public short getThriftFieldId() {
28091
        return _thriftId;
28092
      }
28093
 
28094
      public String getFieldName() {
28095
        return _fieldName;
28096
      }
28097
    }
28098
 
28099
    // isset id assignments
28100
    private static final int __SUCCESS_ISSET_ID = 0;
28101
    private BitSet __isset_bit_vector = new BitSet(1);
28102
 
28103
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28104
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28105
          new FieldValueMetaData(TType.I64)));
28106
    }});
28107
 
28108
    static {
28109
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_result.class, metaDataMap);
28110
    }
28111
 
28112
    public getNoOfCustomersWithSuccessfulTransaction_result() {
28113
    }
28114
 
28115
    public getNoOfCustomersWithSuccessfulTransaction_result(
28116
      long success)
28117
    {
28118
      this();
28119
      this.success = success;
28120
      setSuccessIsSet(true);
28121
    }
28122
 
28123
    /**
28124
     * Performs a deep copy on <i>other</i>.
28125
     */
28126
    public getNoOfCustomersWithSuccessfulTransaction_result(getNoOfCustomersWithSuccessfulTransaction_result other) {
28127
      __isset_bit_vector.clear();
28128
      __isset_bit_vector.or(other.__isset_bit_vector);
28129
      this.success = other.success;
28130
    }
28131
 
28132
    public getNoOfCustomersWithSuccessfulTransaction_result deepCopy() {
28133
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
28134
    }
28135
 
28136
    @Deprecated
28137
    public getNoOfCustomersWithSuccessfulTransaction_result clone() {
28138
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
28139
    }
28140
 
28141
    public long getSuccess() {
28142
      return this.success;
28143
    }
28144
 
28145
    public getNoOfCustomersWithSuccessfulTransaction_result setSuccess(long success) {
28146
      this.success = success;
28147
      setSuccessIsSet(true);
28148
      return this;
28149
    }
28150
 
28151
    public void unsetSuccess() {
28152
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
28153
    }
28154
 
28155
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28156
    public boolean isSetSuccess() {
28157
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
28158
    }
28159
 
28160
    public void setSuccessIsSet(boolean value) {
28161
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
28162
    }
28163
 
28164
    public void setFieldValue(_Fields field, Object value) {
28165
      switch (field) {
28166
      case SUCCESS:
28167
        if (value == null) {
28168
          unsetSuccess();
28169
        } else {
28170
          setSuccess((Long)value);
28171
        }
28172
        break;
28173
 
28174
      }
28175
    }
28176
 
28177
    public void setFieldValue(int fieldID, Object value) {
28178
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28179
    }
28180
 
28181
    public Object getFieldValue(_Fields field) {
28182
      switch (field) {
28183
      case SUCCESS:
28184
        return new Long(getSuccess());
28185
 
28186
      }
28187
      throw new IllegalStateException();
28188
    }
28189
 
28190
    public Object getFieldValue(int fieldId) {
28191
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28192
    }
28193
 
28194
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28195
    public boolean isSet(_Fields field) {
28196
      switch (field) {
28197
      case SUCCESS:
28198
        return isSetSuccess();
28199
      }
28200
      throw new IllegalStateException();
28201
    }
28202
 
28203
    public boolean isSet(int fieldID) {
28204
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28205
    }
28206
 
28207
    @Override
28208
    public boolean equals(Object that) {
28209
      if (that == null)
28210
        return false;
28211
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_result)
28212
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_result)that);
28213
      return false;
28214
    }
28215
 
28216
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_result that) {
28217
      if (that == null)
28218
        return false;
28219
 
28220
      boolean this_present_success = true;
28221
      boolean that_present_success = true;
28222
      if (this_present_success || that_present_success) {
28223
        if (!(this_present_success && that_present_success))
28224
          return false;
28225
        if (this.success != that.success)
28226
          return false;
28227
      }
28228
 
28229
      return true;
28230
    }
28231
 
28232
    @Override
28233
    public int hashCode() {
28234
      return 0;
28235
    }
28236
 
28237
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_result other) {
28238
      if (!getClass().equals(other.getClass())) {
28239
        return getClass().getName().compareTo(other.getClass().getName());
28240
      }
28241
 
28242
      int lastComparison = 0;
28243
      getNoOfCustomersWithSuccessfulTransaction_result typedOther = (getNoOfCustomersWithSuccessfulTransaction_result)other;
28244
 
28245
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28246
      if (lastComparison != 0) {
28247
        return lastComparison;
28248
      }
28249
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28250
      if (lastComparison != 0) {
28251
        return lastComparison;
28252
      }
28253
      return 0;
28254
    }
28255
 
28256
    public void read(TProtocol iprot) throws TException {
28257
      TField field;
28258
      iprot.readStructBegin();
28259
      while (true)
28260
      {
28261
        field = iprot.readFieldBegin();
28262
        if (field.type == TType.STOP) { 
28263
          break;
28264
        }
28265
        _Fields fieldId = _Fields.findByThriftId(field.id);
28266
        if (fieldId == null) {
28267
          TProtocolUtil.skip(iprot, field.type);
28268
        } else {
28269
          switch (fieldId) {
28270
            case SUCCESS:
28271
              if (field.type == TType.I64) {
28272
                this.success = iprot.readI64();
28273
                setSuccessIsSet(true);
28274
              } else { 
28275
                TProtocolUtil.skip(iprot, field.type);
28276
              }
28277
              break;
28278
          }
28279
          iprot.readFieldEnd();
28280
        }
28281
      }
28282
      iprot.readStructEnd();
28283
      validate();
28284
    }
28285
 
28286
    public void write(TProtocol oprot) throws TException {
28287
      oprot.writeStructBegin(STRUCT_DESC);
28288
 
28289
      if (this.isSetSuccess()) {
28290
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28291
        oprot.writeI64(this.success);
28292
        oprot.writeFieldEnd();
28293
      }
28294
      oprot.writeFieldStop();
28295
      oprot.writeStructEnd();
28296
    }
28297
 
28298
    @Override
28299
    public String toString() {
28300
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_result(");
28301
      boolean first = true;
28302
 
28303
      sb.append("success:");
28304
      sb.append(this.success);
28305
      first = false;
28306
      sb.append(")");
28307
      return sb.toString();
28308
    }
28309
 
28310
    public void validate() throws TException {
28311
      // check for required fields
28312
    }
28313
 
28314
  }
28315
 
1731 ankur.sing 28316
  public static class getValidOrdersAmountRange_args implements TBase<getValidOrdersAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_args>   {
28317
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_args");
1629 ankur.sing 28318
 
28319
 
28320
 
28321
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28322
    public enum _Fields implements TFieldIdEnum {
28323
;
28324
 
28325
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28326
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28327
 
28328
      static {
28329
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28330
          byId.put((int)field._thriftId, field);
28331
          byName.put(field.getFieldName(), field);
28332
        }
28333
      }
28334
 
28335
      /**
28336
       * Find the _Fields constant that matches fieldId, or null if its not found.
28337
       */
28338
      public static _Fields findByThriftId(int fieldId) {
28339
        return byId.get(fieldId);
28340
      }
28341
 
28342
      /**
28343
       * Find the _Fields constant that matches fieldId, throwing an exception
28344
       * if it is not found.
28345
       */
28346
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28347
        _Fields fields = findByThriftId(fieldId);
28348
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28349
        return fields;
28350
      }
28351
 
28352
      /**
28353
       * Find the _Fields constant that matches name, or null if its not found.
28354
       */
28355
      public static _Fields findByName(String name) {
28356
        return byName.get(name);
28357
      }
28358
 
28359
      private final short _thriftId;
28360
      private final String _fieldName;
28361
 
28362
      _Fields(short thriftId, String fieldName) {
28363
        _thriftId = thriftId;
28364
        _fieldName = fieldName;
28365
      }
28366
 
28367
      public short getThriftFieldId() {
28368
        return _thriftId;
28369
      }
28370
 
28371
      public String getFieldName() {
28372
        return _fieldName;
28373
      }
28374
    }
28375
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28376
    }});
28377
 
28378
    static {
1731 ankur.sing 28379
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_args.class, metaDataMap);
1629 ankur.sing 28380
    }
28381
 
1731 ankur.sing 28382
    public getValidOrdersAmountRange_args() {
1629 ankur.sing 28383
    }
28384
 
28385
    /**
28386
     * Performs a deep copy on <i>other</i>.
28387
     */
1731 ankur.sing 28388
    public getValidOrdersAmountRange_args(getValidOrdersAmountRange_args other) {
1629 ankur.sing 28389
    }
28390
 
1731 ankur.sing 28391
    public getValidOrdersAmountRange_args deepCopy() {
28392
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 28393
    }
28394
 
28395
    @Deprecated
1731 ankur.sing 28396
    public getValidOrdersAmountRange_args clone() {
28397
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 28398
    }
28399
 
28400
    public void setFieldValue(_Fields field, Object value) {
28401
      switch (field) {
28402
      }
28403
    }
28404
 
28405
    public void setFieldValue(int fieldID, Object value) {
28406
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28407
    }
28408
 
28409
    public Object getFieldValue(_Fields field) {
28410
      switch (field) {
28411
      }
28412
      throw new IllegalStateException();
28413
    }
28414
 
28415
    public Object getFieldValue(int fieldId) {
28416
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28417
    }
28418
 
28419
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28420
    public boolean isSet(_Fields field) {
28421
      switch (field) {
28422
      }
28423
      throw new IllegalStateException();
28424
    }
28425
 
28426
    public boolean isSet(int fieldID) {
28427
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28428
    }
28429
 
28430
    @Override
28431
    public boolean equals(Object that) {
28432
      if (that == null)
28433
        return false;
1731 ankur.sing 28434
      if (that instanceof getValidOrdersAmountRange_args)
28435
        return this.equals((getValidOrdersAmountRange_args)that);
1629 ankur.sing 28436
      return false;
28437
    }
28438
 
1731 ankur.sing 28439
    public boolean equals(getValidOrdersAmountRange_args that) {
1629 ankur.sing 28440
      if (that == null)
28441
        return false;
28442
 
28443
      return true;
28444
    }
28445
 
28446
    @Override
28447
    public int hashCode() {
28448
      return 0;
28449
    }
28450
 
1731 ankur.sing 28451
    public int compareTo(getValidOrdersAmountRange_args other) {
1629 ankur.sing 28452
      if (!getClass().equals(other.getClass())) {
28453
        return getClass().getName().compareTo(other.getClass().getName());
28454
      }
28455
 
28456
      int lastComparison = 0;
1731 ankur.sing 28457
      getValidOrdersAmountRange_args typedOther = (getValidOrdersAmountRange_args)other;
1629 ankur.sing 28458
 
28459
      return 0;
28460
    }
28461
 
28462
    public void read(TProtocol iprot) throws TException {
28463
      TField field;
28464
      iprot.readStructBegin();
28465
      while (true)
28466
      {
28467
        field = iprot.readFieldBegin();
28468
        if (field.type == TType.STOP) { 
28469
          break;
28470
        }
28471
        _Fields fieldId = _Fields.findByThriftId(field.id);
28472
        if (fieldId == null) {
28473
          TProtocolUtil.skip(iprot, field.type);
28474
        } else {
28475
          switch (fieldId) {
28476
          }
28477
          iprot.readFieldEnd();
28478
        }
28479
      }
28480
      iprot.readStructEnd();
28481
      validate();
28482
    }
28483
 
28484
    public void write(TProtocol oprot) throws TException {
28485
      validate();
28486
 
28487
      oprot.writeStructBegin(STRUCT_DESC);
28488
      oprot.writeFieldStop();
28489
      oprot.writeStructEnd();
28490
    }
28491
 
28492
    @Override
28493
    public String toString() {
1731 ankur.sing 28494
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_args(");
1629 ankur.sing 28495
      boolean first = true;
28496
 
28497
      sb.append(")");
28498
      return sb.toString();
28499
    }
28500
 
28501
    public void validate() throws TException {
28502
      // check for required fields
28503
    }
28504
 
28505
  }
28506
 
1731 ankur.sing 28507
  public static class getValidOrdersAmountRange_result implements TBase<getValidOrdersAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_result>   {
28508
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_result");
1629 ankur.sing 28509
 
1731 ankur.sing 28510
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 28511
 
1731 ankur.sing 28512
    private List<Double> success;
1629 ankur.sing 28513
 
28514
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28515
    public enum _Fields implements TFieldIdEnum {
28516
      SUCCESS((short)0, "success");
28517
 
28518
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28519
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28520
 
28521
      static {
28522
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28523
          byId.put((int)field._thriftId, field);
28524
          byName.put(field.getFieldName(), field);
28525
        }
28526
      }
28527
 
28528
      /**
28529
       * Find the _Fields constant that matches fieldId, or null if its not found.
28530
       */
28531
      public static _Fields findByThriftId(int fieldId) {
28532
        return byId.get(fieldId);
28533
      }
28534
 
28535
      /**
28536
       * Find the _Fields constant that matches fieldId, throwing an exception
28537
       * if it is not found.
28538
       */
28539
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28540
        _Fields fields = findByThriftId(fieldId);
28541
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28542
        return fields;
28543
      }
28544
 
28545
      /**
28546
       * Find the _Fields constant that matches name, or null if its not found.
28547
       */
28548
      public static _Fields findByName(String name) {
28549
        return byName.get(name);
28550
      }
28551
 
28552
      private final short _thriftId;
28553
      private final String _fieldName;
28554
 
28555
      _Fields(short thriftId, String fieldName) {
28556
        _thriftId = thriftId;
28557
        _fieldName = fieldName;
28558
      }
28559
 
28560
      public short getThriftFieldId() {
28561
        return _thriftId;
28562
      }
28563
 
28564
      public String getFieldName() {
28565
        return _fieldName;
28566
      }
28567
    }
28568
 
28569
    // isset id assignments
28570
 
28571
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28572
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 28573
          new ListMetaData(TType.LIST, 
28574
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 28575
    }});
28576
 
28577
    static {
1731 ankur.sing 28578
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_result.class, metaDataMap);
1629 ankur.sing 28579
    }
28580
 
1731 ankur.sing 28581
    public getValidOrdersAmountRange_result() {
1629 ankur.sing 28582
    }
28583
 
1731 ankur.sing 28584
    public getValidOrdersAmountRange_result(
28585
      List<Double> success)
1629 ankur.sing 28586
    {
28587
      this();
28588
      this.success = success;
28589
    }
28590
 
28591
    /**
28592
     * Performs a deep copy on <i>other</i>.
28593
     */
1731 ankur.sing 28594
    public getValidOrdersAmountRange_result(getValidOrdersAmountRange_result other) {
28595
      if (other.isSetSuccess()) {
28596
        List<Double> __this__success = new ArrayList<Double>();
28597
        for (Double other_element : other.success) {
28598
          __this__success.add(other_element);
1629 ankur.sing 28599
        }
1731 ankur.sing 28600
        this.success = __this__success;
1629 ankur.sing 28601
      }
28602
    }
28603
 
1731 ankur.sing 28604
    public getValidOrdersAmountRange_result deepCopy() {
28605
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 28606
    }
28607
 
28608
    @Deprecated
1731 ankur.sing 28609
    public getValidOrdersAmountRange_result clone() {
28610
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 28611
    }
28612
 
1731 ankur.sing 28613
    public int getSuccessSize() {
28614
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 28615
    }
28616
 
1731 ankur.sing 28617
    public java.util.Iterator<Double> getSuccessIterator() {
28618
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 28619
    }
28620
 
1731 ankur.sing 28621
    public void addToSuccess(double elem) {
28622
      if (this.success == null) {
28623
        this.success = new ArrayList<Double>();
1629 ankur.sing 28624
      }
1731 ankur.sing 28625
      this.success.add(elem);
1629 ankur.sing 28626
    }
28627
 
1731 ankur.sing 28628
    public List<Double> getSuccess() {
1629 ankur.sing 28629
      return this.success;
28630
    }
28631
 
1731 ankur.sing 28632
    public getValidOrdersAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 28633
      this.success = success;
28634
      return this;
28635
    }
28636
 
28637
    public void unsetSuccess() {
1731 ankur.sing 28638
      this.success = null;
1629 ankur.sing 28639
    }
28640
 
28641
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28642
    public boolean isSetSuccess() {
1731 ankur.sing 28643
      return this.success != null;
1629 ankur.sing 28644
    }
28645
 
28646
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 28647
      if (!value) {
28648
        this.success = null;
28649
      }
1629 ankur.sing 28650
    }
28651
 
28652
    public void setFieldValue(_Fields field, Object value) {
28653
      switch (field) {
28654
      case SUCCESS:
28655
        if (value == null) {
28656
          unsetSuccess();
28657
        } else {
1731 ankur.sing 28658
          setSuccess((List<Double>)value);
1629 ankur.sing 28659
        }
28660
        break;
28661
 
28662
      }
28663
    }
28664
 
28665
    public void setFieldValue(int fieldID, Object value) {
28666
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28667
    }
28668
 
28669
    public Object getFieldValue(_Fields field) {
28670
      switch (field) {
28671
      case SUCCESS:
1731 ankur.sing 28672
        return getSuccess();
1629 ankur.sing 28673
 
28674
      }
28675
      throw new IllegalStateException();
28676
    }
28677
 
28678
    public Object getFieldValue(int fieldId) {
28679
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28680
    }
28681
 
28682
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28683
    public boolean isSet(_Fields field) {
28684
      switch (field) {
28685
      case SUCCESS:
28686
        return isSetSuccess();
28687
      }
28688
      throw new IllegalStateException();
28689
    }
28690
 
28691
    public boolean isSet(int fieldID) {
28692
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28693
    }
28694
 
28695
    @Override
28696
    public boolean equals(Object that) {
28697
      if (that == null)
28698
        return false;
1731 ankur.sing 28699
      if (that instanceof getValidOrdersAmountRange_result)
28700
        return this.equals((getValidOrdersAmountRange_result)that);
1629 ankur.sing 28701
      return false;
28702
    }
28703
 
1731 ankur.sing 28704
    public boolean equals(getValidOrdersAmountRange_result that) {
1629 ankur.sing 28705
      if (that == null)
28706
        return false;
28707
 
1731 ankur.sing 28708
      boolean this_present_success = true && this.isSetSuccess();
28709
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 28710
      if (this_present_success || that_present_success) {
28711
        if (!(this_present_success && that_present_success))
28712
          return false;
1731 ankur.sing 28713
        if (!this.success.equals(that.success))
1629 ankur.sing 28714
          return false;
28715
      }
28716
 
28717
      return true;
28718
    }
28719
 
28720
    @Override
28721
    public int hashCode() {
28722
      return 0;
28723
    }
28724
 
1731 ankur.sing 28725
    public int compareTo(getValidOrdersAmountRange_result other) {
1629 ankur.sing 28726
      if (!getClass().equals(other.getClass())) {
28727
        return getClass().getName().compareTo(other.getClass().getName());
28728
      }
28729
 
28730
      int lastComparison = 0;
1731 ankur.sing 28731
      getValidOrdersAmountRange_result typedOther = (getValidOrdersAmountRange_result)other;
1629 ankur.sing 28732
 
28733
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28734
      if (lastComparison != 0) {
28735
        return lastComparison;
28736
      }
28737
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28738
      if (lastComparison != 0) {
28739
        return lastComparison;
28740
      }
28741
      return 0;
28742
    }
28743
 
28744
    public void read(TProtocol iprot) throws TException {
28745
      TField field;
28746
      iprot.readStructBegin();
28747
      while (true)
28748
      {
28749
        field = iprot.readFieldBegin();
28750
        if (field.type == TType.STOP) { 
28751
          break;
28752
        }
28753
        _Fields fieldId = _Fields.findByThriftId(field.id);
28754
        if (fieldId == null) {
28755
          TProtocolUtil.skip(iprot, field.type);
28756
        } else {
28757
          switch (fieldId) {
28758
            case SUCCESS:
1731 ankur.sing 28759
              if (field.type == TType.LIST) {
28760
                {
28761
                  TList _list80 = iprot.readListBegin();
28762
                  this.success = new ArrayList<Double>(_list80.size);
28763
                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
28764
                  {
28765
                    double _elem82;
28766
                    _elem82 = iprot.readDouble();
28767
                    this.success.add(_elem82);
28768
                  }
28769
                  iprot.readListEnd();
28770
                }
1629 ankur.sing 28771
              } else { 
28772
                TProtocolUtil.skip(iprot, field.type);
28773
              }
28774
              break;
28775
          }
28776
          iprot.readFieldEnd();
28777
        }
28778
      }
28779
      iprot.readStructEnd();
28780
      validate();
28781
    }
28782
 
28783
    public void write(TProtocol oprot) throws TException {
28784
      oprot.writeStructBegin(STRUCT_DESC);
28785
 
28786
      if (this.isSetSuccess()) {
28787
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 28788
        {
28789
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
28790
          for (double _iter83 : this.success)
28791
          {
28792
            oprot.writeDouble(_iter83);
28793
          }
28794
          oprot.writeListEnd();
28795
        }
1629 ankur.sing 28796
        oprot.writeFieldEnd();
28797
      }
28798
      oprot.writeFieldStop();
28799
      oprot.writeStructEnd();
28800
    }
28801
 
28802
    @Override
28803
    public String toString() {
1731 ankur.sing 28804
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_result(");
1629 ankur.sing 28805
      boolean first = true;
28806
 
28807
      sb.append("success:");
1731 ankur.sing 28808
      if (this.success == null) {
28809
        sb.append("null");
28810
      } else {
28811
        sb.append(this.success);
28812
      }
1629 ankur.sing 28813
      first = false;
28814
      sb.append(")");
28815
      return sb.toString();
28816
    }
28817
 
28818
    public void validate() throws TException {
28819
      // check for required fields
28820
    }
28821
 
28822
  }
28823
 
1886 ankur.sing 28824
  public static class getValidOrders_args implements TBase<getValidOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_args>   {
28825
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_args");
28826
 
28827
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)1);
28828
 
28829
    private long limit;
28830
 
28831
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28832
    public enum _Fields implements TFieldIdEnum {
28833
      LIMIT((short)1, "limit");
28834
 
28835
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28836
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28837
 
28838
      static {
28839
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28840
          byId.put((int)field._thriftId, field);
28841
          byName.put(field.getFieldName(), field);
28842
        }
28843
      }
28844
 
28845
      /**
28846
       * Find the _Fields constant that matches fieldId, or null if its not found.
28847
       */
28848
      public static _Fields findByThriftId(int fieldId) {
28849
        return byId.get(fieldId);
28850
      }
28851
 
28852
      /**
28853
       * Find the _Fields constant that matches fieldId, throwing an exception
28854
       * if it is not found.
28855
       */
28856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28857
        _Fields fields = findByThriftId(fieldId);
28858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28859
        return fields;
28860
      }
28861
 
28862
      /**
28863
       * Find the _Fields constant that matches name, or null if its not found.
28864
       */
28865
      public static _Fields findByName(String name) {
28866
        return byName.get(name);
28867
      }
28868
 
28869
      private final short _thriftId;
28870
      private final String _fieldName;
28871
 
28872
      _Fields(short thriftId, String fieldName) {
28873
        _thriftId = thriftId;
28874
        _fieldName = fieldName;
28875
      }
28876
 
28877
      public short getThriftFieldId() {
28878
        return _thriftId;
28879
      }
28880
 
28881
      public String getFieldName() {
28882
        return _fieldName;
28883
      }
28884
    }
28885
 
28886
    // isset id assignments
28887
    private static final int __LIMIT_ISSET_ID = 0;
28888
    private BitSet __isset_bit_vector = new BitSet(1);
28889
 
28890
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28891
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
28892
          new FieldValueMetaData(TType.I64)));
28893
    }});
28894
 
28895
    static {
28896
      FieldMetaData.addStructMetaDataMap(getValidOrders_args.class, metaDataMap);
28897
    }
28898
 
28899
    public getValidOrders_args() {
28900
    }
28901
 
28902
    public getValidOrders_args(
28903
      long limit)
28904
    {
28905
      this();
28906
      this.limit = limit;
28907
      setLimitIsSet(true);
28908
    }
28909
 
28910
    /**
28911
     * Performs a deep copy on <i>other</i>.
28912
     */
28913
    public getValidOrders_args(getValidOrders_args other) {
28914
      __isset_bit_vector.clear();
28915
      __isset_bit_vector.or(other.__isset_bit_vector);
28916
      this.limit = other.limit;
28917
    }
28918
 
28919
    public getValidOrders_args deepCopy() {
28920
      return new getValidOrders_args(this);
28921
    }
28922
 
28923
    @Deprecated
28924
    public getValidOrders_args clone() {
28925
      return new getValidOrders_args(this);
28926
    }
28927
 
28928
    public long getLimit() {
28929
      return this.limit;
28930
    }
28931
 
28932
    public getValidOrders_args setLimit(long limit) {
28933
      this.limit = limit;
28934
      setLimitIsSet(true);
28935
      return this;
28936
    }
28937
 
28938
    public void unsetLimit() {
28939
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
28940
    }
28941
 
28942
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
28943
    public boolean isSetLimit() {
28944
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
28945
    }
28946
 
28947
    public void setLimitIsSet(boolean value) {
28948
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
28949
    }
28950
 
28951
    public void setFieldValue(_Fields field, Object value) {
28952
      switch (field) {
28953
      case LIMIT:
28954
        if (value == null) {
28955
          unsetLimit();
28956
        } else {
28957
          setLimit((Long)value);
28958
        }
28959
        break;
28960
 
28961
      }
28962
    }
28963
 
28964
    public void setFieldValue(int fieldID, Object value) {
28965
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28966
    }
28967
 
28968
    public Object getFieldValue(_Fields field) {
28969
      switch (field) {
28970
      case LIMIT:
28971
        return new Long(getLimit());
28972
 
28973
      }
28974
      throw new IllegalStateException();
28975
    }
28976
 
28977
    public Object getFieldValue(int fieldId) {
28978
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28979
    }
28980
 
28981
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28982
    public boolean isSet(_Fields field) {
28983
      switch (field) {
28984
      case LIMIT:
28985
        return isSetLimit();
28986
      }
28987
      throw new IllegalStateException();
28988
    }
28989
 
28990
    public boolean isSet(int fieldID) {
28991
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28992
    }
28993
 
28994
    @Override
28995
    public boolean equals(Object that) {
28996
      if (that == null)
28997
        return false;
28998
      if (that instanceof getValidOrders_args)
28999
        return this.equals((getValidOrders_args)that);
29000
      return false;
29001
    }
29002
 
29003
    public boolean equals(getValidOrders_args that) {
29004
      if (that == null)
29005
        return false;
29006
 
29007
      boolean this_present_limit = true;
29008
      boolean that_present_limit = true;
29009
      if (this_present_limit || that_present_limit) {
29010
        if (!(this_present_limit && that_present_limit))
29011
          return false;
29012
        if (this.limit != that.limit)
29013
          return false;
29014
      }
29015
 
29016
      return true;
29017
    }
29018
 
29019
    @Override
29020
    public int hashCode() {
29021
      return 0;
29022
    }
29023
 
29024
    public int compareTo(getValidOrders_args other) {
29025
      if (!getClass().equals(other.getClass())) {
29026
        return getClass().getName().compareTo(other.getClass().getName());
29027
      }
29028
 
29029
      int lastComparison = 0;
29030
      getValidOrders_args typedOther = (getValidOrders_args)other;
29031
 
29032
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
29033
      if (lastComparison != 0) {
29034
        return lastComparison;
29035
      }
29036
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
29037
      if (lastComparison != 0) {
29038
        return lastComparison;
29039
      }
29040
      return 0;
29041
    }
29042
 
29043
    public void read(TProtocol iprot) throws TException {
29044
      TField field;
29045
      iprot.readStructBegin();
29046
      while (true)
29047
      {
29048
        field = iprot.readFieldBegin();
29049
        if (field.type == TType.STOP) { 
29050
          break;
29051
        }
29052
        _Fields fieldId = _Fields.findByThriftId(field.id);
29053
        if (fieldId == null) {
29054
          TProtocolUtil.skip(iprot, field.type);
29055
        } else {
29056
          switch (fieldId) {
29057
            case LIMIT:
29058
              if (field.type == TType.I64) {
29059
                this.limit = iprot.readI64();
29060
                setLimitIsSet(true);
29061
              } else { 
29062
                TProtocolUtil.skip(iprot, field.type);
29063
              }
29064
              break;
29065
          }
29066
          iprot.readFieldEnd();
29067
        }
29068
      }
29069
      iprot.readStructEnd();
29070
      validate();
29071
    }
29072
 
29073
    public void write(TProtocol oprot) throws TException {
29074
      validate();
29075
 
29076
      oprot.writeStructBegin(STRUCT_DESC);
29077
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
29078
      oprot.writeI64(this.limit);
29079
      oprot.writeFieldEnd();
29080
      oprot.writeFieldStop();
29081
      oprot.writeStructEnd();
29082
    }
29083
 
29084
    @Override
29085
    public String toString() {
29086
      StringBuilder sb = new StringBuilder("getValidOrders_args(");
29087
      boolean first = true;
29088
 
29089
      sb.append("limit:");
29090
      sb.append(this.limit);
29091
      first = false;
29092
      sb.append(")");
29093
      return sb.toString();
29094
    }
29095
 
29096
    public void validate() throws TException {
29097
      // check for required fields
29098
    }
29099
 
29100
  }
29101
 
29102
  public static class getValidOrders_result implements TBase<getValidOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_result>   {
29103
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_result");
29104
 
29105
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
29106
 
29107
    private List<Order> success;
29108
 
29109
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29110
    public enum _Fields implements TFieldIdEnum {
29111
      SUCCESS((short)0, "success");
29112
 
29113
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29114
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29115
 
29116
      static {
29117
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29118
          byId.put((int)field._thriftId, field);
29119
          byName.put(field.getFieldName(), field);
29120
        }
29121
      }
29122
 
29123
      /**
29124
       * Find the _Fields constant that matches fieldId, or null if its not found.
29125
       */
29126
      public static _Fields findByThriftId(int fieldId) {
29127
        return byId.get(fieldId);
29128
      }
29129
 
29130
      /**
29131
       * Find the _Fields constant that matches fieldId, throwing an exception
29132
       * if it is not found.
29133
       */
29134
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29135
        _Fields fields = findByThriftId(fieldId);
29136
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29137
        return fields;
29138
      }
29139
 
29140
      /**
29141
       * Find the _Fields constant that matches name, or null if its not found.
29142
       */
29143
      public static _Fields findByName(String name) {
29144
        return byName.get(name);
29145
      }
29146
 
29147
      private final short _thriftId;
29148
      private final String _fieldName;
29149
 
29150
      _Fields(short thriftId, String fieldName) {
29151
        _thriftId = thriftId;
29152
        _fieldName = fieldName;
29153
      }
29154
 
29155
      public short getThriftFieldId() {
29156
        return _thriftId;
29157
      }
29158
 
29159
      public String getFieldName() {
29160
        return _fieldName;
29161
      }
29162
    }
29163
 
29164
    // isset id assignments
29165
 
29166
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29167
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29168
          new ListMetaData(TType.LIST, 
29169
              new StructMetaData(TType.STRUCT, Order.class))));
29170
    }});
29171
 
29172
    static {
29173
      FieldMetaData.addStructMetaDataMap(getValidOrders_result.class, metaDataMap);
29174
    }
29175
 
29176
    public getValidOrders_result() {
29177
    }
29178
 
29179
    public getValidOrders_result(
29180
      List<Order> success)
29181
    {
29182
      this();
29183
      this.success = success;
29184
    }
29185
 
29186
    /**
29187
     * Performs a deep copy on <i>other</i>.
29188
     */
29189
    public getValidOrders_result(getValidOrders_result other) {
29190
      if (other.isSetSuccess()) {
29191
        List<Order> __this__success = new ArrayList<Order>();
29192
        for (Order other_element : other.success) {
29193
          __this__success.add(new Order(other_element));
29194
        }
29195
        this.success = __this__success;
29196
      }
29197
    }
29198
 
29199
    public getValidOrders_result deepCopy() {
29200
      return new getValidOrders_result(this);
29201
    }
29202
 
29203
    @Deprecated
29204
    public getValidOrders_result clone() {
29205
      return new getValidOrders_result(this);
29206
    }
29207
 
29208
    public int getSuccessSize() {
29209
      return (this.success == null) ? 0 : this.success.size();
29210
    }
29211
 
29212
    public java.util.Iterator<Order> getSuccessIterator() {
29213
      return (this.success == null) ? null : this.success.iterator();
29214
    }
29215
 
29216
    public void addToSuccess(Order elem) {
29217
      if (this.success == null) {
29218
        this.success = new ArrayList<Order>();
29219
      }
29220
      this.success.add(elem);
29221
    }
29222
 
29223
    public List<Order> getSuccess() {
29224
      return this.success;
29225
    }
29226
 
29227
    public getValidOrders_result setSuccess(List<Order> success) {
29228
      this.success = success;
29229
      return this;
29230
    }
29231
 
29232
    public void unsetSuccess() {
29233
      this.success = null;
29234
    }
29235
 
29236
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29237
    public boolean isSetSuccess() {
29238
      return this.success != null;
29239
    }
29240
 
29241
    public void setSuccessIsSet(boolean value) {
29242
      if (!value) {
29243
        this.success = null;
29244
      }
29245
    }
29246
 
29247
    public void setFieldValue(_Fields field, Object value) {
29248
      switch (field) {
29249
      case SUCCESS:
29250
        if (value == null) {
29251
          unsetSuccess();
29252
        } else {
29253
          setSuccess((List<Order>)value);
29254
        }
29255
        break;
29256
 
29257
      }
29258
    }
29259
 
29260
    public void setFieldValue(int fieldID, Object value) {
29261
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29262
    }
29263
 
29264
    public Object getFieldValue(_Fields field) {
29265
      switch (field) {
29266
      case SUCCESS:
29267
        return getSuccess();
29268
 
29269
      }
29270
      throw new IllegalStateException();
29271
    }
29272
 
29273
    public Object getFieldValue(int fieldId) {
29274
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29275
    }
29276
 
29277
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29278
    public boolean isSet(_Fields field) {
29279
      switch (field) {
29280
      case SUCCESS:
29281
        return isSetSuccess();
29282
      }
29283
      throw new IllegalStateException();
29284
    }
29285
 
29286
    public boolean isSet(int fieldID) {
29287
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29288
    }
29289
 
29290
    @Override
29291
    public boolean equals(Object that) {
29292
      if (that == null)
29293
        return false;
29294
      if (that instanceof getValidOrders_result)
29295
        return this.equals((getValidOrders_result)that);
29296
      return false;
29297
    }
29298
 
29299
    public boolean equals(getValidOrders_result that) {
29300
      if (that == null)
29301
        return false;
29302
 
29303
      boolean this_present_success = true && this.isSetSuccess();
29304
      boolean that_present_success = true && that.isSetSuccess();
29305
      if (this_present_success || that_present_success) {
29306
        if (!(this_present_success && that_present_success))
29307
          return false;
29308
        if (!this.success.equals(that.success))
29309
          return false;
29310
      }
29311
 
29312
      return true;
29313
    }
29314
 
29315
    @Override
29316
    public int hashCode() {
29317
      return 0;
29318
    }
29319
 
29320
    public int compareTo(getValidOrders_result other) {
29321
      if (!getClass().equals(other.getClass())) {
29322
        return getClass().getName().compareTo(other.getClass().getName());
29323
      }
29324
 
29325
      int lastComparison = 0;
29326
      getValidOrders_result typedOther = (getValidOrders_result)other;
29327
 
29328
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29329
      if (lastComparison != 0) {
29330
        return lastComparison;
29331
      }
29332
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29333
      if (lastComparison != 0) {
29334
        return lastComparison;
29335
      }
29336
      return 0;
29337
    }
29338
 
29339
    public void read(TProtocol iprot) throws TException {
29340
      TField field;
29341
      iprot.readStructBegin();
29342
      while (true)
29343
      {
29344
        field = iprot.readFieldBegin();
29345
        if (field.type == TType.STOP) { 
29346
          break;
29347
        }
29348
        _Fields fieldId = _Fields.findByThriftId(field.id);
29349
        if (fieldId == null) {
29350
          TProtocolUtil.skip(iprot, field.type);
29351
        } else {
29352
          switch (fieldId) {
29353
            case SUCCESS:
29354
              if (field.type == TType.LIST) {
29355
                {
29356
                  TList _list84 = iprot.readListBegin();
29357
                  this.success = new ArrayList<Order>(_list84.size);
29358
                  for (int _i85 = 0; _i85 < _list84.size; ++_i85)
29359
                  {
29360
                    Order _elem86;
29361
                    _elem86 = new Order();
29362
                    _elem86.read(iprot);
29363
                    this.success.add(_elem86);
29364
                  }
29365
                  iprot.readListEnd();
29366
                }
29367
              } else { 
29368
                TProtocolUtil.skip(iprot, field.type);
29369
              }
29370
              break;
29371
          }
29372
          iprot.readFieldEnd();
29373
        }
29374
      }
29375
      iprot.readStructEnd();
29376
      validate();
29377
    }
29378
 
29379
    public void write(TProtocol oprot) throws TException {
29380
      oprot.writeStructBegin(STRUCT_DESC);
29381
 
29382
      if (this.isSetSuccess()) {
29383
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29384
        {
29385
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
29386
          for (Order _iter87 : this.success)
29387
          {
29388
            _iter87.write(oprot);
29389
          }
29390
          oprot.writeListEnd();
29391
        }
29392
        oprot.writeFieldEnd();
29393
      }
29394
      oprot.writeFieldStop();
29395
      oprot.writeStructEnd();
29396
    }
29397
 
29398
    @Override
29399
    public String toString() {
29400
      StringBuilder sb = new StringBuilder("getValidOrders_result(");
29401
      boolean first = true;
29402
 
29403
      sb.append("success:");
29404
      if (this.success == null) {
29405
        sb.append("null");
29406
      } else {
29407
        sb.append(this.success);
29408
      }
29409
      first = false;
29410
      sb.append(")");
29411
      return sb.toString();
29412
    }
29413
 
29414
    public void validate() throws TException {
29415
      // check for required fields
29416
    }
29417
 
29418
  }
29419
 
2538 chandransh 29420
  public static class toggleDOAFlag_args implements TBase<toggleDOAFlag_args._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_args>   {
29421
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_args");
29422
 
29423
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
29424
 
29425
    private long orderId;
29426
 
29427
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29428
    public enum _Fields implements TFieldIdEnum {
29429
      ORDER_ID((short)1, "orderId");
29430
 
29431
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29432
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29433
 
29434
      static {
29435
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29436
          byId.put((int)field._thriftId, field);
29437
          byName.put(field.getFieldName(), field);
29438
        }
29439
      }
29440
 
29441
      /**
29442
       * Find the _Fields constant that matches fieldId, or null if its not found.
29443
       */
29444
      public static _Fields findByThriftId(int fieldId) {
29445
        return byId.get(fieldId);
29446
      }
29447
 
29448
      /**
29449
       * Find the _Fields constant that matches fieldId, throwing an exception
29450
       * if it is not found.
29451
       */
29452
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29453
        _Fields fields = findByThriftId(fieldId);
29454
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29455
        return fields;
29456
      }
29457
 
29458
      /**
29459
       * Find the _Fields constant that matches name, or null if its not found.
29460
       */
29461
      public static _Fields findByName(String name) {
29462
        return byName.get(name);
29463
      }
29464
 
29465
      private final short _thriftId;
29466
      private final String _fieldName;
29467
 
29468
      _Fields(short thriftId, String fieldName) {
29469
        _thriftId = thriftId;
29470
        _fieldName = fieldName;
29471
      }
29472
 
29473
      public short getThriftFieldId() {
29474
        return _thriftId;
29475
      }
29476
 
29477
      public String getFieldName() {
29478
        return _fieldName;
29479
      }
29480
    }
29481
 
29482
    // isset id assignments
29483
    private static final int __ORDERID_ISSET_ID = 0;
29484
    private BitSet __isset_bit_vector = new BitSet(1);
29485
 
29486
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29487
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
29488
          new FieldValueMetaData(TType.I64)));
29489
    }});
29490
 
29491
    static {
29492
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_args.class, metaDataMap);
29493
    }
29494
 
29495
    public toggleDOAFlag_args() {
29496
    }
29497
 
29498
    public toggleDOAFlag_args(
29499
      long orderId)
29500
    {
29501
      this();
29502
      this.orderId = orderId;
29503
      setOrderIdIsSet(true);
29504
    }
29505
 
29506
    /**
29507
     * Performs a deep copy on <i>other</i>.
29508
     */
29509
    public toggleDOAFlag_args(toggleDOAFlag_args other) {
29510
      __isset_bit_vector.clear();
29511
      __isset_bit_vector.or(other.__isset_bit_vector);
29512
      this.orderId = other.orderId;
29513
    }
29514
 
29515
    public toggleDOAFlag_args deepCopy() {
29516
      return new toggleDOAFlag_args(this);
29517
    }
29518
 
29519
    @Deprecated
29520
    public toggleDOAFlag_args clone() {
29521
      return new toggleDOAFlag_args(this);
29522
    }
29523
 
29524
    public long getOrderId() {
29525
      return this.orderId;
29526
    }
29527
 
29528
    public toggleDOAFlag_args setOrderId(long orderId) {
29529
      this.orderId = orderId;
29530
      setOrderIdIsSet(true);
29531
      return this;
29532
    }
29533
 
29534
    public void unsetOrderId() {
29535
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
29536
    }
29537
 
29538
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
29539
    public boolean isSetOrderId() {
29540
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
29541
    }
29542
 
29543
    public void setOrderIdIsSet(boolean value) {
29544
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
29545
    }
29546
 
29547
    public void setFieldValue(_Fields field, Object value) {
29548
      switch (field) {
29549
      case ORDER_ID:
29550
        if (value == null) {
29551
          unsetOrderId();
29552
        } else {
29553
          setOrderId((Long)value);
29554
        }
29555
        break;
29556
 
29557
      }
29558
    }
29559
 
29560
    public void setFieldValue(int fieldID, Object value) {
29561
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29562
    }
29563
 
29564
    public Object getFieldValue(_Fields field) {
29565
      switch (field) {
29566
      case ORDER_ID:
29567
        return new Long(getOrderId());
29568
 
29569
      }
29570
      throw new IllegalStateException();
29571
    }
29572
 
29573
    public Object getFieldValue(int fieldId) {
29574
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29575
    }
29576
 
29577
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29578
    public boolean isSet(_Fields field) {
29579
      switch (field) {
29580
      case ORDER_ID:
29581
        return isSetOrderId();
29582
      }
29583
      throw new IllegalStateException();
29584
    }
29585
 
29586
    public boolean isSet(int fieldID) {
29587
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29588
    }
29589
 
29590
    @Override
29591
    public boolean equals(Object that) {
29592
      if (that == null)
29593
        return false;
29594
      if (that instanceof toggleDOAFlag_args)
29595
        return this.equals((toggleDOAFlag_args)that);
29596
      return false;
29597
    }
29598
 
29599
    public boolean equals(toggleDOAFlag_args that) {
29600
      if (that == null)
29601
        return false;
29602
 
29603
      boolean this_present_orderId = true;
29604
      boolean that_present_orderId = true;
29605
      if (this_present_orderId || that_present_orderId) {
29606
        if (!(this_present_orderId && that_present_orderId))
29607
          return false;
29608
        if (this.orderId != that.orderId)
29609
          return false;
29610
      }
29611
 
29612
      return true;
29613
    }
29614
 
29615
    @Override
29616
    public int hashCode() {
29617
      return 0;
29618
    }
29619
 
29620
    public int compareTo(toggleDOAFlag_args other) {
29621
      if (!getClass().equals(other.getClass())) {
29622
        return getClass().getName().compareTo(other.getClass().getName());
29623
      }
29624
 
29625
      int lastComparison = 0;
29626
      toggleDOAFlag_args typedOther = (toggleDOAFlag_args)other;
29627
 
29628
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
29629
      if (lastComparison != 0) {
29630
        return lastComparison;
29631
      }
29632
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
29633
      if (lastComparison != 0) {
29634
        return lastComparison;
29635
      }
29636
      return 0;
29637
    }
29638
 
29639
    public void read(TProtocol iprot) throws TException {
29640
      TField field;
29641
      iprot.readStructBegin();
29642
      while (true)
29643
      {
29644
        field = iprot.readFieldBegin();
29645
        if (field.type == TType.STOP) { 
29646
          break;
29647
        }
29648
        _Fields fieldId = _Fields.findByThriftId(field.id);
29649
        if (fieldId == null) {
29650
          TProtocolUtil.skip(iprot, field.type);
29651
        } else {
29652
          switch (fieldId) {
29653
            case ORDER_ID:
29654
              if (field.type == TType.I64) {
29655
                this.orderId = iprot.readI64();
29656
                setOrderIdIsSet(true);
29657
              } else { 
29658
                TProtocolUtil.skip(iprot, field.type);
29659
              }
29660
              break;
29661
          }
29662
          iprot.readFieldEnd();
29663
        }
29664
      }
29665
      iprot.readStructEnd();
29666
      validate();
29667
    }
29668
 
29669
    public void write(TProtocol oprot) throws TException {
29670
      validate();
29671
 
29672
      oprot.writeStructBegin(STRUCT_DESC);
29673
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
29674
      oprot.writeI64(this.orderId);
29675
      oprot.writeFieldEnd();
29676
      oprot.writeFieldStop();
29677
      oprot.writeStructEnd();
29678
    }
29679
 
29680
    @Override
29681
    public String toString() {
29682
      StringBuilder sb = new StringBuilder("toggleDOAFlag_args(");
29683
      boolean first = true;
29684
 
29685
      sb.append("orderId:");
29686
      sb.append(this.orderId);
29687
      first = false;
29688
      sb.append(")");
29689
      return sb.toString();
29690
    }
29691
 
29692
    public void validate() throws TException {
29693
      // check for required fields
29694
    }
29695
 
29696
  }
29697
 
29698
  public static class toggleDOAFlag_result implements TBase<toggleDOAFlag_result._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_result>   {
29699
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_result");
29700
 
29701
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
29702
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
29703
 
29704
    private boolean success;
29705
    private TransactionServiceException ex;
29706
 
29707
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29708
    public enum _Fields implements TFieldIdEnum {
29709
      SUCCESS((short)0, "success"),
29710
      EX((short)1, "ex");
29711
 
29712
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29713
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29714
 
29715
      static {
29716
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29717
          byId.put((int)field._thriftId, field);
29718
          byName.put(field.getFieldName(), field);
29719
        }
29720
      }
29721
 
29722
      /**
29723
       * Find the _Fields constant that matches fieldId, or null if its not found.
29724
       */
29725
      public static _Fields findByThriftId(int fieldId) {
29726
        return byId.get(fieldId);
29727
      }
29728
 
29729
      /**
29730
       * Find the _Fields constant that matches fieldId, throwing an exception
29731
       * if it is not found.
29732
       */
29733
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29734
        _Fields fields = findByThriftId(fieldId);
29735
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29736
        return fields;
29737
      }
29738
 
29739
      /**
29740
       * Find the _Fields constant that matches name, or null if its not found.
29741
       */
29742
      public static _Fields findByName(String name) {
29743
        return byName.get(name);
29744
      }
29745
 
29746
      private final short _thriftId;
29747
      private final String _fieldName;
29748
 
29749
      _Fields(short thriftId, String fieldName) {
29750
        _thriftId = thriftId;
29751
        _fieldName = fieldName;
29752
      }
29753
 
29754
      public short getThriftFieldId() {
29755
        return _thriftId;
29756
      }
29757
 
29758
      public String getFieldName() {
29759
        return _fieldName;
29760
      }
29761
    }
29762
 
29763
    // isset id assignments
29764
    private static final int __SUCCESS_ISSET_ID = 0;
29765
    private BitSet __isset_bit_vector = new BitSet(1);
29766
 
29767
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29768
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29769
          new FieldValueMetaData(TType.BOOL)));
29770
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
29771
          new FieldValueMetaData(TType.STRUCT)));
29772
    }});
29773
 
29774
    static {
29775
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_result.class, metaDataMap);
29776
    }
29777
 
29778
    public toggleDOAFlag_result() {
29779
    }
29780
 
29781
    public toggleDOAFlag_result(
29782
      boolean success,
29783
      TransactionServiceException ex)
29784
    {
29785
      this();
29786
      this.success = success;
29787
      setSuccessIsSet(true);
29788
      this.ex = ex;
29789
    }
29790
 
29791
    /**
29792
     * Performs a deep copy on <i>other</i>.
29793
     */
29794
    public toggleDOAFlag_result(toggleDOAFlag_result other) {
29795
      __isset_bit_vector.clear();
29796
      __isset_bit_vector.or(other.__isset_bit_vector);
29797
      this.success = other.success;
29798
      if (other.isSetEx()) {
29799
        this.ex = new TransactionServiceException(other.ex);
29800
      }
29801
    }
29802
 
29803
    public toggleDOAFlag_result deepCopy() {
29804
      return new toggleDOAFlag_result(this);
29805
    }
29806
 
29807
    @Deprecated
29808
    public toggleDOAFlag_result clone() {
29809
      return new toggleDOAFlag_result(this);
29810
    }
29811
 
29812
    public boolean isSuccess() {
29813
      return this.success;
29814
    }
29815
 
29816
    public toggleDOAFlag_result setSuccess(boolean success) {
29817
      this.success = success;
29818
      setSuccessIsSet(true);
29819
      return this;
29820
    }
29821
 
29822
    public void unsetSuccess() {
29823
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29824
    }
29825
 
29826
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29827
    public boolean isSetSuccess() {
29828
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29829
    }
29830
 
29831
    public void setSuccessIsSet(boolean value) {
29832
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29833
    }
29834
 
29835
    public TransactionServiceException getEx() {
29836
      return this.ex;
29837
    }
29838
 
29839
    public toggleDOAFlag_result setEx(TransactionServiceException ex) {
29840
      this.ex = ex;
29841
      return this;
29842
    }
29843
 
29844
    public void unsetEx() {
29845
      this.ex = null;
29846
    }
29847
 
29848
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
29849
    public boolean isSetEx() {
29850
      return this.ex != null;
29851
    }
29852
 
29853
    public void setExIsSet(boolean value) {
29854
      if (!value) {
29855
        this.ex = null;
29856
      }
29857
    }
29858
 
29859
    public void setFieldValue(_Fields field, Object value) {
29860
      switch (field) {
29861
      case SUCCESS:
29862
        if (value == null) {
29863
          unsetSuccess();
29864
        } else {
29865
          setSuccess((Boolean)value);
29866
        }
29867
        break;
29868
 
29869
      case EX:
29870
        if (value == null) {
29871
          unsetEx();
29872
        } else {
29873
          setEx((TransactionServiceException)value);
29874
        }
29875
        break;
29876
 
29877
      }
29878
    }
29879
 
29880
    public void setFieldValue(int fieldID, Object value) {
29881
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29882
    }
29883
 
29884
    public Object getFieldValue(_Fields field) {
29885
      switch (field) {
29886
      case SUCCESS:
29887
        return new Boolean(isSuccess());
29888
 
29889
      case EX:
29890
        return getEx();
29891
 
29892
      }
29893
      throw new IllegalStateException();
29894
    }
29895
 
29896
    public Object getFieldValue(int fieldId) {
29897
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29898
    }
29899
 
29900
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29901
    public boolean isSet(_Fields field) {
29902
      switch (field) {
29903
      case SUCCESS:
29904
        return isSetSuccess();
29905
      case EX:
29906
        return isSetEx();
29907
      }
29908
      throw new IllegalStateException();
29909
    }
29910
 
29911
    public boolean isSet(int fieldID) {
29912
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29913
    }
29914
 
29915
    @Override
29916
    public boolean equals(Object that) {
29917
      if (that == null)
29918
        return false;
29919
      if (that instanceof toggleDOAFlag_result)
29920
        return this.equals((toggleDOAFlag_result)that);
29921
      return false;
29922
    }
29923
 
29924
    public boolean equals(toggleDOAFlag_result that) {
29925
      if (that == null)
29926
        return false;
29927
 
29928
      boolean this_present_success = true;
29929
      boolean that_present_success = true;
29930
      if (this_present_success || that_present_success) {
29931
        if (!(this_present_success && that_present_success))
29932
          return false;
29933
        if (this.success != that.success)
29934
          return false;
29935
      }
29936
 
29937
      boolean this_present_ex = true && this.isSetEx();
29938
      boolean that_present_ex = true && that.isSetEx();
29939
      if (this_present_ex || that_present_ex) {
29940
        if (!(this_present_ex && that_present_ex))
29941
          return false;
29942
        if (!this.ex.equals(that.ex))
29943
          return false;
29944
      }
29945
 
29946
      return true;
29947
    }
29948
 
29949
    @Override
29950
    public int hashCode() {
29951
      return 0;
29952
    }
29953
 
29954
    public int compareTo(toggleDOAFlag_result other) {
29955
      if (!getClass().equals(other.getClass())) {
29956
        return getClass().getName().compareTo(other.getClass().getName());
29957
      }
29958
 
29959
      int lastComparison = 0;
29960
      toggleDOAFlag_result typedOther = (toggleDOAFlag_result)other;
29961
 
29962
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29963
      if (lastComparison != 0) {
29964
        return lastComparison;
29965
      }
29966
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29967
      if (lastComparison != 0) {
29968
        return lastComparison;
29969
      }
29970
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
29971
      if (lastComparison != 0) {
29972
        return lastComparison;
29973
      }
29974
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
29975
      if (lastComparison != 0) {
29976
        return lastComparison;
29977
      }
29978
      return 0;
29979
    }
29980
 
29981
    public void read(TProtocol iprot) throws TException {
29982
      TField field;
29983
      iprot.readStructBegin();
29984
      while (true)
29985
      {
29986
        field = iprot.readFieldBegin();
29987
        if (field.type == TType.STOP) { 
29988
          break;
29989
        }
29990
        _Fields fieldId = _Fields.findByThriftId(field.id);
29991
        if (fieldId == null) {
29992
          TProtocolUtil.skip(iprot, field.type);
29993
        } else {
29994
          switch (fieldId) {
29995
            case SUCCESS:
29996
              if (field.type == TType.BOOL) {
29997
                this.success = iprot.readBool();
29998
                setSuccessIsSet(true);
29999
              } else { 
30000
                TProtocolUtil.skip(iprot, field.type);
30001
              }
30002
              break;
30003
            case EX:
30004
              if (field.type == TType.STRUCT) {
30005
                this.ex = new TransactionServiceException();
30006
                this.ex.read(iprot);
30007
              } else { 
30008
                TProtocolUtil.skip(iprot, field.type);
30009
              }
30010
              break;
30011
          }
30012
          iprot.readFieldEnd();
30013
        }
30014
      }
30015
      iprot.readStructEnd();
30016
      validate();
30017
    }
30018
 
30019
    public void write(TProtocol oprot) throws TException {
30020
      oprot.writeStructBegin(STRUCT_DESC);
30021
 
30022
      if (this.isSetSuccess()) {
30023
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30024
        oprot.writeBool(this.success);
30025
        oprot.writeFieldEnd();
30026
      } else if (this.isSetEx()) {
30027
        oprot.writeFieldBegin(EX_FIELD_DESC);
30028
        this.ex.write(oprot);
30029
        oprot.writeFieldEnd();
30030
      }
30031
      oprot.writeFieldStop();
30032
      oprot.writeStructEnd();
30033
    }
30034
 
30035
    @Override
30036
    public String toString() {
30037
      StringBuilder sb = new StringBuilder("toggleDOAFlag_result(");
30038
      boolean first = true;
30039
 
30040
      sb.append("success:");
30041
      sb.append(this.success);
30042
      first = false;
30043
      if (!first) sb.append(", ");
30044
      sb.append("ex:");
30045
      if (this.ex == null) {
30046
        sb.append("null");
30047
      } else {
30048
        sb.append(this.ex);
30049
      }
30050
      first = false;
30051
      sb.append(")");
30052
      return sb.toString();
30053
    }
30054
 
30055
    public void validate() throws TException {
30056
      // check for required fields
30057
    }
30058
 
30059
  }
30060
 
30061
  public static class requestPickupNumber_args implements TBase<requestPickupNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_args>   {
30062
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_args");
30063
 
30064
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
30065
 
30066
    private long orderId;
30067
 
30068
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30069
    public enum _Fields implements TFieldIdEnum {
30070
      ORDER_ID((short)1, "orderId");
30071
 
30072
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30073
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30074
 
30075
      static {
30076
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30077
          byId.put((int)field._thriftId, field);
30078
          byName.put(field.getFieldName(), field);
30079
        }
30080
      }
30081
 
30082
      /**
30083
       * Find the _Fields constant that matches fieldId, or null if its not found.
30084
       */
30085
      public static _Fields findByThriftId(int fieldId) {
30086
        return byId.get(fieldId);
30087
      }
30088
 
30089
      /**
30090
       * Find the _Fields constant that matches fieldId, throwing an exception
30091
       * if it is not found.
30092
       */
30093
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30094
        _Fields fields = findByThriftId(fieldId);
30095
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30096
        return fields;
30097
      }
30098
 
30099
      /**
30100
       * Find the _Fields constant that matches name, or null if its not found.
30101
       */
30102
      public static _Fields findByName(String name) {
30103
        return byName.get(name);
30104
      }
30105
 
30106
      private final short _thriftId;
30107
      private final String _fieldName;
30108
 
30109
      _Fields(short thriftId, String fieldName) {
30110
        _thriftId = thriftId;
30111
        _fieldName = fieldName;
30112
      }
30113
 
30114
      public short getThriftFieldId() {
30115
        return _thriftId;
30116
      }
30117
 
30118
      public String getFieldName() {
30119
        return _fieldName;
30120
      }
30121
    }
30122
 
30123
    // isset id assignments
30124
    private static final int __ORDERID_ISSET_ID = 0;
30125
    private BitSet __isset_bit_vector = new BitSet(1);
30126
 
30127
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30128
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
30129
          new FieldValueMetaData(TType.I64)));
30130
    }});
30131
 
30132
    static {
30133
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_args.class, metaDataMap);
30134
    }
30135
 
30136
    public requestPickupNumber_args() {
30137
    }
30138
 
30139
    public requestPickupNumber_args(
30140
      long orderId)
30141
    {
30142
      this();
30143
      this.orderId = orderId;
30144
      setOrderIdIsSet(true);
30145
    }
30146
 
30147
    /**
30148
     * Performs a deep copy on <i>other</i>.
30149
     */
30150
    public requestPickupNumber_args(requestPickupNumber_args other) {
30151
      __isset_bit_vector.clear();
30152
      __isset_bit_vector.or(other.__isset_bit_vector);
30153
      this.orderId = other.orderId;
30154
    }
30155
 
30156
    public requestPickupNumber_args deepCopy() {
30157
      return new requestPickupNumber_args(this);
30158
    }
30159
 
30160
    @Deprecated
30161
    public requestPickupNumber_args clone() {
30162
      return new requestPickupNumber_args(this);
30163
    }
30164
 
30165
    public long getOrderId() {
30166
      return this.orderId;
30167
    }
30168
 
30169
    public requestPickupNumber_args setOrderId(long orderId) {
30170
      this.orderId = orderId;
30171
      setOrderIdIsSet(true);
30172
      return this;
30173
    }
30174
 
30175
    public void unsetOrderId() {
30176
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
30177
    }
30178
 
30179
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
30180
    public boolean isSetOrderId() {
30181
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
30182
    }
30183
 
30184
    public void setOrderIdIsSet(boolean value) {
30185
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
30186
    }
30187
 
30188
    public void setFieldValue(_Fields field, Object value) {
30189
      switch (field) {
30190
      case ORDER_ID:
30191
        if (value == null) {
30192
          unsetOrderId();
30193
        } else {
30194
          setOrderId((Long)value);
30195
        }
30196
        break;
30197
 
30198
      }
30199
    }
30200
 
30201
    public void setFieldValue(int fieldID, Object value) {
30202
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30203
    }
30204
 
30205
    public Object getFieldValue(_Fields field) {
30206
      switch (field) {
30207
      case ORDER_ID:
30208
        return new Long(getOrderId());
30209
 
30210
      }
30211
      throw new IllegalStateException();
30212
    }
30213
 
30214
    public Object getFieldValue(int fieldId) {
30215
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30216
    }
30217
 
30218
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30219
    public boolean isSet(_Fields field) {
30220
      switch (field) {
30221
      case ORDER_ID:
30222
        return isSetOrderId();
30223
      }
30224
      throw new IllegalStateException();
30225
    }
30226
 
30227
    public boolean isSet(int fieldID) {
30228
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30229
    }
30230
 
30231
    @Override
30232
    public boolean equals(Object that) {
30233
      if (that == null)
30234
        return false;
30235
      if (that instanceof requestPickupNumber_args)
30236
        return this.equals((requestPickupNumber_args)that);
30237
      return false;
30238
    }
30239
 
30240
    public boolean equals(requestPickupNumber_args that) {
30241
      if (that == null)
30242
        return false;
30243
 
30244
      boolean this_present_orderId = true;
30245
      boolean that_present_orderId = true;
30246
      if (this_present_orderId || that_present_orderId) {
30247
        if (!(this_present_orderId && that_present_orderId))
30248
          return false;
30249
        if (this.orderId != that.orderId)
30250
          return false;
30251
      }
30252
 
30253
      return true;
30254
    }
30255
 
30256
    @Override
30257
    public int hashCode() {
30258
      return 0;
30259
    }
30260
 
30261
    public int compareTo(requestPickupNumber_args other) {
30262
      if (!getClass().equals(other.getClass())) {
30263
        return getClass().getName().compareTo(other.getClass().getName());
30264
      }
30265
 
30266
      int lastComparison = 0;
30267
      requestPickupNumber_args typedOther = (requestPickupNumber_args)other;
30268
 
30269
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
30270
      if (lastComparison != 0) {
30271
        return lastComparison;
30272
      }
30273
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
30274
      if (lastComparison != 0) {
30275
        return lastComparison;
30276
      }
30277
      return 0;
30278
    }
30279
 
30280
    public void read(TProtocol iprot) throws TException {
30281
      TField field;
30282
      iprot.readStructBegin();
30283
      while (true)
30284
      {
30285
        field = iprot.readFieldBegin();
30286
        if (field.type == TType.STOP) { 
30287
          break;
30288
        }
30289
        _Fields fieldId = _Fields.findByThriftId(field.id);
30290
        if (fieldId == null) {
30291
          TProtocolUtil.skip(iprot, field.type);
30292
        } else {
30293
          switch (fieldId) {
30294
            case ORDER_ID:
30295
              if (field.type == TType.I64) {
30296
                this.orderId = iprot.readI64();
30297
                setOrderIdIsSet(true);
30298
              } else { 
30299
                TProtocolUtil.skip(iprot, field.type);
30300
              }
30301
              break;
30302
          }
30303
          iprot.readFieldEnd();
30304
        }
30305
      }
30306
      iprot.readStructEnd();
30307
      validate();
30308
    }
30309
 
30310
    public void write(TProtocol oprot) throws TException {
30311
      validate();
30312
 
30313
      oprot.writeStructBegin(STRUCT_DESC);
30314
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
30315
      oprot.writeI64(this.orderId);
30316
      oprot.writeFieldEnd();
30317
      oprot.writeFieldStop();
30318
      oprot.writeStructEnd();
30319
    }
30320
 
30321
    @Override
30322
    public String toString() {
30323
      StringBuilder sb = new StringBuilder("requestPickupNumber_args(");
30324
      boolean first = true;
30325
 
30326
      sb.append("orderId:");
30327
      sb.append(this.orderId);
30328
      first = false;
30329
      sb.append(")");
30330
      return sb.toString();
30331
    }
30332
 
30333
    public void validate() throws TException {
30334
      // check for required fields
30335
    }
30336
 
30337
  }
30338
 
30339
  public static class requestPickupNumber_result implements TBase<requestPickupNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_result>   {
30340
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_result");
30341
 
30342
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
30343
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
30344
 
30345
    private boolean success;
30346
    private TransactionServiceException ex;
30347
 
30348
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30349
    public enum _Fields implements TFieldIdEnum {
30350
      SUCCESS((short)0, "success"),
30351
      EX((short)1, "ex");
30352
 
30353
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30354
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30355
 
30356
      static {
30357
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30358
          byId.put((int)field._thriftId, field);
30359
          byName.put(field.getFieldName(), field);
30360
        }
30361
      }
30362
 
30363
      /**
30364
       * Find the _Fields constant that matches fieldId, or null if its not found.
30365
       */
30366
      public static _Fields findByThriftId(int fieldId) {
30367
        return byId.get(fieldId);
30368
      }
30369
 
30370
      /**
30371
       * Find the _Fields constant that matches fieldId, throwing an exception
30372
       * if it is not found.
30373
       */
30374
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30375
        _Fields fields = findByThriftId(fieldId);
30376
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30377
        return fields;
30378
      }
30379
 
30380
      /**
30381
       * Find the _Fields constant that matches name, or null if its not found.
30382
       */
30383
      public static _Fields findByName(String name) {
30384
        return byName.get(name);
30385
      }
30386
 
30387
      private final short _thriftId;
30388
      private final String _fieldName;
30389
 
30390
      _Fields(short thriftId, String fieldName) {
30391
        _thriftId = thriftId;
30392
        _fieldName = fieldName;
30393
      }
30394
 
30395
      public short getThriftFieldId() {
30396
        return _thriftId;
30397
      }
30398
 
30399
      public String getFieldName() {
30400
        return _fieldName;
30401
      }
30402
    }
30403
 
30404
    // isset id assignments
30405
    private static final int __SUCCESS_ISSET_ID = 0;
30406
    private BitSet __isset_bit_vector = new BitSet(1);
30407
 
30408
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30409
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30410
          new FieldValueMetaData(TType.BOOL)));
30411
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
30412
          new FieldValueMetaData(TType.STRUCT)));
30413
    }});
30414
 
30415
    static {
30416
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_result.class, metaDataMap);
30417
    }
30418
 
30419
    public requestPickupNumber_result() {
30420
    }
30421
 
30422
    public requestPickupNumber_result(
30423
      boolean success,
30424
      TransactionServiceException ex)
30425
    {
30426
      this();
30427
      this.success = success;
30428
      setSuccessIsSet(true);
30429
      this.ex = ex;
30430
    }
30431
 
30432
    /**
30433
     * Performs a deep copy on <i>other</i>.
30434
     */
30435
    public requestPickupNumber_result(requestPickupNumber_result other) {
30436
      __isset_bit_vector.clear();
30437
      __isset_bit_vector.or(other.__isset_bit_vector);
30438
      this.success = other.success;
30439
      if (other.isSetEx()) {
30440
        this.ex = new TransactionServiceException(other.ex);
30441
      }
30442
    }
30443
 
30444
    public requestPickupNumber_result deepCopy() {
30445
      return new requestPickupNumber_result(this);
30446
    }
30447
 
30448
    @Deprecated
30449
    public requestPickupNumber_result clone() {
30450
      return new requestPickupNumber_result(this);
30451
    }
30452
 
30453
    public boolean isSuccess() {
30454
      return this.success;
30455
    }
30456
 
30457
    public requestPickupNumber_result setSuccess(boolean success) {
30458
      this.success = success;
30459
      setSuccessIsSet(true);
30460
      return this;
30461
    }
30462
 
30463
    public void unsetSuccess() {
30464
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
30465
    }
30466
 
30467
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30468
    public boolean isSetSuccess() {
30469
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
30470
    }
30471
 
30472
    public void setSuccessIsSet(boolean value) {
30473
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
30474
    }
30475
 
30476
    public TransactionServiceException getEx() {
30477
      return this.ex;
30478
    }
30479
 
30480
    public requestPickupNumber_result setEx(TransactionServiceException ex) {
30481
      this.ex = ex;
30482
      return this;
30483
    }
30484
 
30485
    public void unsetEx() {
30486
      this.ex = null;
30487
    }
30488
 
30489
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
30490
    public boolean isSetEx() {
30491
      return this.ex != null;
30492
    }
30493
 
30494
    public void setExIsSet(boolean value) {
30495
      if (!value) {
30496
        this.ex = null;
30497
      }
30498
    }
30499
 
30500
    public void setFieldValue(_Fields field, Object value) {
30501
      switch (field) {
30502
      case SUCCESS:
30503
        if (value == null) {
30504
          unsetSuccess();
30505
        } else {
30506
          setSuccess((Boolean)value);
30507
        }
30508
        break;
30509
 
30510
      case EX:
30511
        if (value == null) {
30512
          unsetEx();
30513
        } else {
30514
          setEx((TransactionServiceException)value);
30515
        }
30516
        break;
30517
 
30518
      }
30519
    }
30520
 
30521
    public void setFieldValue(int fieldID, Object value) {
30522
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30523
    }
30524
 
30525
    public Object getFieldValue(_Fields field) {
30526
      switch (field) {
30527
      case SUCCESS:
30528
        return new Boolean(isSuccess());
30529
 
30530
      case EX:
30531
        return getEx();
30532
 
30533
      }
30534
      throw new IllegalStateException();
30535
    }
30536
 
30537
    public Object getFieldValue(int fieldId) {
30538
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30539
    }
30540
 
30541
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30542
    public boolean isSet(_Fields field) {
30543
      switch (field) {
30544
      case SUCCESS:
30545
        return isSetSuccess();
30546
      case EX:
30547
        return isSetEx();
30548
      }
30549
      throw new IllegalStateException();
30550
    }
30551
 
30552
    public boolean isSet(int fieldID) {
30553
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30554
    }
30555
 
30556
    @Override
30557
    public boolean equals(Object that) {
30558
      if (that == null)
30559
        return false;
30560
      if (that instanceof requestPickupNumber_result)
30561
        return this.equals((requestPickupNumber_result)that);
30562
      return false;
30563
    }
30564
 
30565
    public boolean equals(requestPickupNumber_result that) {
30566
      if (that == null)
30567
        return false;
30568
 
30569
      boolean this_present_success = true;
30570
      boolean that_present_success = true;
30571
      if (this_present_success || that_present_success) {
30572
        if (!(this_present_success && that_present_success))
30573
          return false;
30574
        if (this.success != that.success)
30575
          return false;
30576
      }
30577
 
30578
      boolean this_present_ex = true && this.isSetEx();
30579
      boolean that_present_ex = true && that.isSetEx();
30580
      if (this_present_ex || that_present_ex) {
30581
        if (!(this_present_ex && that_present_ex))
30582
          return false;
30583
        if (!this.ex.equals(that.ex))
30584
          return false;
30585
      }
30586
 
30587
      return true;
30588
    }
30589
 
30590
    @Override
30591
    public int hashCode() {
30592
      return 0;
30593
    }
30594
 
30595
    public int compareTo(requestPickupNumber_result other) {
30596
      if (!getClass().equals(other.getClass())) {
30597
        return getClass().getName().compareTo(other.getClass().getName());
30598
      }
30599
 
30600
      int lastComparison = 0;
30601
      requestPickupNumber_result typedOther = (requestPickupNumber_result)other;
30602
 
30603
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30604
      if (lastComparison != 0) {
30605
        return lastComparison;
30606
      }
30607
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30608
      if (lastComparison != 0) {
30609
        return lastComparison;
30610
      }
30611
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
30612
      if (lastComparison != 0) {
30613
        return lastComparison;
30614
      }
30615
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
30616
      if (lastComparison != 0) {
30617
        return lastComparison;
30618
      }
30619
      return 0;
30620
    }
30621
 
30622
    public void read(TProtocol iprot) throws TException {
30623
      TField field;
30624
      iprot.readStructBegin();
30625
      while (true)
30626
      {
30627
        field = iprot.readFieldBegin();
30628
        if (field.type == TType.STOP) { 
30629
          break;
30630
        }
30631
        _Fields fieldId = _Fields.findByThriftId(field.id);
30632
        if (fieldId == null) {
30633
          TProtocolUtil.skip(iprot, field.type);
30634
        } else {
30635
          switch (fieldId) {
30636
            case SUCCESS:
30637
              if (field.type == TType.BOOL) {
30638
                this.success = iprot.readBool();
30639
                setSuccessIsSet(true);
30640
              } else { 
30641
                TProtocolUtil.skip(iprot, field.type);
30642
              }
30643
              break;
30644
            case EX:
30645
              if (field.type == TType.STRUCT) {
30646
                this.ex = new TransactionServiceException();
30647
                this.ex.read(iprot);
30648
              } else { 
30649
                TProtocolUtil.skip(iprot, field.type);
30650
              }
30651
              break;
30652
          }
30653
          iprot.readFieldEnd();
30654
        }
30655
      }
30656
      iprot.readStructEnd();
30657
      validate();
30658
    }
30659
 
30660
    public void write(TProtocol oprot) throws TException {
30661
      oprot.writeStructBegin(STRUCT_DESC);
30662
 
30663
      if (this.isSetSuccess()) {
30664
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30665
        oprot.writeBool(this.success);
30666
        oprot.writeFieldEnd();
30667
      } else if (this.isSetEx()) {
30668
        oprot.writeFieldBegin(EX_FIELD_DESC);
30669
        this.ex.write(oprot);
30670
        oprot.writeFieldEnd();
30671
      }
30672
      oprot.writeFieldStop();
30673
      oprot.writeStructEnd();
30674
    }
30675
 
30676
    @Override
30677
    public String toString() {
30678
      StringBuilder sb = new StringBuilder("requestPickupNumber_result(");
30679
      boolean first = true;
30680
 
30681
      sb.append("success:");
30682
      sb.append(this.success);
30683
      first = false;
30684
      if (!first) sb.append(", ");
30685
      sb.append("ex:");
30686
      if (this.ex == null) {
30687
        sb.append("null");
30688
      } else {
30689
        sb.append(this.ex);
30690
      }
30691
      first = false;
30692
      sb.append(")");
30693
      return sb.toString();
30694
    }
30695
 
30696
    public void validate() throws TException {
30697
      // check for required fields
30698
    }
30699
 
30700
  }
30701
 
30702
  public static class authorizePickup_args implements TBase<authorizePickup_args._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_args>   {
30703
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_args");
30704
 
30705
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
30706
    private static final TField PICKUP_NUMBER_FIELD_DESC = new TField("pickupNumber", TType.STRING, (short)2);
30707
 
30708
    private long orderId;
30709
    private String pickupNumber;
30710
 
30711
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30712
    public enum _Fields implements TFieldIdEnum {
30713
      ORDER_ID((short)1, "orderId"),
30714
      PICKUP_NUMBER((short)2, "pickupNumber");
30715
 
30716
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30717
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30718
 
30719
      static {
30720
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30721
          byId.put((int)field._thriftId, field);
30722
          byName.put(field.getFieldName(), field);
30723
        }
30724
      }
30725
 
30726
      /**
30727
       * Find the _Fields constant that matches fieldId, or null if its not found.
30728
       */
30729
      public static _Fields findByThriftId(int fieldId) {
30730
        return byId.get(fieldId);
30731
      }
30732
 
30733
      /**
30734
       * Find the _Fields constant that matches fieldId, throwing an exception
30735
       * if it is not found.
30736
       */
30737
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30738
        _Fields fields = findByThriftId(fieldId);
30739
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30740
        return fields;
30741
      }
30742
 
30743
      /**
30744
       * Find the _Fields constant that matches name, or null if its not found.
30745
       */
30746
      public static _Fields findByName(String name) {
30747
        return byName.get(name);
30748
      }
30749
 
30750
      private final short _thriftId;
30751
      private final String _fieldName;
30752
 
30753
      _Fields(short thriftId, String fieldName) {
30754
        _thriftId = thriftId;
30755
        _fieldName = fieldName;
30756
      }
30757
 
30758
      public short getThriftFieldId() {
30759
        return _thriftId;
30760
      }
30761
 
30762
      public String getFieldName() {
30763
        return _fieldName;
30764
      }
30765
    }
30766
 
30767
    // isset id assignments
30768
    private static final int __ORDERID_ISSET_ID = 0;
30769
    private BitSet __isset_bit_vector = new BitSet(1);
30770
 
30771
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30772
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
30773
          new FieldValueMetaData(TType.I64)));
30774
      put(_Fields.PICKUP_NUMBER, new FieldMetaData("pickupNumber", TFieldRequirementType.DEFAULT, 
30775
          new FieldValueMetaData(TType.STRING)));
30776
    }});
30777
 
30778
    static {
30779
      FieldMetaData.addStructMetaDataMap(authorizePickup_args.class, metaDataMap);
30780
    }
30781
 
30782
    public authorizePickup_args() {
30783
    }
30784
 
30785
    public authorizePickup_args(
30786
      long orderId,
30787
      String pickupNumber)
30788
    {
30789
      this();
30790
      this.orderId = orderId;
30791
      setOrderIdIsSet(true);
30792
      this.pickupNumber = pickupNumber;
30793
    }
30794
 
30795
    /**
30796
     * Performs a deep copy on <i>other</i>.
30797
     */
30798
    public authorizePickup_args(authorizePickup_args other) {
30799
      __isset_bit_vector.clear();
30800
      __isset_bit_vector.or(other.__isset_bit_vector);
30801
      this.orderId = other.orderId;
30802
      if (other.isSetPickupNumber()) {
30803
        this.pickupNumber = other.pickupNumber;
30804
      }
30805
    }
30806
 
30807
    public authorizePickup_args deepCopy() {
30808
      return new authorizePickup_args(this);
30809
    }
30810
 
30811
    @Deprecated
30812
    public authorizePickup_args clone() {
30813
      return new authorizePickup_args(this);
30814
    }
30815
 
30816
    public long getOrderId() {
30817
      return this.orderId;
30818
    }
30819
 
30820
    public authorizePickup_args setOrderId(long orderId) {
30821
      this.orderId = orderId;
30822
      setOrderIdIsSet(true);
30823
      return this;
30824
    }
30825
 
30826
    public void unsetOrderId() {
30827
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
30828
    }
30829
 
30830
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
30831
    public boolean isSetOrderId() {
30832
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
30833
    }
30834
 
30835
    public void setOrderIdIsSet(boolean value) {
30836
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
30837
    }
30838
 
30839
    public String getPickupNumber() {
30840
      return this.pickupNumber;
30841
    }
30842
 
30843
    public authorizePickup_args setPickupNumber(String pickupNumber) {
30844
      this.pickupNumber = pickupNumber;
30845
      return this;
30846
    }
30847
 
30848
    public void unsetPickupNumber() {
30849
      this.pickupNumber = null;
30850
    }
30851
 
30852
    /** Returns true if field pickupNumber is set (has been asigned a value) and false otherwise */
30853
    public boolean isSetPickupNumber() {
30854
      return this.pickupNumber != null;
30855
    }
30856
 
30857
    public void setPickupNumberIsSet(boolean value) {
30858
      if (!value) {
30859
        this.pickupNumber = null;
30860
      }
30861
    }
30862
 
30863
    public void setFieldValue(_Fields field, Object value) {
30864
      switch (field) {
30865
      case ORDER_ID:
30866
        if (value == null) {
30867
          unsetOrderId();
30868
        } else {
30869
          setOrderId((Long)value);
30870
        }
30871
        break;
30872
 
30873
      case PICKUP_NUMBER:
30874
        if (value == null) {
30875
          unsetPickupNumber();
30876
        } else {
30877
          setPickupNumber((String)value);
30878
        }
30879
        break;
30880
 
30881
      }
30882
    }
30883
 
30884
    public void setFieldValue(int fieldID, Object value) {
30885
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30886
    }
30887
 
30888
    public Object getFieldValue(_Fields field) {
30889
      switch (field) {
30890
      case ORDER_ID:
30891
        return new Long(getOrderId());
30892
 
30893
      case PICKUP_NUMBER:
30894
        return getPickupNumber();
30895
 
30896
      }
30897
      throw new IllegalStateException();
30898
    }
30899
 
30900
    public Object getFieldValue(int fieldId) {
30901
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30902
    }
30903
 
30904
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30905
    public boolean isSet(_Fields field) {
30906
      switch (field) {
30907
      case ORDER_ID:
30908
        return isSetOrderId();
30909
      case PICKUP_NUMBER:
30910
        return isSetPickupNumber();
30911
      }
30912
      throw new IllegalStateException();
30913
    }
30914
 
30915
    public boolean isSet(int fieldID) {
30916
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30917
    }
30918
 
30919
    @Override
30920
    public boolean equals(Object that) {
30921
      if (that == null)
30922
        return false;
30923
      if (that instanceof authorizePickup_args)
30924
        return this.equals((authorizePickup_args)that);
30925
      return false;
30926
    }
30927
 
30928
    public boolean equals(authorizePickup_args that) {
30929
      if (that == null)
30930
        return false;
30931
 
30932
      boolean this_present_orderId = true;
30933
      boolean that_present_orderId = true;
30934
      if (this_present_orderId || that_present_orderId) {
30935
        if (!(this_present_orderId && that_present_orderId))
30936
          return false;
30937
        if (this.orderId != that.orderId)
30938
          return false;
30939
      }
30940
 
30941
      boolean this_present_pickupNumber = true && this.isSetPickupNumber();
30942
      boolean that_present_pickupNumber = true && that.isSetPickupNumber();
30943
      if (this_present_pickupNumber || that_present_pickupNumber) {
30944
        if (!(this_present_pickupNumber && that_present_pickupNumber))
30945
          return false;
30946
        if (!this.pickupNumber.equals(that.pickupNumber))
30947
          return false;
30948
      }
30949
 
30950
      return true;
30951
    }
30952
 
30953
    @Override
30954
    public int hashCode() {
30955
      return 0;
30956
    }
30957
 
30958
    public int compareTo(authorizePickup_args other) {
30959
      if (!getClass().equals(other.getClass())) {
30960
        return getClass().getName().compareTo(other.getClass().getName());
30961
      }
30962
 
30963
      int lastComparison = 0;
30964
      authorizePickup_args typedOther = (authorizePickup_args)other;
30965
 
30966
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
30967
      if (lastComparison != 0) {
30968
        return lastComparison;
30969
      }
30970
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
30971
      if (lastComparison != 0) {
30972
        return lastComparison;
30973
      }
30974
      lastComparison = Boolean.valueOf(isSetPickupNumber()).compareTo(isSetPickupNumber());
30975
      if (lastComparison != 0) {
30976
        return lastComparison;
30977
      }
30978
      lastComparison = TBaseHelper.compareTo(pickupNumber, typedOther.pickupNumber);
30979
      if (lastComparison != 0) {
30980
        return lastComparison;
30981
      }
30982
      return 0;
30983
    }
30984
 
30985
    public void read(TProtocol iprot) throws TException {
30986
      TField field;
30987
      iprot.readStructBegin();
30988
      while (true)
30989
      {
30990
        field = iprot.readFieldBegin();
30991
        if (field.type == TType.STOP) { 
30992
          break;
30993
        }
30994
        _Fields fieldId = _Fields.findByThriftId(field.id);
30995
        if (fieldId == null) {
30996
          TProtocolUtil.skip(iprot, field.type);
30997
        } else {
30998
          switch (fieldId) {
30999
            case ORDER_ID:
31000
              if (field.type == TType.I64) {
31001
                this.orderId = iprot.readI64();
31002
                setOrderIdIsSet(true);
31003
              } else { 
31004
                TProtocolUtil.skip(iprot, field.type);
31005
              }
31006
              break;
31007
            case PICKUP_NUMBER:
31008
              if (field.type == TType.STRING) {
31009
                this.pickupNumber = iprot.readString();
31010
              } else { 
31011
                TProtocolUtil.skip(iprot, field.type);
31012
              }
31013
              break;
31014
          }
31015
          iprot.readFieldEnd();
31016
        }
31017
      }
31018
      iprot.readStructEnd();
31019
      validate();
31020
    }
31021
 
31022
    public void write(TProtocol oprot) throws TException {
31023
      validate();
31024
 
31025
      oprot.writeStructBegin(STRUCT_DESC);
31026
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
31027
      oprot.writeI64(this.orderId);
31028
      oprot.writeFieldEnd();
31029
      if (this.pickupNumber != null) {
31030
        oprot.writeFieldBegin(PICKUP_NUMBER_FIELD_DESC);
31031
        oprot.writeString(this.pickupNumber);
31032
        oprot.writeFieldEnd();
31033
      }
31034
      oprot.writeFieldStop();
31035
      oprot.writeStructEnd();
31036
    }
31037
 
31038
    @Override
31039
    public String toString() {
31040
      StringBuilder sb = new StringBuilder("authorizePickup_args(");
31041
      boolean first = true;
31042
 
31043
      sb.append("orderId:");
31044
      sb.append(this.orderId);
31045
      first = false;
31046
      if (!first) sb.append(", ");
31047
      sb.append("pickupNumber:");
31048
      if (this.pickupNumber == null) {
31049
        sb.append("null");
31050
      } else {
31051
        sb.append(this.pickupNumber);
31052
      }
31053
      first = false;
31054
      sb.append(")");
31055
      return sb.toString();
31056
    }
31057
 
31058
    public void validate() throws TException {
31059
      // check for required fields
31060
    }
31061
 
31062
  }
31063
 
31064
  public static class authorizePickup_result implements TBase<authorizePickup_result._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_result>   {
31065
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_result");
31066
 
31067
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
31068
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
31069
 
31070
    private boolean success;
31071
    private TransactionServiceException ex;
31072
 
31073
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31074
    public enum _Fields implements TFieldIdEnum {
31075
      SUCCESS((short)0, "success"),
31076
      EX((short)1, "ex");
31077
 
31078
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31079
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31080
 
31081
      static {
31082
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31083
          byId.put((int)field._thriftId, field);
31084
          byName.put(field.getFieldName(), field);
31085
        }
31086
      }
31087
 
31088
      /**
31089
       * Find the _Fields constant that matches fieldId, or null if its not found.
31090
       */
31091
      public static _Fields findByThriftId(int fieldId) {
31092
        return byId.get(fieldId);
31093
      }
31094
 
31095
      /**
31096
       * Find the _Fields constant that matches fieldId, throwing an exception
31097
       * if it is not found.
31098
       */
31099
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31100
        _Fields fields = findByThriftId(fieldId);
31101
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31102
        return fields;
31103
      }
31104
 
31105
      /**
31106
       * Find the _Fields constant that matches name, or null if its not found.
31107
       */
31108
      public static _Fields findByName(String name) {
31109
        return byName.get(name);
31110
      }
31111
 
31112
      private final short _thriftId;
31113
      private final String _fieldName;
31114
 
31115
      _Fields(short thriftId, String fieldName) {
31116
        _thriftId = thriftId;
31117
        _fieldName = fieldName;
31118
      }
31119
 
31120
      public short getThriftFieldId() {
31121
        return _thriftId;
31122
      }
31123
 
31124
      public String getFieldName() {
31125
        return _fieldName;
31126
      }
31127
    }
31128
 
31129
    // isset id assignments
31130
    private static final int __SUCCESS_ISSET_ID = 0;
31131
    private BitSet __isset_bit_vector = new BitSet(1);
31132
 
31133
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31134
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31135
          new FieldValueMetaData(TType.BOOL)));
31136
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
31137
          new FieldValueMetaData(TType.STRUCT)));
31138
    }});
31139
 
31140
    static {
31141
      FieldMetaData.addStructMetaDataMap(authorizePickup_result.class, metaDataMap);
31142
    }
31143
 
31144
    public authorizePickup_result() {
31145
    }
31146
 
31147
    public authorizePickup_result(
31148
      boolean success,
31149
      TransactionServiceException ex)
31150
    {
31151
      this();
31152
      this.success = success;
31153
      setSuccessIsSet(true);
31154
      this.ex = ex;
31155
    }
31156
 
31157
    /**
31158
     * Performs a deep copy on <i>other</i>.
31159
     */
31160
    public authorizePickup_result(authorizePickup_result other) {
31161
      __isset_bit_vector.clear();
31162
      __isset_bit_vector.or(other.__isset_bit_vector);
31163
      this.success = other.success;
31164
      if (other.isSetEx()) {
31165
        this.ex = new TransactionServiceException(other.ex);
31166
      }
31167
    }
31168
 
31169
    public authorizePickup_result deepCopy() {
31170
      return new authorizePickup_result(this);
31171
    }
31172
 
31173
    @Deprecated
31174
    public authorizePickup_result clone() {
31175
      return new authorizePickup_result(this);
31176
    }
31177
 
31178
    public boolean isSuccess() {
31179
      return this.success;
31180
    }
31181
 
31182
    public authorizePickup_result setSuccess(boolean success) {
31183
      this.success = success;
31184
      setSuccessIsSet(true);
31185
      return this;
31186
    }
31187
 
31188
    public void unsetSuccess() {
31189
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
31190
    }
31191
 
31192
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31193
    public boolean isSetSuccess() {
31194
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
31195
    }
31196
 
31197
    public void setSuccessIsSet(boolean value) {
31198
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
31199
    }
31200
 
31201
    public TransactionServiceException getEx() {
31202
      return this.ex;
31203
    }
31204
 
31205
    public authorizePickup_result setEx(TransactionServiceException ex) {
31206
      this.ex = ex;
31207
      return this;
31208
    }
31209
 
31210
    public void unsetEx() {
31211
      this.ex = null;
31212
    }
31213
 
31214
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
31215
    public boolean isSetEx() {
31216
      return this.ex != null;
31217
    }
31218
 
31219
    public void setExIsSet(boolean value) {
31220
      if (!value) {
31221
        this.ex = null;
31222
      }
31223
    }
31224
 
31225
    public void setFieldValue(_Fields field, Object value) {
31226
      switch (field) {
31227
      case SUCCESS:
31228
        if (value == null) {
31229
          unsetSuccess();
31230
        } else {
31231
          setSuccess((Boolean)value);
31232
        }
31233
        break;
31234
 
31235
      case EX:
31236
        if (value == null) {
31237
          unsetEx();
31238
        } else {
31239
          setEx((TransactionServiceException)value);
31240
        }
31241
        break;
31242
 
31243
      }
31244
    }
31245
 
31246
    public void setFieldValue(int fieldID, Object value) {
31247
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31248
    }
31249
 
31250
    public Object getFieldValue(_Fields field) {
31251
      switch (field) {
31252
      case SUCCESS:
31253
        return new Boolean(isSuccess());
31254
 
31255
      case EX:
31256
        return getEx();
31257
 
31258
      }
31259
      throw new IllegalStateException();
31260
    }
31261
 
31262
    public Object getFieldValue(int fieldId) {
31263
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31264
    }
31265
 
31266
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31267
    public boolean isSet(_Fields field) {
31268
      switch (field) {
31269
      case SUCCESS:
31270
        return isSetSuccess();
31271
      case EX:
31272
        return isSetEx();
31273
      }
31274
      throw new IllegalStateException();
31275
    }
31276
 
31277
    public boolean isSet(int fieldID) {
31278
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31279
    }
31280
 
31281
    @Override
31282
    public boolean equals(Object that) {
31283
      if (that == null)
31284
        return false;
31285
      if (that instanceof authorizePickup_result)
31286
        return this.equals((authorizePickup_result)that);
31287
      return false;
31288
    }
31289
 
31290
    public boolean equals(authorizePickup_result that) {
31291
      if (that == null)
31292
        return false;
31293
 
31294
      boolean this_present_success = true;
31295
      boolean that_present_success = true;
31296
      if (this_present_success || that_present_success) {
31297
        if (!(this_present_success && that_present_success))
31298
          return false;
31299
        if (this.success != that.success)
31300
          return false;
31301
      }
31302
 
31303
      boolean this_present_ex = true && this.isSetEx();
31304
      boolean that_present_ex = true && that.isSetEx();
31305
      if (this_present_ex || that_present_ex) {
31306
        if (!(this_present_ex && that_present_ex))
31307
          return false;
31308
        if (!this.ex.equals(that.ex))
31309
          return false;
31310
      }
31311
 
31312
      return true;
31313
    }
31314
 
31315
    @Override
31316
    public int hashCode() {
31317
      return 0;
31318
    }
31319
 
31320
    public int compareTo(authorizePickup_result other) {
31321
      if (!getClass().equals(other.getClass())) {
31322
        return getClass().getName().compareTo(other.getClass().getName());
31323
      }
31324
 
31325
      int lastComparison = 0;
31326
      authorizePickup_result typedOther = (authorizePickup_result)other;
31327
 
31328
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31329
      if (lastComparison != 0) {
31330
        return lastComparison;
31331
      }
31332
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31333
      if (lastComparison != 0) {
31334
        return lastComparison;
31335
      }
31336
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
31337
      if (lastComparison != 0) {
31338
        return lastComparison;
31339
      }
31340
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
31341
      if (lastComparison != 0) {
31342
        return lastComparison;
31343
      }
31344
      return 0;
31345
    }
31346
 
31347
    public void read(TProtocol iprot) throws TException {
31348
      TField field;
31349
      iprot.readStructBegin();
31350
      while (true)
31351
      {
31352
        field = iprot.readFieldBegin();
31353
        if (field.type == TType.STOP) { 
31354
          break;
31355
        }
31356
        _Fields fieldId = _Fields.findByThriftId(field.id);
31357
        if (fieldId == null) {
31358
          TProtocolUtil.skip(iprot, field.type);
31359
        } else {
31360
          switch (fieldId) {
31361
            case SUCCESS:
31362
              if (field.type == TType.BOOL) {
31363
                this.success = iprot.readBool();
31364
                setSuccessIsSet(true);
31365
              } else { 
31366
                TProtocolUtil.skip(iprot, field.type);
31367
              }
31368
              break;
31369
            case EX:
31370
              if (field.type == TType.STRUCT) {
31371
                this.ex = new TransactionServiceException();
31372
                this.ex.read(iprot);
31373
              } else { 
31374
                TProtocolUtil.skip(iprot, field.type);
31375
              }
31376
              break;
31377
          }
31378
          iprot.readFieldEnd();
31379
        }
31380
      }
31381
      iprot.readStructEnd();
31382
      validate();
31383
    }
31384
 
31385
    public void write(TProtocol oprot) throws TException {
31386
      oprot.writeStructBegin(STRUCT_DESC);
31387
 
31388
      if (this.isSetSuccess()) {
31389
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31390
        oprot.writeBool(this.success);
31391
        oprot.writeFieldEnd();
31392
      } else if (this.isSetEx()) {
31393
        oprot.writeFieldBegin(EX_FIELD_DESC);
31394
        this.ex.write(oprot);
31395
        oprot.writeFieldEnd();
31396
      }
31397
      oprot.writeFieldStop();
31398
      oprot.writeStructEnd();
31399
    }
31400
 
31401
    @Override
31402
    public String toString() {
31403
      StringBuilder sb = new StringBuilder("authorizePickup_result(");
31404
      boolean first = true;
31405
 
31406
      sb.append("success:");
31407
      sb.append(this.success);
31408
      first = false;
31409
      if (!first) sb.append(", ");
31410
      sb.append("ex:");
31411
      if (this.ex == null) {
31412
        sb.append("null");
31413
      } else {
31414
        sb.append(this.ex);
31415
      }
31416
      first = false;
31417
      sb.append(")");
31418
      return sb.toString();
31419
    }
31420
 
31421
    public void validate() throws TException {
31422
      // check for required fields
31423
    }
31424
 
31425
  }
31426
 
2765 chandransh 31427
  public static class markDoasAsPickedUp_args implements TBase<markDoasAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
31428
    private static final TStruct STRUCT_DESC = new TStruct("markDoasAsPickedUp_args");
31429
 
31430
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
31431
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
31432
 
31433
    private long providerId;
31434
    private Map<String,String> pickupDetails;
31435
 
31436
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31437
    public enum _Fields implements TFieldIdEnum {
31438
      PROVIDER_ID((short)1, "providerId"),
31439
      PICKUP_DETAILS((short)2, "pickupDetails");
31440
 
31441
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31442
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31443
 
31444
      static {
31445
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31446
          byId.put((int)field._thriftId, field);
31447
          byName.put(field.getFieldName(), field);
31448
        }
31449
      }
31450
 
31451
      /**
31452
       * Find the _Fields constant that matches fieldId, or null if its not found.
31453
       */
31454
      public static _Fields findByThriftId(int fieldId) {
31455
        return byId.get(fieldId);
31456
      }
31457
 
31458
      /**
31459
       * Find the _Fields constant that matches fieldId, throwing an exception
31460
       * if it is not found.
31461
       */
31462
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31463
        _Fields fields = findByThriftId(fieldId);
31464
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31465
        return fields;
31466
      }
31467
 
31468
      /**
31469
       * Find the _Fields constant that matches name, or null if its not found.
31470
       */
31471
      public static _Fields findByName(String name) {
31472
        return byName.get(name);
31473
      }
31474
 
31475
      private final short _thriftId;
31476
      private final String _fieldName;
31477
 
31478
      _Fields(short thriftId, String fieldName) {
31479
        _thriftId = thriftId;
31480
        _fieldName = fieldName;
31481
      }
31482
 
31483
      public short getThriftFieldId() {
31484
        return _thriftId;
31485
      }
31486
 
31487
      public String getFieldName() {
31488
        return _fieldName;
31489
      }
31490
    }
31491
 
31492
    // isset id assignments
31493
    private static final int __PROVIDERID_ISSET_ID = 0;
31494
    private BitSet __isset_bit_vector = new BitSet(1);
31495
 
31496
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31497
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
31498
          new FieldValueMetaData(TType.I64)));
31499
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
31500
          new MapMetaData(TType.MAP, 
31501
              new FieldValueMetaData(TType.STRING), 
31502
              new FieldValueMetaData(TType.STRING))));
31503
    }});
31504
 
31505
    static {
31506
      FieldMetaData.addStructMetaDataMap(markDoasAsPickedUp_args.class, metaDataMap);
31507
    }
31508
 
31509
    public markDoasAsPickedUp_args() {
31510
    }
31511
 
31512
    public markDoasAsPickedUp_args(
31513
      long providerId,
31514
      Map<String,String> pickupDetails)
31515
    {
31516
      this();
31517
      this.providerId = providerId;
31518
      setProviderIdIsSet(true);
31519
      this.pickupDetails = pickupDetails;
31520
    }
31521
 
31522
    /**
31523
     * Performs a deep copy on <i>other</i>.
31524
     */
31525
    public markDoasAsPickedUp_args(markDoasAsPickedUp_args other) {
31526
      __isset_bit_vector.clear();
31527
      __isset_bit_vector.or(other.__isset_bit_vector);
31528
      this.providerId = other.providerId;
31529
      if (other.isSetPickupDetails()) {
31530
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
31531
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
31532
 
31533
          String other_element_key = other_element.getKey();
31534
          String other_element_value = other_element.getValue();
31535
 
31536
          String __this__pickupDetails_copy_key = other_element_key;
31537
 
31538
          String __this__pickupDetails_copy_value = other_element_value;
31539
 
31540
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
31541
        }
31542
        this.pickupDetails = __this__pickupDetails;
31543
      }
31544
    }
31545
 
31546
    public markDoasAsPickedUp_args deepCopy() {
31547
      return new markDoasAsPickedUp_args(this);
31548
    }
31549
 
31550
    @Deprecated
31551
    public markDoasAsPickedUp_args clone() {
31552
      return new markDoasAsPickedUp_args(this);
31553
    }
31554
 
31555
    public long getProviderId() {
31556
      return this.providerId;
31557
    }
31558
 
31559
    public markDoasAsPickedUp_args setProviderId(long providerId) {
31560
      this.providerId = providerId;
31561
      setProviderIdIsSet(true);
31562
      return this;
31563
    }
31564
 
31565
    public void unsetProviderId() {
31566
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
31567
    }
31568
 
31569
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
31570
    public boolean isSetProviderId() {
31571
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
31572
    }
31573
 
31574
    public void setProviderIdIsSet(boolean value) {
31575
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
31576
    }
31577
 
31578
    public int getPickupDetailsSize() {
31579
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
31580
    }
31581
 
31582
    public void putToPickupDetails(String key, String val) {
31583
      if (this.pickupDetails == null) {
31584
        this.pickupDetails = new HashMap<String,String>();
31585
      }
31586
      this.pickupDetails.put(key, val);
31587
    }
31588
 
31589
    public Map<String,String> getPickupDetails() {
31590
      return this.pickupDetails;
31591
    }
31592
 
31593
    public markDoasAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
31594
      this.pickupDetails = pickupDetails;
31595
      return this;
31596
    }
31597
 
31598
    public void unsetPickupDetails() {
31599
      this.pickupDetails = null;
31600
    }
31601
 
31602
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
31603
    public boolean isSetPickupDetails() {
31604
      return this.pickupDetails != null;
31605
    }
31606
 
31607
    public void setPickupDetailsIsSet(boolean value) {
31608
      if (!value) {
31609
        this.pickupDetails = null;
31610
      }
31611
    }
31612
 
31613
    public void setFieldValue(_Fields field, Object value) {
31614
      switch (field) {
31615
      case PROVIDER_ID:
31616
        if (value == null) {
31617
          unsetProviderId();
31618
        } else {
31619
          setProviderId((Long)value);
31620
        }
31621
        break;
31622
 
31623
      case PICKUP_DETAILS:
31624
        if (value == null) {
31625
          unsetPickupDetails();
31626
        } else {
31627
          setPickupDetails((Map<String,String>)value);
31628
        }
31629
        break;
31630
 
31631
      }
31632
    }
31633
 
31634
    public void setFieldValue(int fieldID, Object value) {
31635
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31636
    }
31637
 
31638
    public Object getFieldValue(_Fields field) {
31639
      switch (field) {
31640
      case PROVIDER_ID:
31641
        return new Long(getProviderId());
31642
 
31643
      case PICKUP_DETAILS:
31644
        return getPickupDetails();
31645
 
31646
      }
31647
      throw new IllegalStateException();
31648
    }
31649
 
31650
    public Object getFieldValue(int fieldId) {
31651
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31652
    }
31653
 
31654
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31655
    public boolean isSet(_Fields field) {
31656
      switch (field) {
31657
      case PROVIDER_ID:
31658
        return isSetProviderId();
31659
      case PICKUP_DETAILS:
31660
        return isSetPickupDetails();
31661
      }
31662
      throw new IllegalStateException();
31663
    }
31664
 
31665
    public boolean isSet(int fieldID) {
31666
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31667
    }
31668
 
31669
    @Override
31670
    public boolean equals(Object that) {
31671
      if (that == null)
31672
        return false;
31673
      if (that instanceof markDoasAsPickedUp_args)
31674
        return this.equals((markDoasAsPickedUp_args)that);
31675
      return false;
31676
    }
31677
 
31678
    public boolean equals(markDoasAsPickedUp_args that) {
31679
      if (that == null)
31680
        return false;
31681
 
31682
      boolean this_present_providerId = true;
31683
      boolean that_present_providerId = true;
31684
      if (this_present_providerId || that_present_providerId) {
31685
        if (!(this_present_providerId && that_present_providerId))
31686
          return false;
31687
        if (this.providerId != that.providerId)
31688
          return false;
31689
      }
31690
 
31691
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
31692
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
31693
      if (this_present_pickupDetails || that_present_pickupDetails) {
31694
        if (!(this_present_pickupDetails && that_present_pickupDetails))
31695
          return false;
31696
        if (!this.pickupDetails.equals(that.pickupDetails))
31697
          return false;
31698
      }
31699
 
31700
      return true;
31701
    }
31702
 
31703
    @Override
31704
    public int hashCode() {
31705
      return 0;
31706
    }
31707
 
31708
    public void read(TProtocol iprot) throws TException {
31709
      TField field;
31710
      iprot.readStructBegin();
31711
      while (true)
31712
      {
31713
        field = iprot.readFieldBegin();
31714
        if (field.type == TType.STOP) { 
31715
          break;
31716
        }
31717
        _Fields fieldId = _Fields.findByThriftId(field.id);
31718
        if (fieldId == null) {
31719
          TProtocolUtil.skip(iprot, field.type);
31720
        } else {
31721
          switch (fieldId) {
31722
            case PROVIDER_ID:
31723
              if (field.type == TType.I64) {
31724
                this.providerId = iprot.readI64();
31725
                setProviderIdIsSet(true);
31726
              } else { 
31727
                TProtocolUtil.skip(iprot, field.type);
31728
              }
31729
              break;
31730
            case PICKUP_DETAILS:
31731
              if (field.type == TType.MAP) {
31732
                {
31733
                  TMap _map88 = iprot.readMapBegin();
31734
                  this.pickupDetails = new HashMap<String,String>(2*_map88.size);
31735
                  for (int _i89 = 0; _i89 < _map88.size; ++_i89)
31736
                  {
31737
                    String _key90;
31738
                    String _val91;
31739
                    _key90 = iprot.readString();
31740
                    _val91 = iprot.readString();
31741
                    this.pickupDetails.put(_key90, _val91);
31742
                  }
31743
                  iprot.readMapEnd();
31744
                }
31745
              } else { 
31746
                TProtocolUtil.skip(iprot, field.type);
31747
              }
31748
              break;
31749
          }
31750
          iprot.readFieldEnd();
31751
        }
31752
      }
31753
      iprot.readStructEnd();
31754
      validate();
31755
    }
31756
 
31757
    public void write(TProtocol oprot) throws TException {
31758
      validate();
31759
 
31760
      oprot.writeStructBegin(STRUCT_DESC);
31761
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
31762
      oprot.writeI64(this.providerId);
31763
      oprot.writeFieldEnd();
31764
      if (this.pickupDetails != null) {
31765
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
31766
        {
31767
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
31768
          for (Map.Entry<String, String> _iter92 : this.pickupDetails.entrySet())
31769
          {
31770
            oprot.writeString(_iter92.getKey());
31771
            oprot.writeString(_iter92.getValue());
31772
          }
31773
          oprot.writeMapEnd();
31774
        }
31775
        oprot.writeFieldEnd();
31776
      }
31777
      oprot.writeFieldStop();
31778
      oprot.writeStructEnd();
31779
    }
31780
 
31781
    @Override
31782
    public String toString() {
31783
      StringBuilder sb = new StringBuilder("markDoasAsPickedUp_args(");
31784
      boolean first = true;
31785
 
31786
      sb.append("providerId:");
31787
      sb.append(this.providerId);
31788
      first = false;
31789
      if (!first) sb.append(", ");
31790
      sb.append("pickupDetails:");
31791
      if (this.pickupDetails == null) {
31792
        sb.append("null");
31793
      } else {
31794
        sb.append(this.pickupDetails);
31795
      }
31796
      first = false;
31797
      sb.append(")");
31798
      return sb.toString();
31799
    }
31800
 
31801
    public void validate() throws TException {
31802
      // check for required fields
31803
    }
31804
 
31805
  }
31806
 
31807
  public static class markDoasAsPickedUp_result implements TBase<markDoasAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markDoasAsPickedUp_result>   {
31808
    private static final TStruct STRUCT_DESC = new TStruct("markDoasAsPickedUp_result");
31809
 
31810
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
31811
 
31812
    private List<Order> success;
31813
 
31814
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31815
    public enum _Fields implements TFieldIdEnum {
31816
      SUCCESS((short)0, "success");
31817
 
31818
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31819
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31820
 
31821
      static {
31822
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31823
          byId.put((int)field._thriftId, field);
31824
          byName.put(field.getFieldName(), field);
31825
        }
31826
      }
31827
 
31828
      /**
31829
       * Find the _Fields constant that matches fieldId, or null if its not found.
31830
       */
31831
      public static _Fields findByThriftId(int fieldId) {
31832
        return byId.get(fieldId);
31833
      }
31834
 
31835
      /**
31836
       * Find the _Fields constant that matches fieldId, throwing an exception
31837
       * if it is not found.
31838
       */
31839
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31840
        _Fields fields = findByThriftId(fieldId);
31841
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31842
        return fields;
31843
      }
31844
 
31845
      /**
31846
       * Find the _Fields constant that matches name, or null if its not found.
31847
       */
31848
      public static _Fields findByName(String name) {
31849
        return byName.get(name);
31850
      }
31851
 
31852
      private final short _thriftId;
31853
      private final String _fieldName;
31854
 
31855
      _Fields(short thriftId, String fieldName) {
31856
        _thriftId = thriftId;
31857
        _fieldName = fieldName;
31858
      }
31859
 
31860
      public short getThriftFieldId() {
31861
        return _thriftId;
31862
      }
31863
 
31864
      public String getFieldName() {
31865
        return _fieldName;
31866
      }
31867
    }
31868
 
31869
    // isset id assignments
31870
 
31871
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31872
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31873
          new ListMetaData(TType.LIST, 
31874
              new StructMetaData(TType.STRUCT, Order.class))));
31875
    }});
31876
 
31877
    static {
31878
      FieldMetaData.addStructMetaDataMap(markDoasAsPickedUp_result.class, metaDataMap);
31879
    }
31880
 
31881
    public markDoasAsPickedUp_result() {
31882
    }
31883
 
31884
    public markDoasAsPickedUp_result(
31885
      List<Order> success)
31886
    {
31887
      this();
31888
      this.success = success;
31889
    }
31890
 
31891
    /**
31892
     * Performs a deep copy on <i>other</i>.
31893
     */
31894
    public markDoasAsPickedUp_result(markDoasAsPickedUp_result other) {
31895
      if (other.isSetSuccess()) {
31896
        List<Order> __this__success = new ArrayList<Order>();
31897
        for (Order other_element : other.success) {
31898
          __this__success.add(new Order(other_element));
31899
        }
31900
        this.success = __this__success;
31901
      }
31902
    }
31903
 
31904
    public markDoasAsPickedUp_result deepCopy() {
31905
      return new markDoasAsPickedUp_result(this);
31906
    }
31907
 
31908
    @Deprecated
31909
    public markDoasAsPickedUp_result clone() {
31910
      return new markDoasAsPickedUp_result(this);
31911
    }
31912
 
31913
    public int getSuccessSize() {
31914
      return (this.success == null) ? 0 : this.success.size();
31915
    }
31916
 
31917
    public java.util.Iterator<Order> getSuccessIterator() {
31918
      return (this.success == null) ? null : this.success.iterator();
31919
    }
31920
 
31921
    public void addToSuccess(Order elem) {
31922
      if (this.success == null) {
31923
        this.success = new ArrayList<Order>();
31924
      }
31925
      this.success.add(elem);
31926
    }
31927
 
31928
    public List<Order> getSuccess() {
31929
      return this.success;
31930
    }
31931
 
31932
    public markDoasAsPickedUp_result setSuccess(List<Order> success) {
31933
      this.success = success;
31934
      return this;
31935
    }
31936
 
31937
    public void unsetSuccess() {
31938
      this.success = null;
31939
    }
31940
 
31941
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31942
    public boolean isSetSuccess() {
31943
      return this.success != null;
31944
    }
31945
 
31946
    public void setSuccessIsSet(boolean value) {
31947
      if (!value) {
31948
        this.success = null;
31949
      }
31950
    }
31951
 
31952
    public void setFieldValue(_Fields field, Object value) {
31953
      switch (field) {
31954
      case SUCCESS:
31955
        if (value == null) {
31956
          unsetSuccess();
31957
        } else {
31958
          setSuccess((List<Order>)value);
31959
        }
31960
        break;
31961
 
31962
      }
31963
    }
31964
 
31965
    public void setFieldValue(int fieldID, Object value) {
31966
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31967
    }
31968
 
31969
    public Object getFieldValue(_Fields field) {
31970
      switch (field) {
31971
      case SUCCESS:
31972
        return getSuccess();
31973
 
31974
      }
31975
      throw new IllegalStateException();
31976
    }
31977
 
31978
    public Object getFieldValue(int fieldId) {
31979
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31980
    }
31981
 
31982
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31983
    public boolean isSet(_Fields field) {
31984
      switch (field) {
31985
      case SUCCESS:
31986
        return isSetSuccess();
31987
      }
31988
      throw new IllegalStateException();
31989
    }
31990
 
31991
    public boolean isSet(int fieldID) {
31992
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31993
    }
31994
 
31995
    @Override
31996
    public boolean equals(Object that) {
31997
      if (that == null)
31998
        return false;
31999
      if (that instanceof markDoasAsPickedUp_result)
32000
        return this.equals((markDoasAsPickedUp_result)that);
32001
      return false;
32002
    }
32003
 
32004
    public boolean equals(markDoasAsPickedUp_result that) {
32005
      if (that == null)
32006
        return false;
32007
 
32008
      boolean this_present_success = true && this.isSetSuccess();
32009
      boolean that_present_success = true && that.isSetSuccess();
32010
      if (this_present_success || that_present_success) {
32011
        if (!(this_present_success && that_present_success))
32012
          return false;
32013
        if (!this.success.equals(that.success))
32014
          return false;
32015
      }
32016
 
32017
      return true;
32018
    }
32019
 
32020
    @Override
32021
    public int hashCode() {
32022
      return 0;
32023
    }
32024
 
32025
    public int compareTo(markDoasAsPickedUp_result other) {
32026
      if (!getClass().equals(other.getClass())) {
32027
        return getClass().getName().compareTo(other.getClass().getName());
32028
      }
32029
 
32030
      int lastComparison = 0;
32031
      markDoasAsPickedUp_result typedOther = (markDoasAsPickedUp_result)other;
32032
 
32033
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32034
      if (lastComparison != 0) {
32035
        return lastComparison;
32036
      }
32037
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32038
      if (lastComparison != 0) {
32039
        return lastComparison;
32040
      }
32041
      return 0;
32042
    }
32043
 
32044
    public void read(TProtocol iprot) throws TException {
32045
      TField field;
32046
      iprot.readStructBegin();
32047
      while (true)
32048
      {
32049
        field = iprot.readFieldBegin();
32050
        if (field.type == TType.STOP) { 
32051
          break;
32052
        }
32053
        _Fields fieldId = _Fields.findByThriftId(field.id);
32054
        if (fieldId == null) {
32055
          TProtocolUtil.skip(iprot, field.type);
32056
        } else {
32057
          switch (fieldId) {
32058
            case SUCCESS:
32059
              if (field.type == TType.LIST) {
32060
                {
32061
                  TList _list93 = iprot.readListBegin();
32062
                  this.success = new ArrayList<Order>(_list93.size);
32063
                  for (int _i94 = 0; _i94 < _list93.size; ++_i94)
32064
                  {
32065
                    Order _elem95;
32066
                    _elem95 = new Order();
32067
                    _elem95.read(iprot);
32068
                    this.success.add(_elem95);
32069
                  }
32070
                  iprot.readListEnd();
32071
                }
32072
              } else { 
32073
                TProtocolUtil.skip(iprot, field.type);
32074
              }
32075
              break;
32076
          }
32077
          iprot.readFieldEnd();
32078
        }
32079
      }
32080
      iprot.readStructEnd();
32081
      validate();
32082
    }
32083
 
32084
    public void write(TProtocol oprot) throws TException {
32085
      oprot.writeStructBegin(STRUCT_DESC);
32086
 
32087
      if (this.isSetSuccess()) {
32088
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32089
        {
32090
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
32091
          for (Order _iter96 : this.success)
32092
          {
32093
            _iter96.write(oprot);
32094
          }
32095
          oprot.writeListEnd();
32096
        }
32097
        oprot.writeFieldEnd();
32098
      }
32099
      oprot.writeFieldStop();
32100
      oprot.writeStructEnd();
32101
    }
32102
 
32103
    @Override
32104
    public String toString() {
32105
      StringBuilder sb = new StringBuilder("markDoasAsPickedUp_result(");
32106
      boolean first = true;
32107
 
32108
      sb.append("success:");
32109
      if (this.success == null) {
32110
        sb.append("null");
32111
      } else {
32112
        sb.append(this.success);
32113
      }
32114
      first = false;
32115
      sb.append(")");
32116
      return sb.toString();
32117
    }
32118
 
32119
    public void validate() throws TException {
32120
      // check for required fields
32121
    }
32122
 
32123
  }
32124
 
2615 chandransh 32125
  public static class receiveReturn_args implements TBase<receiveReturn_args._Fields>, java.io.Serializable, Cloneable, Comparable<receiveReturn_args>   {
32126
    private static final TStruct STRUCT_DESC = new TStruct("receiveReturn_args");
2590 chandransh 32127
 
32128
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
32129
 
32130
    private long orderId;
32131
 
32132
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32133
    public enum _Fields implements TFieldIdEnum {
32134
      ORDER_ID((short)1, "orderId");
32135
 
32136
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32138
 
32139
      static {
32140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32141
          byId.put((int)field._thriftId, field);
32142
          byName.put(field.getFieldName(), field);
32143
        }
32144
      }
32145
 
32146
      /**
32147
       * Find the _Fields constant that matches fieldId, or null if its not found.
32148
       */
32149
      public static _Fields findByThriftId(int fieldId) {
32150
        return byId.get(fieldId);
32151
      }
32152
 
32153
      /**
32154
       * Find the _Fields constant that matches fieldId, throwing an exception
32155
       * if it is not found.
32156
       */
32157
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32158
        _Fields fields = findByThriftId(fieldId);
32159
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32160
        return fields;
32161
      }
32162
 
32163
      /**
32164
       * Find the _Fields constant that matches name, or null if its not found.
32165
       */
32166
      public static _Fields findByName(String name) {
32167
        return byName.get(name);
32168
      }
32169
 
32170
      private final short _thriftId;
32171
      private final String _fieldName;
32172
 
32173
      _Fields(short thriftId, String fieldName) {
32174
        _thriftId = thriftId;
32175
        _fieldName = fieldName;
32176
      }
32177
 
32178
      public short getThriftFieldId() {
32179
        return _thriftId;
32180
      }
32181
 
32182
      public String getFieldName() {
32183
        return _fieldName;
32184
      }
32185
    }
32186
 
32187
    // isset id assignments
32188
    private static final int __ORDERID_ISSET_ID = 0;
32189
    private BitSet __isset_bit_vector = new BitSet(1);
32190
 
32191
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32192
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
32193
          new FieldValueMetaData(TType.I64)));
32194
    }});
32195
 
32196
    static {
2615 chandransh 32197
      FieldMetaData.addStructMetaDataMap(receiveReturn_args.class, metaDataMap);
2590 chandransh 32198
    }
32199
 
2615 chandransh 32200
    public receiveReturn_args() {
2590 chandransh 32201
    }
32202
 
2615 chandransh 32203
    public receiveReturn_args(
2590 chandransh 32204
      long orderId)
32205
    {
32206
      this();
32207
      this.orderId = orderId;
32208
      setOrderIdIsSet(true);
32209
    }
32210
 
32211
    /**
32212
     * Performs a deep copy on <i>other</i>.
32213
     */
2615 chandransh 32214
    public receiveReturn_args(receiveReturn_args other) {
2590 chandransh 32215
      __isset_bit_vector.clear();
32216
      __isset_bit_vector.or(other.__isset_bit_vector);
32217
      this.orderId = other.orderId;
32218
    }
32219
 
2615 chandransh 32220
    public receiveReturn_args deepCopy() {
32221
      return new receiveReturn_args(this);
2590 chandransh 32222
    }
32223
 
32224
    @Deprecated
2615 chandransh 32225
    public receiveReturn_args clone() {
32226
      return new receiveReturn_args(this);
2590 chandransh 32227
    }
32228
 
32229
    public long getOrderId() {
32230
      return this.orderId;
32231
    }
32232
 
2615 chandransh 32233
    public receiveReturn_args setOrderId(long orderId) {
2590 chandransh 32234
      this.orderId = orderId;
32235
      setOrderIdIsSet(true);
32236
      return this;
32237
    }
32238
 
32239
    public void unsetOrderId() {
32240
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
32241
    }
32242
 
32243
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
32244
    public boolean isSetOrderId() {
32245
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
32246
    }
32247
 
32248
    public void setOrderIdIsSet(boolean value) {
32249
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
32250
    }
32251
 
32252
    public void setFieldValue(_Fields field, Object value) {
32253
      switch (field) {
32254
      case ORDER_ID:
32255
        if (value == null) {
32256
          unsetOrderId();
32257
        } else {
32258
          setOrderId((Long)value);
32259
        }
32260
        break;
32261
 
32262
      }
32263
    }
32264
 
32265
    public void setFieldValue(int fieldID, Object value) {
32266
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32267
    }
32268
 
32269
    public Object getFieldValue(_Fields field) {
32270
      switch (field) {
32271
      case ORDER_ID:
32272
        return new Long(getOrderId());
32273
 
32274
      }
32275
      throw new IllegalStateException();
32276
    }
32277
 
32278
    public Object getFieldValue(int fieldId) {
32279
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32280
    }
32281
 
32282
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32283
    public boolean isSet(_Fields field) {
32284
      switch (field) {
32285
      case ORDER_ID:
32286
        return isSetOrderId();
32287
      }
32288
      throw new IllegalStateException();
32289
    }
32290
 
32291
    public boolean isSet(int fieldID) {
32292
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32293
    }
32294
 
32295
    @Override
32296
    public boolean equals(Object that) {
32297
      if (that == null)
32298
        return false;
2615 chandransh 32299
      if (that instanceof receiveReturn_args)
32300
        return this.equals((receiveReturn_args)that);
2590 chandransh 32301
      return false;
32302
    }
32303
 
2615 chandransh 32304
    public boolean equals(receiveReturn_args that) {
2590 chandransh 32305
      if (that == null)
32306
        return false;
32307
 
32308
      boolean this_present_orderId = true;
32309
      boolean that_present_orderId = true;
32310
      if (this_present_orderId || that_present_orderId) {
32311
        if (!(this_present_orderId && that_present_orderId))
32312
          return false;
32313
        if (this.orderId != that.orderId)
32314
          return false;
32315
      }
32316
 
32317
      return true;
32318
    }
32319
 
32320
    @Override
32321
    public int hashCode() {
32322
      return 0;
32323
    }
32324
 
2615 chandransh 32325
    public int compareTo(receiveReturn_args other) {
2590 chandransh 32326
      if (!getClass().equals(other.getClass())) {
32327
        return getClass().getName().compareTo(other.getClass().getName());
32328
      }
32329
 
32330
      int lastComparison = 0;
2615 chandransh 32331
      receiveReturn_args typedOther = (receiveReturn_args)other;
2590 chandransh 32332
 
32333
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
32334
      if (lastComparison != 0) {
32335
        return lastComparison;
32336
      }
32337
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
32338
      if (lastComparison != 0) {
32339
        return lastComparison;
32340
      }
32341
      return 0;
32342
    }
32343
 
32344
    public void read(TProtocol iprot) throws TException {
32345
      TField field;
32346
      iprot.readStructBegin();
32347
      while (true)
32348
      {
32349
        field = iprot.readFieldBegin();
32350
        if (field.type == TType.STOP) { 
32351
          break;
32352
        }
32353
        _Fields fieldId = _Fields.findByThriftId(field.id);
32354
        if (fieldId == null) {
32355
          TProtocolUtil.skip(iprot, field.type);
32356
        } else {
32357
          switch (fieldId) {
32358
            case ORDER_ID:
32359
              if (field.type == TType.I64) {
32360
                this.orderId = iprot.readI64();
32361
                setOrderIdIsSet(true);
32362
              } else { 
32363
                TProtocolUtil.skip(iprot, field.type);
32364
              }
32365
              break;
32366
          }
32367
          iprot.readFieldEnd();
32368
        }
32369
      }
32370
      iprot.readStructEnd();
32371
      validate();
32372
    }
32373
 
32374
    public void write(TProtocol oprot) throws TException {
32375
      validate();
32376
 
32377
      oprot.writeStructBegin(STRUCT_DESC);
32378
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
32379
      oprot.writeI64(this.orderId);
32380
      oprot.writeFieldEnd();
32381
      oprot.writeFieldStop();
32382
      oprot.writeStructEnd();
32383
    }
32384
 
32385
    @Override
32386
    public String toString() {
2615 chandransh 32387
      StringBuilder sb = new StringBuilder("receiveReturn_args(");
2590 chandransh 32388
      boolean first = true;
32389
 
32390
      sb.append("orderId:");
32391
      sb.append(this.orderId);
32392
      first = false;
32393
      sb.append(")");
32394
      return sb.toString();
32395
    }
32396
 
32397
    public void validate() throws TException {
32398
      // check for required fields
32399
    }
32400
 
32401
  }
32402
 
2615 chandransh 32403
  public static class receiveReturn_result implements TBase<receiveReturn_result._Fields>, java.io.Serializable, Cloneable, Comparable<receiveReturn_result>   {
32404
    private static final TStruct STRUCT_DESC = new TStruct("receiveReturn_result");
2590 chandransh 32405
 
32406
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
32407
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
32408
 
32409
    private boolean success;
32410
    private TransactionServiceException ex;
32411
 
32412
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32413
    public enum _Fields implements TFieldIdEnum {
32414
      SUCCESS((short)0, "success"),
32415
      EX((short)1, "ex");
32416
 
32417
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32418
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32419
 
32420
      static {
32421
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32422
          byId.put((int)field._thriftId, field);
32423
          byName.put(field.getFieldName(), field);
32424
        }
32425
      }
32426
 
32427
      /**
32428
       * Find the _Fields constant that matches fieldId, or null if its not found.
32429
       */
32430
      public static _Fields findByThriftId(int fieldId) {
32431
        return byId.get(fieldId);
32432
      }
32433
 
32434
      /**
32435
       * Find the _Fields constant that matches fieldId, throwing an exception
32436
       * if it is not found.
32437
       */
32438
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32439
        _Fields fields = findByThriftId(fieldId);
32440
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32441
        return fields;
32442
      }
32443
 
32444
      /**
32445
       * Find the _Fields constant that matches name, or null if its not found.
32446
       */
32447
      public static _Fields findByName(String name) {
32448
        return byName.get(name);
32449
      }
32450
 
32451
      private final short _thriftId;
32452
      private final String _fieldName;
32453
 
32454
      _Fields(short thriftId, String fieldName) {
32455
        _thriftId = thriftId;
32456
        _fieldName = fieldName;
32457
      }
32458
 
32459
      public short getThriftFieldId() {
32460
        return _thriftId;
32461
      }
32462
 
32463
      public String getFieldName() {
32464
        return _fieldName;
32465
      }
32466
    }
32467
 
32468
    // isset id assignments
32469
    private static final int __SUCCESS_ISSET_ID = 0;
32470
    private BitSet __isset_bit_vector = new BitSet(1);
32471
 
32472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32473
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
32474
          new FieldValueMetaData(TType.BOOL)));
32475
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
32476
          new FieldValueMetaData(TType.STRUCT)));
32477
    }});
32478
 
32479
    static {
2615 chandransh 32480
      FieldMetaData.addStructMetaDataMap(receiveReturn_result.class, metaDataMap);
2590 chandransh 32481
    }
32482
 
2615 chandransh 32483
    public receiveReturn_result() {
2590 chandransh 32484
    }
32485
 
2615 chandransh 32486
    public receiveReturn_result(
2590 chandransh 32487
      boolean success,
32488
      TransactionServiceException ex)
32489
    {
32490
      this();
32491
      this.success = success;
32492
      setSuccessIsSet(true);
32493
      this.ex = ex;
32494
    }
32495
 
32496
    /**
32497
     * Performs a deep copy on <i>other</i>.
32498
     */
2615 chandransh 32499
    public receiveReturn_result(receiveReturn_result other) {
2590 chandransh 32500
      __isset_bit_vector.clear();
32501
      __isset_bit_vector.or(other.__isset_bit_vector);
32502
      this.success = other.success;
32503
      if (other.isSetEx()) {
32504
        this.ex = new TransactionServiceException(other.ex);
32505
      }
32506
    }
32507
 
2615 chandransh 32508
    public receiveReturn_result deepCopy() {
32509
      return new receiveReturn_result(this);
2590 chandransh 32510
    }
32511
 
32512
    @Deprecated
2615 chandransh 32513
    public receiveReturn_result clone() {
32514
      return new receiveReturn_result(this);
2590 chandransh 32515
    }
32516
 
32517
    public boolean isSuccess() {
32518
      return this.success;
32519
    }
32520
 
2615 chandransh 32521
    public receiveReturn_result setSuccess(boolean success) {
2590 chandransh 32522
      this.success = success;
32523
      setSuccessIsSet(true);
32524
      return this;
32525
    }
32526
 
32527
    public void unsetSuccess() {
32528
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
32529
    }
32530
 
32531
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32532
    public boolean isSetSuccess() {
32533
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
32534
    }
32535
 
32536
    public void setSuccessIsSet(boolean value) {
32537
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
32538
    }
32539
 
32540
    public TransactionServiceException getEx() {
32541
      return this.ex;
32542
    }
32543
 
2615 chandransh 32544
    public receiveReturn_result setEx(TransactionServiceException ex) {
2590 chandransh 32545
      this.ex = ex;
32546
      return this;
32547
    }
32548
 
32549
    public void unsetEx() {
32550
      this.ex = null;
32551
    }
32552
 
32553
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
32554
    public boolean isSetEx() {
32555
      return this.ex != null;
32556
    }
32557
 
32558
    public void setExIsSet(boolean value) {
32559
      if (!value) {
32560
        this.ex = null;
32561
      }
32562
    }
32563
 
32564
    public void setFieldValue(_Fields field, Object value) {
32565
      switch (field) {
32566
      case SUCCESS:
32567
        if (value == null) {
32568
          unsetSuccess();
32569
        } else {
32570
          setSuccess((Boolean)value);
32571
        }
32572
        break;
32573
 
32574
      case EX:
32575
        if (value == null) {
32576
          unsetEx();
32577
        } else {
32578
          setEx((TransactionServiceException)value);
32579
        }
32580
        break;
32581
 
32582
      }
32583
    }
32584
 
32585
    public void setFieldValue(int fieldID, Object value) {
32586
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32587
    }
32588
 
32589
    public Object getFieldValue(_Fields field) {
32590
      switch (field) {
32591
      case SUCCESS:
32592
        return new Boolean(isSuccess());
32593
 
32594
      case EX:
32595
        return getEx();
32596
 
32597
      }
32598
      throw new IllegalStateException();
32599
    }
32600
 
32601
    public Object getFieldValue(int fieldId) {
32602
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32603
    }
32604
 
32605
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32606
    public boolean isSet(_Fields field) {
32607
      switch (field) {
32608
      case SUCCESS:
32609
        return isSetSuccess();
32610
      case EX:
32611
        return isSetEx();
32612
      }
32613
      throw new IllegalStateException();
32614
    }
32615
 
32616
    public boolean isSet(int fieldID) {
32617
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32618
    }
32619
 
32620
    @Override
32621
    public boolean equals(Object that) {
32622
      if (that == null)
32623
        return false;
2615 chandransh 32624
      if (that instanceof receiveReturn_result)
32625
        return this.equals((receiveReturn_result)that);
2590 chandransh 32626
      return false;
32627
    }
32628
 
2615 chandransh 32629
    public boolean equals(receiveReturn_result that) {
2590 chandransh 32630
      if (that == null)
32631
        return false;
32632
 
32633
      boolean this_present_success = true;
32634
      boolean that_present_success = true;
32635
      if (this_present_success || that_present_success) {
32636
        if (!(this_present_success && that_present_success))
32637
          return false;
32638
        if (this.success != that.success)
32639
          return false;
32640
      }
32641
 
32642
      boolean this_present_ex = true && this.isSetEx();
32643
      boolean that_present_ex = true && that.isSetEx();
32644
      if (this_present_ex || that_present_ex) {
32645
        if (!(this_present_ex && that_present_ex))
32646
          return false;
32647
        if (!this.ex.equals(that.ex))
32648
          return false;
32649
      }
32650
 
32651
      return true;
32652
    }
32653
 
32654
    @Override
32655
    public int hashCode() {
32656
      return 0;
32657
    }
32658
 
2615 chandransh 32659
    public int compareTo(receiveReturn_result other) {
2590 chandransh 32660
      if (!getClass().equals(other.getClass())) {
32661
        return getClass().getName().compareTo(other.getClass().getName());
32662
      }
32663
 
32664
      int lastComparison = 0;
2615 chandransh 32665
      receiveReturn_result typedOther = (receiveReturn_result)other;
2590 chandransh 32666
 
32667
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32668
      if (lastComparison != 0) {
32669
        return lastComparison;
32670
      }
32671
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32672
      if (lastComparison != 0) {
32673
        return lastComparison;
32674
      }
32675
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
32676
      if (lastComparison != 0) {
32677
        return lastComparison;
32678
      }
32679
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
32680
      if (lastComparison != 0) {
32681
        return lastComparison;
32682
      }
32683
      return 0;
32684
    }
32685
 
32686
    public void read(TProtocol iprot) throws TException {
32687
      TField field;
32688
      iprot.readStructBegin();
32689
      while (true)
32690
      {
32691
        field = iprot.readFieldBegin();
32692
        if (field.type == TType.STOP) { 
32693
          break;
32694
        }
32695
        _Fields fieldId = _Fields.findByThriftId(field.id);
32696
        if (fieldId == null) {
32697
          TProtocolUtil.skip(iprot, field.type);
32698
        } else {
32699
          switch (fieldId) {
32700
            case SUCCESS:
32701
              if (field.type == TType.BOOL) {
32702
                this.success = iprot.readBool();
32703
                setSuccessIsSet(true);
32704
              } else { 
32705
                TProtocolUtil.skip(iprot, field.type);
32706
              }
32707
              break;
32708
            case EX:
32709
              if (field.type == TType.STRUCT) {
32710
                this.ex = new TransactionServiceException();
32711
                this.ex.read(iprot);
32712
              } else { 
32713
                TProtocolUtil.skip(iprot, field.type);
32714
              }
32715
              break;
32716
          }
32717
          iprot.readFieldEnd();
32718
        }
32719
      }
32720
      iprot.readStructEnd();
32721
      validate();
32722
    }
32723
 
32724
    public void write(TProtocol oprot) throws TException {
32725
      oprot.writeStructBegin(STRUCT_DESC);
32726
 
32727
      if (this.isSetSuccess()) {
32728
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32729
        oprot.writeBool(this.success);
32730
        oprot.writeFieldEnd();
32731
      } else if (this.isSetEx()) {
32732
        oprot.writeFieldBegin(EX_FIELD_DESC);
32733
        this.ex.write(oprot);
32734
        oprot.writeFieldEnd();
32735
      }
32736
      oprot.writeFieldStop();
32737
      oprot.writeStructEnd();
32738
    }
32739
 
32740
    @Override
32741
    public String toString() {
2615 chandransh 32742
      StringBuilder sb = new StringBuilder("receiveReturn_result(");
2590 chandransh 32743
      boolean first = true;
32744
 
32745
      sb.append("success:");
32746
      sb.append(this.success);
32747
      first = false;
32748
      if (!first) sb.append(", ");
32749
      sb.append("ex:");
32750
      if (this.ex == null) {
32751
        sb.append("null");
32752
      } else {
32753
        sb.append(this.ex);
32754
      }
32755
      first = false;
32756
      sb.append(")");
32757
      return sb.toString();
32758
    }
32759
 
32760
    public void validate() throws TException {
32761
      // check for required fields
32762
    }
32763
 
32764
  }
32765
 
32766
  public static class validateDoa_args implements TBase<validateDoa_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_args>   {
32767
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_args");
32768
 
32769
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
32770
    private static final TField IS_VALID_FIELD_DESC = new TField("isValid", TType.BOOL, (short)2);
32771
 
32772
    private long orderId;
32773
    private boolean isValid;
32774
 
32775
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32776
    public enum _Fields implements TFieldIdEnum {
32777
      ORDER_ID((short)1, "orderId"),
32778
      IS_VALID((short)2, "isValid");
32779
 
32780
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32781
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32782
 
32783
      static {
32784
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32785
          byId.put((int)field._thriftId, field);
32786
          byName.put(field.getFieldName(), field);
32787
        }
32788
      }
32789
 
32790
      /**
32791
       * Find the _Fields constant that matches fieldId, or null if its not found.
32792
       */
32793
      public static _Fields findByThriftId(int fieldId) {
32794
        return byId.get(fieldId);
32795
      }
32796
 
32797
      /**
32798
       * Find the _Fields constant that matches fieldId, throwing an exception
32799
       * if it is not found.
32800
       */
32801
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32802
        _Fields fields = findByThriftId(fieldId);
32803
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32804
        return fields;
32805
      }
32806
 
32807
      /**
32808
       * Find the _Fields constant that matches name, or null if its not found.
32809
       */
32810
      public static _Fields findByName(String name) {
32811
        return byName.get(name);
32812
      }
32813
 
32814
      private final short _thriftId;
32815
      private final String _fieldName;
32816
 
32817
      _Fields(short thriftId, String fieldName) {
32818
        _thriftId = thriftId;
32819
        _fieldName = fieldName;
32820
      }
32821
 
32822
      public short getThriftFieldId() {
32823
        return _thriftId;
32824
      }
32825
 
32826
      public String getFieldName() {
32827
        return _fieldName;
32828
      }
32829
    }
32830
 
32831
    // isset id assignments
32832
    private static final int __ORDERID_ISSET_ID = 0;
32833
    private static final int __ISVALID_ISSET_ID = 1;
32834
    private BitSet __isset_bit_vector = new BitSet(2);
32835
 
32836
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32837
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
32838
          new FieldValueMetaData(TType.I64)));
32839
      put(_Fields.IS_VALID, new FieldMetaData("isValid", TFieldRequirementType.DEFAULT, 
32840
          new FieldValueMetaData(TType.BOOL)));
32841
    }});
32842
 
32843
    static {
32844
      FieldMetaData.addStructMetaDataMap(validateDoa_args.class, metaDataMap);
32845
    }
32846
 
32847
    public validateDoa_args() {
32848
    }
32849
 
32850
    public validateDoa_args(
32851
      long orderId,
32852
      boolean isValid)
32853
    {
32854
      this();
32855
      this.orderId = orderId;
32856
      setOrderIdIsSet(true);
32857
      this.isValid = isValid;
32858
      setIsValidIsSet(true);
32859
    }
32860
 
32861
    /**
32862
     * Performs a deep copy on <i>other</i>.
32863
     */
32864
    public validateDoa_args(validateDoa_args other) {
32865
      __isset_bit_vector.clear();
32866
      __isset_bit_vector.or(other.__isset_bit_vector);
32867
      this.orderId = other.orderId;
32868
      this.isValid = other.isValid;
32869
    }
32870
 
32871
    public validateDoa_args deepCopy() {
32872
      return new validateDoa_args(this);
32873
    }
32874
 
32875
    @Deprecated
32876
    public validateDoa_args clone() {
32877
      return new validateDoa_args(this);
32878
    }
32879
 
32880
    public long getOrderId() {
32881
      return this.orderId;
32882
    }
32883
 
32884
    public validateDoa_args setOrderId(long orderId) {
32885
      this.orderId = orderId;
32886
      setOrderIdIsSet(true);
32887
      return this;
32888
    }
32889
 
32890
    public void unsetOrderId() {
32891
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
32892
    }
32893
 
32894
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
32895
    public boolean isSetOrderId() {
32896
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
32897
    }
32898
 
32899
    public void setOrderIdIsSet(boolean value) {
32900
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
32901
    }
32902
 
32903
    public boolean isIsValid() {
32904
      return this.isValid;
32905
    }
32906
 
32907
    public validateDoa_args setIsValid(boolean isValid) {
32908
      this.isValid = isValid;
32909
      setIsValidIsSet(true);
32910
      return this;
32911
    }
32912
 
32913
    public void unsetIsValid() {
32914
      __isset_bit_vector.clear(__ISVALID_ISSET_ID);
32915
    }
32916
 
32917
    /** Returns true if field isValid is set (has been asigned a value) and false otherwise */
32918
    public boolean isSetIsValid() {
32919
      return __isset_bit_vector.get(__ISVALID_ISSET_ID);
32920
    }
32921
 
32922
    public void setIsValidIsSet(boolean value) {
32923
      __isset_bit_vector.set(__ISVALID_ISSET_ID, value);
32924
    }
32925
 
32926
    public void setFieldValue(_Fields field, Object value) {
32927
      switch (field) {
32928
      case ORDER_ID:
32929
        if (value == null) {
32930
          unsetOrderId();
32931
        } else {
32932
          setOrderId((Long)value);
32933
        }
32934
        break;
32935
 
32936
      case IS_VALID:
32937
        if (value == null) {
32938
          unsetIsValid();
32939
        } else {
32940
          setIsValid((Boolean)value);
32941
        }
32942
        break;
32943
 
32944
      }
32945
    }
32946
 
32947
    public void setFieldValue(int fieldID, Object value) {
32948
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32949
    }
32950
 
32951
    public Object getFieldValue(_Fields field) {
32952
      switch (field) {
32953
      case ORDER_ID:
32954
        return new Long(getOrderId());
32955
 
32956
      case IS_VALID:
32957
        return new Boolean(isIsValid());
32958
 
32959
      }
32960
      throw new IllegalStateException();
32961
    }
32962
 
32963
    public Object getFieldValue(int fieldId) {
32964
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32965
    }
32966
 
32967
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32968
    public boolean isSet(_Fields field) {
32969
      switch (field) {
32970
      case ORDER_ID:
32971
        return isSetOrderId();
32972
      case IS_VALID:
32973
        return isSetIsValid();
32974
      }
32975
      throw new IllegalStateException();
32976
    }
32977
 
32978
    public boolean isSet(int fieldID) {
32979
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32980
    }
32981
 
32982
    @Override
32983
    public boolean equals(Object that) {
32984
      if (that == null)
32985
        return false;
32986
      if (that instanceof validateDoa_args)
32987
        return this.equals((validateDoa_args)that);
32988
      return false;
32989
    }
32990
 
32991
    public boolean equals(validateDoa_args that) {
32992
      if (that == null)
32993
        return false;
32994
 
32995
      boolean this_present_orderId = true;
32996
      boolean that_present_orderId = true;
32997
      if (this_present_orderId || that_present_orderId) {
32998
        if (!(this_present_orderId && that_present_orderId))
32999
          return false;
33000
        if (this.orderId != that.orderId)
33001
          return false;
33002
      }
33003
 
33004
      boolean this_present_isValid = true;
33005
      boolean that_present_isValid = true;
33006
      if (this_present_isValid || that_present_isValid) {
33007
        if (!(this_present_isValid && that_present_isValid))
33008
          return false;
33009
        if (this.isValid != that.isValid)
33010
          return false;
33011
      }
33012
 
33013
      return true;
33014
    }
33015
 
33016
    @Override
33017
    public int hashCode() {
33018
      return 0;
33019
    }
33020
 
33021
    public int compareTo(validateDoa_args other) {
33022
      if (!getClass().equals(other.getClass())) {
33023
        return getClass().getName().compareTo(other.getClass().getName());
33024
      }
33025
 
33026
      int lastComparison = 0;
33027
      validateDoa_args typedOther = (validateDoa_args)other;
33028
 
33029
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
33030
      if (lastComparison != 0) {
33031
        return lastComparison;
33032
      }
33033
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
33034
      if (lastComparison != 0) {
33035
        return lastComparison;
33036
      }
33037
      lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(isSetIsValid());
33038
      if (lastComparison != 0) {
33039
        return lastComparison;
33040
      }
33041
      lastComparison = TBaseHelper.compareTo(isValid, typedOther.isValid);
33042
      if (lastComparison != 0) {
33043
        return lastComparison;
33044
      }
33045
      return 0;
33046
    }
33047
 
33048
    public void read(TProtocol iprot) throws TException {
33049
      TField field;
33050
      iprot.readStructBegin();
33051
      while (true)
33052
      {
33053
        field = iprot.readFieldBegin();
33054
        if (field.type == TType.STOP) { 
33055
          break;
33056
        }
33057
        _Fields fieldId = _Fields.findByThriftId(field.id);
33058
        if (fieldId == null) {
33059
          TProtocolUtil.skip(iprot, field.type);
33060
        } else {
33061
          switch (fieldId) {
33062
            case ORDER_ID:
33063
              if (field.type == TType.I64) {
33064
                this.orderId = iprot.readI64();
33065
                setOrderIdIsSet(true);
33066
              } else { 
33067
                TProtocolUtil.skip(iprot, field.type);
33068
              }
33069
              break;
33070
            case IS_VALID:
33071
              if (field.type == TType.BOOL) {
33072
                this.isValid = iprot.readBool();
33073
                setIsValidIsSet(true);
33074
              } else { 
33075
                TProtocolUtil.skip(iprot, field.type);
33076
              }
33077
              break;
33078
          }
33079
          iprot.readFieldEnd();
33080
        }
33081
      }
33082
      iprot.readStructEnd();
33083
      validate();
33084
    }
33085
 
33086
    public void write(TProtocol oprot) throws TException {
33087
      validate();
33088
 
33089
      oprot.writeStructBegin(STRUCT_DESC);
33090
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
33091
      oprot.writeI64(this.orderId);
33092
      oprot.writeFieldEnd();
33093
      oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
33094
      oprot.writeBool(this.isValid);
33095
      oprot.writeFieldEnd();
33096
      oprot.writeFieldStop();
33097
      oprot.writeStructEnd();
33098
    }
33099
 
33100
    @Override
33101
    public String toString() {
33102
      StringBuilder sb = new StringBuilder("validateDoa_args(");
33103
      boolean first = true;
33104
 
33105
      sb.append("orderId:");
33106
      sb.append(this.orderId);
33107
      first = false;
33108
      if (!first) sb.append(", ");
33109
      sb.append("isValid:");
33110
      sb.append(this.isValid);
33111
      first = false;
33112
      sb.append(")");
33113
      return sb.toString();
33114
    }
33115
 
33116
    public void validate() throws TException {
33117
      // check for required fields
33118
    }
33119
 
33120
  }
33121
 
33122
  public static class validateDoa_result implements TBase<validateDoa_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_result>   {
33123
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_result");
33124
 
33125
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
33126
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
33127
 
33128
    private boolean success;
33129
    private TransactionServiceException ex;
33130
 
33131
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33132
    public enum _Fields implements TFieldIdEnum {
33133
      SUCCESS((short)0, "success"),
33134
      EX((short)1, "ex");
33135
 
33136
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33138
 
33139
      static {
33140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33141
          byId.put((int)field._thriftId, field);
33142
          byName.put(field.getFieldName(), field);
33143
        }
33144
      }
33145
 
33146
      /**
33147
       * Find the _Fields constant that matches fieldId, or null if its not found.
33148
       */
33149
      public static _Fields findByThriftId(int fieldId) {
33150
        return byId.get(fieldId);
33151
      }
33152
 
33153
      /**
33154
       * Find the _Fields constant that matches fieldId, throwing an exception
33155
       * if it is not found.
33156
       */
33157
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33158
        _Fields fields = findByThriftId(fieldId);
33159
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33160
        return fields;
33161
      }
33162
 
33163
      /**
33164
       * Find the _Fields constant that matches name, or null if its not found.
33165
       */
33166
      public static _Fields findByName(String name) {
33167
        return byName.get(name);
33168
      }
33169
 
33170
      private final short _thriftId;
33171
      private final String _fieldName;
33172
 
33173
      _Fields(short thriftId, String fieldName) {
33174
        _thriftId = thriftId;
33175
        _fieldName = fieldName;
33176
      }
33177
 
33178
      public short getThriftFieldId() {
33179
        return _thriftId;
33180
      }
33181
 
33182
      public String getFieldName() {
33183
        return _fieldName;
33184
      }
33185
    }
33186
 
33187
    // isset id assignments
33188
    private static final int __SUCCESS_ISSET_ID = 0;
33189
    private BitSet __isset_bit_vector = new BitSet(1);
33190
 
33191
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33192
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
33193
          new FieldValueMetaData(TType.BOOL)));
33194
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
33195
          new FieldValueMetaData(TType.STRUCT)));
33196
    }});
33197
 
33198
    static {
33199
      FieldMetaData.addStructMetaDataMap(validateDoa_result.class, metaDataMap);
33200
    }
33201
 
33202
    public validateDoa_result() {
33203
    }
33204
 
33205
    public validateDoa_result(
33206
      boolean success,
33207
      TransactionServiceException ex)
33208
    {
33209
      this();
33210
      this.success = success;
33211
      setSuccessIsSet(true);
33212
      this.ex = ex;
33213
    }
33214
 
33215
    /**
33216
     * Performs a deep copy on <i>other</i>.
33217
     */
33218
    public validateDoa_result(validateDoa_result other) {
33219
      __isset_bit_vector.clear();
33220
      __isset_bit_vector.or(other.__isset_bit_vector);
33221
      this.success = other.success;
33222
      if (other.isSetEx()) {
33223
        this.ex = new TransactionServiceException(other.ex);
33224
      }
33225
    }
33226
 
33227
    public validateDoa_result deepCopy() {
33228
      return new validateDoa_result(this);
33229
    }
33230
 
33231
    @Deprecated
33232
    public validateDoa_result clone() {
33233
      return new validateDoa_result(this);
33234
    }
33235
 
33236
    public boolean isSuccess() {
33237
      return this.success;
33238
    }
33239
 
33240
    public validateDoa_result setSuccess(boolean success) {
33241
      this.success = success;
33242
      setSuccessIsSet(true);
33243
      return this;
33244
    }
33245
 
33246
    public void unsetSuccess() {
33247
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
33248
    }
33249
 
33250
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
33251
    public boolean isSetSuccess() {
33252
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
33253
    }
33254
 
33255
    public void setSuccessIsSet(boolean value) {
33256
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
33257
    }
33258
 
33259
    public TransactionServiceException getEx() {
33260
      return this.ex;
33261
    }
33262
 
33263
    public validateDoa_result setEx(TransactionServiceException ex) {
33264
      this.ex = ex;
33265
      return this;
33266
    }
33267
 
33268
    public void unsetEx() {
33269
      this.ex = null;
33270
    }
33271
 
33272
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
33273
    public boolean isSetEx() {
33274
      return this.ex != null;
33275
    }
33276
 
33277
    public void setExIsSet(boolean value) {
33278
      if (!value) {
33279
        this.ex = null;
33280
      }
33281
    }
33282
 
33283
    public void setFieldValue(_Fields field, Object value) {
33284
      switch (field) {
33285
      case SUCCESS:
33286
        if (value == null) {
33287
          unsetSuccess();
33288
        } else {
33289
          setSuccess((Boolean)value);
33290
        }
33291
        break;
33292
 
33293
      case EX:
33294
        if (value == null) {
33295
          unsetEx();
33296
        } else {
33297
          setEx((TransactionServiceException)value);
33298
        }
33299
        break;
33300
 
33301
      }
33302
    }
33303
 
33304
    public void setFieldValue(int fieldID, Object value) {
33305
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33306
    }
33307
 
33308
    public Object getFieldValue(_Fields field) {
33309
      switch (field) {
33310
      case SUCCESS:
33311
        return new Boolean(isSuccess());
33312
 
33313
      case EX:
33314
        return getEx();
33315
 
33316
      }
33317
      throw new IllegalStateException();
33318
    }
33319
 
33320
    public Object getFieldValue(int fieldId) {
33321
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33322
    }
33323
 
33324
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33325
    public boolean isSet(_Fields field) {
33326
      switch (field) {
33327
      case SUCCESS:
33328
        return isSetSuccess();
33329
      case EX:
33330
        return isSetEx();
33331
      }
33332
      throw new IllegalStateException();
33333
    }
33334
 
33335
    public boolean isSet(int fieldID) {
33336
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33337
    }
33338
 
33339
    @Override
33340
    public boolean equals(Object that) {
33341
      if (that == null)
33342
        return false;
33343
      if (that instanceof validateDoa_result)
33344
        return this.equals((validateDoa_result)that);
33345
      return false;
33346
    }
33347
 
33348
    public boolean equals(validateDoa_result that) {
33349
      if (that == null)
33350
        return false;
33351
 
33352
      boolean this_present_success = true;
33353
      boolean that_present_success = true;
33354
      if (this_present_success || that_present_success) {
33355
        if (!(this_present_success && that_present_success))
33356
          return false;
33357
        if (this.success != that.success)
33358
          return false;
33359
      }
33360
 
33361
      boolean this_present_ex = true && this.isSetEx();
33362
      boolean that_present_ex = true && that.isSetEx();
33363
      if (this_present_ex || that_present_ex) {
33364
        if (!(this_present_ex && that_present_ex))
33365
          return false;
33366
        if (!this.ex.equals(that.ex))
33367
          return false;
33368
      }
33369
 
33370
      return true;
33371
    }
33372
 
33373
    @Override
33374
    public int hashCode() {
33375
      return 0;
33376
    }
33377
 
33378
    public int compareTo(validateDoa_result other) {
33379
      if (!getClass().equals(other.getClass())) {
33380
        return getClass().getName().compareTo(other.getClass().getName());
33381
      }
33382
 
33383
      int lastComparison = 0;
33384
      validateDoa_result typedOther = (validateDoa_result)other;
33385
 
33386
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
33387
      if (lastComparison != 0) {
33388
        return lastComparison;
33389
      }
33390
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
33391
      if (lastComparison != 0) {
33392
        return lastComparison;
33393
      }
33394
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
33395
      if (lastComparison != 0) {
33396
        return lastComparison;
33397
      }
33398
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
33399
      if (lastComparison != 0) {
33400
        return lastComparison;
33401
      }
33402
      return 0;
33403
    }
33404
 
33405
    public void read(TProtocol iprot) throws TException {
33406
      TField field;
33407
      iprot.readStructBegin();
33408
      while (true)
33409
      {
33410
        field = iprot.readFieldBegin();
33411
        if (field.type == TType.STOP) { 
33412
          break;
33413
        }
33414
        _Fields fieldId = _Fields.findByThriftId(field.id);
33415
        if (fieldId == null) {
33416
          TProtocolUtil.skip(iprot, field.type);
33417
        } else {
33418
          switch (fieldId) {
33419
            case SUCCESS:
33420
              if (field.type == TType.BOOL) {
33421
                this.success = iprot.readBool();
33422
                setSuccessIsSet(true);
33423
              } else { 
33424
                TProtocolUtil.skip(iprot, field.type);
33425
              }
33426
              break;
33427
            case EX:
33428
              if (field.type == TType.STRUCT) {
33429
                this.ex = new TransactionServiceException();
33430
                this.ex.read(iprot);
33431
              } else { 
33432
                TProtocolUtil.skip(iprot, field.type);
33433
              }
33434
              break;
33435
          }
33436
          iprot.readFieldEnd();
33437
        }
33438
      }
33439
      iprot.readStructEnd();
33440
      validate();
33441
    }
33442
 
33443
    public void write(TProtocol oprot) throws TException {
33444
      oprot.writeStructBegin(STRUCT_DESC);
33445
 
33446
      if (this.isSetSuccess()) {
33447
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
33448
        oprot.writeBool(this.success);
33449
        oprot.writeFieldEnd();
33450
      } else if (this.isSetEx()) {
33451
        oprot.writeFieldBegin(EX_FIELD_DESC);
33452
        this.ex.write(oprot);
33453
        oprot.writeFieldEnd();
33454
      }
33455
      oprot.writeFieldStop();
33456
      oprot.writeStructEnd();
33457
    }
33458
 
33459
    @Override
33460
    public String toString() {
33461
      StringBuilder sb = new StringBuilder("validateDoa_result(");
33462
      boolean first = true;
33463
 
33464
      sb.append("success:");
33465
      sb.append(this.success);
33466
      first = false;
33467
      if (!first) sb.append(", ");
33468
      sb.append("ex:");
33469
      if (this.ex == null) {
33470
        sb.append("null");
33471
      } else {
33472
        sb.append(this.ex);
33473
      }
33474
      first = false;
33475
      sb.append(")");
33476
      return sb.toString();
33477
    }
33478
 
33479
    public void validate() throws TException {
33480
      // check for required fields
33481
    }
33482
 
33483
  }
33484
 
2615 chandransh 33485
  public static class reshipOrder_args implements TBase<reshipOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<reshipOrder_args>   {
33486
    private static final TStruct STRUCT_DESC = new TStruct("reshipOrder_args");
33487
 
33488
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
33489
 
33490
    private long orderId;
33491
 
33492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33493
    public enum _Fields implements TFieldIdEnum {
33494
      ORDER_ID((short)1, "orderId");
33495
 
33496
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33498
 
33499
      static {
33500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33501
          byId.put((int)field._thriftId, field);
33502
          byName.put(field.getFieldName(), field);
33503
        }
33504
      }
33505
 
33506
      /**
33507
       * Find the _Fields constant that matches fieldId, or null if its not found.
33508
       */
33509
      public static _Fields findByThriftId(int fieldId) {
33510
        return byId.get(fieldId);
33511
      }
33512
 
33513
      /**
33514
       * Find the _Fields constant that matches fieldId, throwing an exception
33515
       * if it is not found.
33516
       */
33517
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33518
        _Fields fields = findByThriftId(fieldId);
33519
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33520
        return fields;
33521
      }
33522
 
33523
      /**
33524
       * Find the _Fields constant that matches name, or null if its not found.
33525
       */
33526
      public static _Fields findByName(String name) {
33527
        return byName.get(name);
33528
      }
33529
 
33530
      private final short _thriftId;
33531
      private final String _fieldName;
33532
 
33533
      _Fields(short thriftId, String fieldName) {
33534
        _thriftId = thriftId;
33535
        _fieldName = fieldName;
33536
      }
33537
 
33538
      public short getThriftFieldId() {
33539
        return _thriftId;
33540
      }
33541
 
33542
      public String getFieldName() {
33543
        return _fieldName;
33544
      }
33545
    }
33546
 
33547
    // isset id assignments
33548
    private static final int __ORDERID_ISSET_ID = 0;
33549
    private BitSet __isset_bit_vector = new BitSet(1);
33550
 
33551
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33552
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
33553
          new FieldValueMetaData(TType.I64)));
33554
    }});
33555
 
33556
    static {
33557
      FieldMetaData.addStructMetaDataMap(reshipOrder_args.class, metaDataMap);
33558
    }
33559
 
33560
    public reshipOrder_args() {
33561
    }
33562
 
33563
    public reshipOrder_args(
33564
      long orderId)
33565
    {
33566
      this();
33567
      this.orderId = orderId;
33568
      setOrderIdIsSet(true);
33569
    }
33570
 
33571
    /**
33572
     * Performs a deep copy on <i>other</i>.
33573
     */
33574
    public reshipOrder_args(reshipOrder_args other) {
33575
      __isset_bit_vector.clear();
33576
      __isset_bit_vector.or(other.__isset_bit_vector);
33577
      this.orderId = other.orderId;
33578
    }
33579
 
33580
    public reshipOrder_args deepCopy() {
33581
      return new reshipOrder_args(this);
33582
    }
33583
 
33584
    @Deprecated
33585
    public reshipOrder_args clone() {
33586
      return new reshipOrder_args(this);
33587
    }
33588
 
33589
    public long getOrderId() {
33590
      return this.orderId;
33591
    }
33592
 
33593
    public reshipOrder_args setOrderId(long orderId) {
33594
      this.orderId = orderId;
33595
      setOrderIdIsSet(true);
33596
      return this;
33597
    }
33598
 
33599
    public void unsetOrderId() {
33600
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
33601
    }
33602
 
33603
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
33604
    public boolean isSetOrderId() {
33605
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
33606
    }
33607
 
33608
    public void setOrderIdIsSet(boolean value) {
33609
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
33610
    }
33611
 
33612
    public void setFieldValue(_Fields field, Object value) {
33613
      switch (field) {
33614
      case ORDER_ID:
33615
        if (value == null) {
33616
          unsetOrderId();
33617
        } else {
33618
          setOrderId((Long)value);
33619
        }
33620
        break;
33621
 
33622
      }
33623
    }
33624
 
33625
    public void setFieldValue(int fieldID, Object value) {
33626
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33627
    }
33628
 
33629
    public Object getFieldValue(_Fields field) {
33630
      switch (field) {
33631
      case ORDER_ID:
33632
        return new Long(getOrderId());
33633
 
33634
      }
33635
      throw new IllegalStateException();
33636
    }
33637
 
33638
    public Object getFieldValue(int fieldId) {
33639
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33640
    }
33641
 
33642
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33643
    public boolean isSet(_Fields field) {
33644
      switch (field) {
33645
      case ORDER_ID:
33646
        return isSetOrderId();
33647
      }
33648
      throw new IllegalStateException();
33649
    }
33650
 
33651
    public boolean isSet(int fieldID) {
33652
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33653
    }
33654
 
33655
    @Override
33656
    public boolean equals(Object that) {
33657
      if (that == null)
33658
        return false;
33659
      if (that instanceof reshipOrder_args)
33660
        return this.equals((reshipOrder_args)that);
33661
      return false;
33662
    }
33663
 
33664
    public boolean equals(reshipOrder_args that) {
33665
      if (that == null)
33666
        return false;
33667
 
33668
      boolean this_present_orderId = true;
33669
      boolean that_present_orderId = true;
33670
      if (this_present_orderId || that_present_orderId) {
33671
        if (!(this_present_orderId && that_present_orderId))
33672
          return false;
33673
        if (this.orderId != that.orderId)
33674
          return false;
33675
      }
33676
 
33677
      return true;
33678
    }
33679
 
33680
    @Override
33681
    public int hashCode() {
33682
      return 0;
33683
    }
33684
 
33685
    public int compareTo(reshipOrder_args other) {
33686
      if (!getClass().equals(other.getClass())) {
33687
        return getClass().getName().compareTo(other.getClass().getName());
33688
      }
33689
 
33690
      int lastComparison = 0;
33691
      reshipOrder_args typedOther = (reshipOrder_args)other;
33692
 
33693
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
33694
      if (lastComparison != 0) {
33695
        return lastComparison;
33696
      }
33697
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
33698
      if (lastComparison != 0) {
33699
        return lastComparison;
33700
      }
33701
      return 0;
33702
    }
33703
 
33704
    public void read(TProtocol iprot) throws TException {
33705
      TField field;
33706
      iprot.readStructBegin();
33707
      while (true)
33708
      {
33709
        field = iprot.readFieldBegin();
33710
        if (field.type == TType.STOP) { 
33711
          break;
33712
        }
33713
        _Fields fieldId = _Fields.findByThriftId(field.id);
33714
        if (fieldId == null) {
33715
          TProtocolUtil.skip(iprot, field.type);
33716
        } else {
33717
          switch (fieldId) {
33718
            case ORDER_ID:
33719
              if (field.type == TType.I64) {
33720
                this.orderId = iprot.readI64();
33721
                setOrderIdIsSet(true);
33722
              } else { 
33723
                TProtocolUtil.skip(iprot, field.type);
33724
              }
33725
              break;
33726
          }
33727
          iprot.readFieldEnd();
33728
        }
33729
      }
33730
      iprot.readStructEnd();
33731
      validate();
33732
    }
33733
 
33734
    public void write(TProtocol oprot) throws TException {
33735
      validate();
33736
 
33737
      oprot.writeStructBegin(STRUCT_DESC);
33738
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
33739
      oprot.writeI64(this.orderId);
33740
      oprot.writeFieldEnd();
33741
      oprot.writeFieldStop();
33742
      oprot.writeStructEnd();
33743
    }
33744
 
33745
    @Override
33746
    public String toString() {
33747
      StringBuilder sb = new StringBuilder("reshipOrder_args(");
33748
      boolean first = true;
33749
 
33750
      sb.append("orderId:");
33751
      sb.append(this.orderId);
33752
      first = false;
33753
      sb.append(")");
33754
      return sb.toString();
33755
    }
33756
 
33757
    public void validate() throws TException {
33758
      // check for required fields
33759
    }
33760
 
33761
  }
33762
 
33763
  public static class reshipOrder_result implements TBase<reshipOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<reshipOrder_result>   {
33764
    private static final TStruct STRUCT_DESC = new TStruct("reshipOrder_result");
33765
 
33766
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
33767
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
33768
 
33769
    private long success;
33770
    private TransactionServiceException ex;
33771
 
33772
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33773
    public enum _Fields implements TFieldIdEnum {
33774
      SUCCESS((short)0, "success"),
33775
      EX((short)1, "ex");
33776
 
33777
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33778
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33779
 
33780
      static {
33781
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33782
          byId.put((int)field._thriftId, field);
33783
          byName.put(field.getFieldName(), field);
33784
        }
33785
      }
33786
 
33787
      /**
33788
       * Find the _Fields constant that matches fieldId, or null if its not found.
33789
       */
33790
      public static _Fields findByThriftId(int fieldId) {
33791
        return byId.get(fieldId);
33792
      }
33793
 
33794
      /**
33795
       * Find the _Fields constant that matches fieldId, throwing an exception
33796
       * if it is not found.
33797
       */
33798
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33799
        _Fields fields = findByThriftId(fieldId);
33800
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33801
        return fields;
33802
      }
33803
 
33804
      /**
33805
       * Find the _Fields constant that matches name, or null if its not found.
33806
       */
33807
      public static _Fields findByName(String name) {
33808
        return byName.get(name);
33809
      }
33810
 
33811
      private final short _thriftId;
33812
      private final String _fieldName;
33813
 
33814
      _Fields(short thriftId, String fieldName) {
33815
        _thriftId = thriftId;
33816
        _fieldName = fieldName;
33817
      }
33818
 
33819
      public short getThriftFieldId() {
33820
        return _thriftId;
33821
      }
33822
 
33823
      public String getFieldName() {
33824
        return _fieldName;
33825
      }
33826
    }
33827
 
33828
    // isset id assignments
33829
    private static final int __SUCCESS_ISSET_ID = 0;
33830
    private BitSet __isset_bit_vector = new BitSet(1);
33831
 
33832
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33833
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
33834
          new FieldValueMetaData(TType.I64)));
33835
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
33836
          new FieldValueMetaData(TType.STRUCT)));
33837
    }});
33838
 
33839
    static {
33840
      FieldMetaData.addStructMetaDataMap(reshipOrder_result.class, metaDataMap);
33841
    }
33842
 
33843
    public reshipOrder_result() {
33844
    }
33845
 
33846
    public reshipOrder_result(
33847
      long success,
33848
      TransactionServiceException ex)
33849
    {
33850
      this();
33851
      this.success = success;
33852
      setSuccessIsSet(true);
33853
      this.ex = ex;
33854
    }
33855
 
33856
    /**
33857
     * Performs a deep copy on <i>other</i>.
33858
     */
33859
    public reshipOrder_result(reshipOrder_result other) {
33860
      __isset_bit_vector.clear();
33861
      __isset_bit_vector.or(other.__isset_bit_vector);
33862
      this.success = other.success;
33863
      if (other.isSetEx()) {
33864
        this.ex = new TransactionServiceException(other.ex);
33865
      }
33866
    }
33867
 
33868
    public reshipOrder_result deepCopy() {
33869
      return new reshipOrder_result(this);
33870
    }
33871
 
33872
    @Deprecated
33873
    public reshipOrder_result clone() {
33874
      return new reshipOrder_result(this);
33875
    }
33876
 
33877
    public long getSuccess() {
33878
      return this.success;
33879
    }
33880
 
33881
    public reshipOrder_result setSuccess(long success) {
33882
      this.success = success;
33883
      setSuccessIsSet(true);
33884
      return this;
33885
    }
33886
 
33887
    public void unsetSuccess() {
33888
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
33889
    }
33890
 
33891
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
33892
    public boolean isSetSuccess() {
33893
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
33894
    }
33895
 
33896
    public void setSuccessIsSet(boolean value) {
33897
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
33898
    }
33899
 
33900
    public TransactionServiceException getEx() {
33901
      return this.ex;
33902
    }
33903
 
33904
    public reshipOrder_result setEx(TransactionServiceException ex) {
33905
      this.ex = ex;
33906
      return this;
33907
    }
33908
 
33909
    public void unsetEx() {
33910
      this.ex = null;
33911
    }
33912
 
33913
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
33914
    public boolean isSetEx() {
33915
      return this.ex != null;
33916
    }
33917
 
33918
    public void setExIsSet(boolean value) {
33919
      if (!value) {
33920
        this.ex = null;
33921
      }
33922
    }
33923
 
33924
    public void setFieldValue(_Fields field, Object value) {
33925
      switch (field) {
33926
      case SUCCESS:
33927
        if (value == null) {
33928
          unsetSuccess();
33929
        } else {
33930
          setSuccess((Long)value);
33931
        }
33932
        break;
33933
 
33934
      case EX:
33935
        if (value == null) {
33936
          unsetEx();
33937
        } else {
33938
          setEx((TransactionServiceException)value);
33939
        }
33940
        break;
33941
 
33942
      }
33943
    }
33944
 
33945
    public void setFieldValue(int fieldID, Object value) {
33946
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33947
    }
33948
 
33949
    public Object getFieldValue(_Fields field) {
33950
      switch (field) {
33951
      case SUCCESS:
33952
        return new Long(getSuccess());
33953
 
33954
      case EX:
33955
        return getEx();
33956
 
33957
      }
33958
      throw new IllegalStateException();
33959
    }
33960
 
33961
    public Object getFieldValue(int fieldId) {
33962
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33963
    }
33964
 
33965
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33966
    public boolean isSet(_Fields field) {
33967
      switch (field) {
33968
      case SUCCESS:
33969
        return isSetSuccess();
33970
      case EX:
33971
        return isSetEx();
33972
      }
33973
      throw new IllegalStateException();
33974
    }
33975
 
33976
    public boolean isSet(int fieldID) {
33977
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33978
    }
33979
 
33980
    @Override
33981
    public boolean equals(Object that) {
33982
      if (that == null)
33983
        return false;
33984
      if (that instanceof reshipOrder_result)
33985
        return this.equals((reshipOrder_result)that);
33986
      return false;
33987
    }
33988
 
33989
    public boolean equals(reshipOrder_result that) {
33990
      if (that == null)
33991
        return false;
33992
 
33993
      boolean this_present_success = true;
33994
      boolean that_present_success = true;
33995
      if (this_present_success || that_present_success) {
33996
        if (!(this_present_success && that_present_success))
33997
          return false;
33998
        if (this.success != that.success)
33999
          return false;
34000
      }
34001
 
34002
      boolean this_present_ex = true && this.isSetEx();
34003
      boolean that_present_ex = true && that.isSetEx();
34004
      if (this_present_ex || that_present_ex) {
34005
        if (!(this_present_ex && that_present_ex))
34006
          return false;
34007
        if (!this.ex.equals(that.ex))
34008
          return false;
34009
      }
34010
 
34011
      return true;
34012
    }
34013
 
34014
    @Override
34015
    public int hashCode() {
34016
      return 0;
34017
    }
34018
 
34019
    public int compareTo(reshipOrder_result other) {
34020
      if (!getClass().equals(other.getClass())) {
34021
        return getClass().getName().compareTo(other.getClass().getName());
34022
      }
34023
 
34024
      int lastComparison = 0;
34025
      reshipOrder_result typedOther = (reshipOrder_result)other;
34026
 
34027
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
34028
      if (lastComparison != 0) {
34029
        return lastComparison;
34030
      }
34031
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
34032
      if (lastComparison != 0) {
34033
        return lastComparison;
34034
      }
34035
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
34036
      if (lastComparison != 0) {
34037
        return lastComparison;
34038
      }
34039
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
34040
      if (lastComparison != 0) {
34041
        return lastComparison;
34042
      }
34043
      return 0;
34044
    }
34045
 
34046
    public void read(TProtocol iprot) throws TException {
34047
      TField field;
34048
      iprot.readStructBegin();
34049
      while (true)
34050
      {
34051
        field = iprot.readFieldBegin();
34052
        if (field.type == TType.STOP) { 
34053
          break;
34054
        }
34055
        _Fields fieldId = _Fields.findByThriftId(field.id);
34056
        if (fieldId == null) {
34057
          TProtocolUtil.skip(iprot, field.type);
34058
        } else {
34059
          switch (fieldId) {
34060
            case SUCCESS:
34061
              if (field.type == TType.I64) {
34062
                this.success = iprot.readI64();
34063
                setSuccessIsSet(true);
34064
              } else { 
34065
                TProtocolUtil.skip(iprot, field.type);
34066
              }
34067
              break;
34068
            case EX:
34069
              if (field.type == TType.STRUCT) {
34070
                this.ex = new TransactionServiceException();
34071
                this.ex.read(iprot);
34072
              } else { 
34073
                TProtocolUtil.skip(iprot, field.type);
34074
              }
34075
              break;
34076
          }
34077
          iprot.readFieldEnd();
34078
        }
34079
      }
34080
      iprot.readStructEnd();
34081
      validate();
34082
    }
34083
 
34084
    public void write(TProtocol oprot) throws TException {
34085
      oprot.writeStructBegin(STRUCT_DESC);
34086
 
34087
      if (this.isSetSuccess()) {
34088
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
34089
        oprot.writeI64(this.success);
34090
        oprot.writeFieldEnd();
34091
      } else if (this.isSetEx()) {
34092
        oprot.writeFieldBegin(EX_FIELD_DESC);
34093
        this.ex.write(oprot);
34094
        oprot.writeFieldEnd();
34095
      }
34096
      oprot.writeFieldStop();
34097
      oprot.writeStructEnd();
34098
    }
34099
 
34100
    @Override
34101
    public String toString() {
34102
      StringBuilder sb = new StringBuilder("reshipOrder_result(");
34103
      boolean first = true;
34104
 
34105
      sb.append("success:");
34106
      sb.append(this.success);
34107
      first = false;
34108
      if (!first) sb.append(", ");
34109
      sb.append("ex:");
34110
      if (this.ex == null) {
34111
        sb.append("null");
34112
      } else {
34113
        sb.append(this.ex);
34114
      }
34115
      first = false;
34116
      sb.append(")");
34117
      return sb.toString();
34118
    }
34119
 
34120
    public void validate() throws TException {
34121
      // check for required fields
34122
    }
34123
 
34124
  }
34125
 
34126
  public static class refundOrder_args implements TBase<refundOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<refundOrder_args>   {
34127
    private static final TStruct STRUCT_DESC = new TStruct("refundOrder_args");
34128
 
34129
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
34130
 
34131
    private long orderId;
34132
 
34133
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34134
    public enum _Fields implements TFieldIdEnum {
34135
      ORDER_ID((short)1, "orderId");
34136
 
34137
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34138
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34139
 
34140
      static {
34141
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34142
          byId.put((int)field._thriftId, field);
34143
          byName.put(field.getFieldName(), field);
34144
        }
34145
      }
34146
 
34147
      /**
34148
       * Find the _Fields constant that matches fieldId, or null if its not found.
34149
       */
34150
      public static _Fields findByThriftId(int fieldId) {
34151
        return byId.get(fieldId);
34152
      }
34153
 
34154
      /**
34155
       * Find the _Fields constant that matches fieldId, throwing an exception
34156
       * if it is not found.
34157
       */
34158
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34159
        _Fields fields = findByThriftId(fieldId);
34160
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34161
        return fields;
34162
      }
34163
 
34164
      /**
34165
       * Find the _Fields constant that matches name, or null if its not found.
34166
       */
34167
      public static _Fields findByName(String name) {
34168
        return byName.get(name);
34169
      }
34170
 
34171
      private final short _thriftId;
34172
      private final String _fieldName;
34173
 
34174
      _Fields(short thriftId, String fieldName) {
34175
        _thriftId = thriftId;
34176
        _fieldName = fieldName;
34177
      }
34178
 
34179
      public short getThriftFieldId() {
34180
        return _thriftId;
34181
      }
34182
 
34183
      public String getFieldName() {
34184
        return _fieldName;
34185
      }
34186
    }
34187
 
34188
    // isset id assignments
34189
    private static final int __ORDERID_ISSET_ID = 0;
34190
    private BitSet __isset_bit_vector = new BitSet(1);
34191
 
34192
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34193
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
34194
          new FieldValueMetaData(TType.I64)));
34195
    }});
34196
 
34197
    static {
34198
      FieldMetaData.addStructMetaDataMap(refundOrder_args.class, metaDataMap);
34199
    }
34200
 
34201
    public refundOrder_args() {
34202
    }
34203
 
34204
    public refundOrder_args(
34205
      long orderId)
34206
    {
34207
      this();
34208
      this.orderId = orderId;
34209
      setOrderIdIsSet(true);
34210
    }
34211
 
34212
    /**
34213
     * Performs a deep copy on <i>other</i>.
34214
     */
34215
    public refundOrder_args(refundOrder_args other) {
34216
      __isset_bit_vector.clear();
34217
      __isset_bit_vector.or(other.__isset_bit_vector);
34218
      this.orderId = other.orderId;
34219
    }
34220
 
34221
    public refundOrder_args deepCopy() {
34222
      return new refundOrder_args(this);
34223
    }
34224
 
34225
    @Deprecated
34226
    public refundOrder_args clone() {
34227
      return new refundOrder_args(this);
34228
    }
34229
 
34230
    public long getOrderId() {
34231
      return this.orderId;
34232
    }
34233
 
34234
    public refundOrder_args setOrderId(long orderId) {
34235
      this.orderId = orderId;
34236
      setOrderIdIsSet(true);
34237
      return this;
34238
    }
34239
 
34240
    public void unsetOrderId() {
34241
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
34242
    }
34243
 
34244
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
34245
    public boolean isSetOrderId() {
34246
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
34247
    }
34248
 
34249
    public void setOrderIdIsSet(boolean value) {
34250
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
34251
    }
34252
 
34253
    public void setFieldValue(_Fields field, Object value) {
34254
      switch (field) {
34255
      case ORDER_ID:
34256
        if (value == null) {
34257
          unsetOrderId();
34258
        } else {
34259
          setOrderId((Long)value);
34260
        }
34261
        break;
34262
 
34263
      }
34264
    }
34265
 
34266
    public void setFieldValue(int fieldID, Object value) {
34267
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34268
    }
34269
 
34270
    public Object getFieldValue(_Fields field) {
34271
      switch (field) {
34272
      case ORDER_ID:
34273
        return new Long(getOrderId());
34274
 
34275
      }
34276
      throw new IllegalStateException();
34277
    }
34278
 
34279
    public Object getFieldValue(int fieldId) {
34280
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34281
    }
34282
 
34283
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34284
    public boolean isSet(_Fields field) {
34285
      switch (field) {
34286
      case ORDER_ID:
34287
        return isSetOrderId();
34288
      }
34289
      throw new IllegalStateException();
34290
    }
34291
 
34292
    public boolean isSet(int fieldID) {
34293
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34294
    }
34295
 
34296
    @Override
34297
    public boolean equals(Object that) {
34298
      if (that == null)
34299
        return false;
34300
      if (that instanceof refundOrder_args)
34301
        return this.equals((refundOrder_args)that);
34302
      return false;
34303
    }
34304
 
34305
    public boolean equals(refundOrder_args that) {
34306
      if (that == null)
34307
        return false;
34308
 
34309
      boolean this_present_orderId = true;
34310
      boolean that_present_orderId = true;
34311
      if (this_present_orderId || that_present_orderId) {
34312
        if (!(this_present_orderId && that_present_orderId))
34313
          return false;
34314
        if (this.orderId != that.orderId)
34315
          return false;
34316
      }
34317
 
34318
      return true;
34319
    }
34320
 
34321
    @Override
34322
    public int hashCode() {
34323
      return 0;
34324
    }
34325
 
34326
    public int compareTo(refundOrder_args other) {
34327
      if (!getClass().equals(other.getClass())) {
34328
        return getClass().getName().compareTo(other.getClass().getName());
34329
      }
34330
 
34331
      int lastComparison = 0;
34332
      refundOrder_args typedOther = (refundOrder_args)other;
34333
 
34334
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
34335
      if (lastComparison != 0) {
34336
        return lastComparison;
34337
      }
34338
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
34339
      if (lastComparison != 0) {
34340
        return lastComparison;
34341
      }
34342
      return 0;
34343
    }
34344
 
34345
    public void read(TProtocol iprot) throws TException {
34346
      TField field;
34347
      iprot.readStructBegin();
34348
      while (true)
34349
      {
34350
        field = iprot.readFieldBegin();
34351
        if (field.type == TType.STOP) { 
34352
          break;
34353
        }
34354
        _Fields fieldId = _Fields.findByThriftId(field.id);
34355
        if (fieldId == null) {
34356
          TProtocolUtil.skip(iprot, field.type);
34357
        } else {
34358
          switch (fieldId) {
34359
            case ORDER_ID:
34360
              if (field.type == TType.I64) {
34361
                this.orderId = iprot.readI64();
34362
                setOrderIdIsSet(true);
34363
              } else { 
34364
                TProtocolUtil.skip(iprot, field.type);
34365
              }
34366
              break;
34367
          }
34368
          iprot.readFieldEnd();
34369
        }
34370
      }
34371
      iprot.readStructEnd();
34372
      validate();
34373
    }
34374
 
34375
    public void write(TProtocol oprot) throws TException {
34376
      validate();
34377
 
34378
      oprot.writeStructBegin(STRUCT_DESC);
34379
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
34380
      oprot.writeI64(this.orderId);
34381
      oprot.writeFieldEnd();
34382
      oprot.writeFieldStop();
34383
      oprot.writeStructEnd();
34384
    }
34385
 
34386
    @Override
34387
    public String toString() {
34388
      StringBuilder sb = new StringBuilder("refundOrder_args(");
34389
      boolean first = true;
34390
 
34391
      sb.append("orderId:");
34392
      sb.append(this.orderId);
34393
      first = false;
34394
      sb.append(")");
34395
      return sb.toString();
34396
    }
34397
 
34398
    public void validate() throws TException {
34399
      // check for required fields
34400
    }
34401
 
34402
  }
34403
 
34404
  public static class refundOrder_result implements TBase<refundOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<refundOrder_result>   {
34405
    private static final TStruct STRUCT_DESC = new TStruct("refundOrder_result");
34406
 
34407
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
34408
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
34409
 
34410
    private boolean success;
34411
    private TransactionServiceException ex;
34412
 
34413
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34414
    public enum _Fields implements TFieldIdEnum {
34415
      SUCCESS((short)0, "success"),
34416
      EX((short)1, "ex");
34417
 
34418
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34419
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34420
 
34421
      static {
34422
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34423
          byId.put((int)field._thriftId, field);
34424
          byName.put(field.getFieldName(), field);
34425
        }
34426
      }
34427
 
34428
      /**
34429
       * Find the _Fields constant that matches fieldId, or null if its not found.
34430
       */
34431
      public static _Fields findByThriftId(int fieldId) {
34432
        return byId.get(fieldId);
34433
      }
34434
 
34435
      /**
34436
       * Find the _Fields constant that matches fieldId, throwing an exception
34437
       * if it is not found.
34438
       */
34439
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34440
        _Fields fields = findByThriftId(fieldId);
34441
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34442
        return fields;
34443
      }
34444
 
34445
      /**
34446
       * Find the _Fields constant that matches name, or null if its not found.
34447
       */
34448
      public static _Fields findByName(String name) {
34449
        return byName.get(name);
34450
      }
34451
 
34452
      private final short _thriftId;
34453
      private final String _fieldName;
34454
 
34455
      _Fields(short thriftId, String fieldName) {
34456
        _thriftId = thriftId;
34457
        _fieldName = fieldName;
34458
      }
34459
 
34460
      public short getThriftFieldId() {
34461
        return _thriftId;
34462
      }
34463
 
34464
      public String getFieldName() {
34465
        return _fieldName;
34466
      }
34467
    }
34468
 
34469
    // isset id assignments
34470
    private static final int __SUCCESS_ISSET_ID = 0;
34471
    private BitSet __isset_bit_vector = new BitSet(1);
34472
 
34473
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34474
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
34475
          new FieldValueMetaData(TType.BOOL)));
34476
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
34477
          new FieldValueMetaData(TType.STRUCT)));
34478
    }});
34479
 
34480
    static {
34481
      FieldMetaData.addStructMetaDataMap(refundOrder_result.class, metaDataMap);
34482
    }
34483
 
34484
    public refundOrder_result() {
34485
    }
34486
 
34487
    public refundOrder_result(
34488
      boolean success,
34489
      TransactionServiceException ex)
34490
    {
34491
      this();
34492
      this.success = success;
34493
      setSuccessIsSet(true);
34494
      this.ex = ex;
34495
    }
34496
 
34497
    /**
34498
     * Performs a deep copy on <i>other</i>.
34499
     */
34500
    public refundOrder_result(refundOrder_result other) {
34501
      __isset_bit_vector.clear();
34502
      __isset_bit_vector.or(other.__isset_bit_vector);
34503
      this.success = other.success;
34504
      if (other.isSetEx()) {
34505
        this.ex = new TransactionServiceException(other.ex);
34506
      }
34507
    }
34508
 
34509
    public refundOrder_result deepCopy() {
34510
      return new refundOrder_result(this);
34511
    }
34512
 
34513
    @Deprecated
34514
    public refundOrder_result clone() {
34515
      return new refundOrder_result(this);
34516
    }
34517
 
34518
    public boolean isSuccess() {
34519
      return this.success;
34520
    }
34521
 
34522
    public refundOrder_result setSuccess(boolean success) {
34523
      this.success = success;
34524
      setSuccessIsSet(true);
34525
      return this;
34526
    }
34527
 
34528
    public void unsetSuccess() {
34529
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
34530
    }
34531
 
34532
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
34533
    public boolean isSetSuccess() {
34534
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
34535
    }
34536
 
34537
    public void setSuccessIsSet(boolean value) {
34538
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
34539
    }
34540
 
34541
    public TransactionServiceException getEx() {
34542
      return this.ex;
34543
    }
34544
 
34545
    public refundOrder_result setEx(TransactionServiceException ex) {
34546
      this.ex = ex;
34547
      return this;
34548
    }
34549
 
34550
    public void unsetEx() {
34551
      this.ex = null;
34552
    }
34553
 
34554
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
34555
    public boolean isSetEx() {
34556
      return this.ex != null;
34557
    }
34558
 
34559
    public void setExIsSet(boolean value) {
34560
      if (!value) {
34561
        this.ex = null;
34562
      }
34563
    }
34564
 
34565
    public void setFieldValue(_Fields field, Object value) {
34566
      switch (field) {
34567
      case SUCCESS:
34568
        if (value == null) {
34569
          unsetSuccess();
34570
        } else {
34571
          setSuccess((Boolean)value);
34572
        }
34573
        break;
34574
 
34575
      case EX:
34576
        if (value == null) {
34577
          unsetEx();
34578
        } else {
34579
          setEx((TransactionServiceException)value);
34580
        }
34581
        break;
34582
 
34583
      }
34584
    }
34585
 
34586
    public void setFieldValue(int fieldID, Object value) {
34587
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34588
    }
34589
 
34590
    public Object getFieldValue(_Fields field) {
34591
      switch (field) {
34592
      case SUCCESS:
34593
        return new Boolean(isSuccess());
34594
 
34595
      case EX:
34596
        return getEx();
34597
 
34598
      }
34599
      throw new IllegalStateException();
34600
    }
34601
 
34602
    public Object getFieldValue(int fieldId) {
34603
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34604
    }
34605
 
34606
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34607
    public boolean isSet(_Fields field) {
34608
      switch (field) {
34609
      case SUCCESS:
34610
        return isSetSuccess();
34611
      case EX:
34612
        return isSetEx();
34613
      }
34614
      throw new IllegalStateException();
34615
    }
34616
 
34617
    public boolean isSet(int fieldID) {
34618
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34619
    }
34620
 
34621
    @Override
34622
    public boolean equals(Object that) {
34623
      if (that == null)
34624
        return false;
34625
      if (that instanceof refundOrder_result)
34626
        return this.equals((refundOrder_result)that);
34627
      return false;
34628
    }
34629
 
34630
    public boolean equals(refundOrder_result that) {
34631
      if (that == null)
34632
        return false;
34633
 
34634
      boolean this_present_success = true;
34635
      boolean that_present_success = true;
34636
      if (this_present_success || that_present_success) {
34637
        if (!(this_present_success && that_present_success))
34638
          return false;
34639
        if (this.success != that.success)
34640
          return false;
34641
      }
34642
 
34643
      boolean this_present_ex = true && this.isSetEx();
34644
      boolean that_present_ex = true && that.isSetEx();
34645
      if (this_present_ex || that_present_ex) {
34646
        if (!(this_present_ex && that_present_ex))
34647
          return false;
34648
        if (!this.ex.equals(that.ex))
34649
          return false;
34650
      }
34651
 
34652
      return true;
34653
    }
34654
 
34655
    @Override
34656
    public int hashCode() {
34657
      return 0;
34658
    }
34659
 
34660
    public int compareTo(refundOrder_result other) {
34661
      if (!getClass().equals(other.getClass())) {
34662
        return getClass().getName().compareTo(other.getClass().getName());
34663
      }
34664
 
34665
      int lastComparison = 0;
34666
      refundOrder_result typedOther = (refundOrder_result)other;
34667
 
34668
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
34669
      if (lastComparison != 0) {
34670
        return lastComparison;
34671
      }
34672
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
34673
      if (lastComparison != 0) {
34674
        return lastComparison;
34675
      }
34676
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
34677
      if (lastComparison != 0) {
34678
        return lastComparison;
34679
      }
34680
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
34681
      if (lastComparison != 0) {
34682
        return lastComparison;
34683
      }
34684
      return 0;
34685
    }
34686
 
34687
    public void read(TProtocol iprot) throws TException {
34688
      TField field;
34689
      iprot.readStructBegin();
34690
      while (true)
34691
      {
34692
        field = iprot.readFieldBegin();
34693
        if (field.type == TType.STOP) { 
34694
          break;
34695
        }
34696
        _Fields fieldId = _Fields.findByThriftId(field.id);
34697
        if (fieldId == null) {
34698
          TProtocolUtil.skip(iprot, field.type);
34699
        } else {
34700
          switch (fieldId) {
34701
            case SUCCESS:
34702
              if (field.type == TType.BOOL) {
34703
                this.success = iprot.readBool();
34704
                setSuccessIsSet(true);
34705
              } else { 
34706
                TProtocolUtil.skip(iprot, field.type);
34707
              }
34708
              break;
34709
            case EX:
34710
              if (field.type == TType.STRUCT) {
34711
                this.ex = new TransactionServiceException();
34712
                this.ex.read(iprot);
34713
              } else { 
34714
                TProtocolUtil.skip(iprot, field.type);
34715
              }
34716
              break;
34717
          }
34718
          iprot.readFieldEnd();
34719
        }
34720
      }
34721
      iprot.readStructEnd();
34722
      validate();
34723
    }
34724
 
34725
    public void write(TProtocol oprot) throws TException {
34726
      oprot.writeStructBegin(STRUCT_DESC);
34727
 
34728
      if (this.isSetSuccess()) {
34729
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
34730
        oprot.writeBool(this.success);
34731
        oprot.writeFieldEnd();
34732
      } else if (this.isSetEx()) {
34733
        oprot.writeFieldBegin(EX_FIELD_DESC);
34734
        this.ex.write(oprot);
34735
        oprot.writeFieldEnd();
34736
      }
34737
      oprot.writeFieldStop();
34738
      oprot.writeStructEnd();
34739
    }
34740
 
34741
    @Override
34742
    public String toString() {
34743
      StringBuilder sb = new StringBuilder("refundOrder_result(");
34744
      boolean first = true;
34745
 
34746
      sb.append("success:");
34747
      sb.append(this.success);
34748
      first = false;
34749
      if (!first) sb.append(", ");
34750
      sb.append("ex:");
34751
      if (this.ex == null) {
34752
        sb.append("null");
34753
      } else {
34754
        sb.append(this.ex);
34755
      }
34756
      first = false;
34757
      sb.append(")");
34758
      return sb.toString();
34759
    }
34760
 
34761
    public void validate() throws TException {
34762
      // check for required fields
34763
    }
34764
 
34765
  }
34766
 
2690 chandransh 34767
  public static class getReturnOrders_args implements TBase<getReturnOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrders_args>   {
34768
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrders_args");
34769
 
34770
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
34771
    private static final TField FROM_DATE_FIELD_DESC = new TField("fromDate", TType.I64, (short)2);
34772
    private static final TField TO_DATE_FIELD_DESC = new TField("toDate", TType.I64, (short)3);
34773
 
34774
    private long warehouseId;
34775
    private long fromDate;
34776
    private long toDate;
34777
 
34778
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34779
    public enum _Fields implements TFieldIdEnum {
34780
      WAREHOUSE_ID((short)1, "warehouseId"),
34781
      FROM_DATE((short)2, "fromDate"),
34782
      TO_DATE((short)3, "toDate");
34783
 
34784
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34785
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34786
 
34787
      static {
34788
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34789
          byId.put((int)field._thriftId, field);
34790
          byName.put(field.getFieldName(), field);
34791
        }
34792
      }
34793
 
34794
      /**
34795
       * Find the _Fields constant that matches fieldId, or null if its not found.
34796
       */
34797
      public static _Fields findByThriftId(int fieldId) {
34798
        return byId.get(fieldId);
34799
      }
34800
 
34801
      /**
34802
       * Find the _Fields constant that matches fieldId, throwing an exception
34803
       * if it is not found.
34804
       */
34805
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34806
        _Fields fields = findByThriftId(fieldId);
34807
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34808
        return fields;
34809
      }
34810
 
34811
      /**
34812
       * Find the _Fields constant that matches name, or null if its not found.
34813
       */
34814
      public static _Fields findByName(String name) {
34815
        return byName.get(name);
34816
      }
34817
 
34818
      private final short _thriftId;
34819
      private final String _fieldName;
34820
 
34821
      _Fields(short thriftId, String fieldName) {
34822
        _thriftId = thriftId;
34823
        _fieldName = fieldName;
34824
      }
34825
 
34826
      public short getThriftFieldId() {
34827
        return _thriftId;
34828
      }
34829
 
34830
      public String getFieldName() {
34831
        return _fieldName;
34832
      }
34833
    }
34834
 
34835
    // isset id assignments
34836
    private static final int __WAREHOUSEID_ISSET_ID = 0;
34837
    private static final int __FROMDATE_ISSET_ID = 1;
34838
    private static final int __TODATE_ISSET_ID = 2;
34839
    private BitSet __isset_bit_vector = new BitSet(3);
34840
 
34841
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34842
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
34843
          new FieldValueMetaData(TType.I64)));
34844
      put(_Fields.FROM_DATE, new FieldMetaData("fromDate", TFieldRequirementType.DEFAULT, 
34845
          new FieldValueMetaData(TType.I64)));
34846
      put(_Fields.TO_DATE, new FieldMetaData("toDate", TFieldRequirementType.DEFAULT, 
34847
          new FieldValueMetaData(TType.I64)));
34848
    }});
34849
 
34850
    static {
34851
      FieldMetaData.addStructMetaDataMap(getReturnOrders_args.class, metaDataMap);
34852
    }
34853
 
34854
    public getReturnOrders_args() {
34855
    }
34856
 
34857
    public getReturnOrders_args(
34858
      long warehouseId,
34859
      long fromDate,
34860
      long toDate)
34861
    {
34862
      this();
34863
      this.warehouseId = warehouseId;
34864
      setWarehouseIdIsSet(true);
34865
      this.fromDate = fromDate;
34866
      setFromDateIsSet(true);
34867
      this.toDate = toDate;
34868
      setToDateIsSet(true);
34869
    }
34870
 
34871
    /**
34872
     * Performs a deep copy on <i>other</i>.
34873
     */
34874
    public getReturnOrders_args(getReturnOrders_args other) {
34875
      __isset_bit_vector.clear();
34876
      __isset_bit_vector.or(other.__isset_bit_vector);
34877
      this.warehouseId = other.warehouseId;
34878
      this.fromDate = other.fromDate;
34879
      this.toDate = other.toDate;
34880
    }
34881
 
34882
    public getReturnOrders_args deepCopy() {
34883
      return new getReturnOrders_args(this);
34884
    }
34885
 
34886
    @Deprecated
34887
    public getReturnOrders_args clone() {
34888
      return new getReturnOrders_args(this);
34889
    }
34890
 
34891
    public long getWarehouseId() {
34892
      return this.warehouseId;
34893
    }
34894
 
34895
    public getReturnOrders_args setWarehouseId(long warehouseId) {
34896
      this.warehouseId = warehouseId;
34897
      setWarehouseIdIsSet(true);
34898
      return this;
34899
    }
34900
 
34901
    public void unsetWarehouseId() {
34902
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
34903
    }
34904
 
34905
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
34906
    public boolean isSetWarehouseId() {
34907
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
34908
    }
34909
 
34910
    public void setWarehouseIdIsSet(boolean value) {
34911
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
34912
    }
34913
 
34914
    public long getFromDate() {
34915
      return this.fromDate;
34916
    }
34917
 
34918
    public getReturnOrders_args setFromDate(long fromDate) {
34919
      this.fromDate = fromDate;
34920
      setFromDateIsSet(true);
34921
      return this;
34922
    }
34923
 
34924
    public void unsetFromDate() {
34925
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
34926
    }
34927
 
34928
    /** Returns true if field fromDate is set (has been asigned a value) and false otherwise */
34929
    public boolean isSetFromDate() {
34930
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
34931
    }
34932
 
34933
    public void setFromDateIsSet(boolean value) {
34934
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
34935
    }
34936
 
34937
    public long getToDate() {
34938
      return this.toDate;
34939
    }
34940
 
34941
    public getReturnOrders_args setToDate(long toDate) {
34942
      this.toDate = toDate;
34943
      setToDateIsSet(true);
34944
      return this;
34945
    }
34946
 
34947
    public void unsetToDate() {
34948
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
34949
    }
34950
 
34951
    /** Returns true if field toDate is set (has been asigned a value) and false otherwise */
34952
    public boolean isSetToDate() {
34953
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
34954
    }
34955
 
34956
    public void setToDateIsSet(boolean value) {
34957
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
34958
    }
34959
 
34960
    public void setFieldValue(_Fields field, Object value) {
34961
      switch (field) {
34962
      case WAREHOUSE_ID:
34963
        if (value == null) {
34964
          unsetWarehouseId();
34965
        } else {
34966
          setWarehouseId((Long)value);
34967
        }
34968
        break;
34969
 
34970
      case FROM_DATE:
34971
        if (value == null) {
34972
          unsetFromDate();
34973
        } else {
34974
          setFromDate((Long)value);
34975
        }
34976
        break;
34977
 
34978
      case TO_DATE:
34979
        if (value == null) {
34980
          unsetToDate();
34981
        } else {
34982
          setToDate((Long)value);
34983
        }
34984
        break;
34985
 
34986
      }
34987
    }
34988
 
34989
    public void setFieldValue(int fieldID, Object value) {
34990
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34991
    }
34992
 
34993
    public Object getFieldValue(_Fields field) {
34994
      switch (field) {
34995
      case WAREHOUSE_ID:
34996
        return new Long(getWarehouseId());
34997
 
34998
      case FROM_DATE:
34999
        return new Long(getFromDate());
35000
 
35001
      case TO_DATE:
35002
        return new Long(getToDate());
35003
 
35004
      }
35005
      throw new IllegalStateException();
35006
    }
35007
 
35008
    public Object getFieldValue(int fieldId) {
35009
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35010
    }
35011
 
35012
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35013
    public boolean isSet(_Fields field) {
35014
      switch (field) {
35015
      case WAREHOUSE_ID:
35016
        return isSetWarehouseId();
35017
      case FROM_DATE:
35018
        return isSetFromDate();
35019
      case TO_DATE:
35020
        return isSetToDate();
35021
      }
35022
      throw new IllegalStateException();
35023
    }
35024
 
35025
    public boolean isSet(int fieldID) {
35026
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35027
    }
35028
 
35029
    @Override
35030
    public boolean equals(Object that) {
35031
      if (that == null)
35032
        return false;
35033
      if (that instanceof getReturnOrders_args)
35034
        return this.equals((getReturnOrders_args)that);
35035
      return false;
35036
    }
35037
 
35038
    public boolean equals(getReturnOrders_args that) {
35039
      if (that == null)
35040
        return false;
35041
 
35042
      boolean this_present_warehouseId = true;
35043
      boolean that_present_warehouseId = true;
35044
      if (this_present_warehouseId || that_present_warehouseId) {
35045
        if (!(this_present_warehouseId && that_present_warehouseId))
35046
          return false;
35047
        if (this.warehouseId != that.warehouseId)
35048
          return false;
35049
      }
35050
 
35051
      boolean this_present_fromDate = true;
35052
      boolean that_present_fromDate = true;
35053
      if (this_present_fromDate || that_present_fromDate) {
35054
        if (!(this_present_fromDate && that_present_fromDate))
35055
          return false;
35056
        if (this.fromDate != that.fromDate)
35057
          return false;
35058
      }
35059
 
35060
      boolean this_present_toDate = true;
35061
      boolean that_present_toDate = true;
35062
      if (this_present_toDate || that_present_toDate) {
35063
        if (!(this_present_toDate && that_present_toDate))
35064
          return false;
35065
        if (this.toDate != that.toDate)
35066
          return false;
35067
      }
35068
 
35069
      return true;
35070
    }
35071
 
35072
    @Override
35073
    public int hashCode() {
35074
      return 0;
35075
    }
35076
 
35077
    public int compareTo(getReturnOrders_args other) {
35078
      if (!getClass().equals(other.getClass())) {
35079
        return getClass().getName().compareTo(other.getClass().getName());
35080
      }
35081
 
35082
      int lastComparison = 0;
35083
      getReturnOrders_args typedOther = (getReturnOrders_args)other;
35084
 
35085
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
35086
      if (lastComparison != 0) {
35087
        return lastComparison;
35088
      }
35089
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
35090
      if (lastComparison != 0) {
35091
        return lastComparison;
35092
      }
35093
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(isSetFromDate());
35094
      if (lastComparison != 0) {
35095
        return lastComparison;
35096
      }
35097
      lastComparison = TBaseHelper.compareTo(fromDate, typedOther.fromDate);
35098
      if (lastComparison != 0) {
35099
        return lastComparison;
35100
      }
35101
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(isSetToDate());
35102
      if (lastComparison != 0) {
35103
        return lastComparison;
35104
      }
35105
      lastComparison = TBaseHelper.compareTo(toDate, typedOther.toDate);
35106
      if (lastComparison != 0) {
35107
        return lastComparison;
35108
      }
35109
      return 0;
35110
    }
35111
 
35112
    public void read(TProtocol iprot) throws TException {
35113
      TField field;
35114
      iprot.readStructBegin();
35115
      while (true)
35116
      {
35117
        field = iprot.readFieldBegin();
35118
        if (field.type == TType.STOP) { 
35119
          break;
35120
        }
35121
        _Fields fieldId = _Fields.findByThriftId(field.id);
35122
        if (fieldId == null) {
35123
          TProtocolUtil.skip(iprot, field.type);
35124
        } else {
35125
          switch (fieldId) {
35126
            case WAREHOUSE_ID:
35127
              if (field.type == TType.I64) {
35128
                this.warehouseId = iprot.readI64();
35129
                setWarehouseIdIsSet(true);
35130
              } else { 
35131
                TProtocolUtil.skip(iprot, field.type);
35132
              }
35133
              break;
35134
            case FROM_DATE:
35135
              if (field.type == TType.I64) {
35136
                this.fromDate = iprot.readI64();
35137
                setFromDateIsSet(true);
35138
              } else { 
35139
                TProtocolUtil.skip(iprot, field.type);
35140
              }
35141
              break;
35142
            case TO_DATE:
35143
              if (field.type == TType.I64) {
35144
                this.toDate = iprot.readI64();
35145
                setToDateIsSet(true);
35146
              } else { 
35147
                TProtocolUtil.skip(iprot, field.type);
35148
              }
35149
              break;
35150
          }
35151
          iprot.readFieldEnd();
35152
        }
35153
      }
35154
      iprot.readStructEnd();
35155
      validate();
35156
    }
35157
 
35158
    public void write(TProtocol oprot) throws TException {
35159
      validate();
35160
 
35161
      oprot.writeStructBegin(STRUCT_DESC);
35162
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
35163
      oprot.writeI64(this.warehouseId);
35164
      oprot.writeFieldEnd();
35165
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
35166
      oprot.writeI64(this.fromDate);
35167
      oprot.writeFieldEnd();
35168
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
35169
      oprot.writeI64(this.toDate);
35170
      oprot.writeFieldEnd();
35171
      oprot.writeFieldStop();
35172
      oprot.writeStructEnd();
35173
    }
35174
 
35175
    @Override
35176
    public String toString() {
35177
      StringBuilder sb = new StringBuilder("getReturnOrders_args(");
35178
      boolean first = true;
35179
 
35180
      sb.append("warehouseId:");
35181
      sb.append(this.warehouseId);
35182
      first = false;
35183
      if (!first) sb.append(", ");
35184
      sb.append("fromDate:");
35185
      sb.append(this.fromDate);
35186
      first = false;
35187
      if (!first) sb.append(", ");
35188
      sb.append("toDate:");
35189
      sb.append(this.toDate);
35190
      first = false;
35191
      sb.append(")");
35192
      return sb.toString();
35193
    }
35194
 
35195
    public void validate() throws TException {
35196
      // check for required fields
35197
    }
35198
 
35199
  }
35200
 
35201
  public static class getReturnOrders_result implements TBase<getReturnOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrders_result>   {
35202
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrders_result");
35203
 
35204
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
35205
 
35206
    private List<ReturnOrder> success;
35207
 
35208
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35209
    public enum _Fields implements TFieldIdEnum {
35210
      SUCCESS((short)0, "success");
35211
 
35212
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35213
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35214
 
35215
      static {
35216
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35217
          byId.put((int)field._thriftId, field);
35218
          byName.put(field.getFieldName(), field);
35219
        }
35220
      }
35221
 
35222
      /**
35223
       * Find the _Fields constant that matches fieldId, or null if its not found.
35224
       */
35225
      public static _Fields findByThriftId(int fieldId) {
35226
        return byId.get(fieldId);
35227
      }
35228
 
35229
      /**
35230
       * Find the _Fields constant that matches fieldId, throwing an exception
35231
       * if it is not found.
35232
       */
35233
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35234
        _Fields fields = findByThriftId(fieldId);
35235
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35236
        return fields;
35237
      }
35238
 
35239
      /**
35240
       * Find the _Fields constant that matches name, or null if its not found.
35241
       */
35242
      public static _Fields findByName(String name) {
35243
        return byName.get(name);
35244
      }
35245
 
35246
      private final short _thriftId;
35247
      private final String _fieldName;
35248
 
35249
      _Fields(short thriftId, String fieldName) {
35250
        _thriftId = thriftId;
35251
        _fieldName = fieldName;
35252
      }
35253
 
35254
      public short getThriftFieldId() {
35255
        return _thriftId;
35256
      }
35257
 
35258
      public String getFieldName() {
35259
        return _fieldName;
35260
      }
35261
    }
35262
 
35263
    // isset id assignments
35264
 
35265
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35266
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
35267
          new ListMetaData(TType.LIST, 
35268
              new StructMetaData(TType.STRUCT, ReturnOrder.class))));
35269
    }});
35270
 
35271
    static {
35272
      FieldMetaData.addStructMetaDataMap(getReturnOrders_result.class, metaDataMap);
35273
    }
35274
 
35275
    public getReturnOrders_result() {
35276
    }
35277
 
35278
    public getReturnOrders_result(
35279
      List<ReturnOrder> success)
35280
    {
35281
      this();
35282
      this.success = success;
35283
    }
35284
 
35285
    /**
35286
     * Performs a deep copy on <i>other</i>.
35287
     */
35288
    public getReturnOrders_result(getReturnOrders_result other) {
35289
      if (other.isSetSuccess()) {
35290
        List<ReturnOrder> __this__success = new ArrayList<ReturnOrder>();
35291
        for (ReturnOrder other_element : other.success) {
35292
          __this__success.add(new ReturnOrder(other_element));
35293
        }
35294
        this.success = __this__success;
35295
      }
35296
    }
35297
 
35298
    public getReturnOrders_result deepCopy() {
35299
      return new getReturnOrders_result(this);
35300
    }
35301
 
35302
    @Deprecated
35303
    public getReturnOrders_result clone() {
35304
      return new getReturnOrders_result(this);
35305
    }
35306
 
35307
    public int getSuccessSize() {
35308
      return (this.success == null) ? 0 : this.success.size();
35309
    }
35310
 
35311
    public java.util.Iterator<ReturnOrder> getSuccessIterator() {
35312
      return (this.success == null) ? null : this.success.iterator();
35313
    }
35314
 
35315
    public void addToSuccess(ReturnOrder elem) {
35316
      if (this.success == null) {
35317
        this.success = new ArrayList<ReturnOrder>();
35318
      }
35319
      this.success.add(elem);
35320
    }
35321
 
35322
    public List<ReturnOrder> getSuccess() {
35323
      return this.success;
35324
    }
35325
 
35326
    public getReturnOrders_result setSuccess(List<ReturnOrder> success) {
35327
      this.success = success;
35328
      return this;
35329
    }
35330
 
35331
    public void unsetSuccess() {
35332
      this.success = null;
35333
    }
35334
 
35335
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
35336
    public boolean isSetSuccess() {
35337
      return this.success != null;
35338
    }
35339
 
35340
    public void setSuccessIsSet(boolean value) {
35341
      if (!value) {
35342
        this.success = null;
35343
      }
35344
    }
35345
 
35346
    public void setFieldValue(_Fields field, Object value) {
35347
      switch (field) {
35348
      case SUCCESS:
35349
        if (value == null) {
35350
          unsetSuccess();
35351
        } else {
35352
          setSuccess((List<ReturnOrder>)value);
35353
        }
35354
        break;
35355
 
35356
      }
35357
    }
35358
 
35359
    public void setFieldValue(int fieldID, Object value) {
35360
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35361
    }
35362
 
35363
    public Object getFieldValue(_Fields field) {
35364
      switch (field) {
35365
      case SUCCESS:
35366
        return getSuccess();
35367
 
35368
      }
35369
      throw new IllegalStateException();
35370
    }
35371
 
35372
    public Object getFieldValue(int fieldId) {
35373
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35374
    }
35375
 
35376
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35377
    public boolean isSet(_Fields field) {
35378
      switch (field) {
35379
      case SUCCESS:
35380
        return isSetSuccess();
35381
      }
35382
      throw new IllegalStateException();
35383
    }
35384
 
35385
    public boolean isSet(int fieldID) {
35386
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35387
    }
35388
 
35389
    @Override
35390
    public boolean equals(Object that) {
35391
      if (that == null)
35392
        return false;
35393
      if (that instanceof getReturnOrders_result)
35394
        return this.equals((getReturnOrders_result)that);
35395
      return false;
35396
    }
35397
 
35398
    public boolean equals(getReturnOrders_result that) {
35399
      if (that == null)
35400
        return false;
35401
 
35402
      boolean this_present_success = true && this.isSetSuccess();
35403
      boolean that_present_success = true && that.isSetSuccess();
35404
      if (this_present_success || that_present_success) {
35405
        if (!(this_present_success && that_present_success))
35406
          return false;
35407
        if (!this.success.equals(that.success))
35408
          return false;
35409
      }
35410
 
35411
      return true;
35412
    }
35413
 
35414
    @Override
35415
    public int hashCode() {
35416
      return 0;
35417
    }
35418
 
35419
    public int compareTo(getReturnOrders_result other) {
35420
      if (!getClass().equals(other.getClass())) {
35421
        return getClass().getName().compareTo(other.getClass().getName());
35422
      }
35423
 
35424
      int lastComparison = 0;
35425
      getReturnOrders_result typedOther = (getReturnOrders_result)other;
35426
 
35427
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
35428
      if (lastComparison != 0) {
35429
        return lastComparison;
35430
      }
35431
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
35432
      if (lastComparison != 0) {
35433
        return lastComparison;
35434
      }
35435
      return 0;
35436
    }
35437
 
35438
    public void read(TProtocol iprot) throws TException {
35439
      TField field;
35440
      iprot.readStructBegin();
35441
      while (true)
35442
      {
35443
        field = iprot.readFieldBegin();
35444
        if (field.type == TType.STOP) { 
35445
          break;
35446
        }
35447
        _Fields fieldId = _Fields.findByThriftId(field.id);
35448
        if (fieldId == null) {
35449
          TProtocolUtil.skip(iprot, field.type);
35450
        } else {
35451
          switch (fieldId) {
35452
            case SUCCESS:
35453
              if (field.type == TType.LIST) {
35454
                {
2765 chandransh 35455
                  TList _list97 = iprot.readListBegin();
35456
                  this.success = new ArrayList<ReturnOrder>(_list97.size);
35457
                  for (int _i98 = 0; _i98 < _list97.size; ++_i98)
2690 chandransh 35458
                  {
2765 chandransh 35459
                    ReturnOrder _elem99;
35460
                    _elem99 = new ReturnOrder();
35461
                    _elem99.read(iprot);
35462
                    this.success.add(_elem99);
2690 chandransh 35463
                  }
35464
                  iprot.readListEnd();
35465
                }
35466
              } else { 
35467
                TProtocolUtil.skip(iprot, field.type);
35468
              }
35469
              break;
35470
          }
35471
          iprot.readFieldEnd();
35472
        }
35473
      }
35474
      iprot.readStructEnd();
35475
      validate();
35476
    }
35477
 
35478
    public void write(TProtocol oprot) throws TException {
35479
      oprot.writeStructBegin(STRUCT_DESC);
35480
 
35481
      if (this.isSetSuccess()) {
35482
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
35483
        {
35484
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
2765 chandransh 35485
          for (ReturnOrder _iter100 : this.success)
2690 chandransh 35486
          {
2765 chandransh 35487
            _iter100.write(oprot);
2690 chandransh 35488
          }
35489
          oprot.writeListEnd();
35490
        }
35491
        oprot.writeFieldEnd();
35492
      }
35493
      oprot.writeFieldStop();
35494
      oprot.writeStructEnd();
35495
    }
35496
 
35497
    @Override
35498
    public String toString() {
35499
      StringBuilder sb = new StringBuilder("getReturnOrders_result(");
35500
      boolean first = true;
35501
 
35502
      sb.append("success:");
35503
      if (this.success == null) {
35504
        sb.append("null");
35505
      } else {
35506
        sb.append(this.success);
35507
      }
35508
      first = false;
35509
      sb.append(")");
35510
      return sb.toString();
35511
    }
35512
 
35513
    public void validate() throws TException {
35514
      // check for required fields
35515
    }
35516
 
35517
  }
35518
 
2700 chandransh 35519
  public static class getReturnOrder_args implements TBase<getReturnOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrder_args>   {
35520
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrder_args");
35521
 
35522
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
35523
 
35524
    private long id;
35525
 
35526
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35527
    public enum _Fields implements TFieldIdEnum {
35528
      ID((short)1, "id");
35529
 
35530
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35531
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35532
 
35533
      static {
35534
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35535
          byId.put((int)field._thriftId, field);
35536
          byName.put(field.getFieldName(), field);
35537
        }
35538
      }
35539
 
35540
      /**
35541
       * Find the _Fields constant that matches fieldId, or null if its not found.
35542
       */
35543
      public static _Fields findByThriftId(int fieldId) {
35544
        return byId.get(fieldId);
35545
      }
35546
 
35547
      /**
35548
       * Find the _Fields constant that matches fieldId, throwing an exception
35549
       * if it is not found.
35550
       */
35551
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35552
        _Fields fields = findByThriftId(fieldId);
35553
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35554
        return fields;
35555
      }
35556
 
35557
      /**
35558
       * Find the _Fields constant that matches name, or null if its not found.
35559
       */
35560
      public static _Fields findByName(String name) {
35561
        return byName.get(name);
35562
      }
35563
 
35564
      private final short _thriftId;
35565
      private final String _fieldName;
35566
 
35567
      _Fields(short thriftId, String fieldName) {
35568
        _thriftId = thriftId;
35569
        _fieldName = fieldName;
35570
      }
35571
 
35572
      public short getThriftFieldId() {
35573
        return _thriftId;
35574
      }
35575
 
35576
      public String getFieldName() {
35577
        return _fieldName;
35578
      }
35579
    }
35580
 
35581
    // isset id assignments
35582
    private static final int __ID_ISSET_ID = 0;
35583
    private BitSet __isset_bit_vector = new BitSet(1);
35584
 
35585
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35586
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
35587
          new FieldValueMetaData(TType.I64)));
35588
    }});
35589
 
35590
    static {
35591
      FieldMetaData.addStructMetaDataMap(getReturnOrder_args.class, metaDataMap);
35592
    }
35593
 
35594
    public getReturnOrder_args() {
35595
    }
35596
 
35597
    public getReturnOrder_args(
35598
      long id)
35599
    {
35600
      this();
35601
      this.id = id;
35602
      setIdIsSet(true);
35603
    }
35604
 
35605
    /**
35606
     * Performs a deep copy on <i>other</i>.
35607
     */
35608
    public getReturnOrder_args(getReturnOrder_args other) {
35609
      __isset_bit_vector.clear();
35610
      __isset_bit_vector.or(other.__isset_bit_vector);
35611
      this.id = other.id;
35612
    }
35613
 
35614
    public getReturnOrder_args deepCopy() {
35615
      return new getReturnOrder_args(this);
35616
    }
35617
 
35618
    @Deprecated
35619
    public getReturnOrder_args clone() {
35620
      return new getReturnOrder_args(this);
35621
    }
35622
 
35623
    public long getId() {
35624
      return this.id;
35625
    }
35626
 
35627
    public getReturnOrder_args setId(long id) {
35628
      this.id = id;
35629
      setIdIsSet(true);
35630
      return this;
35631
    }
35632
 
35633
    public void unsetId() {
35634
      __isset_bit_vector.clear(__ID_ISSET_ID);
35635
    }
35636
 
35637
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
35638
    public boolean isSetId() {
35639
      return __isset_bit_vector.get(__ID_ISSET_ID);
35640
    }
35641
 
35642
    public void setIdIsSet(boolean value) {
35643
      __isset_bit_vector.set(__ID_ISSET_ID, value);
35644
    }
35645
 
35646
    public void setFieldValue(_Fields field, Object value) {
35647
      switch (field) {
35648
      case ID:
35649
        if (value == null) {
35650
          unsetId();
35651
        } else {
35652
          setId((Long)value);
35653
        }
35654
        break;
35655
 
35656
      }
35657
    }
35658
 
35659
    public void setFieldValue(int fieldID, Object value) {
35660
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35661
    }
35662
 
35663
    public Object getFieldValue(_Fields field) {
35664
      switch (field) {
35665
      case ID:
35666
        return new Long(getId());
35667
 
35668
      }
35669
      throw new IllegalStateException();
35670
    }
35671
 
35672
    public Object getFieldValue(int fieldId) {
35673
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35674
    }
35675
 
35676
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35677
    public boolean isSet(_Fields field) {
35678
      switch (field) {
35679
      case ID:
35680
        return isSetId();
35681
      }
35682
      throw new IllegalStateException();
35683
    }
35684
 
35685
    public boolean isSet(int fieldID) {
35686
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35687
    }
35688
 
35689
    @Override
35690
    public boolean equals(Object that) {
35691
      if (that == null)
35692
        return false;
35693
      if (that instanceof getReturnOrder_args)
35694
        return this.equals((getReturnOrder_args)that);
35695
      return false;
35696
    }
35697
 
35698
    public boolean equals(getReturnOrder_args that) {
35699
      if (that == null)
35700
        return false;
35701
 
35702
      boolean this_present_id = true;
35703
      boolean that_present_id = true;
35704
      if (this_present_id || that_present_id) {
35705
        if (!(this_present_id && that_present_id))
35706
          return false;
35707
        if (this.id != that.id)
35708
          return false;
35709
      }
35710
 
35711
      return true;
35712
    }
35713
 
35714
    @Override
35715
    public int hashCode() {
35716
      return 0;
35717
    }
35718
 
35719
    public int compareTo(getReturnOrder_args other) {
35720
      if (!getClass().equals(other.getClass())) {
35721
        return getClass().getName().compareTo(other.getClass().getName());
35722
      }
35723
 
35724
      int lastComparison = 0;
35725
      getReturnOrder_args typedOther = (getReturnOrder_args)other;
35726
 
35727
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
35728
      if (lastComparison != 0) {
35729
        return lastComparison;
35730
      }
35731
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
35732
      if (lastComparison != 0) {
35733
        return lastComparison;
35734
      }
35735
      return 0;
35736
    }
35737
 
35738
    public void read(TProtocol iprot) throws TException {
35739
      TField field;
35740
      iprot.readStructBegin();
35741
      while (true)
35742
      {
35743
        field = iprot.readFieldBegin();
35744
        if (field.type == TType.STOP) { 
35745
          break;
35746
        }
35747
        _Fields fieldId = _Fields.findByThriftId(field.id);
35748
        if (fieldId == null) {
35749
          TProtocolUtil.skip(iprot, field.type);
35750
        } else {
35751
          switch (fieldId) {
35752
            case ID:
35753
              if (field.type == TType.I64) {
35754
                this.id = iprot.readI64();
35755
                setIdIsSet(true);
35756
              } else { 
35757
                TProtocolUtil.skip(iprot, field.type);
35758
              }
35759
              break;
35760
          }
35761
          iprot.readFieldEnd();
35762
        }
35763
      }
35764
      iprot.readStructEnd();
35765
      validate();
35766
    }
35767
 
35768
    public void write(TProtocol oprot) throws TException {
35769
      validate();
35770
 
35771
      oprot.writeStructBegin(STRUCT_DESC);
35772
      oprot.writeFieldBegin(ID_FIELD_DESC);
35773
      oprot.writeI64(this.id);
35774
      oprot.writeFieldEnd();
35775
      oprot.writeFieldStop();
35776
      oprot.writeStructEnd();
35777
    }
35778
 
35779
    @Override
35780
    public String toString() {
35781
      StringBuilder sb = new StringBuilder("getReturnOrder_args(");
35782
      boolean first = true;
35783
 
35784
      sb.append("id:");
35785
      sb.append(this.id);
35786
      first = false;
35787
      sb.append(")");
35788
      return sb.toString();
35789
    }
35790
 
35791
    public void validate() throws TException {
35792
      // check for required fields
35793
    }
35794
 
35795
  }
35796
 
35797
  public static class getReturnOrder_result implements TBase<getReturnOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrder_result>   {
35798
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrder_result");
35799
 
35800
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
35801
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
35802
 
35803
    private ReturnOrder success;
35804
    private TransactionServiceException ex;
35805
 
35806
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35807
    public enum _Fields implements TFieldIdEnum {
35808
      SUCCESS((short)0, "success"),
35809
      EX((short)1, "ex");
35810
 
35811
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35812
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35813
 
35814
      static {
35815
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35816
          byId.put((int)field._thriftId, field);
35817
          byName.put(field.getFieldName(), field);
35818
        }
35819
      }
35820
 
35821
      /**
35822
       * Find the _Fields constant that matches fieldId, or null if its not found.
35823
       */
35824
      public static _Fields findByThriftId(int fieldId) {
35825
        return byId.get(fieldId);
35826
      }
35827
 
35828
      /**
35829
       * Find the _Fields constant that matches fieldId, throwing an exception
35830
       * if it is not found.
35831
       */
35832
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35833
        _Fields fields = findByThriftId(fieldId);
35834
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35835
        return fields;
35836
      }
35837
 
35838
      /**
35839
       * Find the _Fields constant that matches name, or null if its not found.
35840
       */
35841
      public static _Fields findByName(String name) {
35842
        return byName.get(name);
35843
      }
35844
 
35845
      private final short _thriftId;
35846
      private final String _fieldName;
35847
 
35848
      _Fields(short thriftId, String fieldName) {
35849
        _thriftId = thriftId;
35850
        _fieldName = fieldName;
35851
      }
35852
 
35853
      public short getThriftFieldId() {
35854
        return _thriftId;
35855
      }
35856
 
35857
      public String getFieldName() {
35858
        return _fieldName;
35859
      }
35860
    }
35861
 
35862
    // isset id assignments
35863
 
35864
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35865
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
35866
          new StructMetaData(TType.STRUCT, ReturnOrder.class)));
35867
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
35868
          new FieldValueMetaData(TType.STRUCT)));
35869
    }});
35870
 
35871
    static {
35872
      FieldMetaData.addStructMetaDataMap(getReturnOrder_result.class, metaDataMap);
35873
    }
35874
 
35875
    public getReturnOrder_result() {
35876
    }
35877
 
35878
    public getReturnOrder_result(
35879
      ReturnOrder success,
35880
      TransactionServiceException ex)
35881
    {
35882
      this();
35883
      this.success = success;
35884
      this.ex = ex;
35885
    }
35886
 
35887
    /**
35888
     * Performs a deep copy on <i>other</i>.
35889
     */
35890
    public getReturnOrder_result(getReturnOrder_result other) {
35891
      if (other.isSetSuccess()) {
35892
        this.success = new ReturnOrder(other.success);
35893
      }
35894
      if (other.isSetEx()) {
35895
        this.ex = new TransactionServiceException(other.ex);
35896
      }
35897
    }
35898
 
35899
    public getReturnOrder_result deepCopy() {
35900
      return new getReturnOrder_result(this);
35901
    }
35902
 
35903
    @Deprecated
35904
    public getReturnOrder_result clone() {
35905
      return new getReturnOrder_result(this);
35906
    }
35907
 
35908
    public ReturnOrder getSuccess() {
35909
      return this.success;
35910
    }
35911
 
35912
    public getReturnOrder_result setSuccess(ReturnOrder success) {
35913
      this.success = success;
35914
      return this;
35915
    }
35916
 
35917
    public void unsetSuccess() {
35918
      this.success = null;
35919
    }
35920
 
35921
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
35922
    public boolean isSetSuccess() {
35923
      return this.success != null;
35924
    }
35925
 
35926
    public void setSuccessIsSet(boolean value) {
35927
      if (!value) {
35928
        this.success = null;
35929
      }
35930
    }
35931
 
35932
    public TransactionServiceException getEx() {
35933
      return this.ex;
35934
    }
35935
 
35936
    public getReturnOrder_result setEx(TransactionServiceException ex) {
35937
      this.ex = ex;
35938
      return this;
35939
    }
35940
 
35941
    public void unsetEx() {
35942
      this.ex = null;
35943
    }
35944
 
35945
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
35946
    public boolean isSetEx() {
35947
      return this.ex != null;
35948
    }
35949
 
35950
    public void setExIsSet(boolean value) {
35951
      if (!value) {
35952
        this.ex = null;
35953
      }
35954
    }
35955
 
35956
    public void setFieldValue(_Fields field, Object value) {
35957
      switch (field) {
35958
      case SUCCESS:
35959
        if (value == null) {
35960
          unsetSuccess();
35961
        } else {
35962
          setSuccess((ReturnOrder)value);
35963
        }
35964
        break;
35965
 
35966
      case EX:
35967
        if (value == null) {
35968
          unsetEx();
35969
        } else {
35970
          setEx((TransactionServiceException)value);
35971
        }
35972
        break;
35973
 
35974
      }
35975
    }
35976
 
35977
    public void setFieldValue(int fieldID, Object value) {
35978
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35979
    }
35980
 
35981
    public Object getFieldValue(_Fields field) {
35982
      switch (field) {
35983
      case SUCCESS:
35984
        return getSuccess();
35985
 
35986
      case EX:
35987
        return getEx();
35988
 
35989
      }
35990
      throw new IllegalStateException();
35991
    }
35992
 
35993
    public Object getFieldValue(int fieldId) {
35994
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35995
    }
35996
 
35997
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35998
    public boolean isSet(_Fields field) {
35999
      switch (field) {
36000
      case SUCCESS:
36001
        return isSetSuccess();
36002
      case EX:
36003
        return isSetEx();
36004
      }
36005
      throw new IllegalStateException();
36006
    }
36007
 
36008
    public boolean isSet(int fieldID) {
36009
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
36010
    }
36011
 
36012
    @Override
36013
    public boolean equals(Object that) {
36014
      if (that == null)
36015
        return false;
36016
      if (that instanceof getReturnOrder_result)
36017
        return this.equals((getReturnOrder_result)that);
36018
      return false;
36019
    }
36020
 
36021
    public boolean equals(getReturnOrder_result that) {
36022
      if (that == null)
36023
        return false;
36024
 
36025
      boolean this_present_success = true && this.isSetSuccess();
36026
      boolean that_present_success = true && that.isSetSuccess();
36027
      if (this_present_success || that_present_success) {
36028
        if (!(this_present_success && that_present_success))
36029
          return false;
36030
        if (!this.success.equals(that.success))
36031
          return false;
36032
      }
36033
 
36034
      boolean this_present_ex = true && this.isSetEx();
36035
      boolean that_present_ex = true && that.isSetEx();
36036
      if (this_present_ex || that_present_ex) {
36037
        if (!(this_present_ex && that_present_ex))
36038
          return false;
36039
        if (!this.ex.equals(that.ex))
36040
          return false;
36041
      }
36042
 
36043
      return true;
36044
    }
36045
 
36046
    @Override
36047
    public int hashCode() {
36048
      return 0;
36049
    }
36050
 
36051
    public int compareTo(getReturnOrder_result other) {
36052
      if (!getClass().equals(other.getClass())) {
36053
        return getClass().getName().compareTo(other.getClass().getName());
36054
      }
36055
 
36056
      int lastComparison = 0;
36057
      getReturnOrder_result typedOther = (getReturnOrder_result)other;
36058
 
36059
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
36060
      if (lastComparison != 0) {
36061
        return lastComparison;
36062
      }
36063
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
36064
      if (lastComparison != 0) {
36065
        return lastComparison;
36066
      }
36067
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
36068
      if (lastComparison != 0) {
36069
        return lastComparison;
36070
      }
36071
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
36072
      if (lastComparison != 0) {
36073
        return lastComparison;
36074
      }
36075
      return 0;
36076
    }
36077
 
36078
    public void read(TProtocol iprot) throws TException {
36079
      TField field;
36080
      iprot.readStructBegin();
36081
      while (true)
36082
      {
36083
        field = iprot.readFieldBegin();
36084
        if (field.type == TType.STOP) { 
36085
          break;
36086
        }
36087
        _Fields fieldId = _Fields.findByThriftId(field.id);
36088
        if (fieldId == null) {
36089
          TProtocolUtil.skip(iprot, field.type);
36090
        } else {
36091
          switch (fieldId) {
36092
            case SUCCESS:
36093
              if (field.type == TType.STRUCT) {
36094
                this.success = new ReturnOrder();
36095
                this.success.read(iprot);
36096
              } else { 
36097
                TProtocolUtil.skip(iprot, field.type);
36098
              }
36099
              break;
36100
            case EX:
36101
              if (field.type == TType.STRUCT) {
36102
                this.ex = new TransactionServiceException();
36103
                this.ex.read(iprot);
36104
              } else { 
36105
                TProtocolUtil.skip(iprot, field.type);
36106
              }
36107
              break;
36108
          }
36109
          iprot.readFieldEnd();
36110
        }
36111
      }
36112
      iprot.readStructEnd();
36113
      validate();
36114
    }
36115
 
36116
    public void write(TProtocol oprot) throws TException {
36117
      oprot.writeStructBegin(STRUCT_DESC);
36118
 
36119
      if (this.isSetSuccess()) {
36120
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
36121
        this.success.write(oprot);
36122
        oprot.writeFieldEnd();
36123
      } else if (this.isSetEx()) {
36124
        oprot.writeFieldBegin(EX_FIELD_DESC);
36125
        this.ex.write(oprot);
36126
        oprot.writeFieldEnd();
36127
      }
36128
      oprot.writeFieldStop();
36129
      oprot.writeStructEnd();
36130
    }
36131
 
36132
    @Override
36133
    public String toString() {
36134
      StringBuilder sb = new StringBuilder("getReturnOrder_result(");
36135
      boolean first = true;
36136
 
36137
      sb.append("success:");
36138
      if (this.success == null) {
36139
        sb.append("null");
36140
      } else {
36141
        sb.append(this.success);
36142
      }
36143
      first = false;
36144
      if (!first) sb.append(", ");
36145
      sb.append("ex:");
36146
      if (this.ex == null) {
36147
        sb.append("null");
36148
      } else {
36149
        sb.append(this.ex);
36150
      }
36151
      first = false;
36152
      sb.append(")");
36153
      return sb.toString();
36154
    }
36155
 
36156
    public void validate() throws TException {
36157
      // check for required fields
36158
    }
36159
 
36160
  }
36161
 
2690 chandransh 36162
  public static class processReturn_args implements TBase<processReturn_args._Fields>, java.io.Serializable, Cloneable, Comparable<processReturn_args>   {
36163
    private static final TStruct STRUCT_DESC = new TStruct("processReturn_args");
36164
 
36165
    private static final TField RETURN_ORDER_ID_FIELD_DESC = new TField("returnOrderId", TType.I64, (short)1);
36166
 
36167
    private long returnOrderId;
36168
 
36169
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
36170
    public enum _Fields implements TFieldIdEnum {
36171
      RETURN_ORDER_ID((short)1, "returnOrderId");
36172
 
36173
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
36174
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
36175
 
36176
      static {
36177
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
36178
          byId.put((int)field._thriftId, field);
36179
          byName.put(field.getFieldName(), field);
36180
        }
36181
      }
36182
 
36183
      /**
36184
       * Find the _Fields constant that matches fieldId, or null if its not found.
36185
       */
36186
      public static _Fields findByThriftId(int fieldId) {
36187
        return byId.get(fieldId);
36188
      }
36189
 
36190
      /**
36191
       * Find the _Fields constant that matches fieldId, throwing an exception
36192
       * if it is not found.
36193
       */
36194
      public static _Fields findByThriftIdOrThrow(int fieldId) {
36195
        _Fields fields = findByThriftId(fieldId);
36196
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
36197
        return fields;
36198
      }
36199
 
36200
      /**
36201
       * Find the _Fields constant that matches name, or null if its not found.
36202
       */
36203
      public static _Fields findByName(String name) {
36204
        return byName.get(name);
36205
      }
36206
 
36207
      private final short _thriftId;
36208
      private final String _fieldName;
36209
 
36210
      _Fields(short thriftId, String fieldName) {
36211
        _thriftId = thriftId;
36212
        _fieldName = fieldName;
36213
      }
36214
 
36215
      public short getThriftFieldId() {
36216
        return _thriftId;
36217
      }
36218
 
36219
      public String getFieldName() {
36220
        return _fieldName;
36221
      }
36222
    }
36223
 
36224
    // isset id assignments
36225
    private static final int __RETURNORDERID_ISSET_ID = 0;
36226
    private BitSet __isset_bit_vector = new BitSet(1);
36227
 
36228
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
36229
      put(_Fields.RETURN_ORDER_ID, new FieldMetaData("returnOrderId", TFieldRequirementType.DEFAULT, 
36230
          new FieldValueMetaData(TType.I64)));
36231
    }});
36232
 
36233
    static {
36234
      FieldMetaData.addStructMetaDataMap(processReturn_args.class, metaDataMap);
36235
    }
36236
 
36237
    public processReturn_args() {
36238
    }
36239
 
36240
    public processReturn_args(
36241
      long returnOrderId)
36242
    {
36243
      this();
36244
      this.returnOrderId = returnOrderId;
36245
      setReturnOrderIdIsSet(true);
36246
    }
36247
 
36248
    /**
36249
     * Performs a deep copy on <i>other</i>.
36250
     */
36251
    public processReturn_args(processReturn_args other) {
36252
      __isset_bit_vector.clear();
36253
      __isset_bit_vector.or(other.__isset_bit_vector);
36254
      this.returnOrderId = other.returnOrderId;
36255
    }
36256
 
36257
    public processReturn_args deepCopy() {
36258
      return new processReturn_args(this);
36259
    }
36260
 
36261
    @Deprecated
36262
    public processReturn_args clone() {
36263
      return new processReturn_args(this);
36264
    }
36265
 
36266
    public long getReturnOrderId() {
36267
      return this.returnOrderId;
36268
    }
36269
 
36270
    public processReturn_args setReturnOrderId(long returnOrderId) {
36271
      this.returnOrderId = returnOrderId;
36272
      setReturnOrderIdIsSet(true);
36273
      return this;
36274
    }
36275
 
36276
    public void unsetReturnOrderId() {
36277
      __isset_bit_vector.clear(__RETURNORDERID_ISSET_ID);
36278
    }
36279
 
36280
    /** Returns true if field returnOrderId is set (has been asigned a value) and false otherwise */
36281
    public boolean isSetReturnOrderId() {
36282
      return __isset_bit_vector.get(__RETURNORDERID_ISSET_ID);
36283
    }
36284
 
36285
    public void setReturnOrderIdIsSet(boolean value) {
36286
      __isset_bit_vector.set(__RETURNORDERID_ISSET_ID, value);
36287
    }
36288
 
36289
    public void setFieldValue(_Fields field, Object value) {
36290
      switch (field) {
36291
      case RETURN_ORDER_ID:
36292
        if (value == null) {
36293
          unsetReturnOrderId();
36294
        } else {
36295
          setReturnOrderId((Long)value);
36296
        }
36297
        break;
36298
 
36299
      }
36300
    }
36301
 
36302
    public void setFieldValue(int fieldID, Object value) {
36303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
36304
    }
36305
 
36306
    public Object getFieldValue(_Fields field) {
36307
      switch (field) {
36308
      case RETURN_ORDER_ID:
36309
        return new Long(getReturnOrderId());
36310
 
36311
      }
36312
      throw new IllegalStateException();
36313
    }
36314
 
36315
    public Object getFieldValue(int fieldId) {
36316
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
36317
    }
36318
 
36319
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
36320
    public boolean isSet(_Fields field) {
36321
      switch (field) {
36322
      case RETURN_ORDER_ID:
36323
        return isSetReturnOrderId();
36324
      }
36325
      throw new IllegalStateException();
36326
    }
36327
 
36328
    public boolean isSet(int fieldID) {
36329
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
36330
    }
36331
 
36332
    @Override
36333
    public boolean equals(Object that) {
36334
      if (that == null)
36335
        return false;
36336
      if (that instanceof processReturn_args)
36337
        return this.equals((processReturn_args)that);
36338
      return false;
36339
    }
36340
 
36341
    public boolean equals(processReturn_args that) {
36342
      if (that == null)
36343
        return false;
36344
 
36345
      boolean this_present_returnOrderId = true;
36346
      boolean that_present_returnOrderId = true;
36347
      if (this_present_returnOrderId || that_present_returnOrderId) {
36348
        if (!(this_present_returnOrderId && that_present_returnOrderId))
36349
          return false;
36350
        if (this.returnOrderId != that.returnOrderId)
36351
          return false;
36352
      }
36353
 
36354
      return true;
36355
    }
36356
 
36357
    @Override
36358
    public int hashCode() {
36359
      return 0;
36360
    }
36361
 
36362
    public int compareTo(processReturn_args other) {
36363
      if (!getClass().equals(other.getClass())) {
36364
        return getClass().getName().compareTo(other.getClass().getName());
36365
      }
36366
 
36367
      int lastComparison = 0;
36368
      processReturn_args typedOther = (processReturn_args)other;
36369
 
36370
      lastComparison = Boolean.valueOf(isSetReturnOrderId()).compareTo(isSetReturnOrderId());
36371
      if (lastComparison != 0) {
36372
        return lastComparison;
36373
      }
36374
      lastComparison = TBaseHelper.compareTo(returnOrderId, typedOther.returnOrderId);
36375
      if (lastComparison != 0) {
36376
        return lastComparison;
36377
      }
36378
      return 0;
36379
    }
36380
 
36381
    public void read(TProtocol iprot) throws TException {
36382
      TField field;
36383
      iprot.readStructBegin();
36384
      while (true)
36385
      {
36386
        field = iprot.readFieldBegin();
36387
        if (field.type == TType.STOP) { 
36388
          break;
36389
        }
36390
        _Fields fieldId = _Fields.findByThriftId(field.id);
36391
        if (fieldId == null) {
36392
          TProtocolUtil.skip(iprot, field.type);
36393
        } else {
36394
          switch (fieldId) {
36395
            case RETURN_ORDER_ID:
36396
              if (field.type == TType.I64) {
36397
                this.returnOrderId = iprot.readI64();
36398
                setReturnOrderIdIsSet(true);
36399
              } else { 
36400
                TProtocolUtil.skip(iprot, field.type);
36401
              }
36402
              break;
36403
          }
36404
          iprot.readFieldEnd();
36405
        }
36406
      }
36407
      iprot.readStructEnd();
36408
      validate();
36409
    }
36410
 
36411
    public void write(TProtocol oprot) throws TException {
36412
      validate();
36413
 
36414
      oprot.writeStructBegin(STRUCT_DESC);
36415
      oprot.writeFieldBegin(RETURN_ORDER_ID_FIELD_DESC);
36416
      oprot.writeI64(this.returnOrderId);
36417
      oprot.writeFieldEnd();
36418
      oprot.writeFieldStop();
36419
      oprot.writeStructEnd();
36420
    }
36421
 
36422
    @Override
36423
    public String toString() {
36424
      StringBuilder sb = new StringBuilder("processReturn_args(");
36425
      boolean first = true;
36426
 
36427
      sb.append("returnOrderId:");
36428
      sb.append(this.returnOrderId);
36429
      first = false;
36430
      sb.append(")");
36431
      return sb.toString();
36432
    }
36433
 
36434
    public void validate() throws TException {
36435
      // check for required fields
36436
    }
36437
 
36438
  }
36439
 
36440
  public static class processReturn_result implements TBase<processReturn_result._Fields>, java.io.Serializable, Cloneable, Comparable<processReturn_result>   {
36441
    private static final TStruct STRUCT_DESC = new TStruct("processReturn_result");
36442
 
36443
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
36444
 
36445
    private TransactionServiceException ex;
36446
 
36447
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
36448
    public enum _Fields implements TFieldIdEnum {
36449
      EX((short)1, "ex");
36450
 
36451
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
36452
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
36453
 
36454
      static {
36455
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
36456
          byId.put((int)field._thriftId, field);
36457
          byName.put(field.getFieldName(), field);
36458
        }
36459
      }
36460
 
36461
      /**
36462
       * Find the _Fields constant that matches fieldId, or null if its not found.
36463
       */
36464
      public static _Fields findByThriftId(int fieldId) {
36465
        return byId.get(fieldId);
36466
      }
36467
 
36468
      /**
36469
       * Find the _Fields constant that matches fieldId, throwing an exception
36470
       * if it is not found.
36471
       */
36472
      public static _Fields findByThriftIdOrThrow(int fieldId) {
36473
        _Fields fields = findByThriftId(fieldId);
36474
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
36475
        return fields;
36476
      }
36477
 
36478
      /**
36479
       * Find the _Fields constant that matches name, or null if its not found.
36480
       */
36481
      public static _Fields findByName(String name) {
36482
        return byName.get(name);
36483
      }
36484
 
36485
      private final short _thriftId;
36486
      private final String _fieldName;
36487
 
36488
      _Fields(short thriftId, String fieldName) {
36489
        _thriftId = thriftId;
36490
        _fieldName = fieldName;
36491
      }
36492
 
36493
      public short getThriftFieldId() {
36494
        return _thriftId;
36495
      }
36496
 
36497
      public String getFieldName() {
36498
        return _fieldName;
36499
      }
36500
    }
36501
 
36502
    // isset id assignments
36503
 
36504
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
36505
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
36506
          new FieldValueMetaData(TType.STRUCT)));
36507
    }});
36508
 
36509
    static {
36510
      FieldMetaData.addStructMetaDataMap(processReturn_result.class, metaDataMap);
36511
    }
36512
 
36513
    public processReturn_result() {
36514
    }
36515
 
36516
    public processReturn_result(
36517
      TransactionServiceException ex)
36518
    {
36519
      this();
36520
      this.ex = ex;
36521
    }
36522
 
36523
    /**
36524
     * Performs a deep copy on <i>other</i>.
36525
     */
36526
    public processReturn_result(processReturn_result other) {
36527
      if (other.isSetEx()) {
36528
        this.ex = new TransactionServiceException(other.ex);
36529
      }
36530
    }
36531
 
36532
    public processReturn_result deepCopy() {
36533
      return new processReturn_result(this);
36534
    }
36535
 
36536
    @Deprecated
36537
    public processReturn_result clone() {
36538
      return new processReturn_result(this);
36539
    }
36540
 
36541
    public TransactionServiceException getEx() {
36542
      return this.ex;
36543
    }
36544
 
36545
    public processReturn_result setEx(TransactionServiceException ex) {
36546
      this.ex = ex;
36547
      return this;
36548
    }
36549
 
36550
    public void unsetEx() {
36551
      this.ex = null;
36552
    }
36553
 
36554
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
36555
    public boolean isSetEx() {
36556
      return this.ex != null;
36557
    }
36558
 
36559
    public void setExIsSet(boolean value) {
36560
      if (!value) {
36561
        this.ex = null;
36562
      }
36563
    }
36564
 
36565
    public void setFieldValue(_Fields field, Object value) {
36566
      switch (field) {
36567
      case EX:
36568
        if (value == null) {
36569
          unsetEx();
36570
        } else {
36571
          setEx((TransactionServiceException)value);
36572
        }
36573
        break;
36574
 
36575
      }
36576
    }
36577
 
36578
    public void setFieldValue(int fieldID, Object value) {
36579
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
36580
    }
36581
 
36582
    public Object getFieldValue(_Fields field) {
36583
      switch (field) {
36584
      case EX:
36585
        return getEx();
36586
 
36587
      }
36588
      throw new IllegalStateException();
36589
    }
36590
 
36591
    public Object getFieldValue(int fieldId) {
36592
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
36593
    }
36594
 
36595
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
36596
    public boolean isSet(_Fields field) {
36597
      switch (field) {
36598
      case EX:
36599
        return isSetEx();
36600
      }
36601
      throw new IllegalStateException();
36602
    }
36603
 
36604
    public boolean isSet(int fieldID) {
36605
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
36606
    }
36607
 
36608
    @Override
36609
    public boolean equals(Object that) {
36610
      if (that == null)
36611
        return false;
36612
      if (that instanceof processReturn_result)
36613
        return this.equals((processReturn_result)that);
36614
      return false;
36615
    }
36616
 
36617
    public boolean equals(processReturn_result that) {
36618
      if (that == null)
36619
        return false;
36620
 
36621
      boolean this_present_ex = true && this.isSetEx();
36622
      boolean that_present_ex = true && that.isSetEx();
36623
      if (this_present_ex || that_present_ex) {
36624
        if (!(this_present_ex && that_present_ex))
36625
          return false;
36626
        if (!this.ex.equals(that.ex))
36627
          return false;
36628
      }
36629
 
36630
      return true;
36631
    }
36632
 
36633
    @Override
36634
    public int hashCode() {
36635
      return 0;
36636
    }
36637
 
36638
    public int compareTo(processReturn_result other) {
36639
      if (!getClass().equals(other.getClass())) {
36640
        return getClass().getName().compareTo(other.getClass().getName());
36641
      }
36642
 
36643
      int lastComparison = 0;
36644
      processReturn_result typedOther = (processReturn_result)other;
36645
 
36646
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
36647
      if (lastComparison != 0) {
36648
        return lastComparison;
36649
      }
36650
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
36651
      if (lastComparison != 0) {
36652
        return lastComparison;
36653
      }
36654
      return 0;
36655
    }
36656
 
36657
    public void read(TProtocol iprot) throws TException {
36658
      TField field;
36659
      iprot.readStructBegin();
36660
      while (true)
36661
      {
36662
        field = iprot.readFieldBegin();
36663
        if (field.type == TType.STOP) { 
36664
          break;
36665
        }
36666
        _Fields fieldId = _Fields.findByThriftId(field.id);
36667
        if (fieldId == null) {
36668
          TProtocolUtil.skip(iprot, field.type);
36669
        } else {
36670
          switch (fieldId) {
36671
            case EX:
36672
              if (field.type == TType.STRUCT) {
36673
                this.ex = new TransactionServiceException();
36674
                this.ex.read(iprot);
36675
              } else { 
36676
                TProtocolUtil.skip(iprot, field.type);
36677
              }
36678
              break;
36679
          }
36680
          iprot.readFieldEnd();
36681
        }
36682
      }
36683
      iprot.readStructEnd();
36684
      validate();
36685
    }
36686
 
36687
    public void write(TProtocol oprot) throws TException {
36688
      oprot.writeStructBegin(STRUCT_DESC);
36689
 
36690
      if (this.isSetEx()) {
36691
        oprot.writeFieldBegin(EX_FIELD_DESC);
36692
        this.ex.write(oprot);
36693
        oprot.writeFieldEnd();
36694
      }
36695
      oprot.writeFieldStop();
36696
      oprot.writeStructEnd();
36697
    }
36698
 
36699
    @Override
36700
    public String toString() {
36701
      StringBuilder sb = new StringBuilder("processReturn_result(");
36702
      boolean first = true;
36703
 
36704
      sb.append("ex:");
36705
      if (this.ex == null) {
36706
        sb.append("null");
36707
      } else {
36708
        sb.append(this.ex);
36709
      }
36710
      first = false;
36711
      sb.append(")");
36712
      return sb.toString();
36713
    }
36714
 
36715
    public void validate() throws TException {
36716
      // check for required fields
36717
    }
36718
 
36719
  }
36720
 
68 ashish 36721
}