Subversion Repositories SmartDukaan

Rev

Rev 2819 | Rev 3014 | 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
2842 chandransh 98
     * @param billingType
1148 chandransh 99
     */
2842 chandransh 100
    public boolean addJacketNumber(long orderId, long jacketNumber, long imeiNumber, String itemNumber, String billedBy, long billingType) throws TransactionServiceException, TException;
1148 chandransh 101
 
923 rajveer 102
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
103
 
104
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
105
 
1529 ankur.sing 106
    /**
107
     * Returns list of orders for given transaction Id. Also filters based on customer Id so that
108
     * only user who owns the transaction can view its order details.
109
     * 
110
     * @param transactionId
111
     * @param customerId
112
     */
113
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException;
68 ashish 114
 
483 rajveer 115
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 116
 
483 rajveer 117
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 118
 
483 rajveer 119
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 120
 
483 rajveer 121
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 122
 
758 chandransh 123
    /**
1529 ankur.sing 124
     * Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
125
     * Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
126
     * 
127
     * @param orderId
128
     * @param customerId
129
     */
130
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException;
131
 
132
    /**
1221 chandransh 133
     * Create a batch of all the pending orders for the given warehouse.
134
     * The returned list is orderd by created_timestamp.
135
     * If there are no pending orders, an empty list is returned.
136
     * 
137
     * @param warehouseId
138
     */
139
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
140
 
141
    /**
1209 chandransh 142
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
143
     * 
144
     * @param orderId
145
     */
146
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
147
 
148
    /**
758 chandransh 149
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
150
     * 
151
     * @param warehouseId
152
     * @param providerId
153
     */
154
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
155
 
1114 chandransh 156
    /**
157
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
158
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
159
     * Raises an exception if we encounter report for an AWB number that we did not ship.
160
     * 
161
     * @param providerId
162
     * @param pickupDetails
163
     */
1245 chandransh 164
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 165
 
1133 chandransh 166
    /**
167
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
168
     * the name of the receiver.
169
     * Raises an exception if we encounter report for an AWB number that we did not ship.
170
     * 
171
     * @param providerId
172
     * @param deliveredOrders
173
     */
174
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
175
 
176
    /**
177
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
178
     * Raises an exception if we encounter report for an AWB number that we did not ship.
179
     * 
180
     * @param providerId
181
     * @param returnedOrders
182
     */
183
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
184
 
1245 chandransh 185
    /**
186
     * Update the status description of orders whose AWB numbers are keys of the Map.
187
     * 
188
     * @param providerId
189
     * @param undeliveredOrders
190
     */
191
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
192
 
1406 ankur.sing 193
    /**
194
     * Returns the list of orders whose delivery time has passed but have not been
195
     * delivered yet for the given provider and warehouse. To get a complete list of
196
     * undelivered orders, pass them as -1.
197
     * Returns an empty list if no such orders exist.
198
     * 
199
     * @param providerId
200
     * @param warehouseId
201
     */
202
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
203
 
483 rajveer 204
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 205
 
483 rajveer 206
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 207
 
1598 ankur.sing 208
    /**
209
     * Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
210
     */
211
    public long getValidOrderCount() throws TException;
212
 
1629 ankur.sing 213
    /**
214
     * Returns the number of distinct customers who have done successful transactions
215
     */
216
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException;
217
 
218
    /**
1731 ankur.sing 219
     * Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
220
     * List contains two values, first minimum amount and second maximum amount.
1629 ankur.sing 221
     */
1731 ankur.sing 222
    public List<Double> getValidOrdersAmountRange() throws TException;
1629 ankur.sing 223
 
1886 ankur.sing 224
    /**
225
     * Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
226
     * If limit is passed as 0, then all valid Orders are returned.
227
     * 
228
     * @param limit
229
     */
230
    public List<Order> getValidOrders(long limit) throws TException;
231
 
2538 chandransh 232
    /**
233
     * 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.
234
     * Returns the final flag status.
235
     * Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
236
     * 
237
     * @param orderId
238
     */
239
    public boolean toggleDOAFlag(long orderId) throws TransactionServiceException, TException;
240
 
241
    /**
242
     * Sends out an email to the account manager of the original courier provider used to ship the order.
243
     * If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
244
     * If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
245
     * For any other status, it returns false.
246
     * Throws an exception if the order with the given id couldn't be found.
247
     * 
248
     * @param orderId
249
     */
250
    public boolean requestPickupNumber(long orderId) throws TransactionServiceException, TException;
251
 
252
    /**
253
     * If the order status is DOA_PICKUP_REQUESTED, it does the following
254
     * 	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
255
     * 	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
256
     * 	3. Returns true
2590 chandransh 257
     * If the order is in any other status, it returns false.
2538 chandransh 258
     * Throws an exception if the order with the given id couldn't be found.
259
     * 
260
     * @param orderId
261
     * @param pickupNumber
262
     */
263
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException;
264
 
2590 chandransh 265
    /**
2765 chandransh 266
     * Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
267
     * Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
268
     * 
269
     * @param providerId
270
     * @param pickupDetails
271
     */
272
    public List<Order> markDoasAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException;
273
 
274
    /**
2601 chandransh 275
     * 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 276
     * If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
2590 chandransh 277
     * If the order is in any other state, it returns false.
278
     * Throws an exception if the order with the given id couldn't be found.
279
     * 
280
     * @param orderId
281
     */
2615 chandransh 282
    public boolean receiveReturn(long orderId) throws TransactionServiceException, TException;
2590 chandransh 283
 
284
    /**
2601 chandransh 285
     * Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
2615 chandransh 286
     * 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 287
     * If the order is in any other state, it returns false.
288
     * Throws an exception if the order with the given id couldn't be found.
289
     * 
290
     * @param orderId
291
     * @param isValid
292
     */
293
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException;
294
 
2615 chandransh 295
    /**
296
     * If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
297
     * 	1. Creates a new order for processing in the BILLED state. All billing information is saved.
298
     * 	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.
299
     * 	
300
     * If the order is in DOA_CERT_VALID state, it does the following:
301
     * 	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
302
     * 	2. Creates a return order for the warehouse executive to return the DOA material.
303
     * 	3. Marks the current order as the final DOA_RESHIPPED state.
304
     * 
305
     * Returns the id of the newly created order.
306
     * 
307
     * Throws an exception if the order with the given id couldn't be found.
308
     * 
309
     * @param orderId
310
     */
311
    public long reshipOrder(long orderId) throws TransactionServiceException, TException;
312
 
313
    /**
314
     * If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
315
     * 	1. Creates a refund request for batch processing.
316
     * 	2. Creates a return order for the warehouse executive to return the shipped material.
317
     * 	3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
318
     * 
319
     * If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
320
     * 	1. Creates a refund request for batch processing.
321
     * 	2. Marks the current order as the REFUNDED final state.
322
     * 
323
     * Returns True if it is successful, False otherwise.
324
     * 
325
     * Throws an exception if the order with the given id couldn't be found.
326
     * 
327
     * @param orderId
328
     */
329
    public boolean refundOrder(long orderId) throws TransactionServiceException, TException;
330
 
2690 chandransh 331
    /**
332
     * Get all return orders created between the from and to dates for the given warehouse.
333
     * Ignores the warehouse if it is passed as -1.
334
     * 
335
     * @param warehouseId
336
     * @param fromDate
337
     * @param toDate
338
     */
339
    public List<ReturnOrder> getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException;
340
 
341
    /**
2700 chandransh 342
     * Returns the ReturnOrder corresponding to the given id.
343
     * Throws an exception if the return order with the given id couldn't be found.
344
     * 
345
     * @param id
346
     */
347
    public ReturnOrder getReturnOrder(long id) throws TransactionServiceException, TException;
348
 
349
    /**
2690 chandransh 350
     * Marks the return order with the given id as processed. Raises an exception if no such return order exists.
351
     * 
352
     * @param returnOrderId
353
     */
354
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException;
355
 
2819 chandransh 356
    /**
357
     * Creates a purchase order corresponding to all the pending orders of the given warehouse.
2842 chandransh 358
     * Returns the PO no. of the newly created purchase order. Returns -1 no new purchase order had to be created.
2819 chandransh 359
     * 
360
     * @param warehouseId
361
     */
362
    public long createPurchaseOrder(long warehouseId) throws TransactionServiceException, TException;
363
 
68 ashish 364
  }
365
 
366
  public static class Client implements Iface {
367
    public Client(TProtocol prot)
368
    {
369
      this(prot, prot);
370
    }
371
 
372
    public Client(TProtocol iprot, TProtocol oprot)
373
    {
374
      iprot_ = iprot;
375
      oprot_ = oprot;
376
    }
377
 
378
    protected TProtocol iprot_;
379
    protected TProtocol oprot_;
380
 
381
    protected int seqid_;
382
 
383
    public TProtocol getInputProtocol()
384
    {
385
      return this.iprot_;
386
    }
387
 
388
    public TProtocol getOutputProtocol()
389
    {
390
      return this.oprot_;
391
    }
392
 
764 rajveer 393
    public void closeSession() throws TException
394
    {
395
      send_closeSession();
396
      recv_closeSession();
397
    }
398
 
399
    public void send_closeSession() throws TException
400
    {
401
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
402
      closeSession_args args = new closeSession_args();
403
      args.write(oprot_);
404
      oprot_.writeMessageEnd();
405
      oprot_.getTransport().flush();
406
    }
407
 
408
    public void recv_closeSession() throws TException
409
    {
410
      TMessage msg = iprot_.readMessageBegin();
411
      if (msg.type == TMessageType.EXCEPTION) {
412
        TApplicationException x = TApplicationException.read(iprot_);
413
        iprot_.readMessageEnd();
414
        throw x;
415
      }
416
      closeSession_result result = new closeSession_result();
417
      result.read(iprot_);
418
      iprot_.readMessageEnd();
419
      return;
420
    }
421
 
132 ashish 422
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 423
    {
424
      send_createTransaction(transaction);
132 ashish 425
      return recv_createTransaction();
68 ashish 426
    }
427
 
428
    public void send_createTransaction(Transaction transaction) throws TException
429
    {
430
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
431
      createTransaction_args args = new createTransaction_args();
432
      args.transaction = transaction;
433
      args.write(oprot_);
434
      oprot_.writeMessageEnd();
435
      oprot_.getTransport().flush();
436
    }
437
 
132 ashish 438
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 439
    {
440
      TMessage msg = iprot_.readMessageBegin();
441
      if (msg.type == TMessageType.EXCEPTION) {
442
        TApplicationException x = TApplicationException.read(iprot_);
443
        iprot_.readMessageEnd();
444
        throw x;
445
      }
446
      createTransaction_result result = new createTransaction_result();
447
      result.read(iprot_);
448
      iprot_.readMessageEnd();
132 ashish 449
      if (result.isSetSuccess()) {
450
        return result.success;
451
      }
68 ashish 452
      if (result.ex != null) {
453
        throw result.ex;
454
      }
132 ashish 455
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 456
    }
457
 
458
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
459
    {
460
      send_getTransaction(id);
461
      return recv_getTransaction();
462
    }
463
 
464
    public void send_getTransaction(long id) throws TException
465
    {
466
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
467
      getTransaction_args args = new getTransaction_args();
468
      args.id = id;
469
      args.write(oprot_);
470
      oprot_.writeMessageEnd();
471
      oprot_.getTransport().flush();
472
    }
473
 
474
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
475
    {
476
      TMessage msg = iprot_.readMessageBegin();
477
      if (msg.type == TMessageType.EXCEPTION) {
478
        TApplicationException x = TApplicationException.read(iprot_);
479
        iprot_.readMessageEnd();
480
        throw x;
481
      }
482
      getTransaction_result result = new getTransaction_result();
483
      result.read(iprot_);
484
      iprot_.readMessageEnd();
485
      if (result.isSetSuccess()) {
486
        return result.success;
487
      }
488
      if (result.ex != null) {
489
        throw result.ex;
490
      }
491
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
492
    }
493
 
132 ashish 494
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 495
    {
132 ashish 496
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 497
      return recv_getTransactionsForCustomer();
498
    }
499
 
132 ashish 500
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 501
    {
502
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
503
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
504
      args.customerId = customerId;
132 ashish 505
      args.from_date = from_date;
506
      args.to_date = to_date;
68 ashish 507
      args.status = status;
508
      args.write(oprot_);
509
      oprot_.writeMessageEnd();
510
      oprot_.getTransport().flush();
511
    }
512
 
513
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
514
    {
515
      TMessage msg = iprot_.readMessageBegin();
516
      if (msg.type == TMessageType.EXCEPTION) {
517
        TApplicationException x = TApplicationException.read(iprot_);
518
        iprot_.readMessageEnd();
519
        throw x;
520
      }
521
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
522
      result.read(iprot_);
523
      iprot_.readMessageEnd();
524
      if (result.isSetSuccess()) {
525
        return result.success;
526
      }
527
      if (result.ex != null) {
528
        throw result.ex;
529
      }
530
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
531
    }
532
 
132 ashish 533
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
534
    {
535
      send_getTransactionsForShoppingCartId(shoppingCartId);
536
      return recv_getTransactionsForShoppingCartId();
537
    }
538
 
539
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
540
    {
541
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
542
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
543
      args.shoppingCartId = shoppingCartId;
544
      args.write(oprot_);
545
      oprot_.writeMessageEnd();
546
      oprot_.getTransport().flush();
547
    }
548
 
549
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
550
    {
551
      TMessage msg = iprot_.readMessageBegin();
552
      if (msg.type == TMessageType.EXCEPTION) {
553
        TApplicationException x = TApplicationException.read(iprot_);
554
        iprot_.readMessageEnd();
555
        throw x;
556
      }
557
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
558
      result.read(iprot_);
559
      iprot_.readMessageEnd();
560
      if (result.isSetSuccess()) {
561
        return result.success;
562
      }
563
      if (result.ex != null) {
564
        throw result.ex;
565
      }
566
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
567
    }
568
 
68 ashish 569
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
570
    {
571
      send_getTransactionStatus(transactionId);
572
      return recv_getTransactionStatus();
573
    }
574
 
575
    public void send_getTransactionStatus(long transactionId) throws TException
576
    {
577
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
578
      getTransactionStatus_args args = new getTransactionStatus_args();
579
      args.transactionId = transactionId;
580
      args.write(oprot_);
581
      oprot_.writeMessageEnd();
582
      oprot_.getTransport().flush();
583
    }
584
 
585
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
586
    {
587
      TMessage msg = iprot_.readMessageBegin();
588
      if (msg.type == TMessageType.EXCEPTION) {
589
        TApplicationException x = TApplicationException.read(iprot_);
590
        iprot_.readMessageEnd();
591
        throw x;
592
      }
593
      getTransactionStatus_result result = new getTransactionStatus_result();
594
      result.read(iprot_);
595
      iprot_.readMessageEnd();
596
      if (result.isSetSuccess()) {
597
        return result.success;
598
      }
599
      if (result.ex != null) {
600
        throw result.ex;
601
      }
602
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
603
    }
604
 
605
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
606
    {
607
      send_changeTransactionStatus(transactionId, status, description);
608
      return recv_changeTransactionStatus();
609
    }
610
 
611
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
612
    {
613
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
614
      changeTransactionStatus_args args = new changeTransactionStatus_args();
615
      args.transactionId = transactionId;
616
      args.status = status;
617
      args.description = description;
618
      args.write(oprot_);
619
      oprot_.writeMessageEnd();
620
      oprot_.getTransport().flush();
621
    }
622
 
623
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
624
    {
625
      TMessage msg = iprot_.readMessageBegin();
626
      if (msg.type == TMessageType.EXCEPTION) {
627
        TApplicationException x = TApplicationException.read(iprot_);
628
        iprot_.readMessageEnd();
629
        throw x;
630
      }
631
      changeTransactionStatus_result result = new changeTransactionStatus_result();
632
      result.read(iprot_);
633
      iprot_.readMessageEnd();
634
      if (result.isSetSuccess()) {
635
        return result.success;
636
      }
637
      if (result.ex != null) {
638
        throw result.ex;
639
      }
640
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
641
    }
642
 
1398 varun.gupt 643
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 644
    {
1398 varun.gupt 645
      send_enqueueTransactionInfoEmail(transactionId);
646
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 647
    }
648
 
1398 varun.gupt 649
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 650
    {
1398 varun.gupt 651
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
652
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 653
      args.transactionId = transactionId;
654
      args.write(oprot_);
655
      oprot_.writeMessageEnd();
656
      oprot_.getTransport().flush();
657
    }
658
 
1398 varun.gupt 659
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 660
    {
661
      TMessage msg = iprot_.readMessageBegin();
662
      if (msg.type == TMessageType.EXCEPTION) {
663
        TApplicationException x = TApplicationException.read(iprot_);
664
        iprot_.readMessageEnd();
665
        throw x;
666
      }
1398 varun.gupt 667
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 668
      result.read(iprot_);
669
      iprot_.readMessageEnd();
670
      if (result.isSetSuccess()) {
671
        return result.success;
672
      }
673
      if (result.ex != null) {
674
        throw result.ex;
675
      }
1398 varun.gupt 676
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 677
    }
678
 
483 rajveer 679
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 680
    {
483 rajveer 681
      send_getAllOrders(status, from_date, to_date, warehouse_id);
682
      return recv_getAllOrders();
68 ashish 683
    }
684
 
483 rajveer 685
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 686
    {
483 rajveer 687
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
688
      getAllOrders_args args = new getAllOrders_args();
689
      args.status = status;
690
      args.from_date = from_date;
691
      args.to_date = to_date;
692
      args.warehouse_id = warehouse_id;
68 ashish 693
      args.write(oprot_);
694
      oprot_.writeMessageEnd();
695
      oprot_.getTransport().flush();
696
    }
697
 
483 rajveer 698
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 699
    {
700
      TMessage msg = iprot_.readMessageBegin();
701
      if (msg.type == TMessageType.EXCEPTION) {
702
        TApplicationException x = TApplicationException.read(iprot_);
703
        iprot_.readMessageEnd();
704
        throw x;
705
      }
483 rajveer 706
      getAllOrders_result result = new getAllOrders_result();
68 ashish 707
      result.read(iprot_);
708
      iprot_.readMessageEnd();
709
      if (result.isSetSuccess()) {
710
        return result.success;
711
      }
712
      if (result.ex != null) {
713
        throw result.ex;
714
      }
483 rajveer 715
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 716
    }
717
 
1022 varun.gupt 718
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
719
    {
720
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
721
      return recv_getOrdersByBillingDate();
722
    }
723
 
724
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
725
    {
726
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
727
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
728
      args.status = status;
729
      args.start_billing_date = start_billing_date;
730
      args.end_billing_date = end_billing_date;
731
      args.warehouse_id = warehouse_id;
732
      args.write(oprot_);
733
      oprot_.writeMessageEnd();
734
      oprot_.getTransport().flush();
735
    }
736
 
737
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
738
    {
739
      TMessage msg = iprot_.readMessageBegin();
740
      if (msg.type == TMessageType.EXCEPTION) {
741
        TApplicationException x = TApplicationException.read(iprot_);
742
        iprot_.readMessageEnd();
743
        throw x;
744
      }
745
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
746
      result.read(iprot_);
747
      iprot_.readMessageEnd();
748
      if (result.isSetSuccess()) {
749
        return result.success;
750
      }
751
      if (result.ex != null) {
752
        throw result.ex;
753
      }
754
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
755
    }
756
 
1382 varun.gupt 757
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
758
    {
759
      send_getReturnableOrdersForCustomer(customer_id, limit);
760
      return recv_getReturnableOrdersForCustomer();
761
    }
762
 
763
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
764
    {
765
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
766
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
767
      args.customer_id = customer_id;
768
      args.limit = limit;
769
      args.write(oprot_);
770
      oprot_.writeMessageEnd();
771
      oprot_.getTransport().flush();
772
    }
773
 
774
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
775
    {
776
      TMessage msg = iprot_.readMessageBegin();
777
      if (msg.type == TMessageType.EXCEPTION) {
778
        TApplicationException x = TApplicationException.read(iprot_);
779
        iprot_.readMessageEnd();
780
        throw x;
781
      }
782
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
783
      result.read(iprot_);
784
      iprot_.readMessageEnd();
785
      if (result.isSetSuccess()) {
786
        return result.success;
787
      }
788
      if (result.ex != null) {
789
        throw result.ex;
790
      }
791
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
792
    }
793
 
794
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
795
    {
796
      send_getCancellableOrdersForCustomer(customer_id, limit);
797
      return recv_getCancellableOrdersForCustomer();
798
    }
799
 
800
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
801
    {
802
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
803
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
804
      args.customer_id = customer_id;
805
      args.limit = limit;
806
      args.write(oprot_);
807
      oprot_.writeMessageEnd();
808
      oprot_.getTransport().flush();
809
    }
810
 
811
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
812
    {
813
      TMessage msg = iprot_.readMessageBegin();
814
      if (msg.type == TMessageType.EXCEPTION) {
815
        TApplicationException x = TApplicationException.read(iprot_);
816
        iprot_.readMessageEnd();
817
        throw x;
818
      }
819
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
820
      result.read(iprot_);
821
      iprot_.readMessageEnd();
822
      if (result.isSetSuccess()) {
823
        return result.success;
824
      }
825
      if (result.ex != null) {
826
        throw result.ex;
827
      }
828
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
829
    }
830
 
483 rajveer 831
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 832
    {
483 rajveer 833
      send_changeOrderStatus(orderId, status, description);
834
      return recv_changeOrderStatus();
68 ashish 835
    }
836
 
483 rajveer 837
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 838
    {
483 rajveer 839
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
840
      changeOrderStatus_args args = new changeOrderStatus_args();
841
      args.orderId = orderId;
842
      args.status = status;
843
      args.description = description;
68 ashish 844
      args.write(oprot_);
845
      oprot_.writeMessageEnd();
846
      oprot_.getTransport().flush();
847
    }
848
 
483 rajveer 849
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 850
    {
851
      TMessage msg = iprot_.readMessageBegin();
852
      if (msg.type == TMessageType.EXCEPTION) {
853
        TApplicationException x = TApplicationException.read(iprot_);
854
        iprot_.readMessageEnd();
855
        throw x;
856
      }
483 rajveer 857
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 858
      result.read(iprot_);
859
      iprot_.readMessageEnd();
860
      if (result.isSetSuccess()) {
861
        return result.success;
862
      }
863
      if (result.ex != null) {
864
        throw result.ex;
865
      }
483 rajveer 866
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 867
    }
868
 
1148 chandransh 869
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 870
    {
1148 chandransh 871
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 872
      return recv_addBillingDetails();
873
    }
874
 
1148 chandransh 875
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 876
    {
877
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
878
      addBillingDetails_args args = new addBillingDetails_args();
879
      args.orderId = orderId;
880
      args.invoice_number = invoice_number;
881
      args.billed_by = billed_by;
882
      args.write(oprot_);
883
      oprot_.writeMessageEnd();
884
      oprot_.getTransport().flush();
885
    }
886
 
887
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
888
    {
889
      TMessage msg = iprot_.readMessageBegin();
890
      if (msg.type == TMessageType.EXCEPTION) {
891
        TApplicationException x = TApplicationException.read(iprot_);
892
        iprot_.readMessageEnd();
893
        throw x;
894
      }
895
      addBillingDetails_result result = new addBillingDetails_result();
896
      result.read(iprot_);
897
      iprot_.readMessageEnd();
898
      if (result.isSetSuccess()) {
899
        return result.success;
900
      }
901
      if (result.ex != null) {
902
        throw result.ex;
903
      }
904
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
905
    }
906
 
2842 chandransh 907
    public boolean addJacketNumber(long orderId, long jacketNumber, long imeiNumber, String itemNumber, String billedBy, long billingType) throws TransactionServiceException, TException
1148 chandransh 908
    {
2842 chandransh 909
      send_addJacketNumber(orderId, jacketNumber, imeiNumber, itemNumber, billedBy, billingType);
1148 chandransh 910
      return recv_addJacketNumber();
911
    }
912
 
2842 chandransh 913
    public void send_addJacketNumber(long orderId, long jacketNumber, long imeiNumber, String itemNumber, String billedBy, long billingType) throws TException
1148 chandransh 914
    {
915
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
916
      addJacketNumber_args args = new addJacketNumber_args();
917
      args.orderId = orderId;
918
      args.jacketNumber = jacketNumber;
2779 chandransh 919
      args.imeiNumber = imeiNumber;
920
      args.itemNumber = itemNumber;
921
      args.billedBy = billedBy;
2842 chandransh 922
      args.billingType = billingType;
1148 chandransh 923
      args.write(oprot_);
924
      oprot_.writeMessageEnd();
925
      oprot_.getTransport().flush();
926
    }
927
 
928
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
929
    {
930
      TMessage msg = iprot_.readMessageBegin();
931
      if (msg.type == TMessageType.EXCEPTION) {
932
        TApplicationException x = TApplicationException.read(iprot_);
933
        iprot_.readMessageEnd();
934
        throw x;
935
      }
936
      addJacketNumber_result result = new addJacketNumber_result();
937
      result.read(iprot_);
938
      iprot_.readMessageEnd();
939
      if (result.isSetSuccess()) {
940
        return result.success;
941
      }
942
      if (result.ex != null) {
943
        throw result.ex;
944
      }
945
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
946
    }
947
 
923 rajveer 948
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
949
    {
950
      send_acceptOrder(orderId);
951
      return recv_acceptOrder();
952
    }
953
 
954
    public void send_acceptOrder(long orderId) throws TException
955
    {
956
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
957
      acceptOrder_args args = new acceptOrder_args();
958
      args.orderId = orderId;
959
      args.write(oprot_);
960
      oprot_.writeMessageEnd();
961
      oprot_.getTransport().flush();
962
    }
963
 
964
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
965
    {
966
      TMessage msg = iprot_.readMessageBegin();
967
      if (msg.type == TMessageType.EXCEPTION) {
968
        TApplicationException x = TApplicationException.read(iprot_);
969
        iprot_.readMessageEnd();
970
        throw x;
971
      }
972
      acceptOrder_result result = new acceptOrder_result();
973
      result.read(iprot_);
974
      iprot_.readMessageEnd();
975
      if (result.isSetSuccess()) {
976
        return result.success;
977
      }
978
      if (result.ex != null) {
979
        throw result.ex;
980
      }
981
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
982
    }
983
 
984
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
985
    {
986
      send_billOrder(orderId);
987
      return recv_billOrder();
988
    }
989
 
990
    public void send_billOrder(long orderId) throws TException
991
    {
992
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
993
      billOrder_args args = new billOrder_args();
994
      args.orderId = orderId;
995
      args.write(oprot_);
996
      oprot_.writeMessageEnd();
997
      oprot_.getTransport().flush();
998
    }
999
 
1000
    public boolean recv_billOrder() throws TransactionServiceException, TException
1001
    {
1002
      TMessage msg = iprot_.readMessageBegin();
1003
      if (msg.type == TMessageType.EXCEPTION) {
1004
        TApplicationException x = TApplicationException.read(iprot_);
1005
        iprot_.readMessageEnd();
1006
        throw x;
1007
      }
1008
      billOrder_result result = new billOrder_result();
1009
      result.read(iprot_);
1010
      iprot_.readMessageEnd();
1011
      if (result.isSetSuccess()) {
1012
        return result.success;
1013
      }
1014
      if (result.ex != null) {
1015
        throw result.ex;
1016
      }
1017
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
1018
    }
1019
 
1529 ankur.sing 1020
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 1021
    {
1529 ankur.sing 1022
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 1023
      return recv_getOrdersForTransaction();
68 ashish 1024
    }
1025
 
1529 ankur.sing 1026
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 1027
    {
483 rajveer 1028
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
1029
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 1030
      args.transactionId = transactionId;
1529 ankur.sing 1031
      args.customerId = customerId;
68 ashish 1032
      args.write(oprot_);
1033
      oprot_.writeMessageEnd();
1034
      oprot_.getTransport().flush();
1035
    }
1036
 
483 rajveer 1037
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 1038
    {
1039
      TMessage msg = iprot_.readMessageBegin();
1040
      if (msg.type == TMessageType.EXCEPTION) {
1041
        TApplicationException x = TApplicationException.read(iprot_);
1042
        iprot_.readMessageEnd();
1043
        throw x;
1044
      }
483 rajveer 1045
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 1046
      result.read(iprot_);
1047
      iprot_.readMessageEnd();
1048
      if (result.isSetSuccess()) {
1049
        return result.success;
1050
      }
1051
      if (result.ex != null) {
1052
        throw result.ex;
1053
      }
483 rajveer 1054
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 1055
    }
1056
 
483 rajveer 1057
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 1058
    {
483 rajveer 1059
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
1060
      return recv_getOrdersForCustomer();
68 ashish 1061
    }
1062
 
483 rajveer 1063
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 1064
    {
483 rajveer 1065
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
1066
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
1067
      args.customerId = customerId;
1068
      args.from_date = from_date;
1069
      args.to_date = to_date;
1070
      args.status = status;
68 ashish 1071
      args.write(oprot_);
1072
      oprot_.writeMessageEnd();
1073
      oprot_.getTransport().flush();
1074
    }
1075
 
483 rajveer 1076
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 1077
    {
1078
      TMessage msg = iprot_.readMessageBegin();
1079
      if (msg.type == TMessageType.EXCEPTION) {
1080
        TApplicationException x = TApplicationException.read(iprot_);
1081
        iprot_.readMessageEnd();
1082
        throw x;
1083
      }
483 rajveer 1084
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 1085
      result.read(iprot_);
1086
      iprot_.readMessageEnd();
1087
      if (result.isSetSuccess()) {
1088
        return result.success;
1089
      }
1090
      if (result.ex != null) {
1091
        throw result.ex;
1092
      }
483 rajveer 1093
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 1094
    }
1095
 
483 rajveer 1096
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 1097
    {
483 rajveer 1098
      send_createOrder(order);
1099
      return recv_createOrder();
68 ashish 1100
    }
1101
 
483 rajveer 1102
    public void send_createOrder(Order order) throws TException
68 ashish 1103
    {
483 rajveer 1104
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
1105
      createOrder_args args = new createOrder_args();
1106
      args.order = order;
68 ashish 1107
      args.write(oprot_);
1108
      oprot_.writeMessageEnd();
1109
      oprot_.getTransport().flush();
1110
    }
1111
 
483 rajveer 1112
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 1113
    {
1114
      TMessage msg = iprot_.readMessageBegin();
1115
      if (msg.type == TMessageType.EXCEPTION) {
1116
        TApplicationException x = TApplicationException.read(iprot_);
1117
        iprot_.readMessageEnd();
1118
        throw x;
1119
      }
483 rajveer 1120
      createOrder_result result = new createOrder_result();
68 ashish 1121
      result.read(iprot_);
1122
      iprot_.readMessageEnd();
1123
      if (result.isSetSuccess()) {
1124
        return result.success;
1125
      }
1126
      if (result.ex != null) {
1127
        throw result.ex;
1128
      }
483 rajveer 1129
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 1130
    }
1131
 
483 rajveer 1132
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 1133
    {
483 rajveer 1134
      send_getOrder(id);
1135
      return recv_getOrder();
68 ashish 1136
    }
1137
 
483 rajveer 1138
    public void send_getOrder(long id) throws TException
68 ashish 1139
    {
483 rajveer 1140
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
1141
      getOrder_args args = new getOrder_args();
1142
      args.id = id;
68 ashish 1143
      args.write(oprot_);
1144
      oprot_.writeMessageEnd();
1145
      oprot_.getTransport().flush();
1146
    }
1147
 
483 rajveer 1148
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 1149
    {
1150
      TMessage msg = iprot_.readMessageBegin();
1151
      if (msg.type == TMessageType.EXCEPTION) {
1152
        TApplicationException x = TApplicationException.read(iprot_);
1153
        iprot_.readMessageEnd();
1154
        throw x;
1155
      }
483 rajveer 1156
      getOrder_result result = new getOrder_result();
68 ashish 1157
      result.read(iprot_);
1158
      iprot_.readMessageEnd();
1159
      if (result.isSetSuccess()) {
1160
        return result.success;
1161
      }
1162
      if (result.ex != null) {
1163
        throw result.ex;
1164
      }
483 rajveer 1165
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1166
    }
1167
 
483 rajveer 1168
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1169
    {
483 rajveer 1170
      send_getLineItemsForOrder(orderId);
1171
      return recv_getLineItemsForOrder();
68 ashish 1172
    }
1173
 
483 rajveer 1174
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1175
    {
483 rajveer 1176
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1177
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1178
      args.orderId = orderId;
68 ashish 1179
      args.write(oprot_);
1180
      oprot_.writeMessageEnd();
1181
      oprot_.getTransport().flush();
1182
    }
1183
 
483 rajveer 1184
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1185
    {
1186
      TMessage msg = iprot_.readMessageBegin();
1187
      if (msg.type == TMessageType.EXCEPTION) {
1188
        TApplicationException x = TApplicationException.read(iprot_);
1189
        iprot_.readMessageEnd();
1190
        throw x;
1191
      }
483 rajveer 1192
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1193
      result.read(iprot_);
1194
      iprot_.readMessageEnd();
1195
      if (result.isSetSuccess()) {
1196
        return result.success;
1197
      }
1198
      if (result.ex != null) {
1199
        throw result.ex;
1200
      }
483 rajveer 1201
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1202
    }
1203
 
1529 ankur.sing 1204
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1205
    {
1206
      send_getOrderForCustomer(orderId, customerId);
1207
      return recv_getOrderForCustomer();
1208
    }
1209
 
1210
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1211
    {
1212
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1213
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1214
      args.orderId = orderId;
1215
      args.customerId = customerId;
1216
      args.write(oprot_);
1217
      oprot_.writeMessageEnd();
1218
      oprot_.getTransport().flush();
1219
    }
1220
 
1221
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1222
    {
1223
      TMessage msg = iprot_.readMessageBegin();
1224
      if (msg.type == TMessageType.EXCEPTION) {
1225
        TApplicationException x = TApplicationException.read(iprot_);
1226
        iprot_.readMessageEnd();
1227
        throw x;
1228
      }
1229
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1230
      result.read(iprot_);
1231
      iprot_.readMessageEnd();
1232
      if (result.isSetSuccess()) {
1233
        return result.success;
1234
      }
1235
      if (result.ex != null) {
1236
        throw result.ex;
1237
      }
1238
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1239
    }
1240
 
1221 chandransh 1241
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1242
    {
1243
      send_batchOrders(warehouseId);
1244
      return recv_batchOrders();
1245
    }
1246
 
1247
    public void send_batchOrders(long warehouseId) throws TException
1248
    {
1249
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1250
      batchOrders_args args = new batchOrders_args();
1251
      args.warehouseId = warehouseId;
1252
      args.write(oprot_);
1253
      oprot_.writeMessageEnd();
1254
      oprot_.getTransport().flush();
1255
    }
1256
 
1257
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1258
    {
1259
      TMessage msg = iprot_.readMessageBegin();
1260
      if (msg.type == TMessageType.EXCEPTION) {
1261
        TApplicationException x = TApplicationException.read(iprot_);
1262
        iprot_.readMessageEnd();
1263
        throw x;
1264
      }
1265
      batchOrders_result result = new batchOrders_result();
1266
      result.read(iprot_);
1267
      iprot_.readMessageEnd();
1268
      if (result.isSetSuccess()) {
1269
        return result.success;
1270
      }
1271
      if (result.ex != null) {
1272
        throw result.ex;
1273
      }
1274
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1275
    }
1276
 
1209 chandransh 1277
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1278
    {
1279
      send_markOrderAsOutOfStock(orderId);
1280
      return recv_markOrderAsOutOfStock();
1281
    }
1282
 
1283
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1284
    {
1285
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1286
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1287
      args.orderId = orderId;
1288
      args.write(oprot_);
1289
      oprot_.writeMessageEnd();
1290
      oprot_.getTransport().flush();
1291
    }
1292
 
1293
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1294
    {
1295
      TMessage msg = iprot_.readMessageBegin();
1296
      if (msg.type == TMessageType.EXCEPTION) {
1297
        TApplicationException x = TApplicationException.read(iprot_);
1298
        iprot_.readMessageEnd();
1299
        throw x;
1300
      }
1301
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1302
      result.read(iprot_);
1303
      iprot_.readMessageEnd();
1304
      if (result.isSetSuccess()) {
1305
        return result.success;
1306
      }
1307
      if (result.ex != null) {
1308
        throw result.ex;
1309
      }
1310
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1311
    }
1312
 
758 chandransh 1313
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1314
    {
1315
      send_markOrdersAsManifested(warehouseId, providerId);
1316
      return recv_markOrdersAsManifested();
1317
    }
1318
 
1319
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1320
    {
1321
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1322
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1323
      args.warehouseId = warehouseId;
1324
      args.providerId = providerId;
1325
      args.write(oprot_);
1326
      oprot_.writeMessageEnd();
1327
      oprot_.getTransport().flush();
1328
    }
1329
 
1330
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1331
    {
1332
      TMessage msg = iprot_.readMessageBegin();
1333
      if (msg.type == TMessageType.EXCEPTION) {
1334
        TApplicationException x = TApplicationException.read(iprot_);
1335
        iprot_.readMessageEnd();
1336
        throw x;
1337
      }
1338
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1339
      result.read(iprot_);
1340
      iprot_.readMessageEnd();
1341
      if (result.isSetSuccess()) {
1342
        return result.success;
1343
      }
1344
      if (result.ex != null) {
1345
        throw result.ex;
1346
      }
1347
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1348
    }
1349
 
1245 chandransh 1350
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1351
    {
1352
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1353
      return recv_markOrdersAsPickedUp();
1354
    }
1355
 
1245 chandransh 1356
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1357
    {
1358
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1359
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1360
      args.providerId = providerId;
1361
      args.pickupDetails = pickupDetails;
1362
      args.write(oprot_);
1363
      oprot_.writeMessageEnd();
1364
      oprot_.getTransport().flush();
1365
    }
1366
 
1367
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1368
    {
1369
      TMessage msg = iprot_.readMessageBegin();
1370
      if (msg.type == TMessageType.EXCEPTION) {
1371
        TApplicationException x = TApplicationException.read(iprot_);
1372
        iprot_.readMessageEnd();
1373
        throw x;
1374
      }
1375
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1376
      result.read(iprot_);
1377
      iprot_.readMessageEnd();
1378
      if (result.isSetSuccess()) {
1379
        return result.success;
1380
      }
1381
      if (result.ex != null) {
1382
        throw result.ex;
1383
      }
1384
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1385
    }
1386
 
1133 chandransh 1387
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1388
    {
1389
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1390
      recv_markOrdersAsDelivered();
1391
    }
1392
 
1393
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1394
    {
1395
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1396
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1397
      args.providerId = providerId;
1398
      args.deliveredOrders = deliveredOrders;
1399
      args.write(oprot_);
1400
      oprot_.writeMessageEnd();
1401
      oprot_.getTransport().flush();
1402
    }
1403
 
1404
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1405
    {
1406
      TMessage msg = iprot_.readMessageBegin();
1407
      if (msg.type == TMessageType.EXCEPTION) {
1408
        TApplicationException x = TApplicationException.read(iprot_);
1409
        iprot_.readMessageEnd();
1410
        throw x;
1411
      }
1412
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1413
      result.read(iprot_);
1414
      iprot_.readMessageEnd();
1415
      if (result.ex != null) {
1416
        throw result.ex;
1417
      }
1418
      return;
1419
    }
1420
 
1421
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1422
    {
1423
      send_markOrdersAsFailed(providerId, returnedOrders);
1424
      recv_markOrdersAsFailed();
1425
    }
1426
 
1427
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1428
    {
1429
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1430
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1431
      args.providerId = providerId;
1432
      args.returnedOrders = returnedOrders;
1433
      args.write(oprot_);
1434
      oprot_.writeMessageEnd();
1435
      oprot_.getTransport().flush();
1436
    }
1437
 
1438
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1439
    {
1440
      TMessage msg = iprot_.readMessageBegin();
1441
      if (msg.type == TMessageType.EXCEPTION) {
1442
        TApplicationException x = TApplicationException.read(iprot_);
1443
        iprot_.readMessageEnd();
1444
        throw x;
1445
      }
1446
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1447
      result.read(iprot_);
1448
      iprot_.readMessageEnd();
1449
      if (result.ex != null) {
1450
        throw result.ex;
1451
      }
1452
      return;
1453
    }
1454
 
1245 chandransh 1455
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1456
    {
1457
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1458
      recv_updateNonDeliveryReason();
1459
    }
1460
 
1461
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1462
    {
1463
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1464
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1465
      args.providerId = providerId;
1466
      args.undeliveredOrders = undeliveredOrders;
1467
      args.write(oprot_);
1468
      oprot_.writeMessageEnd();
1469
      oprot_.getTransport().flush();
1470
    }
1471
 
1472
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1473
    {
1474
      TMessage msg = iprot_.readMessageBegin();
1475
      if (msg.type == TMessageType.EXCEPTION) {
1476
        TApplicationException x = TApplicationException.read(iprot_);
1477
        iprot_.readMessageEnd();
1478
        throw x;
1479
      }
1480
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1481
      result.read(iprot_);
1482
      iprot_.readMessageEnd();
1483
      if (result.ex != null) {
1484
        throw result.ex;
1485
      }
1486
      return;
1487
    }
1488
 
1406 ankur.sing 1489
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1490
    {
1491
      send_getUndeliveredOrders(providerId, warehouseId);
1492
      return recv_getUndeliveredOrders();
1493
    }
1494
 
1495
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1496
    {
1497
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1498
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1499
      args.providerId = providerId;
1500
      args.warehouseId = warehouseId;
1501
      args.write(oprot_);
1502
      oprot_.writeMessageEnd();
1503
      oprot_.getTransport().flush();
1504
    }
1505
 
1506
    public List<Order> recv_getUndeliveredOrders() throws TException
1507
    {
1508
      TMessage msg = iprot_.readMessageBegin();
1509
      if (msg.type == TMessageType.EXCEPTION) {
1510
        TApplicationException x = TApplicationException.read(iprot_);
1511
        iprot_.readMessageEnd();
1512
        throw x;
1513
      }
1514
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1515
      result.read(iprot_);
1516
      iprot_.readMessageEnd();
1517
      if (result.isSetSuccess()) {
1518
        return result.success;
1519
      }
1520
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1521
    }
1522
 
483 rajveer 1523
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1524
    {
483 rajveer 1525
      send_getAlerts(orderId, valid);
305 ashish 1526
      return recv_getAlerts();
1527
    }
1528
 
483 rajveer 1529
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1530
    {
1531
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1532
      getAlerts_args args = new getAlerts_args();
483 rajveer 1533
      args.orderId = orderId;
305 ashish 1534
      args.valid = valid;
1535
      args.write(oprot_);
1536
      oprot_.writeMessageEnd();
1537
      oprot_.getTransport().flush();
1538
    }
1539
 
1540
    public List<Alert> recv_getAlerts() throws TException
1541
    {
1542
      TMessage msg = iprot_.readMessageBegin();
1543
      if (msg.type == TMessageType.EXCEPTION) {
1544
        TApplicationException x = TApplicationException.read(iprot_);
1545
        iprot_.readMessageEnd();
1546
        throw x;
1547
      }
1548
      getAlerts_result result = new getAlerts_result();
1549
      result.read(iprot_);
1550
      iprot_.readMessageEnd();
1551
      if (result.isSetSuccess()) {
1552
        return result.success;
1553
      }
1554
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1555
    }
1556
 
483 rajveer 1557
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1558
    {
483 rajveer 1559
      send_setAlert(orderId, unset, type, comment);
305 ashish 1560
      recv_setAlert();
1561
    }
1562
 
483 rajveer 1563
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1564
    {
1565
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1566
      setAlert_args args = new setAlert_args();
483 rajveer 1567
      args.orderId = orderId;
305 ashish 1568
      args.unset = unset;
1569
      args.type = type;
1570
      args.comment = comment;
1571
      args.write(oprot_);
1572
      oprot_.writeMessageEnd();
1573
      oprot_.getTransport().flush();
1574
    }
1575
 
1576
    public void recv_setAlert() throws TException
1577
    {
1578
      TMessage msg = iprot_.readMessageBegin();
1579
      if (msg.type == TMessageType.EXCEPTION) {
1580
        TApplicationException x = TApplicationException.read(iprot_);
1581
        iprot_.readMessageEnd();
1582
        throw x;
1583
      }
1584
      setAlert_result result = new setAlert_result();
1585
      result.read(iprot_);
1586
      iprot_.readMessageEnd();
1587
      return;
1588
    }
1589
 
1598 ankur.sing 1590
    public long getValidOrderCount() throws TException
1591
    {
1592
      send_getValidOrderCount();
1593
      return recv_getValidOrderCount();
1594
    }
1595
 
1596
    public void send_getValidOrderCount() throws TException
1597
    {
1598
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1599
      getValidOrderCount_args args = new getValidOrderCount_args();
1600
      args.write(oprot_);
1601
      oprot_.writeMessageEnd();
1602
      oprot_.getTransport().flush();
1603
    }
1604
 
1605
    public long recv_getValidOrderCount() throws TException
1606
    {
1607
      TMessage msg = iprot_.readMessageBegin();
1608
      if (msg.type == TMessageType.EXCEPTION) {
1609
        TApplicationException x = TApplicationException.read(iprot_);
1610
        iprot_.readMessageEnd();
1611
        throw x;
1612
      }
1613
      getValidOrderCount_result result = new getValidOrderCount_result();
1614
      result.read(iprot_);
1615
      iprot_.readMessageEnd();
1616
      if (result.isSetSuccess()) {
1617
        return result.success;
1618
      }
1619
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1620
    }
1621
 
1629 ankur.sing 1622
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException
1623
    {
1624
      send_getNoOfCustomersWithSuccessfulTransaction();
1625
      return recv_getNoOfCustomersWithSuccessfulTransaction();
1626
    }
1627
 
1628
    public void send_getNoOfCustomersWithSuccessfulTransaction() throws TException
1629
    {
1630
      oprot_.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.CALL, seqid_));
1631
      getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
1632
      args.write(oprot_);
1633
      oprot_.writeMessageEnd();
1634
      oprot_.getTransport().flush();
1635
    }
1636
 
1637
    public long recv_getNoOfCustomersWithSuccessfulTransaction() throws TException
1638
    {
1639
      TMessage msg = iprot_.readMessageBegin();
1640
      if (msg.type == TMessageType.EXCEPTION) {
1641
        TApplicationException x = TApplicationException.read(iprot_);
1642
        iprot_.readMessageEnd();
1643
        throw x;
1644
      }
1645
      getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
1646
      result.read(iprot_);
1647
      iprot_.readMessageEnd();
1648
      if (result.isSetSuccess()) {
1649
        return result.success;
1650
      }
1651
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1652
    }
1653
 
1731 ankur.sing 1654
    public List<Double> getValidOrdersAmountRange() throws TException
1629 ankur.sing 1655
    {
1731 ankur.sing 1656
      send_getValidOrdersAmountRange();
1657
      return recv_getValidOrdersAmountRange();
1629 ankur.sing 1658
    }
1659
 
1731 ankur.sing 1660
    public void send_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1661
    {
1731 ankur.sing 1662
      oprot_.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.CALL, seqid_));
1663
      getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 1664
      args.write(oprot_);
1665
      oprot_.writeMessageEnd();
1666
      oprot_.getTransport().flush();
1667
    }
1668
 
1731 ankur.sing 1669
    public List<Double> recv_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1670
    {
1671
      TMessage msg = iprot_.readMessageBegin();
1672
      if (msg.type == TMessageType.EXCEPTION) {
1673
        TApplicationException x = TApplicationException.read(iprot_);
1674
        iprot_.readMessageEnd();
1675
        throw x;
1676
      }
1731 ankur.sing 1677
      getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
1629 ankur.sing 1678
      result.read(iprot_);
1679
      iprot_.readMessageEnd();
1680
      if (result.isSetSuccess()) {
1681
        return result.success;
1682
      }
1731 ankur.sing 1683
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1629 ankur.sing 1684
    }
1685
 
1886 ankur.sing 1686
    public List<Order> getValidOrders(long limit) throws TException
1687
    {
1688
      send_getValidOrders(limit);
1689
      return recv_getValidOrders();
1690
    }
1691
 
1692
    public void send_getValidOrders(long limit) throws TException
1693
    {
1694
      oprot_.writeMessageBegin(new TMessage("getValidOrders", TMessageType.CALL, seqid_));
1695
      getValidOrders_args args = new getValidOrders_args();
1696
      args.limit = limit;
1697
      args.write(oprot_);
1698
      oprot_.writeMessageEnd();
1699
      oprot_.getTransport().flush();
1700
    }
1701
 
1702
    public List<Order> recv_getValidOrders() throws TException
1703
    {
1704
      TMessage msg = iprot_.readMessageBegin();
1705
      if (msg.type == TMessageType.EXCEPTION) {
1706
        TApplicationException x = TApplicationException.read(iprot_);
1707
        iprot_.readMessageEnd();
1708
        throw x;
1709
      }
1710
      getValidOrders_result result = new getValidOrders_result();
1711
      result.read(iprot_);
1712
      iprot_.readMessageEnd();
1713
      if (result.isSetSuccess()) {
1714
        return result.success;
1715
      }
1716
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1717
    }
1718
 
2538 chandransh 1719
    public boolean toggleDOAFlag(long orderId) throws TransactionServiceException, TException
1720
    {
1721
      send_toggleDOAFlag(orderId);
1722
      return recv_toggleDOAFlag();
1723
    }
1724
 
1725
    public void send_toggleDOAFlag(long orderId) throws TException
1726
    {
1727
      oprot_.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.CALL, seqid_));
1728
      toggleDOAFlag_args args = new toggleDOAFlag_args();
1729
      args.orderId = orderId;
1730
      args.write(oprot_);
1731
      oprot_.writeMessageEnd();
1732
      oprot_.getTransport().flush();
1733
    }
1734
 
1735
    public boolean recv_toggleDOAFlag() throws TransactionServiceException, TException
1736
    {
1737
      TMessage msg = iprot_.readMessageBegin();
1738
      if (msg.type == TMessageType.EXCEPTION) {
1739
        TApplicationException x = TApplicationException.read(iprot_);
1740
        iprot_.readMessageEnd();
1741
        throw x;
1742
      }
1743
      toggleDOAFlag_result result = new toggleDOAFlag_result();
1744
      result.read(iprot_);
1745
      iprot_.readMessageEnd();
1746
      if (result.isSetSuccess()) {
1747
        return result.success;
1748
      }
1749
      if (result.ex != null) {
1750
        throw result.ex;
1751
      }
1752
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");
1753
    }
1754
 
1755
    public boolean requestPickupNumber(long orderId) throws TransactionServiceException, TException
1756
    {
1757
      send_requestPickupNumber(orderId);
1758
      return recv_requestPickupNumber();
1759
    }
1760
 
1761
    public void send_requestPickupNumber(long orderId) throws TException
1762
    {
1763
      oprot_.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.CALL, seqid_));
1764
      requestPickupNumber_args args = new requestPickupNumber_args();
1765
      args.orderId = orderId;
1766
      args.write(oprot_);
1767
      oprot_.writeMessageEnd();
1768
      oprot_.getTransport().flush();
1769
    }
1770
 
1771
    public boolean recv_requestPickupNumber() throws TransactionServiceException, TException
1772
    {
1773
      TMessage msg = iprot_.readMessageBegin();
1774
      if (msg.type == TMessageType.EXCEPTION) {
1775
        TApplicationException x = TApplicationException.read(iprot_);
1776
        iprot_.readMessageEnd();
1777
        throw x;
1778
      }
1779
      requestPickupNumber_result result = new requestPickupNumber_result();
1780
      result.read(iprot_);
1781
      iprot_.readMessageEnd();
1782
      if (result.isSetSuccess()) {
1783
        return result.success;
1784
      }
1785
      if (result.ex != null) {
1786
        throw result.ex;
1787
      }
1788
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");
1789
    }
1790
 
1791
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException
1792
    {
1793
      send_authorizePickup(orderId, pickupNumber);
1794
      return recv_authorizePickup();
1795
    }
1796
 
1797
    public void send_authorizePickup(long orderId, String pickupNumber) throws TException
1798
    {
1799
      oprot_.writeMessageBegin(new TMessage("authorizePickup", TMessageType.CALL, seqid_));
1800
      authorizePickup_args args = new authorizePickup_args();
1801
      args.orderId = orderId;
1802
      args.pickupNumber = pickupNumber;
1803
      args.write(oprot_);
1804
      oprot_.writeMessageEnd();
1805
      oprot_.getTransport().flush();
1806
    }
1807
 
1808
    public boolean recv_authorizePickup() throws TransactionServiceException, TException
1809
    {
1810
      TMessage msg = iprot_.readMessageBegin();
1811
      if (msg.type == TMessageType.EXCEPTION) {
1812
        TApplicationException x = TApplicationException.read(iprot_);
1813
        iprot_.readMessageEnd();
1814
        throw x;
1815
      }
1816
      authorizePickup_result result = new authorizePickup_result();
1817
      result.read(iprot_);
1818
      iprot_.readMessageEnd();
1819
      if (result.isSetSuccess()) {
1820
        return result.success;
1821
      }
1822
      if (result.ex != null) {
1823
        throw result.ex;
1824
      }
1825
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1826
    }
1827
 
2765 chandransh 1828
    public List<Order> markDoasAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1829
    {
1830
      send_markDoasAsPickedUp(providerId, pickupDetails);
1831
      return recv_markDoasAsPickedUp();
1832
    }
1833
 
1834
    public void send_markDoasAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1835
    {
1836
      oprot_.writeMessageBegin(new TMessage("markDoasAsPickedUp", TMessageType.CALL, seqid_));
1837
      markDoasAsPickedUp_args args = new markDoasAsPickedUp_args();
1838
      args.providerId = providerId;
1839
      args.pickupDetails = pickupDetails;
1840
      args.write(oprot_);
1841
      oprot_.writeMessageEnd();
1842
      oprot_.getTransport().flush();
1843
    }
1844
 
1845
    public List<Order> recv_markDoasAsPickedUp() throws TException
1846
    {
1847
      TMessage msg = iprot_.readMessageBegin();
1848
      if (msg.type == TMessageType.EXCEPTION) {
1849
        TApplicationException x = TApplicationException.read(iprot_);
1850
        iprot_.readMessageEnd();
1851
        throw x;
1852
      }
1853
      markDoasAsPickedUp_result result = new markDoasAsPickedUp_result();
1854
      result.read(iprot_);
1855
      iprot_.readMessageEnd();
1856
      if (result.isSetSuccess()) {
1857
        return result.success;
1858
      }
1859
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
1860
    }
1861
 
2615 chandransh 1862
    public boolean receiveReturn(long orderId) throws TransactionServiceException, TException
2590 chandransh 1863
    {
2615 chandransh 1864
      send_receiveReturn(orderId);
1865
      return recv_receiveReturn();
2590 chandransh 1866
    }
1867
 
2615 chandransh 1868
    public void send_receiveReturn(long orderId) throws TException
2590 chandransh 1869
    {
2615 chandransh 1870
      oprot_.writeMessageBegin(new TMessage("receiveReturn", TMessageType.CALL, seqid_));
1871
      receiveReturn_args args = new receiveReturn_args();
2590 chandransh 1872
      args.orderId = orderId;
1873
      args.write(oprot_);
1874
      oprot_.writeMessageEnd();
1875
      oprot_.getTransport().flush();
1876
    }
1877
 
2615 chandransh 1878
    public boolean recv_receiveReturn() throws TransactionServiceException, TException
2590 chandransh 1879
    {
1880
      TMessage msg = iprot_.readMessageBegin();
1881
      if (msg.type == TMessageType.EXCEPTION) {
1882
        TApplicationException x = TApplicationException.read(iprot_);
1883
        iprot_.readMessageEnd();
1884
        throw x;
1885
      }
2615 chandransh 1886
      receiveReturn_result result = new receiveReturn_result();
2590 chandransh 1887
      result.read(iprot_);
1888
      iprot_.readMessageEnd();
1889
      if (result.isSetSuccess()) {
1890
        return result.success;
1891
      }
1892
      if (result.ex != null) {
1893
        throw result.ex;
1894
      }
2615 chandransh 1895
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "receiveReturn failed: unknown result");
2590 chandransh 1896
    }
1897
 
1898
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException
1899
    {
1900
      send_validateDoa(orderId, isValid);
1901
      return recv_validateDoa();
1902
    }
1903
 
1904
    public void send_validateDoa(long orderId, boolean isValid) throws TException
1905
    {
1906
      oprot_.writeMessageBegin(new TMessage("validateDoa", TMessageType.CALL, seqid_));
1907
      validateDoa_args args = new validateDoa_args();
1908
      args.orderId = orderId;
1909
      args.isValid = isValid;
1910
      args.write(oprot_);
1911
      oprot_.writeMessageEnd();
1912
      oprot_.getTransport().flush();
1913
    }
1914
 
1915
    public boolean recv_validateDoa() throws TransactionServiceException, TException
1916
    {
1917
      TMessage msg = iprot_.readMessageBegin();
1918
      if (msg.type == TMessageType.EXCEPTION) {
1919
        TApplicationException x = TApplicationException.read(iprot_);
1920
        iprot_.readMessageEnd();
1921
        throw x;
1922
      }
1923
      validateDoa_result result = new validateDoa_result();
1924
      result.read(iprot_);
1925
      iprot_.readMessageEnd();
1926
      if (result.isSetSuccess()) {
1927
        return result.success;
1928
      }
1929
      if (result.ex != null) {
1930
        throw result.ex;
1931
      }
1932
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
1933
    }
1934
 
2615 chandransh 1935
    public long reshipOrder(long orderId) throws TransactionServiceException, TException
1936
    {
1937
      send_reshipOrder(orderId);
1938
      return recv_reshipOrder();
1939
    }
1940
 
1941
    public void send_reshipOrder(long orderId) throws TException
1942
    {
1943
      oprot_.writeMessageBegin(new TMessage("reshipOrder", TMessageType.CALL, seqid_));
1944
      reshipOrder_args args = new reshipOrder_args();
1945
      args.orderId = orderId;
1946
      args.write(oprot_);
1947
      oprot_.writeMessageEnd();
1948
      oprot_.getTransport().flush();
1949
    }
1950
 
1951
    public long recv_reshipOrder() throws TransactionServiceException, TException
1952
    {
1953
      TMessage msg = iprot_.readMessageBegin();
1954
      if (msg.type == TMessageType.EXCEPTION) {
1955
        TApplicationException x = TApplicationException.read(iprot_);
1956
        iprot_.readMessageEnd();
1957
        throw x;
1958
      }
1959
      reshipOrder_result result = new reshipOrder_result();
1960
      result.read(iprot_);
1961
      iprot_.readMessageEnd();
1962
      if (result.isSetSuccess()) {
1963
        return result.success;
1964
      }
1965
      if (result.ex != null) {
1966
        throw result.ex;
1967
      }
1968
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "reshipOrder failed: unknown result");
1969
    }
1970
 
1971
    public boolean refundOrder(long orderId) throws TransactionServiceException, TException
1972
    {
1973
      send_refundOrder(orderId);
1974
      return recv_refundOrder();
1975
    }
1976
 
1977
    public void send_refundOrder(long orderId) throws TException
1978
    {
1979
      oprot_.writeMessageBegin(new TMessage("refundOrder", TMessageType.CALL, seqid_));
1980
      refundOrder_args args = new refundOrder_args();
1981
      args.orderId = orderId;
1982
      args.write(oprot_);
1983
      oprot_.writeMessageEnd();
1984
      oprot_.getTransport().flush();
1985
    }
1986
 
1987
    public boolean recv_refundOrder() throws TransactionServiceException, TException
1988
    {
1989
      TMessage msg = iprot_.readMessageBegin();
1990
      if (msg.type == TMessageType.EXCEPTION) {
1991
        TApplicationException x = TApplicationException.read(iprot_);
1992
        iprot_.readMessageEnd();
1993
        throw x;
1994
      }
1995
      refundOrder_result result = new refundOrder_result();
1996
      result.read(iprot_);
1997
      iprot_.readMessageEnd();
1998
      if (result.isSetSuccess()) {
1999
        return result.success;
2000
      }
2001
      if (result.ex != null) {
2002
        throw result.ex;
2003
      }
2004
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "refundOrder failed: unknown result");
2005
    }
2006
 
2690 chandransh 2007
    public List<ReturnOrder> getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException
2008
    {
2009
      send_getReturnOrders(warehouseId, fromDate, toDate);
2010
      return recv_getReturnOrders();
2011
    }
2012
 
2013
    public void send_getReturnOrders(long warehouseId, long fromDate, long toDate) throws TException
2014
    {
2015
      oprot_.writeMessageBegin(new TMessage("getReturnOrders", TMessageType.CALL, seqid_));
2016
      getReturnOrders_args args = new getReturnOrders_args();
2017
      args.warehouseId = warehouseId;
2018
      args.fromDate = fromDate;
2019
      args.toDate = toDate;
2020
      args.write(oprot_);
2021
      oprot_.writeMessageEnd();
2022
      oprot_.getTransport().flush();
2023
    }
2024
 
2025
    public List<ReturnOrder> recv_getReturnOrders() throws TException
2026
    {
2027
      TMessage msg = iprot_.readMessageBegin();
2028
      if (msg.type == TMessageType.EXCEPTION) {
2029
        TApplicationException x = TApplicationException.read(iprot_);
2030
        iprot_.readMessageEnd();
2031
        throw x;
2032
      }
2033
      getReturnOrders_result result = new getReturnOrders_result();
2034
      result.read(iprot_);
2035
      iprot_.readMessageEnd();
2036
      if (result.isSetSuccess()) {
2037
        return result.success;
2038
      }
2039
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrders failed: unknown result");
2040
    }
2041
 
2700 chandransh 2042
    public ReturnOrder getReturnOrder(long id) throws TransactionServiceException, TException
2043
    {
2044
      send_getReturnOrder(id);
2045
      return recv_getReturnOrder();
2046
    }
2047
 
2048
    public void send_getReturnOrder(long id) throws TException
2049
    {
2050
      oprot_.writeMessageBegin(new TMessage("getReturnOrder", TMessageType.CALL, seqid_));
2051
      getReturnOrder_args args = new getReturnOrder_args();
2052
      args.id = id;
2053
      args.write(oprot_);
2054
      oprot_.writeMessageEnd();
2055
      oprot_.getTransport().flush();
2056
    }
2057
 
2058
    public ReturnOrder recv_getReturnOrder() throws TransactionServiceException, TException
2059
    {
2060
      TMessage msg = iprot_.readMessageBegin();
2061
      if (msg.type == TMessageType.EXCEPTION) {
2062
        TApplicationException x = TApplicationException.read(iprot_);
2063
        iprot_.readMessageEnd();
2064
        throw x;
2065
      }
2066
      getReturnOrder_result result = new getReturnOrder_result();
2067
      result.read(iprot_);
2068
      iprot_.readMessageEnd();
2069
      if (result.isSetSuccess()) {
2070
        return result.success;
2071
      }
2072
      if (result.ex != null) {
2073
        throw result.ex;
2074
      }
2075
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrder failed: unknown result");
2076
    }
2077
 
2690 chandransh 2078
    public void processReturn(long returnOrderId) throws TransactionServiceException, TException
2079
    {
2080
      send_processReturn(returnOrderId);
2081
      recv_processReturn();
2082
    }
2083
 
2084
    public void send_processReturn(long returnOrderId) throws TException
2085
    {
2086
      oprot_.writeMessageBegin(new TMessage("processReturn", TMessageType.CALL, seqid_));
2087
      processReturn_args args = new processReturn_args();
2088
      args.returnOrderId = returnOrderId;
2089
      args.write(oprot_);
2090
      oprot_.writeMessageEnd();
2091
      oprot_.getTransport().flush();
2092
    }
2093
 
2094
    public void recv_processReturn() throws TransactionServiceException, TException
2095
    {
2096
      TMessage msg = iprot_.readMessageBegin();
2097
      if (msg.type == TMessageType.EXCEPTION) {
2098
        TApplicationException x = TApplicationException.read(iprot_);
2099
        iprot_.readMessageEnd();
2100
        throw x;
2101
      }
2102
      processReturn_result result = new processReturn_result();
2103
      result.read(iprot_);
2104
      iprot_.readMessageEnd();
2105
      if (result.ex != null) {
2106
        throw result.ex;
2107
      }
2108
      return;
2109
    }
2110
 
2819 chandransh 2111
    public long createPurchaseOrder(long warehouseId) throws TransactionServiceException, TException
2112
    {
2113
      send_createPurchaseOrder(warehouseId);
2114
      return recv_createPurchaseOrder();
2115
    }
2116
 
2117
    public void send_createPurchaseOrder(long warehouseId) throws TException
2118
    {
2119
      oprot_.writeMessageBegin(new TMessage("createPurchaseOrder", TMessageType.CALL, seqid_));
2120
      createPurchaseOrder_args args = new createPurchaseOrder_args();
2121
      args.warehouseId = warehouseId;
2122
      args.write(oprot_);
2123
      oprot_.writeMessageEnd();
2124
      oprot_.getTransport().flush();
2125
    }
2126
 
2127
    public long recv_createPurchaseOrder() throws TransactionServiceException, TException
2128
    {
2129
      TMessage msg = iprot_.readMessageBegin();
2130
      if (msg.type == TMessageType.EXCEPTION) {
2131
        TApplicationException x = TApplicationException.read(iprot_);
2132
        iprot_.readMessageEnd();
2133
        throw x;
2134
      }
2135
      createPurchaseOrder_result result = new createPurchaseOrder_result();
2136
      result.read(iprot_);
2137
      iprot_.readMessageEnd();
2138
      if (result.isSetSuccess()) {
2139
        return result.success;
2140
      }
2141
      if (result.ex != null) {
2142
        throw result.ex;
2143
      }
2144
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
2145
    }
2146
 
68 ashish 2147
  }
2148
  public static class Processor implements TProcessor {
2149
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
2150
    public Processor(Iface iface)
2151
    {
2152
      iface_ = iface;
764 rajveer 2153
      processMap_.put("closeSession", new closeSession());
68 ashish 2154
      processMap_.put("createTransaction", new createTransaction());
2155
      processMap_.put("getTransaction", new getTransaction());
2156
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 2157
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 2158
      processMap_.put("getTransactionStatus", new getTransactionStatus());
2159
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 2160
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 2161
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 2162
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 2163
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
2164
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 2165
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 2166
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 2167
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 2168
      processMap_.put("acceptOrder", new acceptOrder());
2169
      processMap_.put("billOrder", new billOrder());
483 rajveer 2170
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
2171
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
2172
      processMap_.put("createOrder", new createOrder());
2173
      processMap_.put("getOrder", new getOrder());
2174
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 2175
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 2176
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 2177
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 2178
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 2179
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 2180
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
2181
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 2182
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 2183
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 2184
      processMap_.put("getAlerts", new getAlerts());
2185
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 2186
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1629 ankur.sing 2187
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1731 ankur.sing 2188
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1886 ankur.sing 2189
      processMap_.put("getValidOrders", new getValidOrders());
2538 chandransh 2190
      processMap_.put("toggleDOAFlag", new toggleDOAFlag());
2191
      processMap_.put("requestPickupNumber", new requestPickupNumber());
2192
      processMap_.put("authorizePickup", new authorizePickup());
2765 chandransh 2193
      processMap_.put("markDoasAsPickedUp", new markDoasAsPickedUp());
2615 chandransh 2194
      processMap_.put("receiveReturn", new receiveReturn());
2590 chandransh 2195
      processMap_.put("validateDoa", new validateDoa());
2615 chandransh 2196
      processMap_.put("reshipOrder", new reshipOrder());
2197
      processMap_.put("refundOrder", new refundOrder());
2690 chandransh 2198
      processMap_.put("getReturnOrders", new getReturnOrders());
2700 chandransh 2199
      processMap_.put("getReturnOrder", new getReturnOrder());
2690 chandransh 2200
      processMap_.put("processReturn", new processReturn());
2819 chandransh 2201
      processMap_.put("createPurchaseOrder", new createPurchaseOrder());
68 ashish 2202
    }
2203
 
2204
    protected static interface ProcessFunction {
2205
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
2206
    }
2207
 
2208
    private Iface iface_;
2209
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
2210
 
2211
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
2212
    {
2213
      TMessage msg = iprot.readMessageBegin();
2214
      ProcessFunction fn = processMap_.get(msg.name);
2215
      if (fn == null) {
2216
        TProtocolUtil.skip(iprot, TType.STRUCT);
2217
        iprot.readMessageEnd();
2218
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
2219
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
2220
        x.write(oprot);
2221
        oprot.writeMessageEnd();
2222
        oprot.getTransport().flush();
2223
        return true;
2224
      }
2225
      fn.process(msg.seqid, iprot, oprot);
2226
      return true;
2227
    }
2228
 
764 rajveer 2229
    private class closeSession implements ProcessFunction {
2230
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2231
      {
2232
        closeSession_args args = new closeSession_args();
2233
        args.read(iprot);
2234
        iprot.readMessageEnd();
2235
        closeSession_result result = new closeSession_result();
2236
        iface_.closeSession();
2237
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
2238
        result.write(oprot);
2239
        oprot.writeMessageEnd();
2240
        oprot.getTransport().flush();
2241
      }
2242
 
2243
    }
2244
 
68 ashish 2245
    private class createTransaction implements ProcessFunction {
2246
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2247
      {
2248
        createTransaction_args args = new createTransaction_args();
2249
        args.read(iprot);
2250
        iprot.readMessageEnd();
2251
        createTransaction_result result = new createTransaction_result();
2252
        try {
132 ashish 2253
          result.success = iface_.createTransaction(args.transaction);
2254
          result.setSuccessIsSet(true);
68 ashish 2255
        } catch (TransactionServiceException ex) {
2256
          result.ex = ex;
2257
        } catch (Throwable th) {
2258
          LOGGER.error("Internal error processing createTransaction", th);
2259
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
2260
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
2261
          x.write(oprot);
2262
          oprot.writeMessageEnd();
2263
          oprot.getTransport().flush();
2264
          return;
2265
        }
2266
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
2267
        result.write(oprot);
2268
        oprot.writeMessageEnd();
2269
        oprot.getTransport().flush();
2270
      }
2271
 
2272
    }
2273
 
2274
    private class getTransaction implements ProcessFunction {
2275
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2276
      {
2277
        getTransaction_args args = new getTransaction_args();
2278
        args.read(iprot);
2279
        iprot.readMessageEnd();
2280
        getTransaction_result result = new getTransaction_result();
2281
        try {
2282
          result.success = iface_.getTransaction(args.id);
2283
        } catch (TransactionServiceException ex) {
2284
          result.ex = ex;
2285
        } catch (Throwable th) {
2286
          LOGGER.error("Internal error processing getTransaction", th);
2287
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
2288
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
2289
          x.write(oprot);
2290
          oprot.writeMessageEnd();
2291
          oprot.getTransport().flush();
2292
          return;
2293
        }
2294
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
2295
        result.write(oprot);
2296
        oprot.writeMessageEnd();
2297
        oprot.getTransport().flush();
2298
      }
2299
 
2300
    }
2301
 
2302
    private class getTransactionsForCustomer implements ProcessFunction {
2303
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2304
      {
2305
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
2306
        args.read(iprot);
2307
        iprot.readMessageEnd();
2308
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
2309
        try {
132 ashish 2310
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2311
        } catch (TransactionServiceException ex) {
2312
          result.ex = ex;
2313
        } catch (Throwable th) {
2314
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
2315
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
2316
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
2317
          x.write(oprot);
2318
          oprot.writeMessageEnd();
2319
          oprot.getTransport().flush();
2320
          return;
2321
        }
2322
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
2323
        result.write(oprot);
2324
        oprot.writeMessageEnd();
2325
        oprot.getTransport().flush();
2326
      }
2327
 
2328
    }
2329
 
132 ashish 2330
    private class getTransactionsForShoppingCartId implements ProcessFunction {
2331
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2332
      {
2333
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
2334
        args.read(iprot);
2335
        iprot.readMessageEnd();
2336
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
2337
        try {
2338
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
2339
        } catch (TransactionServiceException ex) {
2340
          result.ex = ex;
2341
        } catch (Throwable th) {
2342
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
2343
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
2344
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
2345
          x.write(oprot);
2346
          oprot.writeMessageEnd();
2347
          oprot.getTransport().flush();
2348
          return;
2349
        }
2350
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
2351
        result.write(oprot);
2352
        oprot.writeMessageEnd();
2353
        oprot.getTransport().flush();
2354
      }
2355
 
2356
    }
2357
 
68 ashish 2358
    private class getTransactionStatus implements ProcessFunction {
2359
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2360
      {
2361
        getTransactionStatus_args args = new getTransactionStatus_args();
2362
        args.read(iprot);
2363
        iprot.readMessageEnd();
2364
        getTransactionStatus_result result = new getTransactionStatus_result();
2365
        try {
2366
          result.success = iface_.getTransactionStatus(args.transactionId);
2367
        } catch (TransactionServiceException ex) {
2368
          result.ex = ex;
2369
        } catch (Throwable th) {
2370
          LOGGER.error("Internal error processing getTransactionStatus", th);
2371
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
2372
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
2373
          x.write(oprot);
2374
          oprot.writeMessageEnd();
2375
          oprot.getTransport().flush();
2376
          return;
2377
        }
2378
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
2379
        result.write(oprot);
2380
        oprot.writeMessageEnd();
2381
        oprot.getTransport().flush();
2382
      }
2383
 
2384
    }
2385
 
2386
    private class changeTransactionStatus implements ProcessFunction {
2387
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2388
      {
2389
        changeTransactionStatus_args args = new changeTransactionStatus_args();
2390
        args.read(iprot);
2391
        iprot.readMessageEnd();
2392
        changeTransactionStatus_result result = new changeTransactionStatus_result();
2393
        try {
2394
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
2395
          result.setSuccessIsSet(true);
2396
        } catch (TransactionServiceException ex) {
2397
          result.ex = ex;
2398
        } catch (Throwable th) {
2399
          LOGGER.error("Internal error processing changeTransactionStatus", th);
2400
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
2401
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
2402
          x.write(oprot);
2403
          oprot.writeMessageEnd();
2404
          oprot.getTransport().flush();
2405
          return;
2406
        }
2407
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
2408
        result.write(oprot);
2409
        oprot.writeMessageEnd();
2410
        oprot.getTransport().flush();
2411
      }
2412
 
2413
    }
2414
 
1398 varun.gupt 2415
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 2416
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2417
      {
1398 varun.gupt 2418
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 2419
        args.read(iprot);
2420
        iprot.readMessageEnd();
1398 varun.gupt 2421
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 2422
        try {
1398 varun.gupt 2423
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 2424
          result.setSuccessIsSet(true);
2425
        } catch (TransactionServiceException ex) {
2426
          result.ex = ex;
2427
        } catch (Throwable th) {
1398 varun.gupt 2428
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
2429
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
2430
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 2431
          x.write(oprot);
2432
          oprot.writeMessageEnd();
2433
          oprot.getTransport().flush();
2434
          return;
2435
        }
1398 varun.gupt 2436
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 2437
        result.write(oprot);
2438
        oprot.writeMessageEnd();
2439
        oprot.getTransport().flush();
2440
      }
2441
 
2442
    }
2443
 
483 rajveer 2444
    private class getAllOrders implements ProcessFunction {
68 ashish 2445
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2446
      {
483 rajveer 2447
        getAllOrders_args args = new getAllOrders_args();
68 ashish 2448
        args.read(iprot);
2449
        iprot.readMessageEnd();
483 rajveer 2450
        getAllOrders_result result = new getAllOrders_result();
68 ashish 2451
        try {
483 rajveer 2452
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 2453
        } catch (TransactionServiceException ex) {
2454
          result.ex = ex;
2455
        } catch (Throwable th) {
483 rajveer 2456
          LOGGER.error("Internal error processing getAllOrders", th);
2457
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
2458
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 2459
          x.write(oprot);
2460
          oprot.writeMessageEnd();
2461
          oprot.getTransport().flush();
2462
          return;
2463
        }
483 rajveer 2464
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 2465
        result.write(oprot);
2466
        oprot.writeMessageEnd();
2467
        oprot.getTransport().flush();
2468
      }
2469
 
2470
    }
2471
 
1022 varun.gupt 2472
    private class getOrdersByBillingDate implements ProcessFunction {
2473
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2474
      {
2475
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
2476
        args.read(iprot);
2477
        iprot.readMessageEnd();
2478
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
2479
        try {
2480
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
2481
        } catch (TransactionServiceException ex) {
2482
          result.ex = ex;
2483
        } catch (Throwable th) {
2484
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
2485
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
2486
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
2487
          x.write(oprot);
2488
          oprot.writeMessageEnd();
2489
          oprot.getTransport().flush();
2490
          return;
2491
        }
2492
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
2493
        result.write(oprot);
2494
        oprot.writeMessageEnd();
2495
        oprot.getTransport().flush();
2496
      }
2497
 
2498
    }
2499
 
1382 varun.gupt 2500
    private class getReturnableOrdersForCustomer implements ProcessFunction {
2501
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2502
      {
2503
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
2504
        args.read(iprot);
2505
        iprot.readMessageEnd();
2506
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
2507
        try {
2508
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
2509
        } catch (TransactionServiceException ex) {
2510
          result.ex = ex;
2511
        } catch (Throwable th) {
2512
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
2513
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
2514
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2515
          x.write(oprot);
2516
          oprot.writeMessageEnd();
2517
          oprot.getTransport().flush();
2518
          return;
2519
        }
2520
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
2521
        result.write(oprot);
2522
        oprot.writeMessageEnd();
2523
        oprot.getTransport().flush();
2524
      }
2525
 
2526
    }
2527
 
2528
    private class getCancellableOrdersForCustomer implements ProcessFunction {
2529
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2530
      {
2531
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
2532
        args.read(iprot);
2533
        iprot.readMessageEnd();
2534
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
2535
        try {
2536
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
2537
        } catch (TransactionServiceException ex) {
2538
          result.ex = ex;
2539
        } catch (Throwable th) {
2540
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
2541
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
2542
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2543
          x.write(oprot);
2544
          oprot.writeMessageEnd();
2545
          oprot.getTransport().flush();
2546
          return;
2547
        }
2548
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
2549
        result.write(oprot);
2550
        oprot.writeMessageEnd();
2551
        oprot.getTransport().flush();
2552
      }
2553
 
2554
    }
2555
 
483 rajveer 2556
    private class changeOrderStatus implements ProcessFunction {
68 ashish 2557
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2558
      {
483 rajveer 2559
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 2560
        args.read(iprot);
2561
        iprot.readMessageEnd();
483 rajveer 2562
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 2563
        try {
483 rajveer 2564
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 2565
          result.setSuccessIsSet(true);
2566
        } catch (TransactionServiceException ex) {
2567
          result.ex = ex;
2568
        } catch (Throwable th) {
483 rajveer 2569
          LOGGER.error("Internal error processing changeOrderStatus", th);
2570
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
2571
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 2572
          x.write(oprot);
2573
          oprot.writeMessageEnd();
2574
          oprot.getTransport().flush();
2575
          return;
2576
        }
483 rajveer 2577
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 2578
        result.write(oprot);
2579
        oprot.writeMessageEnd();
2580
        oprot.getTransport().flush();
2581
      }
2582
 
2583
    }
2584
 
495 rajveer 2585
    private class addBillingDetails implements ProcessFunction {
2586
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2587
      {
2588
        addBillingDetails_args args = new addBillingDetails_args();
2589
        args.read(iprot);
2590
        iprot.readMessageEnd();
2591
        addBillingDetails_result result = new addBillingDetails_result();
2592
        try {
1148 chandransh 2593
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 2594
          result.setSuccessIsSet(true);
2595
        } catch (TransactionServiceException ex) {
2596
          result.ex = ex;
2597
        } catch (Throwable th) {
2598
          LOGGER.error("Internal error processing addBillingDetails", th);
2599
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
2600
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
2601
          x.write(oprot);
2602
          oprot.writeMessageEnd();
2603
          oprot.getTransport().flush();
2604
          return;
2605
        }
2606
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
2607
        result.write(oprot);
2608
        oprot.writeMessageEnd();
2609
        oprot.getTransport().flush();
2610
      }
2611
 
2612
    }
2613
 
1148 chandransh 2614
    private class addJacketNumber implements ProcessFunction {
2615
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2616
      {
2617
        addJacketNumber_args args = new addJacketNumber_args();
2618
        args.read(iprot);
2619
        iprot.readMessageEnd();
2620
        addJacketNumber_result result = new addJacketNumber_result();
2621
        try {
2842 chandransh 2622
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber, args.imeiNumber, args.itemNumber, args.billedBy, args.billingType);
1148 chandransh 2623
          result.setSuccessIsSet(true);
2624
        } catch (TransactionServiceException ex) {
2625
          result.ex = ex;
2626
        } catch (Throwable th) {
2627
          LOGGER.error("Internal error processing addJacketNumber", th);
2628
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
2629
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
2630
          x.write(oprot);
2631
          oprot.writeMessageEnd();
2632
          oprot.getTransport().flush();
2633
          return;
2634
        }
2635
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
2636
        result.write(oprot);
2637
        oprot.writeMessageEnd();
2638
        oprot.getTransport().flush();
2639
      }
2640
 
2641
    }
2642
 
923 rajveer 2643
    private class acceptOrder implements ProcessFunction {
2644
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2645
      {
2646
        acceptOrder_args args = new acceptOrder_args();
2647
        args.read(iprot);
2648
        iprot.readMessageEnd();
2649
        acceptOrder_result result = new acceptOrder_result();
2650
        try {
2651
          result.success = iface_.acceptOrder(args.orderId);
2652
          result.setSuccessIsSet(true);
2653
        } catch (TransactionServiceException ex) {
2654
          result.ex = ex;
2655
        } catch (Throwable th) {
2656
          LOGGER.error("Internal error processing acceptOrder", th);
2657
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
2658
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
2659
          x.write(oprot);
2660
          oprot.writeMessageEnd();
2661
          oprot.getTransport().flush();
2662
          return;
2663
        }
2664
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
2665
        result.write(oprot);
2666
        oprot.writeMessageEnd();
2667
        oprot.getTransport().flush();
2668
      }
2669
 
2670
    }
2671
 
2672
    private class billOrder implements ProcessFunction {
2673
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2674
      {
2675
        billOrder_args args = new billOrder_args();
2676
        args.read(iprot);
2677
        iprot.readMessageEnd();
2678
        billOrder_result result = new billOrder_result();
2679
        try {
2680
          result.success = iface_.billOrder(args.orderId);
2681
          result.setSuccessIsSet(true);
2682
        } catch (TransactionServiceException ex) {
2683
          result.ex = ex;
2684
        } catch (Throwable th) {
2685
          LOGGER.error("Internal error processing billOrder", th);
2686
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
2687
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
2688
          x.write(oprot);
2689
          oprot.writeMessageEnd();
2690
          oprot.getTransport().flush();
2691
          return;
2692
        }
2693
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
2694
        result.write(oprot);
2695
        oprot.writeMessageEnd();
2696
        oprot.getTransport().flush();
2697
      }
2698
 
2699
    }
2700
 
483 rajveer 2701
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2702
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2703
      {
483 rajveer 2704
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2705
        args.read(iprot);
2706
        iprot.readMessageEnd();
483 rajveer 2707
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2708
        try {
1529 ankur.sing 2709
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2710
        } catch (TransactionServiceException ex) {
2711
          result.ex = ex;
2712
        } catch (Throwable th) {
483 rajveer 2713
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2714
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2715
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2716
          x.write(oprot);
2717
          oprot.writeMessageEnd();
2718
          oprot.getTransport().flush();
2719
          return;
2720
        }
483 rajveer 2721
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2722
        result.write(oprot);
2723
        oprot.writeMessageEnd();
2724
        oprot.getTransport().flush();
2725
      }
2726
 
2727
    }
2728
 
483 rajveer 2729
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2730
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2731
      {
483 rajveer 2732
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2733
        args.read(iprot);
2734
        iprot.readMessageEnd();
483 rajveer 2735
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2736
        try {
483 rajveer 2737
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2738
        } catch (TransactionServiceException ex) {
2739
          result.ex = ex;
2740
        } catch (Throwable th) {
483 rajveer 2741
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2742
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2743
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2744
          x.write(oprot);
2745
          oprot.writeMessageEnd();
2746
          oprot.getTransport().flush();
2747
          return;
2748
        }
483 rajveer 2749
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2750
        result.write(oprot);
2751
        oprot.writeMessageEnd();
2752
        oprot.getTransport().flush();
2753
      }
2754
 
2755
    }
2756
 
483 rajveer 2757
    private class createOrder implements ProcessFunction {
68 ashish 2758
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2759
      {
483 rajveer 2760
        createOrder_args args = new createOrder_args();
68 ashish 2761
        args.read(iprot);
2762
        iprot.readMessageEnd();
483 rajveer 2763
        createOrder_result result = new createOrder_result();
68 ashish 2764
        try {
483 rajveer 2765
          result.success = iface_.createOrder(args.order);
68 ashish 2766
          result.setSuccessIsSet(true);
2767
        } catch (TransactionServiceException ex) {
2768
          result.ex = ex;
2769
        } catch (Throwable th) {
483 rajveer 2770
          LOGGER.error("Internal error processing createOrder", th);
2771
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2772
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2773
          x.write(oprot);
2774
          oprot.writeMessageEnd();
2775
          oprot.getTransport().flush();
2776
          return;
2777
        }
483 rajveer 2778
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2779
        result.write(oprot);
2780
        oprot.writeMessageEnd();
2781
        oprot.getTransport().flush();
2782
      }
2783
 
2784
    }
2785
 
483 rajveer 2786
    private class getOrder implements ProcessFunction {
68 ashish 2787
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2788
      {
483 rajveer 2789
        getOrder_args args = new getOrder_args();
68 ashish 2790
        args.read(iprot);
2791
        iprot.readMessageEnd();
483 rajveer 2792
        getOrder_result result = new getOrder_result();
68 ashish 2793
        try {
483 rajveer 2794
          result.success = iface_.getOrder(args.id);
68 ashish 2795
        } catch (TransactionServiceException ex) {
2796
          result.ex = ex;
2797
        } catch (Throwable th) {
483 rajveer 2798
          LOGGER.error("Internal error processing getOrder", th);
2799
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2800
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2801
          x.write(oprot);
2802
          oprot.writeMessageEnd();
2803
          oprot.getTransport().flush();
2804
          return;
2805
        }
483 rajveer 2806
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2807
        result.write(oprot);
2808
        oprot.writeMessageEnd();
2809
        oprot.getTransport().flush();
2810
      }
2811
 
2812
    }
2813
 
483 rajveer 2814
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2815
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2816
      {
483 rajveer 2817
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2818
        args.read(iprot);
2819
        iprot.readMessageEnd();
483 rajveer 2820
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2821
        try {
483 rajveer 2822
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2823
        } catch (TransactionServiceException ex) {
2824
          result.ex = ex;
2825
        } catch (Throwable th) {
483 rajveer 2826
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2827
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2828
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2829
          x.write(oprot);
2830
          oprot.writeMessageEnd();
2831
          oprot.getTransport().flush();
2832
          return;
2833
        }
483 rajveer 2834
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2835
        result.write(oprot);
2836
        oprot.writeMessageEnd();
2837
        oprot.getTransport().flush();
2838
      }
2839
 
2840
    }
2841
 
1529 ankur.sing 2842
    private class getOrderForCustomer implements ProcessFunction {
2843
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2844
      {
2845
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2846
        args.read(iprot);
2847
        iprot.readMessageEnd();
2848
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2849
        try {
2850
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2851
        } catch (TransactionServiceException ex) {
2852
          result.ex = ex;
2853
        } catch (Throwable th) {
2854
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2855
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2856
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2857
          x.write(oprot);
2858
          oprot.writeMessageEnd();
2859
          oprot.getTransport().flush();
2860
          return;
2861
        }
2862
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2863
        result.write(oprot);
2864
        oprot.writeMessageEnd();
2865
        oprot.getTransport().flush();
2866
      }
2867
 
2868
    }
2869
 
1221 chandransh 2870
    private class batchOrders implements ProcessFunction {
2871
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2872
      {
2873
        batchOrders_args args = new batchOrders_args();
2874
        args.read(iprot);
2875
        iprot.readMessageEnd();
2876
        batchOrders_result result = new batchOrders_result();
2877
        try {
2878
          result.success = iface_.batchOrders(args.warehouseId);
2879
        } catch (TransactionServiceException ex) {
2880
          result.ex = ex;
2881
        } catch (Throwable th) {
2882
          LOGGER.error("Internal error processing batchOrders", th);
2883
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2884
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2885
          x.write(oprot);
2886
          oprot.writeMessageEnd();
2887
          oprot.getTransport().flush();
2888
          return;
2889
        }
2890
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2891
        result.write(oprot);
2892
        oprot.writeMessageEnd();
2893
        oprot.getTransport().flush();
2894
      }
2895
 
2896
    }
2897
 
1209 chandransh 2898
    private class markOrderAsOutOfStock implements ProcessFunction {
2899
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2900
      {
2901
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2902
        args.read(iprot);
2903
        iprot.readMessageEnd();
2904
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2905
        try {
2906
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2907
          result.setSuccessIsSet(true);
2908
        } catch (TransactionServiceException ex) {
2909
          result.ex = ex;
2910
        } catch (Throwable th) {
2911
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2912
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2913
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2914
          x.write(oprot);
2915
          oprot.writeMessageEnd();
2916
          oprot.getTransport().flush();
2917
          return;
2918
        }
2919
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2920
        result.write(oprot);
2921
        oprot.writeMessageEnd();
2922
        oprot.getTransport().flush();
2923
      }
2924
 
2925
    }
2926
 
758 chandransh 2927
    private class markOrdersAsManifested implements ProcessFunction {
2928
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2929
      {
2930
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2931
        args.read(iprot);
2932
        iprot.readMessageEnd();
2933
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2934
        try {
2935
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2936
          result.setSuccessIsSet(true);
2937
        } catch (TransactionServiceException ex) {
2938
          result.ex = ex;
2939
        } catch (Throwable th) {
2940
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2941
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2942
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2943
          x.write(oprot);
2944
          oprot.writeMessageEnd();
2945
          oprot.getTransport().flush();
2946
          return;
2947
        }
2948
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2949
        result.write(oprot);
2950
        oprot.writeMessageEnd();
2951
        oprot.getTransport().flush();
2952
      }
2953
 
2954
    }
2955
 
1114 chandransh 2956
    private class markOrdersAsPickedUp implements ProcessFunction {
2957
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2958
      {
2959
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2960
        args.read(iprot);
2961
        iprot.readMessageEnd();
2962
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2963
        try {
2964
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2965
        } catch (TransactionServiceException ex) {
2966
          result.ex = ex;
2967
        } catch (Throwable th) {
2968
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2969
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2970
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2971
          x.write(oprot);
2972
          oprot.writeMessageEnd();
2973
          oprot.getTransport().flush();
2974
          return;
2975
        }
2976
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2977
        result.write(oprot);
2978
        oprot.writeMessageEnd();
2979
        oprot.getTransport().flush();
2980
      }
2981
 
2982
    }
2983
 
1133 chandransh 2984
    private class markOrdersAsDelivered implements ProcessFunction {
2985
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2986
      {
2987
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2988
        args.read(iprot);
2989
        iprot.readMessageEnd();
2990
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2991
        try {
2992
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2993
        } catch (TransactionServiceException ex) {
2994
          result.ex = ex;
2995
        } catch (Throwable th) {
2996
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2997
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2998
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2999
          x.write(oprot);
3000
          oprot.writeMessageEnd();
3001
          oprot.getTransport().flush();
3002
          return;
3003
        }
3004
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
3005
        result.write(oprot);
3006
        oprot.writeMessageEnd();
3007
        oprot.getTransport().flush();
3008
      }
3009
 
3010
    }
3011
 
3012
    private class markOrdersAsFailed implements ProcessFunction {
3013
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3014
      {
3015
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
3016
        args.read(iprot);
3017
        iprot.readMessageEnd();
3018
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
3019
        try {
3020
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
3021
        } catch (TransactionServiceException ex) {
3022
          result.ex = ex;
3023
        } catch (Throwable th) {
3024
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
3025
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
3026
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
3027
          x.write(oprot);
3028
          oprot.writeMessageEnd();
3029
          oprot.getTransport().flush();
3030
          return;
3031
        }
3032
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
3033
        result.write(oprot);
3034
        oprot.writeMessageEnd();
3035
        oprot.getTransport().flush();
3036
      }
3037
 
3038
    }
3039
 
1245 chandransh 3040
    private class updateNonDeliveryReason implements ProcessFunction {
3041
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3042
      {
3043
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
3044
        args.read(iprot);
3045
        iprot.readMessageEnd();
3046
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
3047
        try {
3048
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
3049
        } catch (TransactionServiceException ex) {
3050
          result.ex = ex;
3051
        } catch (Throwable th) {
3052
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
3053
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
3054
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
3055
          x.write(oprot);
3056
          oprot.writeMessageEnd();
3057
          oprot.getTransport().flush();
3058
          return;
3059
        }
3060
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
3061
        result.write(oprot);
3062
        oprot.writeMessageEnd();
3063
        oprot.getTransport().flush();
3064
      }
3065
 
3066
    }
3067
 
1406 ankur.sing 3068
    private class getUndeliveredOrders implements ProcessFunction {
3069
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3070
      {
3071
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
3072
        args.read(iprot);
3073
        iprot.readMessageEnd();
3074
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
3075
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
3076
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
3077
        result.write(oprot);
3078
        oprot.writeMessageEnd();
3079
        oprot.getTransport().flush();
3080
      }
3081
 
3082
    }
3083
 
305 ashish 3084
    private class getAlerts implements ProcessFunction {
3085
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3086
      {
3087
        getAlerts_args args = new getAlerts_args();
3088
        args.read(iprot);
3089
        iprot.readMessageEnd();
3090
        getAlerts_result result = new getAlerts_result();
483 rajveer 3091
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 3092
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
3093
        result.write(oprot);
3094
        oprot.writeMessageEnd();
3095
        oprot.getTransport().flush();
3096
      }
3097
 
3098
    }
3099
 
3100
    private class setAlert implements ProcessFunction {
3101
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3102
      {
3103
        setAlert_args args = new setAlert_args();
3104
        args.read(iprot);
3105
        iprot.readMessageEnd();
3106
        setAlert_result result = new setAlert_result();
483 rajveer 3107
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 3108
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
3109
        result.write(oprot);
3110
        oprot.writeMessageEnd();
3111
        oprot.getTransport().flush();
3112
      }
3113
 
3114
    }
3115
 
1598 ankur.sing 3116
    private class getValidOrderCount implements ProcessFunction {
3117
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3118
      {
3119
        getValidOrderCount_args args = new getValidOrderCount_args();
3120
        args.read(iprot);
3121
        iprot.readMessageEnd();
3122
        getValidOrderCount_result result = new getValidOrderCount_result();
3123
        result.success = iface_.getValidOrderCount();
3124
        result.setSuccessIsSet(true);
3125
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
3126
        result.write(oprot);
3127
        oprot.writeMessageEnd();
3128
        oprot.getTransport().flush();
3129
      }
3130
 
3131
    }
3132
 
1629 ankur.sing 3133
    private class getNoOfCustomersWithSuccessfulTransaction implements ProcessFunction {
3134
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3135
      {
3136
        getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
3137
        args.read(iprot);
3138
        iprot.readMessageEnd();
3139
        getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
3140
        result.success = iface_.getNoOfCustomersWithSuccessfulTransaction();
3141
        result.setSuccessIsSet(true);
3142
        oprot.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid));
3143
        result.write(oprot);
3144
        oprot.writeMessageEnd();
3145
        oprot.getTransport().flush();
3146
      }
3147
 
3148
    }
3149
 
1731 ankur.sing 3150
    private class getValidOrdersAmountRange implements ProcessFunction {
1629 ankur.sing 3151
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3152
      {
1731 ankur.sing 3153
        getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 3154
        args.read(iprot);
3155
        iprot.readMessageEnd();
1731 ankur.sing 3156
        getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
3157
        result.success = iface_.getValidOrdersAmountRange();
3158
        oprot.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 3159
        result.write(oprot);
3160
        oprot.writeMessageEnd();
3161
        oprot.getTransport().flush();
3162
      }
3163
 
3164
    }
3165
 
1886 ankur.sing 3166
    private class getValidOrders implements ProcessFunction {
3167
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3168
      {
3169
        getValidOrders_args args = new getValidOrders_args();
3170
        args.read(iprot);
3171
        iprot.readMessageEnd();
3172
        getValidOrders_result result = new getValidOrders_result();
3173
        result.success = iface_.getValidOrders(args.limit);
3174
        oprot.writeMessageBegin(new TMessage("getValidOrders", TMessageType.REPLY, seqid));
3175
        result.write(oprot);
3176
        oprot.writeMessageEnd();
3177
        oprot.getTransport().flush();
3178
      }
3179
 
3180
    }
3181
 
2538 chandransh 3182
    private class toggleDOAFlag implements ProcessFunction {
3183
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3184
      {
3185
        toggleDOAFlag_args args = new toggleDOAFlag_args();
3186
        args.read(iprot);
3187
        iprot.readMessageEnd();
3188
        toggleDOAFlag_result result = new toggleDOAFlag_result();
3189
        try {
3190
          result.success = iface_.toggleDOAFlag(args.orderId);
3191
          result.setSuccessIsSet(true);
3192
        } catch (TransactionServiceException ex) {
3193
          result.ex = ex;
3194
        } catch (Throwable th) {
3195
          LOGGER.error("Internal error processing toggleDOAFlag", th);
3196
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing toggleDOAFlag");
3197
          oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.EXCEPTION, seqid));
3198
          x.write(oprot);
3199
          oprot.writeMessageEnd();
3200
          oprot.getTransport().flush();
3201
          return;
3202
        }
3203
        oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.REPLY, seqid));
3204
        result.write(oprot);
3205
        oprot.writeMessageEnd();
3206
        oprot.getTransport().flush();
3207
      }
3208
 
3209
    }
3210
 
3211
    private class requestPickupNumber implements ProcessFunction {
3212
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3213
      {
3214
        requestPickupNumber_args args = new requestPickupNumber_args();
3215
        args.read(iprot);
3216
        iprot.readMessageEnd();
3217
        requestPickupNumber_result result = new requestPickupNumber_result();
3218
        try {
3219
          result.success = iface_.requestPickupNumber(args.orderId);
3220
          result.setSuccessIsSet(true);
3221
        } catch (TransactionServiceException ex) {
3222
          result.ex = ex;
3223
        } catch (Throwable th) {
3224
          LOGGER.error("Internal error processing requestPickupNumber", th);
3225
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing requestPickupNumber");
3226
          oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.EXCEPTION, seqid));
3227
          x.write(oprot);
3228
          oprot.writeMessageEnd();
3229
          oprot.getTransport().flush();
3230
          return;
3231
        }
3232
        oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.REPLY, seqid));
3233
        result.write(oprot);
3234
        oprot.writeMessageEnd();
3235
        oprot.getTransport().flush();
3236
      }
3237
 
3238
    }
3239
 
3240
    private class authorizePickup implements ProcessFunction {
3241
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3242
      {
3243
        authorizePickup_args args = new authorizePickup_args();
3244
        args.read(iprot);
3245
        iprot.readMessageEnd();
3246
        authorizePickup_result result = new authorizePickup_result();
3247
        try {
3248
          result.success = iface_.authorizePickup(args.orderId, args.pickupNumber);
3249
          result.setSuccessIsSet(true);
3250
        } catch (TransactionServiceException ex) {
3251
          result.ex = ex;
3252
        } catch (Throwable th) {
3253
          LOGGER.error("Internal error processing authorizePickup", th);
3254
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authorizePickup");
3255
          oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.EXCEPTION, seqid));
3256
          x.write(oprot);
3257
          oprot.writeMessageEnd();
3258
          oprot.getTransport().flush();
3259
          return;
3260
        }
3261
        oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.REPLY, seqid));
3262
        result.write(oprot);
3263
        oprot.writeMessageEnd();
3264
        oprot.getTransport().flush();
3265
      }
3266
 
3267
    }
3268
 
2765 chandransh 3269
    private class markDoasAsPickedUp implements ProcessFunction {
3270
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3271
      {
3272
        markDoasAsPickedUp_args args = new markDoasAsPickedUp_args();
3273
        args.read(iprot);
3274
        iprot.readMessageEnd();
3275
        markDoasAsPickedUp_result result = new markDoasAsPickedUp_result();
3276
        result.success = iface_.markDoasAsPickedUp(args.providerId, args.pickupDetails);
3277
        oprot.writeMessageBegin(new TMessage("markDoasAsPickedUp", TMessageType.REPLY, seqid));
3278
        result.write(oprot);
3279
        oprot.writeMessageEnd();
3280
        oprot.getTransport().flush();
3281
      }
3282
 
3283
    }
3284
 
2615 chandransh 3285
    private class receiveReturn implements ProcessFunction {
2590 chandransh 3286
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3287
      {
2615 chandransh 3288
        receiveReturn_args args = new receiveReturn_args();
2590 chandransh 3289
        args.read(iprot);
3290
        iprot.readMessageEnd();
2615 chandransh 3291
        receiveReturn_result result = new receiveReturn_result();
2590 chandransh 3292
        try {
2615 chandransh 3293
          result.success = iface_.receiveReturn(args.orderId);
2590 chandransh 3294
          result.setSuccessIsSet(true);
3295
        } catch (TransactionServiceException ex) {
3296
          result.ex = ex;
3297
        } catch (Throwable th) {
2615 chandransh 3298
          LOGGER.error("Internal error processing receiveReturn", th);
3299
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing receiveReturn");
3300
          oprot.writeMessageBegin(new TMessage("receiveReturn", TMessageType.EXCEPTION, seqid));
2590 chandransh 3301
          x.write(oprot);
3302
          oprot.writeMessageEnd();
3303
          oprot.getTransport().flush();
3304
          return;
3305
        }
2615 chandransh 3306
        oprot.writeMessageBegin(new TMessage("receiveReturn", TMessageType.REPLY, seqid));
2590 chandransh 3307
        result.write(oprot);
3308
        oprot.writeMessageEnd();
3309
        oprot.getTransport().flush();
3310
      }
3311
 
3312
    }
3313
 
3314
    private class validateDoa implements ProcessFunction {
3315
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3316
      {
3317
        validateDoa_args args = new validateDoa_args();
3318
        args.read(iprot);
3319
        iprot.readMessageEnd();
3320
        validateDoa_result result = new validateDoa_result();
3321
        try {
3322
          result.success = iface_.validateDoa(args.orderId, args.isValid);
3323
          result.setSuccessIsSet(true);
3324
        } catch (TransactionServiceException ex) {
3325
          result.ex = ex;
3326
        } catch (Throwable th) {
3327
          LOGGER.error("Internal error processing validateDoa", th);
3328
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateDoa");
3329
          oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.EXCEPTION, seqid));
3330
          x.write(oprot);
3331
          oprot.writeMessageEnd();
3332
          oprot.getTransport().flush();
3333
          return;
3334
        }
3335
        oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.REPLY, seqid));
3336
        result.write(oprot);
3337
        oprot.writeMessageEnd();
3338
        oprot.getTransport().flush();
3339
      }
3340
 
3341
    }
3342
 
2615 chandransh 3343
    private class reshipOrder implements ProcessFunction {
3344
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3345
      {
3346
        reshipOrder_args args = new reshipOrder_args();
3347
        args.read(iprot);
3348
        iprot.readMessageEnd();
3349
        reshipOrder_result result = new reshipOrder_result();
3350
        try {
3351
          result.success = iface_.reshipOrder(args.orderId);
3352
          result.setSuccessIsSet(true);
3353
        } catch (TransactionServiceException ex) {
3354
          result.ex = ex;
3355
        } catch (Throwable th) {
3356
          LOGGER.error("Internal error processing reshipOrder", th);
3357
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing reshipOrder");
3358
          oprot.writeMessageBegin(new TMessage("reshipOrder", TMessageType.EXCEPTION, seqid));
3359
          x.write(oprot);
3360
          oprot.writeMessageEnd();
3361
          oprot.getTransport().flush();
3362
          return;
3363
        }
3364
        oprot.writeMessageBegin(new TMessage("reshipOrder", TMessageType.REPLY, seqid));
3365
        result.write(oprot);
3366
        oprot.writeMessageEnd();
3367
        oprot.getTransport().flush();
3368
      }
3369
 
3370
    }
3371
 
3372
    private class refundOrder implements ProcessFunction {
3373
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3374
      {
3375
        refundOrder_args args = new refundOrder_args();
3376
        args.read(iprot);
3377
        iprot.readMessageEnd();
3378
        refundOrder_result result = new refundOrder_result();
3379
        try {
3380
          result.success = iface_.refundOrder(args.orderId);
3381
          result.setSuccessIsSet(true);
3382
        } catch (TransactionServiceException ex) {
3383
          result.ex = ex;
3384
        } catch (Throwable th) {
3385
          LOGGER.error("Internal error processing refundOrder", th);
3386
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing refundOrder");
3387
          oprot.writeMessageBegin(new TMessage("refundOrder", TMessageType.EXCEPTION, seqid));
3388
          x.write(oprot);
3389
          oprot.writeMessageEnd();
3390
          oprot.getTransport().flush();
3391
          return;
3392
        }
3393
        oprot.writeMessageBegin(new TMessage("refundOrder", TMessageType.REPLY, seqid));
3394
        result.write(oprot);
3395
        oprot.writeMessageEnd();
3396
        oprot.getTransport().flush();
3397
      }
3398
 
3399
    }
3400
 
2690 chandransh 3401
    private class getReturnOrders implements ProcessFunction {
3402
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3403
      {
3404
        getReturnOrders_args args = new getReturnOrders_args();
3405
        args.read(iprot);
3406
        iprot.readMessageEnd();
3407
        getReturnOrders_result result = new getReturnOrders_result();
3408
        result.success = iface_.getReturnOrders(args.warehouseId, args.fromDate, args.toDate);
3409
        oprot.writeMessageBegin(new TMessage("getReturnOrders", TMessageType.REPLY, seqid));
3410
        result.write(oprot);
3411
        oprot.writeMessageEnd();
3412
        oprot.getTransport().flush();
3413
      }
3414
 
3415
    }
3416
 
2700 chandransh 3417
    private class getReturnOrder implements ProcessFunction {
3418
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3419
      {
3420
        getReturnOrder_args args = new getReturnOrder_args();
3421
        args.read(iprot);
3422
        iprot.readMessageEnd();
3423
        getReturnOrder_result result = new getReturnOrder_result();
3424
        try {
3425
          result.success = iface_.getReturnOrder(args.id);
3426
        } catch (TransactionServiceException ex) {
3427
          result.ex = ex;
3428
        } catch (Throwable th) {
3429
          LOGGER.error("Internal error processing getReturnOrder", th);
3430
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnOrder");
3431
          oprot.writeMessageBegin(new TMessage("getReturnOrder", TMessageType.EXCEPTION, seqid));
3432
          x.write(oprot);
3433
          oprot.writeMessageEnd();
3434
          oprot.getTransport().flush();
3435
          return;
3436
        }
3437
        oprot.writeMessageBegin(new TMessage("getReturnOrder", TMessageType.REPLY, seqid));
3438
        result.write(oprot);
3439
        oprot.writeMessageEnd();
3440
        oprot.getTransport().flush();
3441
      }
3442
 
3443
    }
3444
 
2690 chandransh 3445
    private class processReturn implements ProcessFunction {
3446
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3447
      {
3448
        processReturn_args args = new processReturn_args();
3449
        args.read(iprot);
3450
        iprot.readMessageEnd();
3451
        processReturn_result result = new processReturn_result();
3452
        try {
3453
          iface_.processReturn(args.returnOrderId);
3454
        } catch (TransactionServiceException ex) {
3455
          result.ex = ex;
3456
        } catch (Throwable th) {
3457
          LOGGER.error("Internal error processing processReturn", th);
3458
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing processReturn");
3459
          oprot.writeMessageBegin(new TMessage("processReturn", TMessageType.EXCEPTION, seqid));
3460
          x.write(oprot);
3461
          oprot.writeMessageEnd();
3462
          oprot.getTransport().flush();
3463
          return;
3464
        }
3465
        oprot.writeMessageBegin(new TMessage("processReturn", TMessageType.REPLY, seqid));
3466
        result.write(oprot);
3467
        oprot.writeMessageEnd();
3468
        oprot.getTransport().flush();
3469
      }
3470
 
3471
    }
3472
 
2819 chandransh 3473
    private class createPurchaseOrder implements ProcessFunction {
3474
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3475
      {
3476
        createPurchaseOrder_args args = new createPurchaseOrder_args();
3477
        args.read(iprot);
3478
        iprot.readMessageEnd();
3479
        createPurchaseOrder_result result = new createPurchaseOrder_result();
3480
        try {
3481
          result.success = iface_.createPurchaseOrder(args.warehouseId);
3482
          result.setSuccessIsSet(true);
3483
        } catch (TransactionServiceException ex) {
3484
          result.ex = ex;
3485
        } catch (Throwable th) {
3486
          LOGGER.error("Internal error processing createPurchaseOrder", th);
3487
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createPurchaseOrder");
3488
          oprot.writeMessageBegin(new TMessage("createPurchaseOrder", TMessageType.EXCEPTION, seqid));
3489
          x.write(oprot);
3490
          oprot.writeMessageEnd();
3491
          oprot.getTransport().flush();
3492
          return;
3493
        }
3494
        oprot.writeMessageBegin(new TMessage("createPurchaseOrder", TMessageType.REPLY, seqid));
3495
        result.write(oprot);
3496
        oprot.writeMessageEnd();
3497
        oprot.getTransport().flush();
3498
      }
3499
 
3500
    }
3501
 
68 ashish 3502
  }
3503
 
764 rajveer 3504
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3505
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3506
 
3507
 
3508
 
3509
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3510
    public enum _Fields implements TFieldIdEnum {
3511
;
3512
 
3513
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3514
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3515
 
3516
      static {
3517
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3518
          byId.put((int)field._thriftId, field);
3519
          byName.put(field.getFieldName(), field);
3520
        }
3521
      }
3522
 
3523
      /**
3524
       * Find the _Fields constant that matches fieldId, or null if its not found.
3525
       */
3526
      public static _Fields findByThriftId(int fieldId) {
3527
        return byId.get(fieldId);
3528
      }
3529
 
3530
      /**
3531
       * Find the _Fields constant that matches fieldId, throwing an exception
3532
       * if it is not found.
3533
       */
3534
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3535
        _Fields fields = findByThriftId(fieldId);
3536
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3537
        return fields;
3538
      }
3539
 
3540
      /**
3541
       * Find the _Fields constant that matches name, or null if its not found.
3542
       */
3543
      public static _Fields findByName(String name) {
3544
        return byName.get(name);
3545
      }
3546
 
3547
      private final short _thriftId;
3548
      private final String _fieldName;
3549
 
3550
      _Fields(short thriftId, String fieldName) {
3551
        _thriftId = thriftId;
3552
        _fieldName = fieldName;
3553
      }
3554
 
3555
      public short getThriftFieldId() {
3556
        return _thriftId;
3557
      }
3558
 
3559
      public String getFieldName() {
3560
        return _fieldName;
3561
      }
3562
    }
3563
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3564
    }});
3565
 
3566
    static {
3567
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3568
    }
3569
 
3570
    public closeSession_args() {
3571
    }
3572
 
3573
    /**
3574
     * Performs a deep copy on <i>other</i>.
3575
     */
3576
    public closeSession_args(closeSession_args other) {
3577
    }
3578
 
3579
    public closeSession_args deepCopy() {
3580
      return new closeSession_args(this);
3581
    }
3582
 
3583
    @Deprecated
3584
    public closeSession_args clone() {
3585
      return new closeSession_args(this);
3586
    }
3587
 
3588
    public void setFieldValue(_Fields field, Object value) {
3589
      switch (field) {
3590
      }
3591
    }
3592
 
3593
    public void setFieldValue(int fieldID, Object value) {
3594
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3595
    }
3596
 
3597
    public Object getFieldValue(_Fields field) {
3598
      switch (field) {
3599
      }
3600
      throw new IllegalStateException();
3601
    }
3602
 
3603
    public Object getFieldValue(int fieldId) {
3604
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3605
    }
3606
 
3607
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3608
    public boolean isSet(_Fields field) {
3609
      switch (field) {
3610
      }
3611
      throw new IllegalStateException();
3612
    }
3613
 
3614
    public boolean isSet(int fieldID) {
3615
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3616
    }
3617
 
3618
    @Override
3619
    public boolean equals(Object that) {
3620
      if (that == null)
3621
        return false;
3622
      if (that instanceof closeSession_args)
3623
        return this.equals((closeSession_args)that);
3624
      return false;
3625
    }
3626
 
3627
    public boolean equals(closeSession_args that) {
3628
      if (that == null)
3629
        return false;
3630
 
3631
      return true;
3632
    }
3633
 
3634
    @Override
3635
    public int hashCode() {
3636
      return 0;
3637
    }
3638
 
3639
    public int compareTo(closeSession_args other) {
3640
      if (!getClass().equals(other.getClass())) {
3641
        return getClass().getName().compareTo(other.getClass().getName());
3642
      }
3643
 
3644
      int lastComparison = 0;
3645
      closeSession_args typedOther = (closeSession_args)other;
3646
 
3647
      return 0;
3648
    }
3649
 
3650
    public void read(TProtocol iprot) throws TException {
3651
      TField field;
3652
      iprot.readStructBegin();
3653
      while (true)
3654
      {
3655
        field = iprot.readFieldBegin();
3656
        if (field.type == TType.STOP) { 
3657
          break;
3658
        }
3659
        _Fields fieldId = _Fields.findByThriftId(field.id);
3660
        if (fieldId == null) {
3661
          TProtocolUtil.skip(iprot, field.type);
3662
        } else {
3663
          switch (fieldId) {
3664
          }
3665
          iprot.readFieldEnd();
3666
        }
3667
      }
3668
      iprot.readStructEnd();
3669
      validate();
3670
    }
3671
 
3672
    public void write(TProtocol oprot) throws TException {
3673
      validate();
3674
 
3675
      oprot.writeStructBegin(STRUCT_DESC);
3676
      oprot.writeFieldStop();
3677
      oprot.writeStructEnd();
3678
    }
3679
 
3680
    @Override
3681
    public String toString() {
3682
      StringBuilder sb = new StringBuilder("closeSession_args(");
3683
      boolean first = true;
3684
 
3685
      sb.append(")");
3686
      return sb.toString();
3687
    }
3688
 
3689
    public void validate() throws TException {
3690
      // check for required fields
3691
    }
3692
 
3693
  }
3694
 
3695
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3696
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3697
 
3698
 
3699
 
3700
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3701
    public enum _Fields implements TFieldIdEnum {
3702
;
3703
 
3704
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3705
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3706
 
3707
      static {
3708
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3709
          byId.put((int)field._thriftId, field);
3710
          byName.put(field.getFieldName(), field);
3711
        }
3712
      }
3713
 
3714
      /**
3715
       * Find the _Fields constant that matches fieldId, or null if its not found.
3716
       */
3717
      public static _Fields findByThriftId(int fieldId) {
3718
        return byId.get(fieldId);
3719
      }
3720
 
3721
      /**
3722
       * Find the _Fields constant that matches fieldId, throwing an exception
3723
       * if it is not found.
3724
       */
3725
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3726
        _Fields fields = findByThriftId(fieldId);
3727
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3728
        return fields;
3729
      }
3730
 
3731
      /**
3732
       * Find the _Fields constant that matches name, or null if its not found.
3733
       */
3734
      public static _Fields findByName(String name) {
3735
        return byName.get(name);
3736
      }
3737
 
3738
      private final short _thriftId;
3739
      private final String _fieldName;
3740
 
3741
      _Fields(short thriftId, String fieldName) {
3742
        _thriftId = thriftId;
3743
        _fieldName = fieldName;
3744
      }
3745
 
3746
      public short getThriftFieldId() {
3747
        return _thriftId;
3748
      }
3749
 
3750
      public String getFieldName() {
3751
        return _fieldName;
3752
      }
3753
    }
3754
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3755
    }});
3756
 
3757
    static {
3758
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3759
    }
3760
 
3761
    public closeSession_result() {
3762
    }
3763
 
3764
    /**
3765
     * Performs a deep copy on <i>other</i>.
3766
     */
3767
    public closeSession_result(closeSession_result other) {
3768
    }
3769
 
3770
    public closeSession_result deepCopy() {
3771
      return new closeSession_result(this);
3772
    }
3773
 
3774
    @Deprecated
3775
    public closeSession_result clone() {
3776
      return new closeSession_result(this);
3777
    }
3778
 
3779
    public void setFieldValue(_Fields field, Object value) {
3780
      switch (field) {
3781
      }
3782
    }
3783
 
3784
    public void setFieldValue(int fieldID, Object value) {
3785
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3786
    }
3787
 
3788
    public Object getFieldValue(_Fields field) {
3789
      switch (field) {
3790
      }
3791
      throw new IllegalStateException();
3792
    }
3793
 
3794
    public Object getFieldValue(int fieldId) {
3795
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3796
    }
3797
 
3798
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3799
    public boolean isSet(_Fields field) {
3800
      switch (field) {
3801
      }
3802
      throw new IllegalStateException();
3803
    }
3804
 
3805
    public boolean isSet(int fieldID) {
3806
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3807
    }
3808
 
3809
    @Override
3810
    public boolean equals(Object that) {
3811
      if (that == null)
3812
        return false;
3813
      if (that instanceof closeSession_result)
3814
        return this.equals((closeSession_result)that);
3815
      return false;
3816
    }
3817
 
3818
    public boolean equals(closeSession_result that) {
3819
      if (that == null)
3820
        return false;
3821
 
3822
      return true;
3823
    }
3824
 
3825
    @Override
3826
    public int hashCode() {
3827
      return 0;
3828
    }
3829
 
3830
    public int compareTo(closeSession_result other) {
3831
      if (!getClass().equals(other.getClass())) {
3832
        return getClass().getName().compareTo(other.getClass().getName());
3833
      }
3834
 
3835
      int lastComparison = 0;
3836
      closeSession_result typedOther = (closeSession_result)other;
3837
 
3838
      return 0;
3839
    }
3840
 
3841
    public void read(TProtocol iprot) throws TException {
3842
      TField field;
3843
      iprot.readStructBegin();
3844
      while (true)
3845
      {
3846
        field = iprot.readFieldBegin();
3847
        if (field.type == TType.STOP) { 
3848
          break;
3849
        }
3850
        _Fields fieldId = _Fields.findByThriftId(field.id);
3851
        if (fieldId == null) {
3852
          TProtocolUtil.skip(iprot, field.type);
3853
        } else {
3854
          switch (fieldId) {
3855
          }
3856
          iprot.readFieldEnd();
3857
        }
3858
      }
3859
      iprot.readStructEnd();
3860
      validate();
3861
    }
3862
 
3863
    public void write(TProtocol oprot) throws TException {
3864
      oprot.writeStructBegin(STRUCT_DESC);
3865
 
3866
      oprot.writeFieldStop();
3867
      oprot.writeStructEnd();
3868
    }
3869
 
3870
    @Override
3871
    public String toString() {
3872
      StringBuilder sb = new StringBuilder("closeSession_result(");
3873
      boolean first = true;
3874
 
3875
      sb.append(")");
3876
      return sb.toString();
3877
    }
3878
 
3879
    public void validate() throws TException {
3880
      // check for required fields
3881
    }
3882
 
3883
  }
3884
 
684 chandransh 3885
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 3886
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
3887
 
3888
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
3889
 
3890
    private Transaction transaction;
3891
 
3892
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3893
    public enum _Fields implements TFieldIdEnum {
3894
      TRANSACTION((short)1, "transaction");
3895
 
3896
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3897
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3898
 
3899
      static {
3900
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3901
          byId.put((int)field._thriftId, field);
3902
          byName.put(field.getFieldName(), field);
3903
        }
3904
      }
3905
 
3906
      /**
3907
       * Find the _Fields constant that matches fieldId, or null if its not found.
3908
       */
3909
      public static _Fields findByThriftId(int fieldId) {
3910
        return byId.get(fieldId);
3911
      }
3912
 
3913
      /**
3914
       * Find the _Fields constant that matches fieldId, throwing an exception
3915
       * if it is not found.
3916
       */
3917
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3918
        _Fields fields = findByThriftId(fieldId);
3919
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3920
        return fields;
3921
      }
3922
 
3923
      /**
3924
       * Find the _Fields constant that matches name, or null if its not found.
3925
       */
3926
      public static _Fields findByName(String name) {
3927
        return byName.get(name);
3928
      }
3929
 
3930
      private final short _thriftId;
3931
      private final String _fieldName;
3932
 
3933
      _Fields(short thriftId, String fieldName) {
3934
        _thriftId = thriftId;
3935
        _fieldName = fieldName;
3936
      }
3937
 
3938
      public short getThriftFieldId() {
3939
        return _thriftId;
3940
      }
3941
 
3942
      public String getFieldName() {
3943
        return _fieldName;
3944
      }
3945
    }
3946
 
3947
    // isset id assignments
3948
 
3949
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3950
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
3951
          new StructMetaData(TType.STRUCT, Transaction.class)));
3952
    }});
3953
 
3954
    static {
3955
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
3956
    }
3957
 
3958
    public createTransaction_args() {
3959
    }
3960
 
3961
    public createTransaction_args(
3962
      Transaction transaction)
3963
    {
3964
      this();
3965
      this.transaction = transaction;
3966
    }
3967
 
3968
    /**
3969
     * Performs a deep copy on <i>other</i>.
3970
     */
3971
    public createTransaction_args(createTransaction_args other) {
3972
      if (other.isSetTransaction()) {
3973
        this.transaction = new Transaction(other.transaction);
3974
      }
3975
    }
3976
 
3977
    public createTransaction_args deepCopy() {
3978
      return new createTransaction_args(this);
3979
    }
3980
 
3981
    @Deprecated
3982
    public createTransaction_args clone() {
3983
      return new createTransaction_args(this);
3984
    }
3985
 
3986
    public Transaction getTransaction() {
3987
      return this.transaction;
3988
    }
3989
 
3990
    public createTransaction_args setTransaction(Transaction transaction) {
3991
      this.transaction = transaction;
3992
      return this;
3993
    }
3994
 
3995
    public void unsetTransaction() {
3996
      this.transaction = null;
3997
    }
3998
 
3999
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
4000
    public boolean isSetTransaction() {
4001
      return this.transaction != null;
4002
    }
4003
 
4004
    public void setTransactionIsSet(boolean value) {
4005
      if (!value) {
4006
        this.transaction = null;
4007
      }
4008
    }
4009
 
4010
    public void setFieldValue(_Fields field, Object value) {
4011
      switch (field) {
4012
      case TRANSACTION:
4013
        if (value == null) {
4014
          unsetTransaction();
4015
        } else {
4016
          setTransaction((Transaction)value);
4017
        }
4018
        break;
4019
 
4020
      }
4021
    }
4022
 
4023
    public void setFieldValue(int fieldID, Object value) {
4024
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4025
    }
4026
 
4027
    public Object getFieldValue(_Fields field) {
4028
      switch (field) {
4029
      case TRANSACTION:
4030
        return getTransaction();
4031
 
4032
      }
4033
      throw new IllegalStateException();
4034
    }
4035
 
4036
    public Object getFieldValue(int fieldId) {
4037
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4038
    }
4039
 
4040
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4041
    public boolean isSet(_Fields field) {
4042
      switch (field) {
4043
      case TRANSACTION:
4044
        return isSetTransaction();
4045
      }
4046
      throw new IllegalStateException();
4047
    }
4048
 
4049
    public boolean isSet(int fieldID) {
4050
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4051
    }
4052
 
4053
    @Override
4054
    public boolean equals(Object that) {
4055
      if (that == null)
4056
        return false;
4057
      if (that instanceof createTransaction_args)
4058
        return this.equals((createTransaction_args)that);
4059
      return false;
4060
    }
4061
 
4062
    public boolean equals(createTransaction_args that) {
4063
      if (that == null)
4064
        return false;
4065
 
4066
      boolean this_present_transaction = true && this.isSetTransaction();
4067
      boolean that_present_transaction = true && that.isSetTransaction();
4068
      if (this_present_transaction || that_present_transaction) {
4069
        if (!(this_present_transaction && that_present_transaction))
4070
          return false;
4071
        if (!this.transaction.equals(that.transaction))
4072
          return false;
4073
      }
4074
 
4075
      return true;
4076
    }
4077
 
4078
    @Override
4079
    public int hashCode() {
4080
      return 0;
4081
    }
4082
 
684 chandransh 4083
    public int compareTo(createTransaction_args other) {
4084
      if (!getClass().equals(other.getClass())) {
4085
        return getClass().getName().compareTo(other.getClass().getName());
4086
      }
4087
 
4088
      int lastComparison = 0;
4089
      createTransaction_args typedOther = (createTransaction_args)other;
4090
 
4091
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
4092
      if (lastComparison != 0) {
4093
        return lastComparison;
4094
      }
4095
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
4096
      if (lastComparison != 0) {
4097
        return lastComparison;
4098
      }
4099
      return 0;
4100
    }
4101
 
68 ashish 4102
    public void read(TProtocol iprot) throws TException {
4103
      TField field;
4104
      iprot.readStructBegin();
4105
      while (true)
4106
      {
4107
        field = iprot.readFieldBegin();
4108
        if (field.type == TType.STOP) { 
4109
          break;
4110
        }
4111
        _Fields fieldId = _Fields.findByThriftId(field.id);
4112
        if (fieldId == null) {
4113
          TProtocolUtil.skip(iprot, field.type);
4114
        } else {
4115
          switch (fieldId) {
4116
            case TRANSACTION:
4117
              if (field.type == TType.STRUCT) {
4118
                this.transaction = new Transaction();
4119
                this.transaction.read(iprot);
4120
              } else { 
4121
                TProtocolUtil.skip(iprot, field.type);
4122
              }
4123
              break;
4124
          }
4125
          iprot.readFieldEnd();
4126
        }
4127
      }
4128
      iprot.readStructEnd();
4129
      validate();
4130
    }
4131
 
4132
    public void write(TProtocol oprot) throws TException {
4133
      validate();
4134
 
4135
      oprot.writeStructBegin(STRUCT_DESC);
4136
      if (this.transaction != null) {
4137
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
4138
        this.transaction.write(oprot);
4139
        oprot.writeFieldEnd();
4140
      }
4141
      oprot.writeFieldStop();
4142
      oprot.writeStructEnd();
4143
    }
4144
 
4145
    @Override
4146
    public String toString() {
4147
      StringBuilder sb = new StringBuilder("createTransaction_args(");
4148
      boolean first = true;
4149
 
4150
      sb.append("transaction:");
4151
      if (this.transaction == null) {
4152
        sb.append("null");
4153
      } else {
4154
        sb.append(this.transaction);
4155
      }
4156
      first = false;
4157
      sb.append(")");
4158
      return sb.toString();
4159
    }
4160
 
4161
    public void validate() throws TException {
4162
      // check for required fields
4163
    }
4164
 
4165
  }
4166
 
4167
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
4168
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
4169
 
132 ashish 4170
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 4171
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4172
 
132 ashish 4173
    private long success;
68 ashish 4174
    private TransactionServiceException ex;
4175
 
4176
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4177
    public enum _Fields implements TFieldIdEnum {
132 ashish 4178
      SUCCESS((short)0, "success"),
68 ashish 4179
      EX((short)1, "ex");
4180
 
4181
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4182
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4183
 
4184
      static {
4185
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4186
          byId.put((int)field._thriftId, field);
4187
          byName.put(field.getFieldName(), field);
4188
        }
4189
      }
4190
 
4191
      /**
4192
       * Find the _Fields constant that matches fieldId, or null if its not found.
4193
       */
4194
      public static _Fields findByThriftId(int fieldId) {
4195
        return byId.get(fieldId);
4196
      }
4197
 
4198
      /**
4199
       * Find the _Fields constant that matches fieldId, throwing an exception
4200
       * if it is not found.
4201
       */
4202
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4203
        _Fields fields = findByThriftId(fieldId);
4204
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4205
        return fields;
4206
      }
4207
 
4208
      /**
4209
       * Find the _Fields constant that matches name, or null if its not found.
4210
       */
4211
      public static _Fields findByName(String name) {
4212
        return byName.get(name);
4213
      }
4214
 
4215
      private final short _thriftId;
4216
      private final String _fieldName;
4217
 
4218
      _Fields(short thriftId, String fieldName) {
4219
        _thriftId = thriftId;
4220
        _fieldName = fieldName;
4221
      }
4222
 
4223
      public short getThriftFieldId() {
4224
        return _thriftId;
4225
      }
4226
 
4227
      public String getFieldName() {
4228
        return _fieldName;
4229
      }
4230
    }
4231
 
4232
    // isset id assignments
132 ashish 4233
    private static final int __SUCCESS_ISSET_ID = 0;
4234
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 4235
 
4236
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 4237
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4238
          new FieldValueMetaData(TType.I64)));
68 ashish 4239
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4240
          new FieldValueMetaData(TType.STRUCT)));
4241
    }});
4242
 
4243
    static {
4244
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
4245
    }
4246
 
4247
    public createTransaction_result() {
4248
    }
4249
 
4250
    public createTransaction_result(
132 ashish 4251
      long success,
68 ashish 4252
      TransactionServiceException ex)
4253
    {
4254
      this();
132 ashish 4255
      this.success = success;
4256
      setSuccessIsSet(true);
68 ashish 4257
      this.ex = ex;
4258
    }
4259
 
4260
    /**
4261
     * Performs a deep copy on <i>other</i>.
4262
     */
4263
    public createTransaction_result(createTransaction_result other) {
132 ashish 4264
      __isset_bit_vector.clear();
4265
      __isset_bit_vector.or(other.__isset_bit_vector);
4266
      this.success = other.success;
68 ashish 4267
      if (other.isSetEx()) {
4268
        this.ex = new TransactionServiceException(other.ex);
4269
      }
4270
    }
4271
 
4272
    public createTransaction_result deepCopy() {
4273
      return new createTransaction_result(this);
4274
    }
4275
 
4276
    @Deprecated
4277
    public createTransaction_result clone() {
4278
      return new createTransaction_result(this);
4279
    }
4280
 
132 ashish 4281
    public long getSuccess() {
4282
      return this.success;
4283
    }
4284
 
4285
    public createTransaction_result setSuccess(long success) {
4286
      this.success = success;
4287
      setSuccessIsSet(true);
4288
      return this;
4289
    }
4290
 
4291
    public void unsetSuccess() {
4292
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
4293
    }
4294
 
4295
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4296
    public boolean isSetSuccess() {
4297
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
4298
    }
4299
 
4300
    public void setSuccessIsSet(boolean value) {
4301
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
4302
    }
4303
 
68 ashish 4304
    public TransactionServiceException getEx() {
4305
      return this.ex;
4306
    }
4307
 
4308
    public createTransaction_result setEx(TransactionServiceException ex) {
4309
      this.ex = ex;
4310
      return this;
4311
    }
4312
 
4313
    public void unsetEx() {
4314
      this.ex = null;
4315
    }
4316
 
4317
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4318
    public boolean isSetEx() {
4319
      return this.ex != null;
4320
    }
4321
 
4322
    public void setExIsSet(boolean value) {
4323
      if (!value) {
4324
        this.ex = null;
4325
      }
4326
    }
4327
 
4328
    public void setFieldValue(_Fields field, Object value) {
4329
      switch (field) {
132 ashish 4330
      case SUCCESS:
4331
        if (value == null) {
4332
          unsetSuccess();
4333
        } else {
4334
          setSuccess((Long)value);
4335
        }
4336
        break;
4337
 
68 ashish 4338
      case EX:
4339
        if (value == null) {
4340
          unsetEx();
4341
        } else {
4342
          setEx((TransactionServiceException)value);
4343
        }
4344
        break;
4345
 
4346
      }
4347
    }
4348
 
4349
    public void setFieldValue(int fieldID, Object value) {
4350
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4351
    }
4352
 
4353
    public Object getFieldValue(_Fields field) {
4354
      switch (field) {
132 ashish 4355
      case SUCCESS:
4356
        return new Long(getSuccess());
4357
 
68 ashish 4358
      case EX:
4359
        return getEx();
4360
 
4361
      }
4362
      throw new IllegalStateException();
4363
    }
4364
 
4365
    public Object getFieldValue(int fieldId) {
4366
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4367
    }
4368
 
4369
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4370
    public boolean isSet(_Fields field) {
4371
      switch (field) {
132 ashish 4372
      case SUCCESS:
4373
        return isSetSuccess();
68 ashish 4374
      case EX:
4375
        return isSetEx();
4376
      }
4377
      throw new IllegalStateException();
4378
    }
4379
 
4380
    public boolean isSet(int fieldID) {
4381
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4382
    }
4383
 
4384
    @Override
4385
    public boolean equals(Object that) {
4386
      if (that == null)
4387
        return false;
4388
      if (that instanceof createTransaction_result)
4389
        return this.equals((createTransaction_result)that);
4390
      return false;
4391
    }
4392
 
4393
    public boolean equals(createTransaction_result that) {
4394
      if (that == null)
4395
        return false;
4396
 
132 ashish 4397
      boolean this_present_success = true;
4398
      boolean that_present_success = true;
4399
      if (this_present_success || that_present_success) {
4400
        if (!(this_present_success && that_present_success))
4401
          return false;
4402
        if (this.success != that.success)
4403
          return false;
4404
      }
4405
 
68 ashish 4406
      boolean this_present_ex = true && this.isSetEx();
4407
      boolean that_present_ex = true && that.isSetEx();
4408
      if (this_present_ex || that_present_ex) {
4409
        if (!(this_present_ex && that_present_ex))
4410
          return false;
4411
        if (!this.ex.equals(that.ex))
4412
          return false;
4413
      }
4414
 
4415
      return true;
4416
    }
4417
 
4418
    @Override
4419
    public int hashCode() {
4420
      return 0;
4421
    }
4422
 
4423
    public int compareTo(createTransaction_result other) {
4424
      if (!getClass().equals(other.getClass())) {
4425
        return getClass().getName().compareTo(other.getClass().getName());
4426
      }
4427
 
4428
      int lastComparison = 0;
4429
      createTransaction_result typedOther = (createTransaction_result)other;
4430
 
132 ashish 4431
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4432
      if (lastComparison != 0) {
4433
        return lastComparison;
4434
      }
4435
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4436
      if (lastComparison != 0) {
4437
        return lastComparison;
4438
      }
68 ashish 4439
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4440
      if (lastComparison != 0) {
4441
        return lastComparison;
4442
      }
4443
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4444
      if (lastComparison != 0) {
4445
        return lastComparison;
4446
      }
4447
      return 0;
4448
    }
4449
 
4450
    public void read(TProtocol iprot) throws TException {
4451
      TField field;
4452
      iprot.readStructBegin();
4453
      while (true)
4454
      {
4455
        field = iprot.readFieldBegin();
4456
        if (field.type == TType.STOP) { 
4457
          break;
4458
        }
4459
        _Fields fieldId = _Fields.findByThriftId(field.id);
4460
        if (fieldId == null) {
4461
          TProtocolUtil.skip(iprot, field.type);
4462
        } else {
4463
          switch (fieldId) {
132 ashish 4464
            case SUCCESS:
4465
              if (field.type == TType.I64) {
4466
                this.success = iprot.readI64();
4467
                setSuccessIsSet(true);
4468
              } else { 
4469
                TProtocolUtil.skip(iprot, field.type);
4470
              }
4471
              break;
68 ashish 4472
            case EX:
4473
              if (field.type == TType.STRUCT) {
4474
                this.ex = new TransactionServiceException();
4475
                this.ex.read(iprot);
4476
              } else { 
4477
                TProtocolUtil.skip(iprot, field.type);
4478
              }
4479
              break;
4480
          }
4481
          iprot.readFieldEnd();
4482
        }
4483
      }
4484
      iprot.readStructEnd();
4485
      validate();
4486
    }
4487
 
4488
    public void write(TProtocol oprot) throws TException {
4489
      oprot.writeStructBegin(STRUCT_DESC);
4490
 
132 ashish 4491
      if (this.isSetSuccess()) {
4492
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4493
        oprot.writeI64(this.success);
4494
        oprot.writeFieldEnd();
4495
      } else if (this.isSetEx()) {
68 ashish 4496
        oprot.writeFieldBegin(EX_FIELD_DESC);
4497
        this.ex.write(oprot);
4498
        oprot.writeFieldEnd();
4499
      }
4500
      oprot.writeFieldStop();
4501
      oprot.writeStructEnd();
4502
    }
4503
 
4504
    @Override
4505
    public String toString() {
4506
      StringBuilder sb = new StringBuilder("createTransaction_result(");
4507
      boolean first = true;
4508
 
132 ashish 4509
      sb.append("success:");
4510
      sb.append(this.success);
4511
      first = false;
4512
      if (!first) sb.append(", ");
68 ashish 4513
      sb.append("ex:");
4514
      if (this.ex == null) {
4515
        sb.append("null");
4516
      } else {
4517
        sb.append(this.ex);
4518
      }
4519
      first = false;
4520
      sb.append(")");
4521
      return sb.toString();
4522
    }
4523
 
4524
    public void validate() throws TException {
4525
      // check for required fields
4526
    }
4527
 
4528
  }
4529
 
4530
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
4531
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
4532
 
4533
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
4534
 
4535
    private long id;
4536
 
4537
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4538
    public enum _Fields implements TFieldIdEnum {
4539
      ID((short)1, "id");
4540
 
4541
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4542
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4543
 
4544
      static {
4545
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4546
          byId.put((int)field._thriftId, field);
4547
          byName.put(field.getFieldName(), field);
4548
        }
4549
      }
4550
 
4551
      /**
4552
       * Find the _Fields constant that matches fieldId, or null if its not found.
4553
       */
4554
      public static _Fields findByThriftId(int fieldId) {
4555
        return byId.get(fieldId);
4556
      }
4557
 
4558
      /**
4559
       * Find the _Fields constant that matches fieldId, throwing an exception
4560
       * if it is not found.
4561
       */
4562
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4563
        _Fields fields = findByThriftId(fieldId);
4564
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4565
        return fields;
4566
      }
4567
 
4568
      /**
4569
       * Find the _Fields constant that matches name, or null if its not found.
4570
       */
4571
      public static _Fields findByName(String name) {
4572
        return byName.get(name);
4573
      }
4574
 
4575
      private final short _thriftId;
4576
      private final String _fieldName;
4577
 
4578
      _Fields(short thriftId, String fieldName) {
4579
        _thriftId = thriftId;
4580
        _fieldName = fieldName;
4581
      }
4582
 
4583
      public short getThriftFieldId() {
4584
        return _thriftId;
4585
      }
4586
 
4587
      public String getFieldName() {
4588
        return _fieldName;
4589
      }
4590
    }
4591
 
4592
    // isset id assignments
4593
    private static final int __ID_ISSET_ID = 0;
4594
    private BitSet __isset_bit_vector = new BitSet(1);
4595
 
4596
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4597
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
4598
          new FieldValueMetaData(TType.I64)));
4599
    }});
4600
 
4601
    static {
4602
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
4603
    }
4604
 
4605
    public getTransaction_args() {
4606
    }
4607
 
4608
    public getTransaction_args(
4609
      long id)
4610
    {
4611
      this();
4612
      this.id = id;
4613
      setIdIsSet(true);
4614
    }
4615
 
4616
    /**
4617
     * Performs a deep copy on <i>other</i>.
4618
     */
4619
    public getTransaction_args(getTransaction_args other) {
4620
      __isset_bit_vector.clear();
4621
      __isset_bit_vector.or(other.__isset_bit_vector);
4622
      this.id = other.id;
4623
    }
4624
 
4625
    public getTransaction_args deepCopy() {
4626
      return new getTransaction_args(this);
4627
    }
4628
 
4629
    @Deprecated
4630
    public getTransaction_args clone() {
4631
      return new getTransaction_args(this);
4632
    }
4633
 
4634
    public long getId() {
4635
      return this.id;
4636
    }
4637
 
4638
    public getTransaction_args setId(long id) {
4639
      this.id = id;
4640
      setIdIsSet(true);
4641
      return this;
4642
    }
4643
 
4644
    public void unsetId() {
4645
      __isset_bit_vector.clear(__ID_ISSET_ID);
4646
    }
4647
 
4648
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
4649
    public boolean isSetId() {
4650
      return __isset_bit_vector.get(__ID_ISSET_ID);
4651
    }
4652
 
4653
    public void setIdIsSet(boolean value) {
4654
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4655
    }
4656
 
4657
    public void setFieldValue(_Fields field, Object value) {
4658
      switch (field) {
4659
      case ID:
4660
        if (value == null) {
4661
          unsetId();
4662
        } else {
4663
          setId((Long)value);
4664
        }
4665
        break;
4666
 
4667
      }
4668
    }
4669
 
4670
    public void setFieldValue(int fieldID, Object value) {
4671
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4672
    }
4673
 
4674
    public Object getFieldValue(_Fields field) {
4675
      switch (field) {
4676
      case ID:
4677
        return new Long(getId());
4678
 
4679
      }
4680
      throw new IllegalStateException();
4681
    }
4682
 
4683
    public Object getFieldValue(int fieldId) {
4684
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4685
    }
4686
 
4687
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4688
    public boolean isSet(_Fields field) {
4689
      switch (field) {
4690
      case ID:
4691
        return isSetId();
4692
      }
4693
      throw new IllegalStateException();
4694
    }
4695
 
4696
    public boolean isSet(int fieldID) {
4697
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4698
    }
4699
 
4700
    @Override
4701
    public boolean equals(Object that) {
4702
      if (that == null)
4703
        return false;
4704
      if (that instanceof getTransaction_args)
4705
        return this.equals((getTransaction_args)that);
4706
      return false;
4707
    }
4708
 
4709
    public boolean equals(getTransaction_args that) {
4710
      if (that == null)
4711
        return false;
4712
 
4713
      boolean this_present_id = true;
4714
      boolean that_present_id = true;
4715
      if (this_present_id || that_present_id) {
4716
        if (!(this_present_id && that_present_id))
4717
          return false;
4718
        if (this.id != that.id)
4719
          return false;
4720
      }
4721
 
4722
      return true;
4723
    }
4724
 
4725
    @Override
4726
    public int hashCode() {
4727
      return 0;
4728
    }
4729
 
4730
    public int compareTo(getTransaction_args other) {
4731
      if (!getClass().equals(other.getClass())) {
4732
        return getClass().getName().compareTo(other.getClass().getName());
4733
      }
4734
 
4735
      int lastComparison = 0;
4736
      getTransaction_args typedOther = (getTransaction_args)other;
4737
 
4738
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
4739
      if (lastComparison != 0) {
4740
        return lastComparison;
4741
      }
4742
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
4743
      if (lastComparison != 0) {
4744
        return lastComparison;
4745
      }
4746
      return 0;
4747
    }
4748
 
4749
    public void read(TProtocol iprot) throws TException {
4750
      TField field;
4751
      iprot.readStructBegin();
4752
      while (true)
4753
      {
4754
        field = iprot.readFieldBegin();
4755
        if (field.type == TType.STOP) { 
4756
          break;
4757
        }
4758
        _Fields fieldId = _Fields.findByThriftId(field.id);
4759
        if (fieldId == null) {
4760
          TProtocolUtil.skip(iprot, field.type);
4761
        } else {
4762
          switch (fieldId) {
4763
            case ID:
4764
              if (field.type == TType.I64) {
4765
                this.id = iprot.readI64();
4766
                setIdIsSet(true);
4767
              } else { 
4768
                TProtocolUtil.skip(iprot, field.type);
4769
              }
4770
              break;
4771
          }
4772
          iprot.readFieldEnd();
4773
        }
4774
      }
4775
      iprot.readStructEnd();
4776
      validate();
4777
    }
4778
 
4779
    public void write(TProtocol oprot) throws TException {
4780
      validate();
4781
 
4782
      oprot.writeStructBegin(STRUCT_DESC);
4783
      oprot.writeFieldBegin(ID_FIELD_DESC);
4784
      oprot.writeI64(this.id);
4785
      oprot.writeFieldEnd();
4786
      oprot.writeFieldStop();
4787
      oprot.writeStructEnd();
4788
    }
4789
 
4790
    @Override
4791
    public String toString() {
4792
      StringBuilder sb = new StringBuilder("getTransaction_args(");
4793
      boolean first = true;
4794
 
4795
      sb.append("id:");
4796
      sb.append(this.id);
4797
      first = false;
4798
      sb.append(")");
4799
      return sb.toString();
4800
    }
4801
 
4802
    public void validate() throws TException {
4803
      // check for required fields
4804
    }
4805
 
4806
  }
4807
 
684 chandransh 4808
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 4809
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
4810
 
4811
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4812
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4813
 
4814
    private Transaction success;
4815
    private TransactionServiceException ex;
4816
 
4817
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4818
    public enum _Fields implements TFieldIdEnum {
4819
      SUCCESS((short)0, "success"),
4820
      EX((short)1, "ex");
4821
 
4822
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4824
 
4825
      static {
4826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4827
          byId.put((int)field._thriftId, field);
4828
          byName.put(field.getFieldName(), field);
4829
        }
4830
      }
4831
 
4832
      /**
4833
       * Find the _Fields constant that matches fieldId, or null if its not found.
4834
       */
4835
      public static _Fields findByThriftId(int fieldId) {
4836
        return byId.get(fieldId);
4837
      }
4838
 
4839
      /**
4840
       * Find the _Fields constant that matches fieldId, throwing an exception
4841
       * if it is not found.
4842
       */
4843
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4844
        _Fields fields = findByThriftId(fieldId);
4845
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4846
        return fields;
4847
      }
4848
 
4849
      /**
4850
       * Find the _Fields constant that matches name, or null if its not found.
4851
       */
4852
      public static _Fields findByName(String name) {
4853
        return byName.get(name);
4854
      }
4855
 
4856
      private final short _thriftId;
4857
      private final String _fieldName;
4858
 
4859
      _Fields(short thriftId, String fieldName) {
4860
        _thriftId = thriftId;
4861
        _fieldName = fieldName;
4862
      }
4863
 
4864
      public short getThriftFieldId() {
4865
        return _thriftId;
4866
      }
4867
 
4868
      public String getFieldName() {
4869
        return _fieldName;
4870
      }
4871
    }
4872
 
4873
    // isset id assignments
4874
 
4875
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4876
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4877
          new StructMetaData(TType.STRUCT, Transaction.class)));
4878
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4879
          new FieldValueMetaData(TType.STRUCT)));
4880
    }});
4881
 
4882
    static {
4883
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
4884
    }
4885
 
4886
    public getTransaction_result() {
4887
    }
4888
 
4889
    public getTransaction_result(
4890
      Transaction success,
4891
      TransactionServiceException ex)
4892
    {
4893
      this();
4894
      this.success = success;
4895
      this.ex = ex;
4896
    }
4897
 
4898
    /**
4899
     * Performs a deep copy on <i>other</i>.
4900
     */
4901
    public getTransaction_result(getTransaction_result other) {
4902
      if (other.isSetSuccess()) {
4903
        this.success = new Transaction(other.success);
4904
      }
4905
      if (other.isSetEx()) {
4906
        this.ex = new TransactionServiceException(other.ex);
4907
      }
4908
    }
4909
 
4910
    public getTransaction_result deepCopy() {
4911
      return new getTransaction_result(this);
4912
    }
4913
 
4914
    @Deprecated
4915
    public getTransaction_result clone() {
4916
      return new getTransaction_result(this);
4917
    }
4918
 
4919
    public Transaction getSuccess() {
4920
      return this.success;
4921
    }
4922
 
4923
    public getTransaction_result setSuccess(Transaction success) {
4924
      this.success = success;
4925
      return this;
4926
    }
4927
 
4928
    public void unsetSuccess() {
4929
      this.success = null;
4930
    }
4931
 
4932
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4933
    public boolean isSetSuccess() {
4934
      return this.success != null;
4935
    }
4936
 
4937
    public void setSuccessIsSet(boolean value) {
4938
      if (!value) {
4939
        this.success = null;
4940
      }
4941
    }
4942
 
4943
    public TransactionServiceException getEx() {
4944
      return this.ex;
4945
    }
4946
 
4947
    public getTransaction_result setEx(TransactionServiceException ex) {
4948
      this.ex = ex;
4949
      return this;
4950
    }
4951
 
4952
    public void unsetEx() {
4953
      this.ex = null;
4954
    }
4955
 
4956
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4957
    public boolean isSetEx() {
4958
      return this.ex != null;
4959
    }
4960
 
4961
    public void setExIsSet(boolean value) {
4962
      if (!value) {
4963
        this.ex = null;
4964
      }
4965
    }
4966
 
4967
    public void setFieldValue(_Fields field, Object value) {
4968
      switch (field) {
4969
      case SUCCESS:
4970
        if (value == null) {
4971
          unsetSuccess();
4972
        } else {
4973
          setSuccess((Transaction)value);
4974
        }
4975
        break;
4976
 
4977
      case EX:
4978
        if (value == null) {
4979
          unsetEx();
4980
        } else {
4981
          setEx((TransactionServiceException)value);
4982
        }
4983
        break;
4984
 
4985
      }
4986
    }
4987
 
4988
    public void setFieldValue(int fieldID, Object value) {
4989
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4990
    }
4991
 
4992
    public Object getFieldValue(_Fields field) {
4993
      switch (field) {
4994
      case SUCCESS:
4995
        return getSuccess();
4996
 
4997
      case EX:
4998
        return getEx();
4999
 
5000
      }
5001
      throw new IllegalStateException();
5002
    }
5003
 
5004
    public Object getFieldValue(int fieldId) {
5005
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5006
    }
5007
 
5008
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5009
    public boolean isSet(_Fields field) {
5010
      switch (field) {
5011
      case SUCCESS:
5012
        return isSetSuccess();
5013
      case EX:
5014
        return isSetEx();
5015
      }
5016
      throw new IllegalStateException();
5017
    }
5018
 
5019
    public boolean isSet(int fieldID) {
5020
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5021
    }
5022
 
5023
    @Override
5024
    public boolean equals(Object that) {
5025
      if (that == null)
5026
        return false;
5027
      if (that instanceof getTransaction_result)
5028
        return this.equals((getTransaction_result)that);
5029
      return false;
5030
    }
5031
 
5032
    public boolean equals(getTransaction_result that) {
5033
      if (that == null)
5034
        return false;
5035
 
5036
      boolean this_present_success = true && this.isSetSuccess();
5037
      boolean that_present_success = true && that.isSetSuccess();
5038
      if (this_present_success || that_present_success) {
5039
        if (!(this_present_success && that_present_success))
5040
          return false;
5041
        if (!this.success.equals(that.success))
5042
          return false;
5043
      }
5044
 
5045
      boolean this_present_ex = true && this.isSetEx();
5046
      boolean that_present_ex = true && that.isSetEx();
5047
      if (this_present_ex || that_present_ex) {
5048
        if (!(this_present_ex && that_present_ex))
5049
          return false;
5050
        if (!this.ex.equals(that.ex))
5051
          return false;
5052
      }
5053
 
5054
      return true;
5055
    }
5056
 
5057
    @Override
5058
    public int hashCode() {
5059
      return 0;
5060
    }
5061
 
684 chandransh 5062
    public int compareTo(getTransaction_result other) {
5063
      if (!getClass().equals(other.getClass())) {
5064
        return getClass().getName().compareTo(other.getClass().getName());
5065
      }
5066
 
5067
      int lastComparison = 0;
5068
      getTransaction_result typedOther = (getTransaction_result)other;
5069
 
5070
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5071
      if (lastComparison != 0) {
5072
        return lastComparison;
5073
      }
5074
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5075
      if (lastComparison != 0) {
5076
        return lastComparison;
5077
      }
5078
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5079
      if (lastComparison != 0) {
5080
        return lastComparison;
5081
      }
5082
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5083
      if (lastComparison != 0) {
5084
        return lastComparison;
5085
      }
5086
      return 0;
5087
    }
5088
 
68 ashish 5089
    public void read(TProtocol iprot) throws TException {
5090
      TField field;
5091
      iprot.readStructBegin();
5092
      while (true)
5093
      {
5094
        field = iprot.readFieldBegin();
5095
        if (field.type == TType.STOP) { 
5096
          break;
5097
        }
5098
        _Fields fieldId = _Fields.findByThriftId(field.id);
5099
        if (fieldId == null) {
5100
          TProtocolUtil.skip(iprot, field.type);
5101
        } else {
5102
          switch (fieldId) {
5103
            case SUCCESS:
5104
              if (field.type == TType.STRUCT) {
5105
                this.success = new Transaction();
5106
                this.success.read(iprot);
5107
              } else { 
5108
                TProtocolUtil.skip(iprot, field.type);
5109
              }
5110
              break;
5111
            case EX:
5112
              if (field.type == TType.STRUCT) {
5113
                this.ex = new TransactionServiceException();
5114
                this.ex.read(iprot);
5115
              } else { 
5116
                TProtocolUtil.skip(iprot, field.type);
5117
              }
5118
              break;
5119
          }
5120
          iprot.readFieldEnd();
5121
        }
5122
      }
5123
      iprot.readStructEnd();
5124
      validate();
5125
    }
5126
 
5127
    public void write(TProtocol oprot) throws TException {
5128
      oprot.writeStructBegin(STRUCT_DESC);
5129
 
5130
      if (this.isSetSuccess()) {
5131
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5132
        this.success.write(oprot);
5133
        oprot.writeFieldEnd();
5134
      } else if (this.isSetEx()) {
5135
        oprot.writeFieldBegin(EX_FIELD_DESC);
5136
        this.ex.write(oprot);
5137
        oprot.writeFieldEnd();
5138
      }
5139
      oprot.writeFieldStop();
5140
      oprot.writeStructEnd();
5141
    }
5142
 
5143
    @Override
5144
    public String toString() {
5145
      StringBuilder sb = new StringBuilder("getTransaction_result(");
5146
      boolean first = true;
5147
 
5148
      sb.append("success:");
5149
      if (this.success == null) {
5150
        sb.append("null");
5151
      } else {
5152
        sb.append(this.success);
5153
      }
5154
      first = false;
5155
      if (!first) sb.append(", ");
5156
      sb.append("ex:");
5157
      if (this.ex == null) {
5158
        sb.append("null");
5159
      } else {
5160
        sb.append(this.ex);
5161
      }
5162
      first = false;
5163
      sb.append(")");
5164
      return sb.toString();
5165
    }
5166
 
5167
    public void validate() throws TException {
5168
      // check for required fields
5169
    }
5170
 
5171
  }
5172
 
5173
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
5174
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
5175
 
5176
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 5177
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
5178
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 5179
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
5180
 
5181
    private long customerId;
132 ashish 5182
    private long from_date;
5183
    private long to_date;
68 ashish 5184
    private TransactionStatus status;
5185
 
5186
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5187
    public enum _Fields implements TFieldIdEnum {
5188
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 5189
      FROM_DATE((short)2, "from_date"),
5190
      TO_DATE((short)3, "to_date"),
68 ashish 5191
      /**
5192
       * 
5193
       * @see TransactionStatus
5194
       */
5195
      STATUS((short)4, "status");
5196
 
5197
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5198
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5199
 
5200
      static {
5201
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5202
          byId.put((int)field._thriftId, field);
5203
          byName.put(field.getFieldName(), field);
5204
        }
5205
      }
5206
 
5207
      /**
5208
       * Find the _Fields constant that matches fieldId, or null if its not found.
5209
       */
5210
      public static _Fields findByThriftId(int fieldId) {
5211
        return byId.get(fieldId);
5212
      }
5213
 
5214
      /**
5215
       * Find the _Fields constant that matches fieldId, throwing an exception
5216
       * if it is not found.
5217
       */
5218
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5219
        _Fields fields = findByThriftId(fieldId);
5220
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5221
        return fields;
5222
      }
5223
 
5224
      /**
5225
       * Find the _Fields constant that matches name, or null if its not found.
5226
       */
5227
      public static _Fields findByName(String name) {
5228
        return byName.get(name);
5229
      }
5230
 
5231
      private final short _thriftId;
5232
      private final String _fieldName;
5233
 
5234
      _Fields(short thriftId, String fieldName) {
5235
        _thriftId = thriftId;
5236
        _fieldName = fieldName;
5237
      }
5238
 
5239
      public short getThriftFieldId() {
5240
        return _thriftId;
5241
      }
5242
 
5243
      public String getFieldName() {
5244
        return _fieldName;
5245
      }
5246
    }
5247
 
5248
    // isset id assignments
5249
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 5250
    private static final int __FROM_DATE_ISSET_ID = 1;
5251
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 5252
    private BitSet __isset_bit_vector = new BitSet(3);
5253
 
5254
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5255
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
5256
          new FieldValueMetaData(TType.I64)));
132 ashish 5257
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 5258
          new FieldValueMetaData(TType.I64)));
132 ashish 5259
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 5260
          new FieldValueMetaData(TType.I64)));
5261
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5262
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
5263
    }});
5264
 
5265
    static {
5266
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
5267
    }
5268
 
5269
    public getTransactionsForCustomer_args() {
5270
    }
5271
 
5272
    public getTransactionsForCustomer_args(
5273
      long customerId,
132 ashish 5274
      long from_date,
5275
      long to_date,
68 ashish 5276
      TransactionStatus status)
5277
    {
5278
      this();
5279
      this.customerId = customerId;
5280
      setCustomerIdIsSet(true);
132 ashish 5281
      this.from_date = from_date;
5282
      setFrom_dateIsSet(true);
5283
      this.to_date = to_date;
5284
      setTo_dateIsSet(true);
68 ashish 5285
      this.status = status;
5286
    }
5287
 
5288
    /**
5289
     * Performs a deep copy on <i>other</i>.
5290
     */
5291
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
5292
      __isset_bit_vector.clear();
5293
      __isset_bit_vector.or(other.__isset_bit_vector);
5294
      this.customerId = other.customerId;
132 ashish 5295
      this.from_date = other.from_date;
5296
      this.to_date = other.to_date;
68 ashish 5297
      if (other.isSetStatus()) {
5298
        this.status = other.status;
5299
      }
5300
    }
5301
 
5302
    public getTransactionsForCustomer_args deepCopy() {
5303
      return new getTransactionsForCustomer_args(this);
5304
    }
5305
 
5306
    @Deprecated
5307
    public getTransactionsForCustomer_args clone() {
5308
      return new getTransactionsForCustomer_args(this);
5309
    }
5310
 
5311
    public long getCustomerId() {
5312
      return this.customerId;
5313
    }
5314
 
5315
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
5316
      this.customerId = customerId;
5317
      setCustomerIdIsSet(true);
5318
      return this;
5319
    }
5320
 
5321
    public void unsetCustomerId() {
5322
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
5323
    }
5324
 
5325
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
5326
    public boolean isSetCustomerId() {
5327
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
5328
    }
5329
 
5330
    public void setCustomerIdIsSet(boolean value) {
5331
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
5332
    }
5333
 
132 ashish 5334
    public long getFrom_date() {
5335
      return this.from_date;
68 ashish 5336
    }
5337
 
132 ashish 5338
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
5339
      this.from_date = from_date;
5340
      setFrom_dateIsSet(true);
68 ashish 5341
      return this;
5342
    }
5343
 
132 ashish 5344
    public void unsetFrom_date() {
5345
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 5346
    }
5347
 
132 ashish 5348
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
5349
    public boolean isSetFrom_date() {
5350
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 5351
    }
5352
 
132 ashish 5353
    public void setFrom_dateIsSet(boolean value) {
5354
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 5355
    }
5356
 
132 ashish 5357
    public long getTo_date() {
5358
      return this.to_date;
68 ashish 5359
    }
5360
 
132 ashish 5361
    public getTransactionsForCustomer_args setTo_date(long to_date) {
5362
      this.to_date = to_date;
5363
      setTo_dateIsSet(true);
68 ashish 5364
      return this;
5365
    }
5366
 
132 ashish 5367
    public void unsetTo_date() {
5368
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 5369
    }
5370
 
132 ashish 5371
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
5372
    public boolean isSetTo_date() {
5373
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 5374
    }
5375
 
132 ashish 5376
    public void setTo_dateIsSet(boolean value) {
5377
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 5378
    }
5379
 
5380
    /**
5381
     * 
5382
     * @see TransactionStatus
5383
     */
5384
    public TransactionStatus getStatus() {
5385
      return this.status;
5386
    }
5387
 
5388
    /**
5389
     * 
5390
     * @see TransactionStatus
5391
     */
5392
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
5393
      this.status = status;
5394
      return this;
5395
    }
5396
 
5397
    public void unsetStatus() {
5398
      this.status = null;
5399
    }
5400
 
5401
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5402
    public boolean isSetStatus() {
5403
      return this.status != null;
5404
    }
5405
 
5406
    public void setStatusIsSet(boolean value) {
5407
      if (!value) {
5408
        this.status = null;
5409
      }
5410
    }
5411
 
5412
    public void setFieldValue(_Fields field, Object value) {
5413
      switch (field) {
5414
      case CUSTOMER_ID:
5415
        if (value == null) {
5416
          unsetCustomerId();
5417
        } else {
5418
          setCustomerId((Long)value);
5419
        }
5420
        break;
5421
 
132 ashish 5422
      case FROM_DATE:
68 ashish 5423
        if (value == null) {
132 ashish 5424
          unsetFrom_date();
68 ashish 5425
        } else {
132 ashish 5426
          setFrom_date((Long)value);
68 ashish 5427
        }
5428
        break;
5429
 
132 ashish 5430
      case TO_DATE:
68 ashish 5431
        if (value == null) {
132 ashish 5432
          unsetTo_date();
68 ashish 5433
        } else {
132 ashish 5434
          setTo_date((Long)value);
68 ashish 5435
        }
5436
        break;
5437
 
5438
      case STATUS:
5439
        if (value == null) {
5440
          unsetStatus();
5441
        } else {
5442
          setStatus((TransactionStatus)value);
5443
        }
5444
        break;
5445
 
5446
      }
5447
    }
5448
 
5449
    public void setFieldValue(int fieldID, Object value) {
5450
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5451
    }
5452
 
5453
    public Object getFieldValue(_Fields field) {
5454
      switch (field) {
5455
      case CUSTOMER_ID:
5456
        return new Long(getCustomerId());
5457
 
132 ashish 5458
      case FROM_DATE:
5459
        return new Long(getFrom_date());
68 ashish 5460
 
132 ashish 5461
      case TO_DATE:
5462
        return new Long(getTo_date());
68 ashish 5463
 
5464
      case STATUS:
5465
        return getStatus();
5466
 
5467
      }
5468
      throw new IllegalStateException();
5469
    }
5470
 
5471
    public Object getFieldValue(int fieldId) {
5472
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5473
    }
5474
 
5475
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5476
    public boolean isSet(_Fields field) {
5477
      switch (field) {
5478
      case CUSTOMER_ID:
5479
        return isSetCustomerId();
132 ashish 5480
      case FROM_DATE:
5481
        return isSetFrom_date();
5482
      case TO_DATE:
5483
        return isSetTo_date();
68 ashish 5484
      case STATUS:
5485
        return isSetStatus();
5486
      }
5487
      throw new IllegalStateException();
5488
    }
5489
 
5490
    public boolean isSet(int fieldID) {
5491
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5492
    }
5493
 
5494
    @Override
5495
    public boolean equals(Object that) {
5496
      if (that == null)
5497
        return false;
5498
      if (that instanceof getTransactionsForCustomer_args)
5499
        return this.equals((getTransactionsForCustomer_args)that);
5500
      return false;
5501
    }
5502
 
5503
    public boolean equals(getTransactionsForCustomer_args that) {
5504
      if (that == null)
5505
        return false;
5506
 
5507
      boolean this_present_customerId = true;
5508
      boolean that_present_customerId = true;
5509
      if (this_present_customerId || that_present_customerId) {
5510
        if (!(this_present_customerId && that_present_customerId))
5511
          return false;
5512
        if (this.customerId != that.customerId)
5513
          return false;
5514
      }
5515
 
132 ashish 5516
      boolean this_present_from_date = true;
5517
      boolean that_present_from_date = true;
5518
      if (this_present_from_date || that_present_from_date) {
5519
        if (!(this_present_from_date && that_present_from_date))
68 ashish 5520
          return false;
132 ashish 5521
        if (this.from_date != that.from_date)
68 ashish 5522
          return false;
5523
      }
5524
 
132 ashish 5525
      boolean this_present_to_date = true;
5526
      boolean that_present_to_date = true;
5527
      if (this_present_to_date || that_present_to_date) {
5528
        if (!(this_present_to_date && that_present_to_date))
68 ashish 5529
          return false;
132 ashish 5530
        if (this.to_date != that.to_date)
68 ashish 5531
          return false;
5532
      }
5533
 
5534
      boolean this_present_status = true && this.isSetStatus();
5535
      boolean that_present_status = true && that.isSetStatus();
5536
      if (this_present_status || that_present_status) {
5537
        if (!(this_present_status && that_present_status))
5538
          return false;
5539
        if (!this.status.equals(that.status))
5540
          return false;
5541
      }
5542
 
5543
      return true;
5544
    }
5545
 
5546
    @Override
5547
    public int hashCode() {
5548
      return 0;
5549
    }
5550
 
5551
    public int compareTo(getTransactionsForCustomer_args other) {
5552
      if (!getClass().equals(other.getClass())) {
5553
        return getClass().getName().compareTo(other.getClass().getName());
5554
      }
5555
 
5556
      int lastComparison = 0;
5557
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
5558
 
5559
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
5560
      if (lastComparison != 0) {
5561
        return lastComparison;
5562
      }
5563
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
5564
      if (lastComparison != 0) {
5565
        return lastComparison;
5566
      }
132 ashish 5567
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 5568
      if (lastComparison != 0) {
5569
        return lastComparison;
5570
      }
132 ashish 5571
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 5572
      if (lastComparison != 0) {
5573
        return lastComparison;
5574
      }
132 ashish 5575
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 5576
      if (lastComparison != 0) {
5577
        return lastComparison;
5578
      }
132 ashish 5579
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 5580
      if (lastComparison != 0) {
5581
        return lastComparison;
5582
      }
5583
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
5584
      if (lastComparison != 0) {
5585
        return lastComparison;
5586
      }
5587
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
5588
      if (lastComparison != 0) {
5589
        return lastComparison;
5590
      }
5591
      return 0;
5592
    }
5593
 
5594
    public void read(TProtocol iprot) throws TException {
5595
      TField field;
5596
      iprot.readStructBegin();
5597
      while (true)
5598
      {
5599
        field = iprot.readFieldBegin();
5600
        if (field.type == TType.STOP) { 
5601
          break;
5602
        }
5603
        _Fields fieldId = _Fields.findByThriftId(field.id);
5604
        if (fieldId == null) {
5605
          TProtocolUtil.skip(iprot, field.type);
5606
        } else {
5607
          switch (fieldId) {
5608
            case CUSTOMER_ID:
5609
              if (field.type == TType.I64) {
5610
                this.customerId = iprot.readI64();
5611
                setCustomerIdIsSet(true);
5612
              } else { 
5613
                TProtocolUtil.skip(iprot, field.type);
5614
              }
5615
              break;
132 ashish 5616
            case FROM_DATE:
68 ashish 5617
              if (field.type == TType.I64) {
132 ashish 5618
                this.from_date = iprot.readI64();
5619
                setFrom_dateIsSet(true);
68 ashish 5620
              } else { 
5621
                TProtocolUtil.skip(iprot, field.type);
5622
              }
5623
              break;
132 ashish 5624
            case TO_DATE:
68 ashish 5625
              if (field.type == TType.I64) {
132 ashish 5626
                this.to_date = iprot.readI64();
5627
                setTo_dateIsSet(true);
68 ashish 5628
              } else { 
5629
                TProtocolUtil.skip(iprot, field.type);
5630
              }
5631
              break;
5632
            case STATUS:
5633
              if (field.type == TType.I32) {
5634
                this.status = TransactionStatus.findByValue(iprot.readI32());
5635
              } else { 
5636
                TProtocolUtil.skip(iprot, field.type);
5637
              }
5638
              break;
5639
          }
5640
          iprot.readFieldEnd();
5641
        }
5642
      }
5643
      iprot.readStructEnd();
5644
      validate();
5645
    }
5646
 
5647
    public void write(TProtocol oprot) throws TException {
5648
      validate();
5649
 
5650
      oprot.writeStructBegin(STRUCT_DESC);
5651
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
5652
      oprot.writeI64(this.customerId);
5653
      oprot.writeFieldEnd();
132 ashish 5654
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
5655
      oprot.writeI64(this.from_date);
68 ashish 5656
      oprot.writeFieldEnd();
132 ashish 5657
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
5658
      oprot.writeI64(this.to_date);
68 ashish 5659
      oprot.writeFieldEnd();
5660
      if (this.status != null) {
5661
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5662
        oprot.writeI32(this.status.getValue());
5663
        oprot.writeFieldEnd();
5664
      }
5665
      oprot.writeFieldStop();
5666
      oprot.writeStructEnd();
5667
    }
5668
 
5669
    @Override
5670
    public String toString() {
5671
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
5672
      boolean first = true;
5673
 
5674
      sb.append("customerId:");
5675
      sb.append(this.customerId);
5676
      first = false;
5677
      if (!first) sb.append(", ");
132 ashish 5678
      sb.append("from_date:");
5679
      sb.append(this.from_date);
68 ashish 5680
      first = false;
5681
      if (!first) sb.append(", ");
132 ashish 5682
      sb.append("to_date:");
5683
      sb.append(this.to_date);
68 ashish 5684
      first = false;
5685
      if (!first) sb.append(", ");
5686
      sb.append("status:");
5687
      if (this.status == null) {
5688
        sb.append("null");
5689
      } else {
5690
        String status_name = status.name();
5691
        if (status_name != null) {
5692
          sb.append(status_name);
5693
          sb.append(" (");
5694
        }
5695
        sb.append(this.status);
5696
        if (status_name != null) {
5697
          sb.append(")");
5698
        }
5699
      }
5700
      first = false;
5701
      sb.append(")");
5702
      return sb.toString();
5703
    }
5704
 
5705
    public void validate() throws TException {
5706
      // check for required fields
5707
    }
5708
 
5709
  }
5710
 
684 chandransh 5711
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 5712
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
5713
 
5714
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5715
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5716
 
5717
    private List<Transaction> success;
5718
    private TransactionServiceException ex;
5719
 
5720
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5721
    public enum _Fields implements TFieldIdEnum {
5722
      SUCCESS((short)0, "success"),
5723
      EX((short)1, "ex");
5724
 
5725
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5726
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5727
 
5728
      static {
5729
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5730
          byId.put((int)field._thriftId, field);
5731
          byName.put(field.getFieldName(), field);
5732
        }
5733
      }
5734
 
5735
      /**
5736
       * Find the _Fields constant that matches fieldId, or null if its not found.
5737
       */
5738
      public static _Fields findByThriftId(int fieldId) {
5739
        return byId.get(fieldId);
5740
      }
5741
 
5742
      /**
5743
       * Find the _Fields constant that matches fieldId, throwing an exception
5744
       * if it is not found.
5745
       */
5746
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5747
        _Fields fields = findByThriftId(fieldId);
5748
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5749
        return fields;
5750
      }
5751
 
5752
      /**
5753
       * Find the _Fields constant that matches name, or null if its not found.
5754
       */
5755
      public static _Fields findByName(String name) {
5756
        return byName.get(name);
5757
      }
5758
 
5759
      private final short _thriftId;
5760
      private final String _fieldName;
5761
 
5762
      _Fields(short thriftId, String fieldName) {
5763
        _thriftId = thriftId;
5764
        _fieldName = fieldName;
5765
      }
5766
 
5767
      public short getThriftFieldId() {
5768
        return _thriftId;
5769
      }
5770
 
5771
      public String getFieldName() {
5772
        return _fieldName;
5773
      }
5774
    }
5775
 
5776
    // isset id assignments
5777
 
5778
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5779
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5780
          new ListMetaData(TType.LIST, 
5781
              new StructMetaData(TType.STRUCT, Transaction.class))));
5782
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5783
          new FieldValueMetaData(TType.STRUCT)));
5784
    }});
5785
 
5786
    static {
5787
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
5788
    }
5789
 
5790
    public getTransactionsForCustomer_result() {
5791
    }
5792
 
5793
    public getTransactionsForCustomer_result(
5794
      List<Transaction> success,
5795
      TransactionServiceException ex)
5796
    {
5797
      this();
5798
      this.success = success;
5799
      this.ex = ex;
5800
    }
5801
 
5802
    /**
5803
     * Performs a deep copy on <i>other</i>.
5804
     */
5805
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
5806
      if (other.isSetSuccess()) {
5807
        List<Transaction> __this__success = new ArrayList<Transaction>();
5808
        for (Transaction other_element : other.success) {
5809
          __this__success.add(new Transaction(other_element));
5810
        }
5811
        this.success = __this__success;
5812
      }
5813
      if (other.isSetEx()) {
5814
        this.ex = new TransactionServiceException(other.ex);
5815
      }
5816
    }
5817
 
5818
    public getTransactionsForCustomer_result deepCopy() {
5819
      return new getTransactionsForCustomer_result(this);
5820
    }
5821
 
5822
    @Deprecated
5823
    public getTransactionsForCustomer_result clone() {
5824
      return new getTransactionsForCustomer_result(this);
5825
    }
5826
 
5827
    public int getSuccessSize() {
5828
      return (this.success == null) ? 0 : this.success.size();
5829
    }
5830
 
5831
    public java.util.Iterator<Transaction> getSuccessIterator() {
5832
      return (this.success == null) ? null : this.success.iterator();
5833
    }
5834
 
5835
    public void addToSuccess(Transaction elem) {
5836
      if (this.success == null) {
5837
        this.success = new ArrayList<Transaction>();
5838
      }
5839
      this.success.add(elem);
5840
    }
5841
 
5842
    public List<Transaction> getSuccess() {
5843
      return this.success;
5844
    }
5845
 
5846
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
5847
      this.success = success;
5848
      return this;
5849
    }
5850
 
5851
    public void unsetSuccess() {
5852
      this.success = null;
5853
    }
5854
 
5855
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5856
    public boolean isSetSuccess() {
5857
      return this.success != null;
5858
    }
5859
 
5860
    public void setSuccessIsSet(boolean value) {
5861
      if (!value) {
5862
        this.success = null;
5863
      }
5864
    }
5865
 
5866
    public TransactionServiceException getEx() {
5867
      return this.ex;
5868
    }
5869
 
5870
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
5871
      this.ex = ex;
5872
      return this;
5873
    }
5874
 
5875
    public void unsetEx() {
5876
      this.ex = null;
5877
    }
5878
 
5879
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5880
    public boolean isSetEx() {
5881
      return this.ex != null;
5882
    }
5883
 
5884
    public void setExIsSet(boolean value) {
5885
      if (!value) {
5886
        this.ex = null;
5887
      }
5888
    }
5889
 
5890
    public void setFieldValue(_Fields field, Object value) {
5891
      switch (field) {
5892
      case SUCCESS:
5893
        if (value == null) {
5894
          unsetSuccess();
5895
        } else {
5896
          setSuccess((List<Transaction>)value);
5897
        }
5898
        break;
5899
 
5900
      case EX:
5901
        if (value == null) {
5902
          unsetEx();
5903
        } else {
5904
          setEx((TransactionServiceException)value);
5905
        }
5906
        break;
5907
 
5908
      }
5909
    }
5910
 
5911
    public void setFieldValue(int fieldID, Object value) {
5912
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5913
    }
5914
 
5915
    public Object getFieldValue(_Fields field) {
5916
      switch (field) {
5917
      case SUCCESS:
5918
        return getSuccess();
5919
 
5920
      case EX:
5921
        return getEx();
5922
 
5923
      }
5924
      throw new IllegalStateException();
5925
    }
5926
 
5927
    public Object getFieldValue(int fieldId) {
5928
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5929
    }
5930
 
5931
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5932
    public boolean isSet(_Fields field) {
5933
      switch (field) {
5934
      case SUCCESS:
5935
        return isSetSuccess();
5936
      case EX:
5937
        return isSetEx();
5938
      }
5939
      throw new IllegalStateException();
5940
    }
5941
 
5942
    public boolean isSet(int fieldID) {
5943
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5944
    }
5945
 
5946
    @Override
5947
    public boolean equals(Object that) {
5948
      if (that == null)
5949
        return false;
5950
      if (that instanceof getTransactionsForCustomer_result)
5951
        return this.equals((getTransactionsForCustomer_result)that);
5952
      return false;
5953
    }
5954
 
5955
    public boolean equals(getTransactionsForCustomer_result that) {
5956
      if (that == null)
5957
        return false;
5958
 
5959
      boolean this_present_success = true && this.isSetSuccess();
5960
      boolean that_present_success = true && that.isSetSuccess();
5961
      if (this_present_success || that_present_success) {
5962
        if (!(this_present_success && that_present_success))
5963
          return false;
5964
        if (!this.success.equals(that.success))
5965
          return false;
5966
      }
5967
 
5968
      boolean this_present_ex = true && this.isSetEx();
5969
      boolean that_present_ex = true && that.isSetEx();
5970
      if (this_present_ex || that_present_ex) {
5971
        if (!(this_present_ex && that_present_ex))
5972
          return false;
5973
        if (!this.ex.equals(that.ex))
5974
          return false;
5975
      }
5976
 
5977
      return true;
5978
    }
5979
 
5980
    @Override
5981
    public int hashCode() {
5982
      return 0;
5983
    }
5984
 
684 chandransh 5985
    public int compareTo(getTransactionsForCustomer_result other) {
5986
      if (!getClass().equals(other.getClass())) {
5987
        return getClass().getName().compareTo(other.getClass().getName());
5988
      }
5989
 
5990
      int lastComparison = 0;
5991
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
5992
 
5993
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5994
      if (lastComparison != 0) {
5995
        return lastComparison;
5996
      }
5997
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5998
      if (lastComparison != 0) {
5999
        return lastComparison;
6000
      }
6001
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6002
      if (lastComparison != 0) {
6003
        return lastComparison;
6004
      }
6005
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6006
      if (lastComparison != 0) {
6007
        return lastComparison;
6008
      }
6009
      return 0;
6010
    }
6011
 
68 ashish 6012
    public void read(TProtocol iprot) throws TException {
6013
      TField field;
6014
      iprot.readStructBegin();
6015
      while (true)
6016
      {
6017
        field = iprot.readFieldBegin();
6018
        if (field.type == TType.STOP) { 
6019
          break;
6020
        }
6021
        _Fields fieldId = _Fields.findByThriftId(field.id);
6022
        if (fieldId == null) {
6023
          TProtocolUtil.skip(iprot, field.type);
6024
        } else {
6025
          switch (fieldId) {
6026
            case SUCCESS:
6027
              if (field.type == TType.LIST) {
6028
                {
684 chandransh 6029
                  TList _list8 = iprot.readListBegin();
6030
                  this.success = new ArrayList<Transaction>(_list8.size);
6031
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 6032
                  {
684 chandransh 6033
                    Transaction _elem10;
6034
                    _elem10 = new Transaction();
6035
                    _elem10.read(iprot);
6036
                    this.success.add(_elem10);
68 ashish 6037
                  }
6038
                  iprot.readListEnd();
6039
                }
6040
              } else { 
6041
                TProtocolUtil.skip(iprot, field.type);
6042
              }
6043
              break;
6044
            case EX:
6045
              if (field.type == TType.STRUCT) {
6046
                this.ex = new TransactionServiceException();
6047
                this.ex.read(iprot);
6048
              } else { 
6049
                TProtocolUtil.skip(iprot, field.type);
6050
              }
6051
              break;
6052
          }
6053
          iprot.readFieldEnd();
6054
        }
6055
      }
6056
      iprot.readStructEnd();
6057
      validate();
6058
    }
6059
 
6060
    public void write(TProtocol oprot) throws TException {
6061
      oprot.writeStructBegin(STRUCT_DESC);
6062
 
6063
      if (this.isSetSuccess()) {
6064
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6065
        {
6066
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 6067
          for (Transaction _iter11 : this.success)
68 ashish 6068
          {
684 chandransh 6069
            _iter11.write(oprot);
68 ashish 6070
          }
6071
          oprot.writeListEnd();
6072
        }
6073
        oprot.writeFieldEnd();
6074
      } else if (this.isSetEx()) {
6075
        oprot.writeFieldBegin(EX_FIELD_DESC);
6076
        this.ex.write(oprot);
6077
        oprot.writeFieldEnd();
6078
      }
6079
      oprot.writeFieldStop();
6080
      oprot.writeStructEnd();
6081
    }
6082
 
6083
    @Override
6084
    public String toString() {
6085
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
6086
      boolean first = true;
6087
 
6088
      sb.append("success:");
6089
      if (this.success == null) {
6090
        sb.append("null");
6091
      } else {
6092
        sb.append(this.success);
6093
      }
6094
      first = false;
6095
      if (!first) sb.append(", ");
6096
      sb.append("ex:");
6097
      if (this.ex == null) {
6098
        sb.append("null");
6099
      } else {
6100
        sb.append(this.ex);
6101
      }
6102
      first = false;
6103
      sb.append(")");
6104
      return sb.toString();
6105
    }
6106
 
6107
    public void validate() throws TException {
6108
      // check for required fields
6109
    }
6110
 
6111
  }
6112
 
132 ashish 6113
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
6114
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
6115
 
6116
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
6117
 
6118
    private long shoppingCartId;
6119
 
6120
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6121
    public enum _Fields implements TFieldIdEnum {
6122
      SHOPPING_CART_ID((short)1, "shoppingCartId");
6123
 
6124
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6125
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6126
 
6127
      static {
6128
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6129
          byId.put((int)field._thriftId, field);
6130
          byName.put(field.getFieldName(), field);
6131
        }
6132
      }
6133
 
6134
      /**
6135
       * Find the _Fields constant that matches fieldId, or null if its not found.
6136
       */
6137
      public static _Fields findByThriftId(int fieldId) {
6138
        return byId.get(fieldId);
6139
      }
6140
 
6141
      /**
6142
       * Find the _Fields constant that matches fieldId, throwing an exception
6143
       * if it is not found.
6144
       */
6145
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6146
        _Fields fields = findByThriftId(fieldId);
6147
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6148
        return fields;
6149
      }
6150
 
6151
      /**
6152
       * Find the _Fields constant that matches name, or null if its not found.
6153
       */
6154
      public static _Fields findByName(String name) {
6155
        return byName.get(name);
6156
      }
6157
 
6158
      private final short _thriftId;
6159
      private final String _fieldName;
6160
 
6161
      _Fields(short thriftId, String fieldName) {
6162
        _thriftId = thriftId;
6163
        _fieldName = fieldName;
6164
      }
6165
 
6166
      public short getThriftFieldId() {
6167
        return _thriftId;
6168
      }
6169
 
6170
      public String getFieldName() {
6171
        return _fieldName;
6172
      }
6173
    }
6174
 
6175
    // isset id assignments
6176
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
6177
    private BitSet __isset_bit_vector = new BitSet(1);
6178
 
6179
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6180
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
6181
          new FieldValueMetaData(TType.I64)));
6182
    }});
6183
 
6184
    static {
6185
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
6186
    }
6187
 
6188
    public getTransactionsForShoppingCartId_args() {
6189
    }
6190
 
6191
    public getTransactionsForShoppingCartId_args(
6192
      long shoppingCartId)
6193
    {
6194
      this();
6195
      this.shoppingCartId = shoppingCartId;
6196
      setShoppingCartIdIsSet(true);
6197
    }
6198
 
6199
    /**
6200
     * Performs a deep copy on <i>other</i>.
6201
     */
6202
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
6203
      __isset_bit_vector.clear();
6204
      __isset_bit_vector.or(other.__isset_bit_vector);
6205
      this.shoppingCartId = other.shoppingCartId;
6206
    }
6207
 
6208
    public getTransactionsForShoppingCartId_args deepCopy() {
6209
      return new getTransactionsForShoppingCartId_args(this);
6210
    }
6211
 
6212
    @Deprecated
6213
    public getTransactionsForShoppingCartId_args clone() {
6214
      return new getTransactionsForShoppingCartId_args(this);
6215
    }
6216
 
6217
    public long getShoppingCartId() {
6218
      return this.shoppingCartId;
6219
    }
6220
 
6221
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
6222
      this.shoppingCartId = shoppingCartId;
6223
      setShoppingCartIdIsSet(true);
6224
      return this;
6225
    }
6226
 
6227
    public void unsetShoppingCartId() {
6228
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
6229
    }
6230
 
6231
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
6232
    public boolean isSetShoppingCartId() {
6233
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
6234
    }
6235
 
6236
    public void setShoppingCartIdIsSet(boolean value) {
6237
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
6238
    }
6239
 
6240
    public void setFieldValue(_Fields field, Object value) {
6241
      switch (field) {
6242
      case SHOPPING_CART_ID:
6243
        if (value == null) {
6244
          unsetShoppingCartId();
6245
        } else {
6246
          setShoppingCartId((Long)value);
6247
        }
6248
        break;
6249
 
6250
      }
6251
    }
6252
 
6253
    public void setFieldValue(int fieldID, Object value) {
6254
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6255
    }
6256
 
6257
    public Object getFieldValue(_Fields field) {
6258
      switch (field) {
6259
      case SHOPPING_CART_ID:
6260
        return new Long(getShoppingCartId());
6261
 
6262
      }
6263
      throw new IllegalStateException();
6264
    }
6265
 
6266
    public Object getFieldValue(int fieldId) {
6267
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6268
    }
6269
 
6270
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6271
    public boolean isSet(_Fields field) {
6272
      switch (field) {
6273
      case SHOPPING_CART_ID:
6274
        return isSetShoppingCartId();
6275
      }
6276
      throw new IllegalStateException();
6277
    }
6278
 
6279
    public boolean isSet(int fieldID) {
6280
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6281
    }
6282
 
6283
    @Override
6284
    public boolean equals(Object that) {
6285
      if (that == null)
6286
        return false;
6287
      if (that instanceof getTransactionsForShoppingCartId_args)
6288
        return this.equals((getTransactionsForShoppingCartId_args)that);
6289
      return false;
6290
    }
6291
 
6292
    public boolean equals(getTransactionsForShoppingCartId_args that) {
6293
      if (that == null)
6294
        return false;
6295
 
6296
      boolean this_present_shoppingCartId = true;
6297
      boolean that_present_shoppingCartId = true;
6298
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
6299
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
6300
          return false;
6301
        if (this.shoppingCartId != that.shoppingCartId)
6302
          return false;
6303
      }
6304
 
6305
      return true;
6306
    }
6307
 
6308
    @Override
6309
    public int hashCode() {
6310
      return 0;
6311
    }
6312
 
6313
    public int compareTo(getTransactionsForShoppingCartId_args other) {
6314
      if (!getClass().equals(other.getClass())) {
6315
        return getClass().getName().compareTo(other.getClass().getName());
6316
      }
6317
 
6318
      int lastComparison = 0;
6319
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
6320
 
6321
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
6322
      if (lastComparison != 0) {
6323
        return lastComparison;
6324
      }
6325
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
6326
      if (lastComparison != 0) {
6327
        return lastComparison;
6328
      }
6329
      return 0;
6330
    }
6331
 
6332
    public void read(TProtocol iprot) throws TException {
6333
      TField field;
6334
      iprot.readStructBegin();
6335
      while (true)
6336
      {
6337
        field = iprot.readFieldBegin();
6338
        if (field.type == TType.STOP) { 
6339
          break;
6340
        }
6341
        _Fields fieldId = _Fields.findByThriftId(field.id);
6342
        if (fieldId == null) {
6343
          TProtocolUtil.skip(iprot, field.type);
6344
        } else {
6345
          switch (fieldId) {
6346
            case SHOPPING_CART_ID:
6347
              if (field.type == TType.I64) {
6348
                this.shoppingCartId = iprot.readI64();
6349
                setShoppingCartIdIsSet(true);
6350
              } else { 
6351
                TProtocolUtil.skip(iprot, field.type);
6352
              }
6353
              break;
6354
          }
6355
          iprot.readFieldEnd();
6356
        }
6357
      }
6358
      iprot.readStructEnd();
6359
      validate();
6360
    }
6361
 
6362
    public void write(TProtocol oprot) throws TException {
6363
      validate();
6364
 
6365
      oprot.writeStructBegin(STRUCT_DESC);
6366
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
6367
      oprot.writeI64(this.shoppingCartId);
6368
      oprot.writeFieldEnd();
6369
      oprot.writeFieldStop();
6370
      oprot.writeStructEnd();
6371
    }
6372
 
6373
    @Override
6374
    public String toString() {
6375
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
6376
      boolean first = true;
6377
 
6378
      sb.append("shoppingCartId:");
6379
      sb.append(this.shoppingCartId);
6380
      first = false;
6381
      sb.append(")");
6382
      return sb.toString();
6383
    }
6384
 
6385
    public void validate() throws TException {
6386
      // check for required fields
6387
    }
6388
 
6389
  }
6390
 
684 chandransh 6391
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 6392
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
6393
 
6394
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
6395
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6396
 
6397
    private List<Transaction> success;
6398
    private TransactionServiceException ex;
6399
 
6400
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6401
    public enum _Fields implements TFieldIdEnum {
6402
      SUCCESS((short)0, "success"),
6403
      EX((short)1, "ex");
6404
 
6405
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6406
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6407
 
6408
      static {
6409
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6410
          byId.put((int)field._thriftId, field);
6411
          byName.put(field.getFieldName(), field);
6412
        }
6413
      }
6414
 
6415
      /**
6416
       * Find the _Fields constant that matches fieldId, or null if its not found.
6417
       */
6418
      public static _Fields findByThriftId(int fieldId) {
6419
        return byId.get(fieldId);
6420
      }
6421
 
6422
      /**
6423
       * Find the _Fields constant that matches fieldId, throwing an exception
6424
       * if it is not found.
6425
       */
6426
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6427
        _Fields fields = findByThriftId(fieldId);
6428
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6429
        return fields;
6430
      }
6431
 
6432
      /**
6433
       * Find the _Fields constant that matches name, or null if its not found.
6434
       */
6435
      public static _Fields findByName(String name) {
6436
        return byName.get(name);
6437
      }
6438
 
6439
      private final short _thriftId;
6440
      private final String _fieldName;
6441
 
6442
      _Fields(short thriftId, String fieldName) {
6443
        _thriftId = thriftId;
6444
        _fieldName = fieldName;
6445
      }
6446
 
6447
      public short getThriftFieldId() {
6448
        return _thriftId;
6449
      }
6450
 
6451
      public String getFieldName() {
6452
        return _fieldName;
6453
      }
6454
    }
6455
 
6456
    // isset id assignments
6457
 
6458
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6459
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6460
          new ListMetaData(TType.LIST, 
6461
              new StructMetaData(TType.STRUCT, Transaction.class))));
6462
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6463
          new FieldValueMetaData(TType.STRUCT)));
6464
    }});
6465
 
6466
    static {
6467
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
6468
    }
6469
 
6470
    public getTransactionsForShoppingCartId_result() {
6471
    }
6472
 
6473
    public getTransactionsForShoppingCartId_result(
6474
      List<Transaction> success,
6475
      TransactionServiceException ex)
6476
    {
6477
      this();
6478
      this.success = success;
6479
      this.ex = ex;
6480
    }
6481
 
6482
    /**
6483
     * Performs a deep copy on <i>other</i>.
6484
     */
6485
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
6486
      if (other.isSetSuccess()) {
6487
        List<Transaction> __this__success = new ArrayList<Transaction>();
6488
        for (Transaction other_element : other.success) {
6489
          __this__success.add(new Transaction(other_element));
6490
        }
6491
        this.success = __this__success;
6492
      }
6493
      if (other.isSetEx()) {
6494
        this.ex = new TransactionServiceException(other.ex);
6495
      }
6496
    }
6497
 
6498
    public getTransactionsForShoppingCartId_result deepCopy() {
6499
      return new getTransactionsForShoppingCartId_result(this);
6500
    }
6501
 
6502
    @Deprecated
6503
    public getTransactionsForShoppingCartId_result clone() {
6504
      return new getTransactionsForShoppingCartId_result(this);
6505
    }
6506
 
6507
    public int getSuccessSize() {
6508
      return (this.success == null) ? 0 : this.success.size();
6509
    }
6510
 
6511
    public java.util.Iterator<Transaction> getSuccessIterator() {
6512
      return (this.success == null) ? null : this.success.iterator();
6513
    }
6514
 
6515
    public void addToSuccess(Transaction elem) {
6516
      if (this.success == null) {
6517
        this.success = new ArrayList<Transaction>();
6518
      }
6519
      this.success.add(elem);
6520
    }
6521
 
6522
    public List<Transaction> getSuccess() {
6523
      return this.success;
6524
    }
6525
 
6526
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
6527
      this.success = success;
6528
      return this;
6529
    }
6530
 
6531
    public void unsetSuccess() {
6532
      this.success = null;
6533
    }
6534
 
6535
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6536
    public boolean isSetSuccess() {
6537
      return this.success != null;
6538
    }
6539
 
6540
    public void setSuccessIsSet(boolean value) {
6541
      if (!value) {
6542
        this.success = null;
6543
      }
6544
    }
6545
 
6546
    public TransactionServiceException getEx() {
6547
      return this.ex;
6548
    }
6549
 
6550
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
6551
      this.ex = ex;
6552
      return this;
6553
    }
6554
 
6555
    public void unsetEx() {
6556
      this.ex = null;
6557
    }
6558
 
6559
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6560
    public boolean isSetEx() {
6561
      return this.ex != null;
6562
    }
6563
 
6564
    public void setExIsSet(boolean value) {
6565
      if (!value) {
6566
        this.ex = null;
6567
      }
6568
    }
6569
 
6570
    public void setFieldValue(_Fields field, Object value) {
6571
      switch (field) {
6572
      case SUCCESS:
6573
        if (value == null) {
6574
          unsetSuccess();
6575
        } else {
6576
          setSuccess((List<Transaction>)value);
6577
        }
6578
        break;
6579
 
6580
      case EX:
6581
        if (value == null) {
6582
          unsetEx();
6583
        } else {
6584
          setEx((TransactionServiceException)value);
6585
        }
6586
        break;
6587
 
6588
      }
6589
    }
6590
 
6591
    public void setFieldValue(int fieldID, Object value) {
6592
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6593
    }
6594
 
6595
    public Object getFieldValue(_Fields field) {
6596
      switch (field) {
6597
      case SUCCESS:
6598
        return getSuccess();
6599
 
6600
      case EX:
6601
        return getEx();
6602
 
6603
      }
6604
      throw new IllegalStateException();
6605
    }
6606
 
6607
    public Object getFieldValue(int fieldId) {
6608
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6609
    }
6610
 
6611
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6612
    public boolean isSet(_Fields field) {
6613
      switch (field) {
6614
      case SUCCESS:
6615
        return isSetSuccess();
6616
      case EX:
6617
        return isSetEx();
6618
      }
6619
      throw new IllegalStateException();
6620
    }
6621
 
6622
    public boolean isSet(int fieldID) {
6623
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6624
    }
6625
 
6626
    @Override
6627
    public boolean equals(Object that) {
6628
      if (that == null)
6629
        return false;
6630
      if (that instanceof getTransactionsForShoppingCartId_result)
6631
        return this.equals((getTransactionsForShoppingCartId_result)that);
6632
      return false;
6633
    }
6634
 
6635
    public boolean equals(getTransactionsForShoppingCartId_result that) {
6636
      if (that == null)
6637
        return false;
6638
 
6639
      boolean this_present_success = true && this.isSetSuccess();
6640
      boolean that_present_success = true && that.isSetSuccess();
6641
      if (this_present_success || that_present_success) {
6642
        if (!(this_present_success && that_present_success))
6643
          return false;
6644
        if (!this.success.equals(that.success))
6645
          return false;
6646
      }
6647
 
6648
      boolean this_present_ex = true && this.isSetEx();
6649
      boolean that_present_ex = true && that.isSetEx();
6650
      if (this_present_ex || that_present_ex) {
6651
        if (!(this_present_ex && that_present_ex))
6652
          return false;
6653
        if (!this.ex.equals(that.ex))
6654
          return false;
6655
      }
6656
 
6657
      return true;
6658
    }
6659
 
6660
    @Override
6661
    public int hashCode() {
6662
      return 0;
6663
    }
6664
 
684 chandransh 6665
    public int compareTo(getTransactionsForShoppingCartId_result other) {
6666
      if (!getClass().equals(other.getClass())) {
6667
        return getClass().getName().compareTo(other.getClass().getName());
6668
      }
6669
 
6670
      int lastComparison = 0;
6671
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
6672
 
6673
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6674
      if (lastComparison != 0) {
6675
        return lastComparison;
6676
      }
6677
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6678
      if (lastComparison != 0) {
6679
        return lastComparison;
6680
      }
6681
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6682
      if (lastComparison != 0) {
6683
        return lastComparison;
6684
      }
6685
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6686
      if (lastComparison != 0) {
6687
        return lastComparison;
6688
      }
6689
      return 0;
6690
    }
6691
 
132 ashish 6692
    public void read(TProtocol iprot) throws TException {
6693
      TField field;
6694
      iprot.readStructBegin();
6695
      while (true)
6696
      {
6697
        field = iprot.readFieldBegin();
6698
        if (field.type == TType.STOP) { 
6699
          break;
6700
        }
6701
        _Fields fieldId = _Fields.findByThriftId(field.id);
6702
        if (fieldId == null) {
6703
          TProtocolUtil.skip(iprot, field.type);
6704
        } else {
6705
          switch (fieldId) {
6706
            case SUCCESS:
6707
              if (field.type == TType.LIST) {
6708
                {
684 chandransh 6709
                  TList _list12 = iprot.readListBegin();
6710
                  this.success = new ArrayList<Transaction>(_list12.size);
6711
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 6712
                  {
684 chandransh 6713
                    Transaction _elem14;
6714
                    _elem14 = new Transaction();
6715
                    _elem14.read(iprot);
6716
                    this.success.add(_elem14);
132 ashish 6717
                  }
6718
                  iprot.readListEnd();
6719
                }
6720
              } else { 
6721
                TProtocolUtil.skip(iprot, field.type);
6722
              }
6723
              break;
6724
            case EX:
6725
              if (field.type == TType.STRUCT) {
6726
                this.ex = new TransactionServiceException();
6727
                this.ex.read(iprot);
6728
              } else { 
6729
                TProtocolUtil.skip(iprot, field.type);
6730
              }
6731
              break;
6732
          }
6733
          iprot.readFieldEnd();
6734
        }
6735
      }
6736
      iprot.readStructEnd();
6737
      validate();
6738
    }
6739
 
6740
    public void write(TProtocol oprot) throws TException {
6741
      oprot.writeStructBegin(STRUCT_DESC);
6742
 
6743
      if (this.isSetSuccess()) {
6744
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6745
        {
6746
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 6747
          for (Transaction _iter15 : this.success)
132 ashish 6748
          {
684 chandransh 6749
            _iter15.write(oprot);
132 ashish 6750
          }
6751
          oprot.writeListEnd();
6752
        }
6753
        oprot.writeFieldEnd();
6754
      } else if (this.isSetEx()) {
6755
        oprot.writeFieldBegin(EX_FIELD_DESC);
6756
        this.ex.write(oprot);
6757
        oprot.writeFieldEnd();
6758
      }
6759
      oprot.writeFieldStop();
6760
      oprot.writeStructEnd();
6761
    }
6762
 
6763
    @Override
6764
    public String toString() {
6765
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
6766
      boolean first = true;
6767
 
6768
      sb.append("success:");
6769
      if (this.success == null) {
6770
        sb.append("null");
6771
      } else {
6772
        sb.append(this.success);
6773
      }
6774
      first = false;
6775
      if (!first) sb.append(", ");
6776
      sb.append("ex:");
6777
      if (this.ex == null) {
6778
        sb.append("null");
6779
      } else {
6780
        sb.append(this.ex);
6781
      }
6782
      first = false;
6783
      sb.append(")");
6784
      return sb.toString();
6785
    }
6786
 
6787
    public void validate() throws TException {
6788
      // check for required fields
6789
    }
6790
 
6791
  }
6792
 
68 ashish 6793
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
6794
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
6795
 
6796
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6797
 
6798
    private long transactionId;
6799
 
6800
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6801
    public enum _Fields implements TFieldIdEnum {
6802
      TRANSACTION_ID((short)1, "transactionId");
6803
 
6804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6806
 
6807
      static {
6808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6809
          byId.put((int)field._thriftId, field);
6810
          byName.put(field.getFieldName(), field);
6811
        }
6812
      }
6813
 
6814
      /**
6815
       * Find the _Fields constant that matches fieldId, or null if its not found.
6816
       */
6817
      public static _Fields findByThriftId(int fieldId) {
6818
        return byId.get(fieldId);
6819
      }
6820
 
6821
      /**
6822
       * Find the _Fields constant that matches fieldId, throwing an exception
6823
       * if it is not found.
6824
       */
6825
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6826
        _Fields fields = findByThriftId(fieldId);
6827
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6828
        return fields;
6829
      }
6830
 
6831
      /**
6832
       * Find the _Fields constant that matches name, or null if its not found.
6833
       */
6834
      public static _Fields findByName(String name) {
6835
        return byName.get(name);
6836
      }
6837
 
6838
      private final short _thriftId;
6839
      private final String _fieldName;
6840
 
6841
      _Fields(short thriftId, String fieldName) {
6842
        _thriftId = thriftId;
6843
        _fieldName = fieldName;
6844
      }
6845
 
6846
      public short getThriftFieldId() {
6847
        return _thriftId;
6848
      }
6849
 
6850
      public String getFieldName() {
6851
        return _fieldName;
6852
      }
6853
    }
6854
 
6855
    // isset id assignments
6856
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6857
    private BitSet __isset_bit_vector = new BitSet(1);
6858
 
6859
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6860
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6861
          new FieldValueMetaData(TType.I64)));
6862
    }});
6863
 
6864
    static {
6865
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
6866
    }
6867
 
6868
    public getTransactionStatus_args() {
6869
    }
6870
 
6871
    public getTransactionStatus_args(
6872
      long transactionId)
6873
    {
6874
      this();
6875
      this.transactionId = transactionId;
6876
      setTransactionIdIsSet(true);
6877
    }
6878
 
6879
    /**
6880
     * Performs a deep copy on <i>other</i>.
6881
     */
6882
    public getTransactionStatus_args(getTransactionStatus_args other) {
6883
      __isset_bit_vector.clear();
6884
      __isset_bit_vector.or(other.__isset_bit_vector);
6885
      this.transactionId = other.transactionId;
6886
    }
6887
 
6888
    public getTransactionStatus_args deepCopy() {
6889
      return new getTransactionStatus_args(this);
6890
    }
6891
 
6892
    @Deprecated
6893
    public getTransactionStatus_args clone() {
6894
      return new getTransactionStatus_args(this);
6895
    }
6896
 
6897
    public long getTransactionId() {
6898
      return this.transactionId;
6899
    }
6900
 
6901
    public getTransactionStatus_args setTransactionId(long transactionId) {
6902
      this.transactionId = transactionId;
6903
      setTransactionIdIsSet(true);
6904
      return this;
6905
    }
6906
 
6907
    public void unsetTransactionId() {
6908
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6909
    }
6910
 
6911
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6912
    public boolean isSetTransactionId() {
6913
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6914
    }
6915
 
6916
    public void setTransactionIdIsSet(boolean value) {
6917
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6918
    }
6919
 
6920
    public void setFieldValue(_Fields field, Object value) {
6921
      switch (field) {
6922
      case TRANSACTION_ID:
6923
        if (value == null) {
6924
          unsetTransactionId();
6925
        } else {
6926
          setTransactionId((Long)value);
6927
        }
6928
        break;
6929
 
6930
      }
6931
    }
6932
 
6933
    public void setFieldValue(int fieldID, Object value) {
6934
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6935
    }
6936
 
6937
    public Object getFieldValue(_Fields field) {
6938
      switch (field) {
6939
      case TRANSACTION_ID:
6940
        return new Long(getTransactionId());
6941
 
6942
      }
6943
      throw new IllegalStateException();
6944
    }
6945
 
6946
    public Object getFieldValue(int fieldId) {
6947
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6948
    }
6949
 
6950
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6951
    public boolean isSet(_Fields field) {
6952
      switch (field) {
6953
      case TRANSACTION_ID:
6954
        return isSetTransactionId();
6955
      }
6956
      throw new IllegalStateException();
6957
    }
6958
 
6959
    public boolean isSet(int fieldID) {
6960
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6961
    }
6962
 
6963
    @Override
6964
    public boolean equals(Object that) {
6965
      if (that == null)
6966
        return false;
6967
      if (that instanceof getTransactionStatus_args)
6968
        return this.equals((getTransactionStatus_args)that);
6969
      return false;
6970
    }
6971
 
6972
    public boolean equals(getTransactionStatus_args that) {
6973
      if (that == null)
6974
        return false;
6975
 
6976
      boolean this_present_transactionId = true;
6977
      boolean that_present_transactionId = true;
6978
      if (this_present_transactionId || that_present_transactionId) {
6979
        if (!(this_present_transactionId && that_present_transactionId))
6980
          return false;
6981
        if (this.transactionId != that.transactionId)
6982
          return false;
6983
      }
6984
 
6985
      return true;
6986
    }
6987
 
6988
    @Override
6989
    public int hashCode() {
6990
      return 0;
6991
    }
6992
 
6993
    public int compareTo(getTransactionStatus_args other) {
6994
      if (!getClass().equals(other.getClass())) {
6995
        return getClass().getName().compareTo(other.getClass().getName());
6996
      }
6997
 
6998
      int lastComparison = 0;
6999
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
7000
 
7001
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7002
      if (lastComparison != 0) {
7003
        return lastComparison;
7004
      }
7005
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7006
      if (lastComparison != 0) {
7007
        return lastComparison;
7008
      }
7009
      return 0;
7010
    }
7011
 
7012
    public void read(TProtocol iprot) throws TException {
7013
      TField field;
7014
      iprot.readStructBegin();
7015
      while (true)
7016
      {
7017
        field = iprot.readFieldBegin();
7018
        if (field.type == TType.STOP) { 
7019
          break;
7020
        }
7021
        _Fields fieldId = _Fields.findByThriftId(field.id);
7022
        if (fieldId == null) {
7023
          TProtocolUtil.skip(iprot, field.type);
7024
        } else {
7025
          switch (fieldId) {
7026
            case TRANSACTION_ID:
7027
              if (field.type == TType.I64) {
7028
                this.transactionId = iprot.readI64();
7029
                setTransactionIdIsSet(true);
7030
              } else { 
7031
                TProtocolUtil.skip(iprot, field.type);
7032
              }
7033
              break;
7034
          }
7035
          iprot.readFieldEnd();
7036
        }
7037
      }
7038
      iprot.readStructEnd();
7039
      validate();
7040
    }
7041
 
7042
    public void write(TProtocol oprot) throws TException {
7043
      validate();
7044
 
7045
      oprot.writeStructBegin(STRUCT_DESC);
7046
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7047
      oprot.writeI64(this.transactionId);
7048
      oprot.writeFieldEnd();
7049
      oprot.writeFieldStop();
7050
      oprot.writeStructEnd();
7051
    }
7052
 
7053
    @Override
7054
    public String toString() {
7055
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
7056
      boolean first = true;
7057
 
7058
      sb.append("transactionId:");
7059
      sb.append(this.transactionId);
7060
      first = false;
7061
      sb.append(")");
7062
      return sb.toString();
7063
    }
7064
 
7065
    public void validate() throws TException {
7066
      // check for required fields
7067
    }
7068
 
7069
  }
7070
 
7071
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
7072
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
7073
 
7074
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
7075
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7076
 
7077
    private TransactionStatus success;
7078
    private TransactionServiceException ex;
7079
 
7080
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7081
    public enum _Fields implements TFieldIdEnum {
7082
      /**
7083
       * 
7084
       * @see TransactionStatus
7085
       */
7086
      SUCCESS((short)0, "success"),
7087
      EX((short)1, "ex");
7088
 
7089
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7090
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7091
 
7092
      static {
7093
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7094
          byId.put((int)field._thriftId, field);
7095
          byName.put(field.getFieldName(), field);
7096
        }
7097
      }
7098
 
7099
      /**
7100
       * Find the _Fields constant that matches fieldId, or null if its not found.
7101
       */
7102
      public static _Fields findByThriftId(int fieldId) {
7103
        return byId.get(fieldId);
7104
      }
7105
 
7106
      /**
7107
       * Find the _Fields constant that matches fieldId, throwing an exception
7108
       * if it is not found.
7109
       */
7110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7111
        _Fields fields = findByThriftId(fieldId);
7112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7113
        return fields;
7114
      }
7115
 
7116
      /**
7117
       * Find the _Fields constant that matches name, or null if its not found.
7118
       */
7119
      public static _Fields findByName(String name) {
7120
        return byName.get(name);
7121
      }
7122
 
7123
      private final short _thriftId;
7124
      private final String _fieldName;
7125
 
7126
      _Fields(short thriftId, String fieldName) {
7127
        _thriftId = thriftId;
7128
        _fieldName = fieldName;
7129
      }
7130
 
7131
      public short getThriftFieldId() {
7132
        return _thriftId;
7133
      }
7134
 
7135
      public String getFieldName() {
7136
        return _fieldName;
7137
      }
7138
    }
7139
 
7140
    // isset id assignments
7141
 
7142
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7143
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7144
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7145
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7146
          new FieldValueMetaData(TType.STRUCT)));
7147
    }});
7148
 
7149
    static {
7150
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
7151
    }
7152
 
7153
    public getTransactionStatus_result() {
7154
    }
7155
 
7156
    public getTransactionStatus_result(
7157
      TransactionStatus success,
7158
      TransactionServiceException ex)
7159
    {
7160
      this();
7161
      this.success = success;
7162
      this.ex = ex;
7163
    }
7164
 
7165
    /**
7166
     * Performs a deep copy on <i>other</i>.
7167
     */
7168
    public getTransactionStatus_result(getTransactionStatus_result other) {
7169
      if (other.isSetSuccess()) {
7170
        this.success = other.success;
7171
      }
7172
      if (other.isSetEx()) {
7173
        this.ex = new TransactionServiceException(other.ex);
7174
      }
7175
    }
7176
 
7177
    public getTransactionStatus_result deepCopy() {
7178
      return new getTransactionStatus_result(this);
7179
    }
7180
 
7181
    @Deprecated
7182
    public getTransactionStatus_result clone() {
7183
      return new getTransactionStatus_result(this);
7184
    }
7185
 
7186
    /**
7187
     * 
7188
     * @see TransactionStatus
7189
     */
7190
    public TransactionStatus getSuccess() {
7191
      return this.success;
7192
    }
7193
 
7194
    /**
7195
     * 
7196
     * @see TransactionStatus
7197
     */
7198
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
7199
      this.success = success;
7200
      return this;
7201
    }
7202
 
7203
    public void unsetSuccess() {
7204
      this.success = null;
7205
    }
7206
 
7207
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7208
    public boolean isSetSuccess() {
7209
      return this.success != null;
7210
    }
7211
 
7212
    public void setSuccessIsSet(boolean value) {
7213
      if (!value) {
7214
        this.success = null;
7215
      }
7216
    }
7217
 
7218
    public TransactionServiceException getEx() {
7219
      return this.ex;
7220
    }
7221
 
7222
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
7223
      this.ex = ex;
7224
      return this;
7225
    }
7226
 
7227
    public void unsetEx() {
7228
      this.ex = null;
7229
    }
7230
 
7231
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7232
    public boolean isSetEx() {
7233
      return this.ex != null;
7234
    }
7235
 
7236
    public void setExIsSet(boolean value) {
7237
      if (!value) {
7238
        this.ex = null;
7239
      }
7240
    }
7241
 
7242
    public void setFieldValue(_Fields field, Object value) {
7243
      switch (field) {
7244
      case SUCCESS:
7245
        if (value == null) {
7246
          unsetSuccess();
7247
        } else {
7248
          setSuccess((TransactionStatus)value);
7249
        }
7250
        break;
7251
 
7252
      case EX:
7253
        if (value == null) {
7254
          unsetEx();
7255
        } else {
7256
          setEx((TransactionServiceException)value);
7257
        }
7258
        break;
7259
 
7260
      }
7261
    }
7262
 
7263
    public void setFieldValue(int fieldID, Object value) {
7264
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7265
    }
7266
 
7267
    public Object getFieldValue(_Fields field) {
7268
      switch (field) {
7269
      case SUCCESS:
7270
        return getSuccess();
7271
 
7272
      case EX:
7273
        return getEx();
7274
 
7275
      }
7276
      throw new IllegalStateException();
7277
    }
7278
 
7279
    public Object getFieldValue(int fieldId) {
7280
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7281
    }
7282
 
7283
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7284
    public boolean isSet(_Fields field) {
7285
      switch (field) {
7286
      case SUCCESS:
7287
        return isSetSuccess();
7288
      case EX:
7289
        return isSetEx();
7290
      }
7291
      throw new IllegalStateException();
7292
    }
7293
 
7294
    public boolean isSet(int fieldID) {
7295
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7296
    }
7297
 
7298
    @Override
7299
    public boolean equals(Object that) {
7300
      if (that == null)
7301
        return false;
7302
      if (that instanceof getTransactionStatus_result)
7303
        return this.equals((getTransactionStatus_result)that);
7304
      return false;
7305
    }
7306
 
7307
    public boolean equals(getTransactionStatus_result that) {
7308
      if (that == null)
7309
        return false;
7310
 
7311
      boolean this_present_success = true && this.isSetSuccess();
7312
      boolean that_present_success = true && that.isSetSuccess();
7313
      if (this_present_success || that_present_success) {
7314
        if (!(this_present_success && that_present_success))
7315
          return false;
7316
        if (!this.success.equals(that.success))
7317
          return false;
7318
      }
7319
 
7320
      boolean this_present_ex = true && this.isSetEx();
7321
      boolean that_present_ex = true && that.isSetEx();
7322
      if (this_present_ex || that_present_ex) {
7323
        if (!(this_present_ex && that_present_ex))
7324
          return false;
7325
        if (!this.ex.equals(that.ex))
7326
          return false;
7327
      }
7328
 
7329
      return true;
7330
    }
7331
 
7332
    @Override
7333
    public int hashCode() {
7334
      return 0;
7335
    }
7336
 
7337
    public int compareTo(getTransactionStatus_result other) {
7338
      if (!getClass().equals(other.getClass())) {
7339
        return getClass().getName().compareTo(other.getClass().getName());
7340
      }
7341
 
7342
      int lastComparison = 0;
7343
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
7344
 
7345
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7346
      if (lastComparison != 0) {
7347
        return lastComparison;
7348
      }
7349
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7350
      if (lastComparison != 0) {
7351
        return lastComparison;
7352
      }
7353
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7354
      if (lastComparison != 0) {
7355
        return lastComparison;
7356
      }
7357
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7358
      if (lastComparison != 0) {
7359
        return lastComparison;
7360
      }
7361
      return 0;
7362
    }
7363
 
7364
    public void read(TProtocol iprot) throws TException {
7365
      TField field;
7366
      iprot.readStructBegin();
7367
      while (true)
7368
      {
7369
        field = iprot.readFieldBegin();
7370
        if (field.type == TType.STOP) { 
7371
          break;
7372
        }
7373
        _Fields fieldId = _Fields.findByThriftId(field.id);
7374
        if (fieldId == null) {
7375
          TProtocolUtil.skip(iprot, field.type);
7376
        } else {
7377
          switch (fieldId) {
7378
            case SUCCESS:
7379
              if (field.type == TType.I32) {
7380
                this.success = TransactionStatus.findByValue(iprot.readI32());
7381
              } else { 
7382
                TProtocolUtil.skip(iprot, field.type);
7383
              }
7384
              break;
7385
            case EX:
7386
              if (field.type == TType.STRUCT) {
7387
                this.ex = new TransactionServiceException();
7388
                this.ex.read(iprot);
7389
              } else { 
7390
                TProtocolUtil.skip(iprot, field.type);
7391
              }
7392
              break;
7393
          }
7394
          iprot.readFieldEnd();
7395
        }
7396
      }
7397
      iprot.readStructEnd();
7398
      validate();
7399
    }
7400
 
7401
    public void write(TProtocol oprot) throws TException {
7402
      oprot.writeStructBegin(STRUCT_DESC);
7403
 
7404
      if (this.isSetSuccess()) {
7405
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7406
        oprot.writeI32(this.success.getValue());
7407
        oprot.writeFieldEnd();
7408
      } else if (this.isSetEx()) {
7409
        oprot.writeFieldBegin(EX_FIELD_DESC);
7410
        this.ex.write(oprot);
7411
        oprot.writeFieldEnd();
7412
      }
7413
      oprot.writeFieldStop();
7414
      oprot.writeStructEnd();
7415
    }
7416
 
7417
    @Override
7418
    public String toString() {
7419
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
7420
      boolean first = true;
7421
 
7422
      sb.append("success:");
7423
      if (this.success == null) {
7424
        sb.append("null");
7425
      } else {
7426
        String success_name = success.name();
7427
        if (success_name != null) {
7428
          sb.append(success_name);
7429
          sb.append(" (");
7430
        }
7431
        sb.append(this.success);
7432
        if (success_name != null) {
7433
          sb.append(")");
7434
        }
7435
      }
7436
      first = false;
7437
      if (!first) sb.append(", ");
7438
      sb.append("ex:");
7439
      if (this.ex == null) {
7440
        sb.append("null");
7441
      } else {
7442
        sb.append(this.ex);
7443
      }
7444
      first = false;
7445
      sb.append(")");
7446
      return sb.toString();
7447
    }
7448
 
7449
    public void validate() throws TException {
7450
      // check for required fields
7451
    }
7452
 
7453
  }
7454
 
7455
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
7456
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
7457
 
7458
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7459
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
7460
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
7461
 
7462
    private long transactionId;
7463
    private TransactionStatus status;
7464
    private String description;
7465
 
7466
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7467
    public enum _Fields implements TFieldIdEnum {
7468
      TRANSACTION_ID((short)1, "transactionId"),
7469
      /**
7470
       * 
7471
       * @see TransactionStatus
7472
       */
7473
      STATUS((short)2, "status"),
7474
      DESCRIPTION((short)3, "description");
7475
 
7476
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7477
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7478
 
7479
      static {
7480
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7481
          byId.put((int)field._thriftId, field);
7482
          byName.put(field.getFieldName(), field);
7483
        }
7484
      }
7485
 
7486
      /**
7487
       * Find the _Fields constant that matches fieldId, or null if its not found.
7488
       */
7489
      public static _Fields findByThriftId(int fieldId) {
7490
        return byId.get(fieldId);
7491
      }
7492
 
7493
      /**
7494
       * Find the _Fields constant that matches fieldId, throwing an exception
7495
       * if it is not found.
7496
       */
7497
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7498
        _Fields fields = findByThriftId(fieldId);
7499
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7500
        return fields;
7501
      }
7502
 
7503
      /**
7504
       * Find the _Fields constant that matches name, or null if its not found.
7505
       */
7506
      public static _Fields findByName(String name) {
7507
        return byName.get(name);
7508
      }
7509
 
7510
      private final short _thriftId;
7511
      private final String _fieldName;
7512
 
7513
      _Fields(short thriftId, String fieldName) {
7514
        _thriftId = thriftId;
7515
        _fieldName = fieldName;
7516
      }
7517
 
7518
      public short getThriftFieldId() {
7519
        return _thriftId;
7520
      }
7521
 
7522
      public String getFieldName() {
7523
        return _fieldName;
7524
      }
7525
    }
7526
 
7527
    // isset id assignments
7528
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7529
    private BitSet __isset_bit_vector = new BitSet(1);
7530
 
7531
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7532
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7533
          new FieldValueMetaData(TType.I64)));
7534
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7535
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7536
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
7537
          new FieldValueMetaData(TType.STRING)));
7538
    }});
7539
 
7540
    static {
7541
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
7542
    }
7543
 
7544
    public changeTransactionStatus_args() {
7545
    }
7546
 
7547
    public changeTransactionStatus_args(
7548
      long transactionId,
7549
      TransactionStatus status,
7550
      String description)
7551
    {
7552
      this();
7553
      this.transactionId = transactionId;
7554
      setTransactionIdIsSet(true);
7555
      this.status = status;
7556
      this.description = description;
7557
    }
7558
 
7559
    /**
7560
     * Performs a deep copy on <i>other</i>.
7561
     */
7562
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
7563
      __isset_bit_vector.clear();
7564
      __isset_bit_vector.or(other.__isset_bit_vector);
7565
      this.transactionId = other.transactionId;
7566
      if (other.isSetStatus()) {
7567
        this.status = other.status;
7568
      }
7569
      if (other.isSetDescription()) {
7570
        this.description = other.description;
7571
      }
7572
    }
7573
 
7574
    public changeTransactionStatus_args deepCopy() {
7575
      return new changeTransactionStatus_args(this);
7576
    }
7577
 
7578
    @Deprecated
7579
    public changeTransactionStatus_args clone() {
7580
      return new changeTransactionStatus_args(this);
7581
    }
7582
 
7583
    public long getTransactionId() {
7584
      return this.transactionId;
7585
    }
7586
 
7587
    public changeTransactionStatus_args setTransactionId(long transactionId) {
7588
      this.transactionId = transactionId;
7589
      setTransactionIdIsSet(true);
7590
      return this;
7591
    }
7592
 
7593
    public void unsetTransactionId() {
7594
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7595
    }
7596
 
7597
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7598
    public boolean isSetTransactionId() {
7599
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7600
    }
7601
 
7602
    public void setTransactionIdIsSet(boolean value) {
7603
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7604
    }
7605
 
7606
    /**
7607
     * 
7608
     * @see TransactionStatus
7609
     */
7610
    public TransactionStatus getStatus() {
7611
      return this.status;
7612
    }
7613
 
7614
    /**
7615
     * 
7616
     * @see TransactionStatus
7617
     */
7618
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
7619
      this.status = status;
7620
      return this;
7621
    }
7622
 
7623
    public void unsetStatus() {
7624
      this.status = null;
7625
    }
7626
 
7627
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7628
    public boolean isSetStatus() {
7629
      return this.status != null;
7630
    }
7631
 
7632
    public void setStatusIsSet(boolean value) {
7633
      if (!value) {
7634
        this.status = null;
7635
      }
7636
    }
7637
 
7638
    public String getDescription() {
7639
      return this.description;
7640
    }
7641
 
7642
    public changeTransactionStatus_args setDescription(String description) {
7643
      this.description = description;
7644
      return this;
7645
    }
7646
 
7647
    public void unsetDescription() {
7648
      this.description = null;
7649
    }
7650
 
7651
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
7652
    public boolean isSetDescription() {
7653
      return this.description != null;
7654
    }
7655
 
7656
    public void setDescriptionIsSet(boolean value) {
7657
      if (!value) {
7658
        this.description = null;
7659
      }
7660
    }
7661
 
7662
    public void setFieldValue(_Fields field, Object value) {
7663
      switch (field) {
7664
      case TRANSACTION_ID:
7665
        if (value == null) {
7666
          unsetTransactionId();
7667
        } else {
7668
          setTransactionId((Long)value);
7669
        }
7670
        break;
7671
 
7672
      case STATUS:
7673
        if (value == null) {
7674
          unsetStatus();
7675
        } else {
7676
          setStatus((TransactionStatus)value);
7677
        }
7678
        break;
7679
 
7680
      case DESCRIPTION:
7681
        if (value == null) {
7682
          unsetDescription();
7683
        } else {
7684
          setDescription((String)value);
7685
        }
7686
        break;
7687
 
7688
      }
7689
    }
7690
 
7691
    public void setFieldValue(int fieldID, Object value) {
7692
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7693
    }
7694
 
7695
    public Object getFieldValue(_Fields field) {
7696
      switch (field) {
7697
      case TRANSACTION_ID:
7698
        return new Long(getTransactionId());
7699
 
7700
      case STATUS:
7701
        return getStatus();
7702
 
7703
      case DESCRIPTION:
7704
        return getDescription();
7705
 
7706
      }
7707
      throw new IllegalStateException();
7708
    }
7709
 
7710
    public Object getFieldValue(int fieldId) {
7711
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7712
    }
7713
 
7714
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7715
    public boolean isSet(_Fields field) {
7716
      switch (field) {
7717
      case TRANSACTION_ID:
7718
        return isSetTransactionId();
7719
      case STATUS:
7720
        return isSetStatus();
7721
      case DESCRIPTION:
7722
        return isSetDescription();
7723
      }
7724
      throw new IllegalStateException();
7725
    }
7726
 
7727
    public boolean isSet(int fieldID) {
7728
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7729
    }
7730
 
7731
    @Override
7732
    public boolean equals(Object that) {
7733
      if (that == null)
7734
        return false;
7735
      if (that instanceof changeTransactionStatus_args)
7736
        return this.equals((changeTransactionStatus_args)that);
7737
      return false;
7738
    }
7739
 
7740
    public boolean equals(changeTransactionStatus_args that) {
7741
      if (that == null)
7742
        return false;
7743
 
7744
      boolean this_present_transactionId = true;
7745
      boolean that_present_transactionId = true;
7746
      if (this_present_transactionId || that_present_transactionId) {
7747
        if (!(this_present_transactionId && that_present_transactionId))
7748
          return false;
7749
        if (this.transactionId != that.transactionId)
7750
          return false;
7751
      }
7752
 
7753
      boolean this_present_status = true && this.isSetStatus();
7754
      boolean that_present_status = true && that.isSetStatus();
7755
      if (this_present_status || that_present_status) {
7756
        if (!(this_present_status && that_present_status))
7757
          return false;
7758
        if (!this.status.equals(that.status))
7759
          return false;
7760
      }
7761
 
7762
      boolean this_present_description = true && this.isSetDescription();
7763
      boolean that_present_description = true && that.isSetDescription();
7764
      if (this_present_description || that_present_description) {
7765
        if (!(this_present_description && that_present_description))
7766
          return false;
7767
        if (!this.description.equals(that.description))
7768
          return false;
7769
      }
7770
 
7771
      return true;
7772
    }
7773
 
7774
    @Override
7775
    public int hashCode() {
7776
      return 0;
7777
    }
7778
 
7779
    public int compareTo(changeTransactionStatus_args other) {
7780
      if (!getClass().equals(other.getClass())) {
7781
        return getClass().getName().compareTo(other.getClass().getName());
7782
      }
7783
 
7784
      int lastComparison = 0;
7785
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
7786
 
7787
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7788
      if (lastComparison != 0) {
7789
        return lastComparison;
7790
      }
7791
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7792
      if (lastComparison != 0) {
7793
        return lastComparison;
7794
      }
7795
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7796
      if (lastComparison != 0) {
7797
        return lastComparison;
7798
      }
7799
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7800
      if (lastComparison != 0) {
7801
        return lastComparison;
7802
      }
7803
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
7804
      if (lastComparison != 0) {
7805
        return lastComparison;
7806
      }
7807
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
7808
      if (lastComparison != 0) {
7809
        return lastComparison;
7810
      }
7811
      return 0;
7812
    }
7813
 
7814
    public void read(TProtocol iprot) throws TException {
7815
      TField field;
7816
      iprot.readStructBegin();
7817
      while (true)
7818
      {
7819
        field = iprot.readFieldBegin();
7820
        if (field.type == TType.STOP) { 
7821
          break;
7822
        }
7823
        _Fields fieldId = _Fields.findByThriftId(field.id);
7824
        if (fieldId == null) {
7825
          TProtocolUtil.skip(iprot, field.type);
7826
        } else {
7827
          switch (fieldId) {
7828
            case TRANSACTION_ID:
7829
              if (field.type == TType.I64) {
7830
                this.transactionId = iprot.readI64();
7831
                setTransactionIdIsSet(true);
7832
              } else { 
7833
                TProtocolUtil.skip(iprot, field.type);
7834
              }
7835
              break;
7836
            case STATUS:
7837
              if (field.type == TType.I32) {
7838
                this.status = TransactionStatus.findByValue(iprot.readI32());
7839
              } else { 
7840
                TProtocolUtil.skip(iprot, field.type);
7841
              }
7842
              break;
7843
            case DESCRIPTION:
7844
              if (field.type == TType.STRING) {
7845
                this.description = iprot.readString();
7846
              } else { 
7847
                TProtocolUtil.skip(iprot, field.type);
7848
              }
7849
              break;
7850
          }
7851
          iprot.readFieldEnd();
7852
        }
7853
      }
7854
      iprot.readStructEnd();
7855
      validate();
7856
    }
7857
 
7858
    public void write(TProtocol oprot) throws TException {
7859
      validate();
7860
 
7861
      oprot.writeStructBegin(STRUCT_DESC);
7862
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7863
      oprot.writeI64(this.transactionId);
7864
      oprot.writeFieldEnd();
7865
      if (this.status != null) {
7866
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7867
        oprot.writeI32(this.status.getValue());
7868
        oprot.writeFieldEnd();
7869
      }
7870
      if (this.description != null) {
7871
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
7872
        oprot.writeString(this.description);
7873
        oprot.writeFieldEnd();
7874
      }
7875
      oprot.writeFieldStop();
7876
      oprot.writeStructEnd();
7877
    }
7878
 
7879
    @Override
7880
    public String toString() {
7881
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
7882
      boolean first = true;
7883
 
7884
      sb.append("transactionId:");
7885
      sb.append(this.transactionId);
7886
      first = false;
7887
      if (!first) sb.append(", ");
7888
      sb.append("status:");
7889
      if (this.status == null) {
7890
        sb.append("null");
7891
      } else {
7892
        String status_name = status.name();
7893
        if (status_name != null) {
7894
          sb.append(status_name);
7895
          sb.append(" (");
7896
        }
7897
        sb.append(this.status);
7898
        if (status_name != null) {
7899
          sb.append(")");
7900
        }
7901
      }
7902
      first = false;
7903
      if (!first) sb.append(", ");
7904
      sb.append("description:");
7905
      if (this.description == null) {
7906
        sb.append("null");
7907
      } else {
7908
        sb.append(this.description);
7909
      }
7910
      first = false;
7911
      sb.append(")");
7912
      return sb.toString();
7913
    }
7914
 
7915
    public void validate() throws TException {
7916
      // check for required fields
7917
    }
7918
 
7919
  }
7920
 
7921
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
7922
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
7923
 
7924
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7925
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7926
 
7927
    private boolean success;
7928
    private TransactionServiceException ex;
7929
 
7930
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7931
    public enum _Fields implements TFieldIdEnum {
7932
      SUCCESS((short)0, "success"),
7933
      EX((short)1, "ex");
7934
 
7935
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7936
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7937
 
7938
      static {
7939
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7940
          byId.put((int)field._thriftId, field);
7941
          byName.put(field.getFieldName(), field);
7942
        }
7943
      }
7944
 
7945
      /**
7946
       * Find the _Fields constant that matches fieldId, or null if its not found.
7947
       */
7948
      public static _Fields findByThriftId(int fieldId) {
7949
        return byId.get(fieldId);
7950
      }
7951
 
7952
      /**
7953
       * Find the _Fields constant that matches fieldId, throwing an exception
7954
       * if it is not found.
7955
       */
7956
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7957
        _Fields fields = findByThriftId(fieldId);
7958
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7959
        return fields;
7960
      }
7961
 
7962
      /**
7963
       * Find the _Fields constant that matches name, or null if its not found.
7964
       */
7965
      public static _Fields findByName(String name) {
7966
        return byName.get(name);
7967
      }
7968
 
7969
      private final short _thriftId;
7970
      private final String _fieldName;
7971
 
7972
      _Fields(short thriftId, String fieldName) {
7973
        _thriftId = thriftId;
7974
        _fieldName = fieldName;
7975
      }
7976
 
7977
      public short getThriftFieldId() {
7978
        return _thriftId;
7979
      }
7980
 
7981
      public String getFieldName() {
7982
        return _fieldName;
7983
      }
7984
    }
7985
 
7986
    // isset id assignments
7987
    private static final int __SUCCESS_ISSET_ID = 0;
7988
    private BitSet __isset_bit_vector = new BitSet(1);
7989
 
7990
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7991
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7992
          new FieldValueMetaData(TType.BOOL)));
7993
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7994
          new FieldValueMetaData(TType.STRUCT)));
7995
    }});
7996
 
7997
    static {
7998
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
7999
    }
8000
 
8001
    public changeTransactionStatus_result() {
8002
    }
8003
 
8004
    public changeTransactionStatus_result(
8005
      boolean success,
8006
      TransactionServiceException ex)
8007
    {
8008
      this();
8009
      this.success = success;
8010
      setSuccessIsSet(true);
8011
      this.ex = ex;
8012
    }
8013
 
8014
    /**
8015
     * Performs a deep copy on <i>other</i>.
8016
     */
8017
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
8018
      __isset_bit_vector.clear();
8019
      __isset_bit_vector.or(other.__isset_bit_vector);
8020
      this.success = other.success;
8021
      if (other.isSetEx()) {
8022
        this.ex = new TransactionServiceException(other.ex);
8023
      }
8024
    }
8025
 
8026
    public changeTransactionStatus_result deepCopy() {
8027
      return new changeTransactionStatus_result(this);
8028
    }
8029
 
8030
    @Deprecated
8031
    public changeTransactionStatus_result clone() {
8032
      return new changeTransactionStatus_result(this);
8033
    }
8034
 
8035
    public boolean isSuccess() {
8036
      return this.success;
8037
    }
8038
 
8039
    public changeTransactionStatus_result setSuccess(boolean success) {
8040
      this.success = success;
8041
      setSuccessIsSet(true);
8042
      return this;
8043
    }
8044
 
8045
    public void unsetSuccess() {
8046
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8047
    }
8048
 
8049
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8050
    public boolean isSetSuccess() {
8051
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8052
    }
8053
 
8054
    public void setSuccessIsSet(boolean value) {
8055
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8056
    }
8057
 
8058
    public TransactionServiceException getEx() {
8059
      return this.ex;
8060
    }
8061
 
8062
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
8063
      this.ex = ex;
8064
      return this;
8065
    }
8066
 
8067
    public void unsetEx() {
8068
      this.ex = null;
8069
    }
8070
 
8071
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8072
    public boolean isSetEx() {
8073
      return this.ex != null;
8074
    }
8075
 
8076
    public void setExIsSet(boolean value) {
8077
      if (!value) {
8078
        this.ex = null;
8079
      }
8080
    }
8081
 
8082
    public void setFieldValue(_Fields field, Object value) {
8083
      switch (field) {
8084
      case SUCCESS:
8085
        if (value == null) {
8086
          unsetSuccess();
8087
        } else {
8088
          setSuccess((Boolean)value);
8089
        }
8090
        break;
8091
 
8092
      case EX:
8093
        if (value == null) {
8094
          unsetEx();
8095
        } else {
8096
          setEx((TransactionServiceException)value);
8097
        }
8098
        break;
8099
 
8100
      }
8101
    }
8102
 
8103
    public void setFieldValue(int fieldID, Object value) {
8104
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8105
    }
8106
 
8107
    public Object getFieldValue(_Fields field) {
8108
      switch (field) {
8109
      case SUCCESS:
8110
        return new Boolean(isSuccess());
8111
 
8112
      case EX:
8113
        return getEx();
8114
 
8115
      }
8116
      throw new IllegalStateException();
8117
    }
8118
 
8119
    public Object getFieldValue(int fieldId) {
8120
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8121
    }
8122
 
8123
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8124
    public boolean isSet(_Fields field) {
8125
      switch (field) {
8126
      case SUCCESS:
8127
        return isSetSuccess();
8128
      case EX:
8129
        return isSetEx();
8130
      }
8131
      throw new IllegalStateException();
8132
    }
8133
 
8134
    public boolean isSet(int fieldID) {
8135
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8136
    }
8137
 
8138
    @Override
8139
    public boolean equals(Object that) {
8140
      if (that == null)
8141
        return false;
8142
      if (that instanceof changeTransactionStatus_result)
8143
        return this.equals((changeTransactionStatus_result)that);
8144
      return false;
8145
    }
8146
 
8147
    public boolean equals(changeTransactionStatus_result that) {
8148
      if (that == null)
8149
        return false;
8150
 
8151
      boolean this_present_success = true;
8152
      boolean that_present_success = true;
8153
      if (this_present_success || that_present_success) {
8154
        if (!(this_present_success && that_present_success))
8155
          return false;
8156
        if (this.success != that.success)
8157
          return false;
8158
      }
8159
 
8160
      boolean this_present_ex = true && this.isSetEx();
8161
      boolean that_present_ex = true && that.isSetEx();
8162
      if (this_present_ex || that_present_ex) {
8163
        if (!(this_present_ex && that_present_ex))
8164
          return false;
8165
        if (!this.ex.equals(that.ex))
8166
          return false;
8167
      }
8168
 
8169
      return true;
8170
    }
8171
 
8172
    @Override
8173
    public int hashCode() {
8174
      return 0;
8175
    }
8176
 
8177
    public int compareTo(changeTransactionStatus_result other) {
8178
      if (!getClass().equals(other.getClass())) {
8179
        return getClass().getName().compareTo(other.getClass().getName());
8180
      }
8181
 
8182
      int lastComparison = 0;
8183
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
8184
 
8185
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8186
      if (lastComparison != 0) {
8187
        return lastComparison;
8188
      }
8189
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8190
      if (lastComparison != 0) {
8191
        return lastComparison;
8192
      }
8193
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8194
      if (lastComparison != 0) {
8195
        return lastComparison;
8196
      }
8197
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8198
      if (lastComparison != 0) {
8199
        return lastComparison;
8200
      }
8201
      return 0;
8202
    }
8203
 
8204
    public void read(TProtocol iprot) throws TException {
8205
      TField field;
8206
      iprot.readStructBegin();
8207
      while (true)
8208
      {
8209
        field = iprot.readFieldBegin();
8210
        if (field.type == TType.STOP) { 
8211
          break;
8212
        }
8213
        _Fields fieldId = _Fields.findByThriftId(field.id);
8214
        if (fieldId == null) {
8215
          TProtocolUtil.skip(iprot, field.type);
8216
        } else {
8217
          switch (fieldId) {
8218
            case SUCCESS:
8219
              if (field.type == TType.BOOL) {
8220
                this.success = iprot.readBool();
8221
                setSuccessIsSet(true);
8222
              } else { 
8223
                TProtocolUtil.skip(iprot, field.type);
8224
              }
8225
              break;
8226
            case EX:
8227
              if (field.type == TType.STRUCT) {
8228
                this.ex = new TransactionServiceException();
8229
                this.ex.read(iprot);
8230
              } else { 
8231
                TProtocolUtil.skip(iprot, field.type);
8232
              }
8233
              break;
8234
          }
8235
          iprot.readFieldEnd();
8236
        }
8237
      }
8238
      iprot.readStructEnd();
8239
      validate();
8240
    }
8241
 
8242
    public void write(TProtocol oprot) throws TException {
8243
      oprot.writeStructBegin(STRUCT_DESC);
8244
 
8245
      if (this.isSetSuccess()) {
8246
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8247
        oprot.writeBool(this.success);
8248
        oprot.writeFieldEnd();
8249
      } else if (this.isSetEx()) {
8250
        oprot.writeFieldBegin(EX_FIELD_DESC);
8251
        this.ex.write(oprot);
8252
        oprot.writeFieldEnd();
8253
      }
8254
      oprot.writeFieldStop();
8255
      oprot.writeStructEnd();
8256
    }
8257
 
8258
    @Override
8259
    public String toString() {
8260
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
8261
      boolean first = true;
8262
 
8263
      sb.append("success:");
8264
      sb.append(this.success);
8265
      first = false;
8266
      if (!first) sb.append(", ");
8267
      sb.append("ex:");
8268
      if (this.ex == null) {
8269
        sb.append("null");
8270
      } else {
8271
        sb.append(this.ex);
8272
      }
8273
      first = false;
8274
      sb.append(")");
8275
      return sb.toString();
8276
    }
8277
 
8278
    public void validate() throws TException {
8279
      // check for required fields
8280
    }
8281
 
8282
  }
8283
 
1398 varun.gupt 8284
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
8285
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 8286
 
8287
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
8288
 
8289
    private long transactionId;
8290
 
8291
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8292
    public enum _Fields implements TFieldIdEnum {
8293
      TRANSACTION_ID((short)1, "transactionId");
8294
 
8295
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8296
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8297
 
8298
      static {
8299
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8300
          byId.put((int)field._thriftId, field);
8301
          byName.put(field.getFieldName(), field);
8302
        }
8303
      }
8304
 
8305
      /**
8306
       * Find the _Fields constant that matches fieldId, or null if its not found.
8307
       */
8308
      public static _Fields findByThriftId(int fieldId) {
8309
        return byId.get(fieldId);
8310
      }
8311
 
8312
      /**
8313
       * Find the _Fields constant that matches fieldId, throwing an exception
8314
       * if it is not found.
8315
       */
8316
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8317
        _Fields fields = findByThriftId(fieldId);
8318
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8319
        return fields;
8320
      }
8321
 
8322
      /**
8323
       * Find the _Fields constant that matches name, or null if its not found.
8324
       */
8325
      public static _Fields findByName(String name) {
8326
        return byName.get(name);
8327
      }
8328
 
8329
      private final short _thriftId;
8330
      private final String _fieldName;
8331
 
8332
      _Fields(short thriftId, String fieldName) {
8333
        _thriftId = thriftId;
8334
        _fieldName = fieldName;
8335
      }
8336
 
8337
      public short getThriftFieldId() {
8338
        return _thriftId;
8339
      }
8340
 
8341
      public String getFieldName() {
8342
        return _fieldName;
8343
      }
8344
    }
8345
 
8346
    // isset id assignments
8347
    private static final int __TRANSACTIONID_ISSET_ID = 0;
8348
    private BitSet __isset_bit_vector = new BitSet(1);
8349
 
8350
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8351
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
8352
          new FieldValueMetaData(TType.I64)));
8353
    }});
8354
 
8355
    static {
1398 varun.gupt 8356
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 8357
    }
8358
 
1398 varun.gupt 8359
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 8360
    }
8361
 
1398 varun.gupt 8362
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 8363
      long transactionId)
8364
    {
8365
      this();
8366
      this.transactionId = transactionId;
8367
      setTransactionIdIsSet(true);
8368
    }
8369
 
8370
    /**
8371
     * Performs a deep copy on <i>other</i>.
8372
     */
1398 varun.gupt 8373
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 8374
      __isset_bit_vector.clear();
8375
      __isset_bit_vector.or(other.__isset_bit_vector);
8376
      this.transactionId = other.transactionId;
8377
    }
8378
 
1398 varun.gupt 8379
    public enqueueTransactionInfoEmail_args deepCopy() {
8380
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 8381
    }
8382
 
8383
    @Deprecated
1398 varun.gupt 8384
    public enqueueTransactionInfoEmail_args clone() {
8385
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 8386
    }
8387
 
8388
    public long getTransactionId() {
8389
      return this.transactionId;
8390
    }
8391
 
1398 varun.gupt 8392
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 8393
      this.transactionId = transactionId;
8394
      setTransactionIdIsSet(true);
8395
      return this;
8396
    }
8397
 
8398
    public void unsetTransactionId() {
8399
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
8400
    }
8401
 
8402
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
8403
    public boolean isSetTransactionId() {
8404
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
8405
    }
8406
 
8407
    public void setTransactionIdIsSet(boolean value) {
8408
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
8409
    }
8410
 
8411
    public void setFieldValue(_Fields field, Object value) {
8412
      switch (field) {
8413
      case TRANSACTION_ID:
8414
        if (value == null) {
8415
          unsetTransactionId();
8416
        } else {
8417
          setTransactionId((Long)value);
8418
        }
8419
        break;
8420
 
8421
      }
8422
    }
8423
 
8424
    public void setFieldValue(int fieldID, Object value) {
8425
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8426
    }
8427
 
8428
    public Object getFieldValue(_Fields field) {
8429
      switch (field) {
8430
      case TRANSACTION_ID:
8431
        return new Long(getTransactionId());
8432
 
8433
      }
8434
      throw new IllegalStateException();
8435
    }
8436
 
8437
    public Object getFieldValue(int fieldId) {
8438
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8439
    }
8440
 
8441
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8442
    public boolean isSet(_Fields field) {
8443
      switch (field) {
8444
      case TRANSACTION_ID:
8445
        return isSetTransactionId();
8446
      }
8447
      throw new IllegalStateException();
8448
    }
8449
 
8450
    public boolean isSet(int fieldID) {
8451
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8452
    }
8453
 
8454
    @Override
8455
    public boolean equals(Object that) {
8456
      if (that == null)
8457
        return false;
1398 varun.gupt 8458
      if (that instanceof enqueueTransactionInfoEmail_args)
8459
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 8460
      return false;
8461
    }
8462
 
1398 varun.gupt 8463
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 8464
      if (that == null)
8465
        return false;
8466
 
8467
      boolean this_present_transactionId = true;
8468
      boolean that_present_transactionId = true;
8469
      if (this_present_transactionId || that_present_transactionId) {
8470
        if (!(this_present_transactionId && that_present_transactionId))
8471
          return false;
8472
        if (this.transactionId != that.transactionId)
8473
          return false;
8474
      }
8475
 
8476
      return true;
8477
    }
8478
 
8479
    @Override
8480
    public int hashCode() {
8481
      return 0;
8482
    }
8483
 
1398 varun.gupt 8484
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 8485
      if (!getClass().equals(other.getClass())) {
8486
        return getClass().getName().compareTo(other.getClass().getName());
8487
      }
8488
 
8489
      int lastComparison = 0;
1398 varun.gupt 8490
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 8491
 
8492
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
8493
      if (lastComparison != 0) {
8494
        return lastComparison;
8495
      }
8496
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
8497
      if (lastComparison != 0) {
8498
        return lastComparison;
8499
      }
8500
      return 0;
8501
    }
8502
 
8503
    public void read(TProtocol iprot) throws TException {
8504
      TField field;
8505
      iprot.readStructBegin();
8506
      while (true)
8507
      {
8508
        field = iprot.readFieldBegin();
8509
        if (field.type == TType.STOP) { 
8510
          break;
8511
        }
8512
        _Fields fieldId = _Fields.findByThriftId(field.id);
8513
        if (fieldId == null) {
8514
          TProtocolUtil.skip(iprot, field.type);
8515
        } else {
8516
          switch (fieldId) {
8517
            case TRANSACTION_ID:
8518
              if (field.type == TType.I64) {
8519
                this.transactionId = iprot.readI64();
8520
                setTransactionIdIsSet(true);
8521
              } else { 
8522
                TProtocolUtil.skip(iprot, field.type);
8523
              }
8524
              break;
8525
          }
8526
          iprot.readFieldEnd();
8527
        }
8528
      }
8529
      iprot.readStructEnd();
8530
      validate();
8531
    }
8532
 
8533
    public void write(TProtocol oprot) throws TException {
8534
      validate();
8535
 
8536
      oprot.writeStructBegin(STRUCT_DESC);
8537
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
8538
      oprot.writeI64(this.transactionId);
8539
      oprot.writeFieldEnd();
8540
      oprot.writeFieldStop();
8541
      oprot.writeStructEnd();
8542
    }
8543
 
8544
    @Override
8545
    public String toString() {
1398 varun.gupt 8546
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 8547
      boolean first = true;
8548
 
8549
      sb.append("transactionId:");
8550
      sb.append(this.transactionId);
8551
      first = false;
8552
      sb.append(")");
8553
      return sb.toString();
8554
    }
8555
 
8556
    public void validate() throws TException {
8557
      // check for required fields
8558
    }
8559
 
8560
  }
8561
 
1398 varun.gupt 8562
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
8563
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 8564
 
8565
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8566
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8567
 
8568
    private boolean success;
8569
    private TransactionServiceException ex;
8570
 
8571
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8572
    public enum _Fields implements TFieldIdEnum {
8573
      SUCCESS((short)0, "success"),
8574
      EX((short)1, "ex");
8575
 
8576
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8577
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8578
 
8579
      static {
8580
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8581
          byId.put((int)field._thriftId, field);
8582
          byName.put(field.getFieldName(), field);
8583
        }
8584
      }
8585
 
8586
      /**
8587
       * Find the _Fields constant that matches fieldId, or null if its not found.
8588
       */
8589
      public static _Fields findByThriftId(int fieldId) {
8590
        return byId.get(fieldId);
8591
      }
8592
 
8593
      /**
8594
       * Find the _Fields constant that matches fieldId, throwing an exception
8595
       * if it is not found.
8596
       */
8597
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8598
        _Fields fields = findByThriftId(fieldId);
8599
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8600
        return fields;
8601
      }
8602
 
8603
      /**
8604
       * Find the _Fields constant that matches name, or null if its not found.
8605
       */
8606
      public static _Fields findByName(String name) {
8607
        return byName.get(name);
8608
      }
8609
 
8610
      private final short _thriftId;
8611
      private final String _fieldName;
8612
 
8613
      _Fields(short thriftId, String fieldName) {
8614
        _thriftId = thriftId;
8615
        _fieldName = fieldName;
8616
      }
8617
 
8618
      public short getThriftFieldId() {
8619
        return _thriftId;
8620
      }
8621
 
8622
      public String getFieldName() {
8623
        return _fieldName;
8624
      }
8625
    }
8626
 
8627
    // isset id assignments
8628
    private static final int __SUCCESS_ISSET_ID = 0;
8629
    private BitSet __isset_bit_vector = new BitSet(1);
8630
 
8631
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8632
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8633
          new FieldValueMetaData(TType.BOOL)));
8634
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8635
          new FieldValueMetaData(TType.STRUCT)));
8636
    }});
8637
 
8638
    static {
1398 varun.gupt 8639
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 8640
    }
8641
 
1398 varun.gupt 8642
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 8643
    }
8644
 
1398 varun.gupt 8645
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 8646
      boolean success,
8647
      TransactionServiceException ex)
8648
    {
8649
      this();
8650
      this.success = success;
8651
      setSuccessIsSet(true);
8652
      this.ex = ex;
8653
    }
8654
 
8655
    /**
8656
     * Performs a deep copy on <i>other</i>.
8657
     */
1398 varun.gupt 8658
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 8659
      __isset_bit_vector.clear();
8660
      __isset_bit_vector.or(other.__isset_bit_vector);
8661
      this.success = other.success;
8662
      if (other.isSetEx()) {
8663
        this.ex = new TransactionServiceException(other.ex);
8664
      }
8665
    }
8666
 
1398 varun.gupt 8667
    public enqueueTransactionInfoEmail_result deepCopy() {
8668
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8669
    }
8670
 
8671
    @Deprecated
1398 varun.gupt 8672
    public enqueueTransactionInfoEmail_result clone() {
8673
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8674
    }
8675
 
8676
    public boolean isSuccess() {
8677
      return this.success;
8678
    }
8679
 
1398 varun.gupt 8680
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 8681
      this.success = success;
8682
      setSuccessIsSet(true);
8683
      return this;
8684
    }
8685
 
8686
    public void unsetSuccess() {
8687
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8688
    }
8689
 
8690
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8691
    public boolean isSetSuccess() {
8692
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8693
    }
8694
 
8695
    public void setSuccessIsSet(boolean value) {
8696
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8697
    }
8698
 
8699
    public TransactionServiceException getEx() {
8700
      return this.ex;
8701
    }
8702
 
1398 varun.gupt 8703
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 8704
      this.ex = ex;
8705
      return this;
8706
    }
8707
 
8708
    public void unsetEx() {
8709
      this.ex = null;
8710
    }
8711
 
8712
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8713
    public boolean isSetEx() {
8714
      return this.ex != null;
8715
    }
8716
 
8717
    public void setExIsSet(boolean value) {
8718
      if (!value) {
8719
        this.ex = null;
8720
      }
8721
    }
8722
 
8723
    public void setFieldValue(_Fields field, Object value) {
8724
      switch (field) {
8725
      case SUCCESS:
8726
        if (value == null) {
8727
          unsetSuccess();
8728
        } else {
8729
          setSuccess((Boolean)value);
8730
        }
8731
        break;
8732
 
8733
      case EX:
8734
        if (value == null) {
8735
          unsetEx();
8736
        } else {
8737
          setEx((TransactionServiceException)value);
8738
        }
8739
        break;
8740
 
8741
      }
8742
    }
8743
 
8744
    public void setFieldValue(int fieldID, Object value) {
8745
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8746
    }
8747
 
8748
    public Object getFieldValue(_Fields field) {
8749
      switch (field) {
8750
      case SUCCESS:
8751
        return new Boolean(isSuccess());
8752
 
8753
      case EX:
8754
        return getEx();
8755
 
8756
      }
8757
      throw new IllegalStateException();
8758
    }
8759
 
8760
    public Object getFieldValue(int fieldId) {
8761
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8762
    }
8763
 
8764
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8765
    public boolean isSet(_Fields field) {
8766
      switch (field) {
8767
      case SUCCESS:
8768
        return isSetSuccess();
8769
      case EX:
8770
        return isSetEx();
8771
      }
8772
      throw new IllegalStateException();
8773
    }
8774
 
8775
    public boolean isSet(int fieldID) {
8776
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8777
    }
8778
 
8779
    @Override
8780
    public boolean equals(Object that) {
8781
      if (that == null)
8782
        return false;
1398 varun.gupt 8783
      if (that instanceof enqueueTransactionInfoEmail_result)
8784
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 8785
      return false;
8786
    }
8787
 
1398 varun.gupt 8788
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 8789
      if (that == null)
8790
        return false;
8791
 
8792
      boolean this_present_success = true;
8793
      boolean that_present_success = true;
8794
      if (this_present_success || that_present_success) {
8795
        if (!(this_present_success && that_present_success))
8796
          return false;
8797
        if (this.success != that.success)
8798
          return false;
8799
      }
8800
 
8801
      boolean this_present_ex = true && this.isSetEx();
8802
      boolean that_present_ex = true && that.isSetEx();
8803
      if (this_present_ex || that_present_ex) {
8804
        if (!(this_present_ex && that_present_ex))
8805
          return false;
8806
        if (!this.ex.equals(that.ex))
8807
          return false;
8808
      }
8809
 
8810
      return true;
8811
    }
8812
 
8813
    @Override
8814
    public int hashCode() {
8815
      return 0;
8816
    }
8817
 
1398 varun.gupt 8818
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 8819
      if (!getClass().equals(other.getClass())) {
8820
        return getClass().getName().compareTo(other.getClass().getName());
8821
      }
8822
 
8823
      int lastComparison = 0;
1398 varun.gupt 8824
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 8825
 
8826
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8827
      if (lastComparison != 0) {
8828
        return lastComparison;
8829
      }
8830
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8831
      if (lastComparison != 0) {
8832
        return lastComparison;
8833
      }
8834
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8835
      if (lastComparison != 0) {
8836
        return lastComparison;
8837
      }
8838
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8839
      if (lastComparison != 0) {
8840
        return lastComparison;
8841
      }
8842
      return 0;
8843
    }
8844
 
8845
    public void read(TProtocol iprot) throws TException {
8846
      TField field;
8847
      iprot.readStructBegin();
8848
      while (true)
8849
      {
8850
        field = iprot.readFieldBegin();
8851
        if (field.type == TType.STOP) { 
8852
          break;
8853
        }
8854
        _Fields fieldId = _Fields.findByThriftId(field.id);
8855
        if (fieldId == null) {
8856
          TProtocolUtil.skip(iprot, field.type);
8857
        } else {
8858
          switch (fieldId) {
8859
            case SUCCESS:
8860
              if (field.type == TType.BOOL) {
8861
                this.success = iprot.readBool();
8862
                setSuccessIsSet(true);
8863
              } else { 
8864
                TProtocolUtil.skip(iprot, field.type);
8865
              }
8866
              break;
8867
            case EX:
8868
              if (field.type == TType.STRUCT) {
8869
                this.ex = new TransactionServiceException();
8870
                this.ex.read(iprot);
8871
              } else { 
8872
                TProtocolUtil.skip(iprot, field.type);
8873
              }
8874
              break;
8875
          }
8876
          iprot.readFieldEnd();
8877
        }
8878
      }
8879
      iprot.readStructEnd();
8880
      validate();
8881
    }
8882
 
8883
    public void write(TProtocol oprot) throws TException {
8884
      oprot.writeStructBegin(STRUCT_DESC);
8885
 
8886
      if (this.isSetSuccess()) {
8887
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8888
        oprot.writeBool(this.success);
8889
        oprot.writeFieldEnd();
8890
      } else if (this.isSetEx()) {
8891
        oprot.writeFieldBegin(EX_FIELD_DESC);
8892
        this.ex.write(oprot);
8893
        oprot.writeFieldEnd();
8894
      }
8895
      oprot.writeFieldStop();
8896
      oprot.writeStructEnd();
8897
    }
8898
 
8899
    @Override
8900
    public String toString() {
1398 varun.gupt 8901
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 8902
      boolean first = true;
8903
 
8904
      sb.append("success:");
8905
      sb.append(this.success);
8906
      first = false;
8907
      if (!first) sb.append(", ");
8908
      sb.append("ex:");
8909
      if (this.ex == null) {
8910
        sb.append("null");
8911
      } else {
8912
        sb.append(this.ex);
8913
      }
8914
      first = false;
8915
      sb.append(")");
8916
      return sb.toString();
8917
    }
8918
 
8919
    public void validate() throws TException {
8920
      // check for required fields
8921
    }
8922
 
8923
  }
8924
 
483 rajveer 8925
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
8926
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 8927
 
483 rajveer 8928
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8929
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
8930
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
8931
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 8932
 
483 rajveer 8933
    private OrderStatus status;
8934
    private long from_date;
8935
    private long to_date;
8936
    private long warehouse_id;
68 ashish 8937
 
8938
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8939
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8940
      /**
8941
       * 
8942
       * @see OrderStatus
8943
       */
8944
      STATUS((short)1, "status"),
8945
      FROM_DATE((short)2, "from_date"),
8946
      TO_DATE((short)3, "to_date"),
8947
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 8948
 
8949
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8950
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8951
 
8952
      static {
8953
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8954
          byId.put((int)field._thriftId, field);
8955
          byName.put(field.getFieldName(), field);
8956
        }
8957
      }
8958
 
8959
      /**
8960
       * Find the _Fields constant that matches fieldId, or null if its not found.
8961
       */
8962
      public static _Fields findByThriftId(int fieldId) {
8963
        return byId.get(fieldId);
8964
      }
8965
 
8966
      /**
8967
       * Find the _Fields constant that matches fieldId, throwing an exception
8968
       * if it is not found.
8969
       */
8970
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8971
        _Fields fields = findByThriftId(fieldId);
8972
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8973
        return fields;
8974
      }
8975
 
8976
      /**
8977
       * Find the _Fields constant that matches name, or null if its not found.
8978
       */
8979
      public static _Fields findByName(String name) {
8980
        return byName.get(name);
8981
      }
8982
 
8983
      private final short _thriftId;
8984
      private final String _fieldName;
8985
 
8986
      _Fields(short thriftId, String fieldName) {
8987
        _thriftId = thriftId;
8988
        _fieldName = fieldName;
8989
      }
8990
 
8991
      public short getThriftFieldId() {
8992
        return _thriftId;
8993
      }
8994
 
8995
      public String getFieldName() {
8996
        return _fieldName;
8997
      }
8998
    }
8999
 
9000
    // isset id assignments
483 rajveer 9001
    private static final int __FROM_DATE_ISSET_ID = 0;
9002
    private static final int __TO_DATE_ISSET_ID = 1;
9003
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
9004
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 9005
 
9006
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 9007
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
9008
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
9009
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 9010
          new FieldValueMetaData(TType.I64)));
483 rajveer 9011
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
9012
          new FieldValueMetaData(TType.I64)));
9013
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
9014
          new FieldValueMetaData(TType.I64)));
68 ashish 9015
    }});
9016
 
9017
    static {
483 rajveer 9018
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 9019
    }
9020
 
483 rajveer 9021
    public getAllOrders_args() {
68 ashish 9022
    }
9023
 
483 rajveer 9024
    public getAllOrders_args(
9025
      OrderStatus status,
9026
      long from_date,
9027
      long to_date,
9028
      long warehouse_id)
68 ashish 9029
    {
9030
      this();
483 rajveer 9031
      this.status = status;
9032
      this.from_date = from_date;
9033
      setFrom_dateIsSet(true);
9034
      this.to_date = to_date;
9035
      setTo_dateIsSet(true);
9036
      this.warehouse_id = warehouse_id;
9037
      setWarehouse_idIsSet(true);
68 ashish 9038
    }
9039
 
9040
    /**
9041
     * Performs a deep copy on <i>other</i>.
9042
     */
483 rajveer 9043
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 9044
      __isset_bit_vector.clear();
9045
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 9046
      if (other.isSetStatus()) {
9047
        this.status = other.status;
9048
      }
9049
      this.from_date = other.from_date;
9050
      this.to_date = other.to_date;
9051
      this.warehouse_id = other.warehouse_id;
68 ashish 9052
    }
9053
 
483 rajveer 9054
    public getAllOrders_args deepCopy() {
9055
      return new getAllOrders_args(this);
68 ashish 9056
    }
9057
 
9058
    @Deprecated
483 rajveer 9059
    public getAllOrders_args clone() {
9060
      return new getAllOrders_args(this);
68 ashish 9061
    }
9062
 
483 rajveer 9063
    /**
9064
     * 
9065
     * @see OrderStatus
9066
     */
9067
    public OrderStatus getStatus() {
9068
      return this.status;
68 ashish 9069
    }
9070
 
483 rajveer 9071
    /**
9072
     * 
9073
     * @see OrderStatus
9074
     */
9075
    public getAllOrders_args setStatus(OrderStatus status) {
9076
      this.status = status;
68 ashish 9077
      return this;
9078
    }
9079
 
483 rajveer 9080
    public void unsetStatus() {
9081
      this.status = null;
68 ashish 9082
    }
9083
 
483 rajveer 9084
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9085
    public boolean isSetStatus() {
9086
      return this.status != null;
68 ashish 9087
    }
9088
 
483 rajveer 9089
    public void setStatusIsSet(boolean value) {
9090
      if (!value) {
9091
        this.status = null;
68 ashish 9092
      }
9093
    }
9094
 
483 rajveer 9095
    public long getFrom_date() {
9096
      return this.from_date;
68 ashish 9097
    }
9098
 
483 rajveer 9099
    public getAllOrders_args setFrom_date(long from_date) {
9100
      this.from_date = from_date;
9101
      setFrom_dateIsSet(true);
9102
      return this;
68 ashish 9103
    }
9104
 
483 rajveer 9105
    public void unsetFrom_date() {
9106
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 9107
    }
9108
 
483 rajveer 9109
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
9110
    public boolean isSetFrom_date() {
9111
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 9112
    }
9113
 
483 rajveer 9114
    public void setFrom_dateIsSet(boolean value) {
9115
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 9116
    }
9117
 
483 rajveer 9118
    public long getTo_date() {
9119
      return this.to_date;
68 ashish 9120
    }
9121
 
483 rajveer 9122
    public getAllOrders_args setTo_date(long to_date) {
9123
      this.to_date = to_date;
9124
      setTo_dateIsSet(true);
68 ashish 9125
      return this;
9126
    }
9127
 
483 rajveer 9128
    public void unsetTo_date() {
9129
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 9130
    }
9131
 
483 rajveer 9132
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
9133
    public boolean isSetTo_date() {
9134
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 9135
    }
9136
 
483 rajveer 9137
    public void setTo_dateIsSet(boolean value) {
9138
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 9139
    }
9140
 
483 rajveer 9141
    public long getWarehouse_id() {
9142
      return this.warehouse_id;
68 ashish 9143
    }
9144
 
483 rajveer 9145
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
9146
      this.warehouse_id = warehouse_id;
9147
      setWarehouse_idIsSet(true);
68 ashish 9148
      return this;
9149
    }
9150
 
483 rajveer 9151
    public void unsetWarehouse_id() {
9152
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 9153
    }
9154
 
483 rajveer 9155
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9156
    public boolean isSetWarehouse_id() {
9157
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 9158
    }
9159
 
483 rajveer 9160
    public void setWarehouse_idIsSet(boolean value) {
9161
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 9162
    }
9163
 
9164
    public void setFieldValue(_Fields field, Object value) {
9165
      switch (field) {
483 rajveer 9166
      case STATUS:
68 ashish 9167
        if (value == null) {
483 rajveer 9168
          unsetStatus();
68 ashish 9169
        } else {
483 rajveer 9170
          setStatus((OrderStatus)value);
68 ashish 9171
        }
9172
        break;
9173
 
483 rajveer 9174
      case FROM_DATE:
68 ashish 9175
        if (value == null) {
483 rajveer 9176
          unsetFrom_date();
68 ashish 9177
        } else {
483 rajveer 9178
          setFrom_date((Long)value);
68 ashish 9179
        }
9180
        break;
9181
 
483 rajveer 9182
      case TO_DATE:
9183
        if (value == null) {
9184
          unsetTo_date();
9185
        } else {
9186
          setTo_date((Long)value);
9187
        }
9188
        break;
9189
 
9190
      case WAREHOUSE_ID:
9191
        if (value == null) {
9192
          unsetWarehouse_id();
9193
        } else {
9194
          setWarehouse_id((Long)value);
9195
        }
9196
        break;
9197
 
68 ashish 9198
      }
9199
    }
9200
 
9201
    public void setFieldValue(int fieldID, Object value) {
9202
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9203
    }
9204
 
9205
    public Object getFieldValue(_Fields field) {
9206
      switch (field) {
483 rajveer 9207
      case STATUS:
9208
        return getStatus();
68 ashish 9209
 
483 rajveer 9210
      case FROM_DATE:
9211
        return new Long(getFrom_date());
68 ashish 9212
 
483 rajveer 9213
      case TO_DATE:
9214
        return new Long(getTo_date());
9215
 
9216
      case WAREHOUSE_ID:
9217
        return new Long(getWarehouse_id());
9218
 
68 ashish 9219
      }
9220
      throw new IllegalStateException();
9221
    }
9222
 
9223
    public Object getFieldValue(int fieldId) {
9224
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9225
    }
9226
 
9227
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9228
    public boolean isSet(_Fields field) {
9229
      switch (field) {
483 rajveer 9230
      case STATUS:
9231
        return isSetStatus();
9232
      case FROM_DATE:
9233
        return isSetFrom_date();
9234
      case TO_DATE:
9235
        return isSetTo_date();
9236
      case WAREHOUSE_ID:
9237
        return isSetWarehouse_id();
68 ashish 9238
      }
9239
      throw new IllegalStateException();
9240
    }
9241
 
9242
    public boolean isSet(int fieldID) {
9243
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9244
    }
9245
 
9246
    @Override
9247
    public boolean equals(Object that) {
9248
      if (that == null)
9249
        return false;
483 rajveer 9250
      if (that instanceof getAllOrders_args)
9251
        return this.equals((getAllOrders_args)that);
68 ashish 9252
      return false;
9253
    }
9254
 
483 rajveer 9255
    public boolean equals(getAllOrders_args that) {
68 ashish 9256
      if (that == null)
9257
        return false;
9258
 
483 rajveer 9259
      boolean this_present_status = true && this.isSetStatus();
9260
      boolean that_present_status = true && that.isSetStatus();
9261
      if (this_present_status || that_present_status) {
9262
        if (!(this_present_status && that_present_status))
68 ashish 9263
          return false;
483 rajveer 9264
        if (!this.status.equals(that.status))
68 ashish 9265
          return false;
9266
      }
9267
 
483 rajveer 9268
      boolean this_present_from_date = true;
9269
      boolean that_present_from_date = true;
9270
      if (this_present_from_date || that_present_from_date) {
9271
        if (!(this_present_from_date && that_present_from_date))
68 ashish 9272
          return false;
483 rajveer 9273
        if (this.from_date != that.from_date)
68 ashish 9274
          return false;
9275
      }
9276
 
483 rajveer 9277
      boolean this_present_to_date = true;
9278
      boolean that_present_to_date = true;
9279
      if (this_present_to_date || that_present_to_date) {
9280
        if (!(this_present_to_date && that_present_to_date))
9281
          return false;
9282
        if (this.to_date != that.to_date)
9283
          return false;
68 ashish 9284
      }
9285
 
483 rajveer 9286
      boolean this_present_warehouse_id = true;
9287
      boolean that_present_warehouse_id = true;
9288
      if (this_present_warehouse_id || that_present_warehouse_id) {
9289
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 9290
          return false;
483 rajveer 9291
        if (this.warehouse_id != that.warehouse_id)
68 ashish 9292
          return false;
9293
      }
9294
 
9295
      return true;
9296
    }
9297
 
9298
    @Override
9299
    public int hashCode() {
9300
      return 0;
9301
    }
9302
 
483 rajveer 9303
    public int compareTo(getAllOrders_args other) {
68 ashish 9304
      if (!getClass().equals(other.getClass())) {
9305
        return getClass().getName().compareTo(other.getClass().getName());
9306
      }
9307
 
9308
      int lastComparison = 0;
483 rajveer 9309
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 9310
 
483 rajveer 9311
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 9312
      if (lastComparison != 0) {
9313
        return lastComparison;
9314
      }
483 rajveer 9315
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 9316
      if (lastComparison != 0) {
9317
        return lastComparison;
9318
      }
483 rajveer 9319
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
9320
      if (lastComparison != 0) {
9321
        return lastComparison;
9322
      }
9323
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
9324
      if (lastComparison != 0) {
9325
        return lastComparison;
9326
      }
9327
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
9328
      if (lastComparison != 0) {
9329
        return lastComparison;
9330
      }
9331
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
9332
      if (lastComparison != 0) {
9333
        return lastComparison;
9334
      }
9335
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9336
      if (lastComparison != 0) {
9337
        return lastComparison;
9338
      }
9339
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9340
      if (lastComparison != 0) {
9341
        return lastComparison;
9342
      }
68 ashish 9343
      return 0;
9344
    }
9345
 
9346
    public void read(TProtocol iprot) throws TException {
9347
      TField field;
9348
      iprot.readStructBegin();
9349
      while (true)
9350
      {
9351
        field = iprot.readFieldBegin();
9352
        if (field.type == TType.STOP) { 
9353
          break;
9354
        }
9355
        _Fields fieldId = _Fields.findByThriftId(field.id);
9356
        if (fieldId == null) {
9357
          TProtocolUtil.skip(iprot, field.type);
9358
        } else {
9359
          switch (fieldId) {
483 rajveer 9360
            case STATUS:
9361
              if (field.type == TType.I32) {
9362
                this.status = OrderStatus.findByValue(iprot.readI32());
9363
              } else { 
9364
                TProtocolUtil.skip(iprot, field.type);
9365
              }
9366
              break;
9367
            case FROM_DATE:
68 ashish 9368
              if (field.type == TType.I64) {
483 rajveer 9369
                this.from_date = iprot.readI64();
9370
                setFrom_dateIsSet(true);
68 ashish 9371
              } else { 
9372
                TProtocolUtil.skip(iprot, field.type);
9373
              }
9374
              break;
483 rajveer 9375
            case TO_DATE:
9376
              if (field.type == TType.I64) {
9377
                this.to_date = iprot.readI64();
9378
                setTo_dateIsSet(true);
9379
              } else { 
9380
                TProtocolUtil.skip(iprot, field.type);
9381
              }
9382
              break;
9383
            case WAREHOUSE_ID:
9384
              if (field.type == TType.I64) {
9385
                this.warehouse_id = iprot.readI64();
9386
                setWarehouse_idIsSet(true);
9387
              } else { 
9388
                TProtocolUtil.skip(iprot, field.type);
9389
              }
9390
              break;
68 ashish 9391
          }
9392
          iprot.readFieldEnd();
9393
        }
9394
      }
9395
      iprot.readStructEnd();
9396
      validate();
9397
    }
9398
 
9399
    public void write(TProtocol oprot) throws TException {
9400
      validate();
9401
 
9402
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 9403
      if (this.status != null) {
9404
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9405
        oprot.writeI32(this.status.getValue());
9406
        oprot.writeFieldEnd();
9407
      }
9408
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
9409
      oprot.writeI64(this.from_date);
68 ashish 9410
      oprot.writeFieldEnd();
483 rajveer 9411
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
9412
      oprot.writeI64(this.to_date);
9413
      oprot.writeFieldEnd();
9414
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9415
      oprot.writeI64(this.warehouse_id);
9416
      oprot.writeFieldEnd();
68 ashish 9417
      oprot.writeFieldStop();
9418
      oprot.writeStructEnd();
9419
    }
9420
 
9421
    @Override
9422
    public String toString() {
483 rajveer 9423
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 9424
      boolean first = true;
9425
 
483 rajveer 9426
      sb.append("status:");
9427
      if (this.status == null) {
9428
        sb.append("null");
9429
      } else {
9430
        String status_name = status.name();
9431
        if (status_name != null) {
9432
          sb.append(status_name);
9433
          sb.append(" (");
9434
        }
9435
        sb.append(this.status);
9436
        if (status_name != null) {
9437
          sb.append(")");
9438
        }
9439
      }
68 ashish 9440
      first = false;
483 rajveer 9441
      if (!first) sb.append(", ");
9442
      sb.append("from_date:");
9443
      sb.append(this.from_date);
9444
      first = false;
9445
      if (!first) sb.append(", ");
9446
      sb.append("to_date:");
9447
      sb.append(this.to_date);
9448
      first = false;
9449
      if (!first) sb.append(", ");
9450
      sb.append("warehouse_id:");
9451
      sb.append(this.warehouse_id);
9452
      first = false;
68 ashish 9453
      sb.append(")");
9454
      return sb.toString();
9455
    }
9456
 
9457
    public void validate() throws TException {
9458
      // check for required fields
9459
    }
9460
 
9461
  }
9462
 
483 rajveer 9463
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
9464
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 9465
 
483 rajveer 9466
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 9467
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9468
 
483 rajveer 9469
    private List<Order> success;
68 ashish 9470
    private TransactionServiceException ex;
9471
 
9472
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9473
    public enum _Fields implements TFieldIdEnum {
9474
      SUCCESS((short)0, "success"),
9475
      EX((short)1, "ex");
9476
 
9477
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9478
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9479
 
9480
      static {
9481
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9482
          byId.put((int)field._thriftId, field);
9483
          byName.put(field.getFieldName(), field);
9484
        }
9485
      }
9486
 
9487
      /**
9488
       * Find the _Fields constant that matches fieldId, or null if its not found.
9489
       */
9490
      public static _Fields findByThriftId(int fieldId) {
9491
        return byId.get(fieldId);
9492
      }
9493
 
9494
      /**
9495
       * Find the _Fields constant that matches fieldId, throwing an exception
9496
       * if it is not found.
9497
       */
9498
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9499
        _Fields fields = findByThriftId(fieldId);
9500
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9501
        return fields;
9502
      }
9503
 
9504
      /**
9505
       * Find the _Fields constant that matches name, or null if its not found.
9506
       */
9507
      public static _Fields findByName(String name) {
9508
        return byName.get(name);
9509
      }
9510
 
9511
      private final short _thriftId;
9512
      private final String _fieldName;
9513
 
9514
      _Fields(short thriftId, String fieldName) {
9515
        _thriftId = thriftId;
9516
        _fieldName = fieldName;
9517
      }
9518
 
9519
      public short getThriftFieldId() {
9520
        return _thriftId;
9521
      }
9522
 
9523
      public String getFieldName() {
9524
        return _fieldName;
9525
      }
9526
    }
9527
 
9528
    // isset id assignments
9529
 
9530
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9531
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 9532
          new ListMetaData(TType.LIST, 
9533
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 9534
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9535
          new FieldValueMetaData(TType.STRUCT)));
9536
    }});
9537
 
9538
    static {
483 rajveer 9539
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 9540
    }
9541
 
483 rajveer 9542
    public getAllOrders_result() {
68 ashish 9543
    }
9544
 
483 rajveer 9545
    public getAllOrders_result(
9546
      List<Order> success,
68 ashish 9547
      TransactionServiceException ex)
9548
    {
9549
      this();
9550
      this.success = success;
9551
      this.ex = ex;
9552
    }
9553
 
9554
    /**
9555
     * Performs a deep copy on <i>other</i>.
9556
     */
483 rajveer 9557
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 9558
      if (other.isSetSuccess()) {
483 rajveer 9559
        List<Order> __this__success = new ArrayList<Order>();
9560
        for (Order other_element : other.success) {
9561
          __this__success.add(new Order(other_element));
9562
        }
9563
        this.success = __this__success;
68 ashish 9564
      }
9565
      if (other.isSetEx()) {
9566
        this.ex = new TransactionServiceException(other.ex);
9567
      }
9568
    }
9569
 
483 rajveer 9570
    public getAllOrders_result deepCopy() {
9571
      return new getAllOrders_result(this);
68 ashish 9572
    }
9573
 
9574
    @Deprecated
483 rajveer 9575
    public getAllOrders_result clone() {
9576
      return new getAllOrders_result(this);
68 ashish 9577
    }
9578
 
483 rajveer 9579
    public int getSuccessSize() {
9580
      return (this.success == null) ? 0 : this.success.size();
9581
    }
9582
 
9583
    public java.util.Iterator<Order> getSuccessIterator() {
9584
      return (this.success == null) ? null : this.success.iterator();
9585
    }
9586
 
9587
    public void addToSuccess(Order elem) {
9588
      if (this.success == null) {
9589
        this.success = new ArrayList<Order>();
9590
      }
9591
      this.success.add(elem);
9592
    }
9593
 
9594
    public List<Order> getSuccess() {
68 ashish 9595
      return this.success;
9596
    }
9597
 
483 rajveer 9598
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 9599
      this.success = success;
9600
      return this;
9601
    }
9602
 
9603
    public void unsetSuccess() {
9604
      this.success = null;
9605
    }
9606
 
9607
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9608
    public boolean isSetSuccess() {
9609
      return this.success != null;
9610
    }
9611
 
9612
    public void setSuccessIsSet(boolean value) {
9613
      if (!value) {
9614
        this.success = null;
9615
      }
9616
    }
9617
 
9618
    public TransactionServiceException getEx() {
9619
      return this.ex;
9620
    }
9621
 
483 rajveer 9622
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 9623
      this.ex = ex;
9624
      return this;
9625
    }
9626
 
9627
    public void unsetEx() {
9628
      this.ex = null;
9629
    }
9630
 
9631
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9632
    public boolean isSetEx() {
9633
      return this.ex != null;
9634
    }
9635
 
9636
    public void setExIsSet(boolean value) {
9637
      if (!value) {
9638
        this.ex = null;
9639
      }
9640
    }
9641
 
9642
    public void setFieldValue(_Fields field, Object value) {
9643
      switch (field) {
9644
      case SUCCESS:
9645
        if (value == null) {
9646
          unsetSuccess();
9647
        } else {
483 rajveer 9648
          setSuccess((List<Order>)value);
68 ashish 9649
        }
9650
        break;
9651
 
9652
      case EX:
9653
        if (value == null) {
9654
          unsetEx();
9655
        } else {
9656
          setEx((TransactionServiceException)value);
9657
        }
9658
        break;
9659
 
9660
      }
9661
    }
9662
 
9663
    public void setFieldValue(int fieldID, Object value) {
9664
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9665
    }
9666
 
9667
    public Object getFieldValue(_Fields field) {
9668
      switch (field) {
9669
      case SUCCESS:
9670
        return getSuccess();
9671
 
9672
      case EX:
9673
        return getEx();
9674
 
9675
      }
9676
      throw new IllegalStateException();
9677
    }
9678
 
9679
    public Object getFieldValue(int fieldId) {
9680
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9681
    }
9682
 
9683
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9684
    public boolean isSet(_Fields field) {
9685
      switch (field) {
9686
      case SUCCESS:
9687
        return isSetSuccess();
9688
      case EX:
9689
        return isSetEx();
9690
      }
9691
      throw new IllegalStateException();
9692
    }
9693
 
9694
    public boolean isSet(int fieldID) {
9695
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9696
    }
9697
 
9698
    @Override
9699
    public boolean equals(Object that) {
9700
      if (that == null)
9701
        return false;
483 rajveer 9702
      if (that instanceof getAllOrders_result)
9703
        return this.equals((getAllOrders_result)that);
68 ashish 9704
      return false;
9705
    }
9706
 
483 rajveer 9707
    public boolean equals(getAllOrders_result that) {
68 ashish 9708
      if (that == null)
9709
        return false;
9710
 
9711
      boolean this_present_success = true && this.isSetSuccess();
9712
      boolean that_present_success = true && that.isSetSuccess();
9713
      if (this_present_success || that_present_success) {
9714
        if (!(this_present_success && that_present_success))
9715
          return false;
9716
        if (!this.success.equals(that.success))
9717
          return false;
9718
      }
9719
 
9720
      boolean this_present_ex = true && this.isSetEx();
9721
      boolean that_present_ex = true && that.isSetEx();
9722
      if (this_present_ex || that_present_ex) {
9723
        if (!(this_present_ex && that_present_ex))
9724
          return false;
9725
        if (!this.ex.equals(that.ex))
9726
          return false;
9727
      }
9728
 
9729
      return true;
9730
    }
9731
 
9732
    @Override
9733
    public int hashCode() {
9734
      return 0;
9735
    }
9736
 
483 rajveer 9737
    public int compareTo(getAllOrders_result other) {
9738
      if (!getClass().equals(other.getClass())) {
9739
        return getClass().getName().compareTo(other.getClass().getName());
9740
      }
9741
 
9742
      int lastComparison = 0;
9743
      getAllOrders_result typedOther = (getAllOrders_result)other;
9744
 
9745
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9746
      if (lastComparison != 0) {
9747
        return lastComparison;
9748
      }
9749
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9750
      if (lastComparison != 0) {
9751
        return lastComparison;
9752
      }
9753
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9754
      if (lastComparison != 0) {
9755
        return lastComparison;
9756
      }
9757
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9758
      if (lastComparison != 0) {
9759
        return lastComparison;
9760
      }
9761
      return 0;
9762
    }
9763
 
68 ashish 9764
    public void read(TProtocol iprot) throws TException {
9765
      TField field;
9766
      iprot.readStructBegin();
9767
      while (true)
9768
      {
9769
        field = iprot.readFieldBegin();
9770
        if (field.type == TType.STOP) { 
9771
          break;
9772
        }
9773
        _Fields fieldId = _Fields.findByThriftId(field.id);
9774
        if (fieldId == null) {
9775
          TProtocolUtil.skip(iprot, field.type);
9776
        } else {
9777
          switch (fieldId) {
9778
            case SUCCESS:
483 rajveer 9779
              if (field.type == TType.LIST) {
9780
                {
684 chandransh 9781
                  TList _list16 = iprot.readListBegin();
9782
                  this.success = new ArrayList<Order>(_list16.size);
9783
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 9784
                  {
684 chandransh 9785
                    Order _elem18;
9786
                    _elem18 = new Order();
9787
                    _elem18.read(iprot);
9788
                    this.success.add(_elem18);
483 rajveer 9789
                  }
9790
                  iprot.readListEnd();
9791
                }
68 ashish 9792
              } else { 
9793
                TProtocolUtil.skip(iprot, field.type);
9794
              }
9795
              break;
9796
            case EX:
9797
              if (field.type == TType.STRUCT) {
9798
                this.ex = new TransactionServiceException();
9799
                this.ex.read(iprot);
9800
              } else { 
9801
                TProtocolUtil.skip(iprot, field.type);
9802
              }
9803
              break;
9804
          }
9805
          iprot.readFieldEnd();
9806
        }
9807
      }
9808
      iprot.readStructEnd();
9809
      validate();
9810
    }
9811
 
9812
    public void write(TProtocol oprot) throws TException {
9813
      oprot.writeStructBegin(STRUCT_DESC);
9814
 
9815
      if (this.isSetSuccess()) {
9816
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 9817
        {
9818
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 9819
          for (Order _iter19 : this.success)
483 rajveer 9820
          {
684 chandransh 9821
            _iter19.write(oprot);
483 rajveer 9822
          }
9823
          oprot.writeListEnd();
9824
        }
68 ashish 9825
        oprot.writeFieldEnd();
9826
      } else if (this.isSetEx()) {
9827
        oprot.writeFieldBegin(EX_FIELD_DESC);
9828
        this.ex.write(oprot);
9829
        oprot.writeFieldEnd();
9830
      }
9831
      oprot.writeFieldStop();
9832
      oprot.writeStructEnd();
9833
    }
9834
 
9835
    @Override
9836
    public String toString() {
483 rajveer 9837
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 9838
      boolean first = true;
9839
 
9840
      sb.append("success:");
9841
      if (this.success == null) {
9842
        sb.append("null");
9843
      } else {
9844
        sb.append(this.success);
9845
      }
9846
      first = false;
9847
      if (!first) sb.append(", ");
9848
      sb.append("ex:");
9849
      if (this.ex == null) {
9850
        sb.append("null");
9851
      } else {
9852
        sb.append(this.ex);
9853
      }
9854
      first = false;
9855
      sb.append(")");
9856
      return sb.toString();
9857
    }
9858
 
9859
    public void validate() throws TException {
9860
      // check for required fields
9861
    }
9862
 
9863
  }
9864
 
1022 varun.gupt 9865
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
9866
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
9867
 
9868
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
9869
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
9870
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
9871
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
9872
 
9873
    private OrderStatus status;
9874
    private long start_billing_date;
9875
    private long end_billing_date;
9876
    private long warehouse_id;
9877
 
9878
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9879
    public enum _Fields implements TFieldIdEnum {
9880
      /**
9881
       * 
9882
       * @see OrderStatus
9883
       */
9884
      STATUS((short)1, "status"),
9885
      START_BILLING_DATE((short)2, "start_billing_date"),
9886
      END_BILLING_DATE((short)3, "end_billing_date"),
9887
      WAREHOUSE_ID((short)4, "warehouse_id");
9888
 
9889
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9890
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9891
 
9892
      static {
9893
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9894
          byId.put((int)field._thriftId, field);
9895
          byName.put(field.getFieldName(), field);
9896
        }
9897
      }
9898
 
9899
      /**
9900
       * Find the _Fields constant that matches fieldId, or null if its not found.
9901
       */
9902
      public static _Fields findByThriftId(int fieldId) {
9903
        return byId.get(fieldId);
9904
      }
9905
 
9906
      /**
9907
       * Find the _Fields constant that matches fieldId, throwing an exception
9908
       * if it is not found.
9909
       */
9910
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9911
        _Fields fields = findByThriftId(fieldId);
9912
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9913
        return fields;
9914
      }
9915
 
9916
      /**
9917
       * Find the _Fields constant that matches name, or null if its not found.
9918
       */
9919
      public static _Fields findByName(String name) {
9920
        return byName.get(name);
9921
      }
9922
 
9923
      private final short _thriftId;
9924
      private final String _fieldName;
9925
 
9926
      _Fields(short thriftId, String fieldName) {
9927
        _thriftId = thriftId;
9928
        _fieldName = fieldName;
9929
      }
9930
 
9931
      public short getThriftFieldId() {
9932
        return _thriftId;
9933
      }
9934
 
9935
      public String getFieldName() {
9936
        return _fieldName;
9937
      }
9938
    }
9939
 
9940
    // isset id assignments
9941
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
9942
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
9943
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
9944
    private BitSet __isset_bit_vector = new BitSet(3);
9945
 
9946
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9947
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
9948
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
9949
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
9950
          new FieldValueMetaData(TType.I64)));
9951
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
9952
          new FieldValueMetaData(TType.I64)));
9953
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
9954
          new FieldValueMetaData(TType.I64)));
9955
    }});
9956
 
9957
    static {
9958
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
9959
    }
9960
 
9961
    public getOrdersByBillingDate_args() {
9962
    }
9963
 
9964
    public getOrdersByBillingDate_args(
9965
      OrderStatus status,
9966
      long start_billing_date,
9967
      long end_billing_date,
9968
      long warehouse_id)
9969
    {
9970
      this();
9971
      this.status = status;
9972
      this.start_billing_date = start_billing_date;
9973
      setStart_billing_dateIsSet(true);
9974
      this.end_billing_date = end_billing_date;
9975
      setEnd_billing_dateIsSet(true);
9976
      this.warehouse_id = warehouse_id;
9977
      setWarehouse_idIsSet(true);
9978
    }
9979
 
9980
    /**
9981
     * Performs a deep copy on <i>other</i>.
9982
     */
9983
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
9984
      __isset_bit_vector.clear();
9985
      __isset_bit_vector.or(other.__isset_bit_vector);
9986
      if (other.isSetStatus()) {
9987
        this.status = other.status;
9988
      }
9989
      this.start_billing_date = other.start_billing_date;
9990
      this.end_billing_date = other.end_billing_date;
9991
      this.warehouse_id = other.warehouse_id;
9992
    }
9993
 
9994
    public getOrdersByBillingDate_args deepCopy() {
9995
      return new getOrdersByBillingDate_args(this);
9996
    }
9997
 
9998
    @Deprecated
9999
    public getOrdersByBillingDate_args clone() {
10000
      return new getOrdersByBillingDate_args(this);
10001
    }
10002
 
10003
    /**
10004
     * 
10005
     * @see OrderStatus
10006
     */
10007
    public OrderStatus getStatus() {
10008
      return this.status;
10009
    }
10010
 
10011
    /**
10012
     * 
10013
     * @see OrderStatus
10014
     */
10015
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
10016
      this.status = status;
10017
      return this;
10018
    }
10019
 
10020
    public void unsetStatus() {
10021
      this.status = null;
10022
    }
10023
 
10024
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
10025
    public boolean isSetStatus() {
10026
      return this.status != null;
10027
    }
10028
 
10029
    public void setStatusIsSet(boolean value) {
10030
      if (!value) {
10031
        this.status = null;
10032
      }
10033
    }
10034
 
10035
    public long getStart_billing_date() {
10036
      return this.start_billing_date;
10037
    }
10038
 
10039
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
10040
      this.start_billing_date = start_billing_date;
10041
      setStart_billing_dateIsSet(true);
10042
      return this;
10043
    }
10044
 
10045
    public void unsetStart_billing_date() {
10046
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
10047
    }
10048
 
10049
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
10050
    public boolean isSetStart_billing_date() {
10051
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
10052
    }
10053
 
10054
    public void setStart_billing_dateIsSet(boolean value) {
10055
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
10056
    }
10057
 
10058
    public long getEnd_billing_date() {
10059
      return this.end_billing_date;
10060
    }
10061
 
10062
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
10063
      this.end_billing_date = end_billing_date;
10064
      setEnd_billing_dateIsSet(true);
10065
      return this;
10066
    }
10067
 
10068
    public void unsetEnd_billing_date() {
10069
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
10070
    }
10071
 
10072
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
10073
    public boolean isSetEnd_billing_date() {
10074
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
10075
    }
10076
 
10077
    public void setEnd_billing_dateIsSet(boolean value) {
10078
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
10079
    }
10080
 
10081
    public long getWarehouse_id() {
10082
      return this.warehouse_id;
10083
    }
10084
 
10085
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
10086
      this.warehouse_id = warehouse_id;
10087
      setWarehouse_idIsSet(true);
10088
      return this;
10089
    }
10090
 
10091
    public void unsetWarehouse_id() {
10092
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
10093
    }
10094
 
10095
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
10096
    public boolean isSetWarehouse_id() {
10097
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
10098
    }
10099
 
10100
    public void setWarehouse_idIsSet(boolean value) {
10101
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
10102
    }
10103
 
10104
    public void setFieldValue(_Fields field, Object value) {
10105
      switch (field) {
10106
      case STATUS:
10107
        if (value == null) {
10108
          unsetStatus();
10109
        } else {
10110
          setStatus((OrderStatus)value);
10111
        }
10112
        break;
10113
 
10114
      case START_BILLING_DATE:
10115
        if (value == null) {
10116
          unsetStart_billing_date();
10117
        } else {
10118
          setStart_billing_date((Long)value);
10119
        }
10120
        break;
10121
 
10122
      case END_BILLING_DATE:
10123
        if (value == null) {
10124
          unsetEnd_billing_date();
10125
        } else {
10126
          setEnd_billing_date((Long)value);
10127
        }
10128
        break;
10129
 
10130
      case WAREHOUSE_ID:
10131
        if (value == null) {
10132
          unsetWarehouse_id();
10133
        } else {
10134
          setWarehouse_id((Long)value);
10135
        }
10136
        break;
10137
 
10138
      }
10139
    }
10140
 
10141
    public void setFieldValue(int fieldID, Object value) {
10142
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10143
    }
10144
 
10145
    public Object getFieldValue(_Fields field) {
10146
      switch (field) {
10147
      case STATUS:
10148
        return getStatus();
10149
 
10150
      case START_BILLING_DATE:
10151
        return new Long(getStart_billing_date());
10152
 
10153
      case END_BILLING_DATE:
10154
        return new Long(getEnd_billing_date());
10155
 
10156
      case WAREHOUSE_ID:
10157
        return new Long(getWarehouse_id());
10158
 
10159
      }
10160
      throw new IllegalStateException();
10161
    }
10162
 
10163
    public Object getFieldValue(int fieldId) {
10164
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10165
    }
10166
 
10167
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10168
    public boolean isSet(_Fields field) {
10169
      switch (field) {
10170
      case STATUS:
10171
        return isSetStatus();
10172
      case START_BILLING_DATE:
10173
        return isSetStart_billing_date();
10174
      case END_BILLING_DATE:
10175
        return isSetEnd_billing_date();
10176
      case WAREHOUSE_ID:
10177
        return isSetWarehouse_id();
10178
      }
10179
      throw new IllegalStateException();
10180
    }
10181
 
10182
    public boolean isSet(int fieldID) {
10183
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10184
    }
10185
 
10186
    @Override
10187
    public boolean equals(Object that) {
10188
      if (that == null)
10189
        return false;
10190
      if (that instanceof getOrdersByBillingDate_args)
10191
        return this.equals((getOrdersByBillingDate_args)that);
10192
      return false;
10193
    }
10194
 
10195
    public boolean equals(getOrdersByBillingDate_args that) {
10196
      if (that == null)
10197
        return false;
10198
 
10199
      boolean this_present_status = true && this.isSetStatus();
10200
      boolean that_present_status = true && that.isSetStatus();
10201
      if (this_present_status || that_present_status) {
10202
        if (!(this_present_status && that_present_status))
10203
          return false;
10204
        if (!this.status.equals(that.status))
10205
          return false;
10206
      }
10207
 
10208
      boolean this_present_start_billing_date = true;
10209
      boolean that_present_start_billing_date = true;
10210
      if (this_present_start_billing_date || that_present_start_billing_date) {
10211
        if (!(this_present_start_billing_date && that_present_start_billing_date))
10212
          return false;
10213
        if (this.start_billing_date != that.start_billing_date)
10214
          return false;
10215
      }
10216
 
10217
      boolean this_present_end_billing_date = true;
10218
      boolean that_present_end_billing_date = true;
10219
      if (this_present_end_billing_date || that_present_end_billing_date) {
10220
        if (!(this_present_end_billing_date && that_present_end_billing_date))
10221
          return false;
10222
        if (this.end_billing_date != that.end_billing_date)
10223
          return false;
10224
      }
10225
 
10226
      boolean this_present_warehouse_id = true;
10227
      boolean that_present_warehouse_id = true;
10228
      if (this_present_warehouse_id || that_present_warehouse_id) {
10229
        if (!(this_present_warehouse_id && that_present_warehouse_id))
10230
          return false;
10231
        if (this.warehouse_id != that.warehouse_id)
10232
          return false;
10233
      }
10234
 
10235
      return true;
10236
    }
10237
 
10238
    @Override
10239
    public int hashCode() {
10240
      return 0;
10241
    }
10242
 
10243
    public int compareTo(getOrdersByBillingDate_args other) {
10244
      if (!getClass().equals(other.getClass())) {
10245
        return getClass().getName().compareTo(other.getClass().getName());
10246
      }
10247
 
10248
      int lastComparison = 0;
10249
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
10250
 
10251
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
10252
      if (lastComparison != 0) {
10253
        return lastComparison;
10254
      }
10255
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
10256
      if (lastComparison != 0) {
10257
        return lastComparison;
10258
      }
10259
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
10260
      if (lastComparison != 0) {
10261
        return lastComparison;
10262
      }
10263
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
10264
      if (lastComparison != 0) {
10265
        return lastComparison;
10266
      }
10267
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
10268
      if (lastComparison != 0) {
10269
        return lastComparison;
10270
      }
10271
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
10272
      if (lastComparison != 0) {
10273
        return lastComparison;
10274
      }
10275
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
10276
      if (lastComparison != 0) {
10277
        return lastComparison;
10278
      }
10279
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
10280
      if (lastComparison != 0) {
10281
        return lastComparison;
10282
      }
10283
      return 0;
10284
    }
10285
 
10286
    public void read(TProtocol iprot) throws TException {
10287
      TField field;
10288
      iprot.readStructBegin();
10289
      while (true)
10290
      {
10291
        field = iprot.readFieldBegin();
10292
        if (field.type == TType.STOP) { 
10293
          break;
10294
        }
10295
        _Fields fieldId = _Fields.findByThriftId(field.id);
10296
        if (fieldId == null) {
10297
          TProtocolUtil.skip(iprot, field.type);
10298
        } else {
10299
          switch (fieldId) {
10300
            case STATUS:
10301
              if (field.type == TType.I32) {
10302
                this.status = OrderStatus.findByValue(iprot.readI32());
10303
              } else { 
10304
                TProtocolUtil.skip(iprot, field.type);
10305
              }
10306
              break;
10307
            case START_BILLING_DATE:
10308
              if (field.type == TType.I64) {
10309
                this.start_billing_date = iprot.readI64();
10310
                setStart_billing_dateIsSet(true);
10311
              } else { 
10312
                TProtocolUtil.skip(iprot, field.type);
10313
              }
10314
              break;
10315
            case END_BILLING_DATE:
10316
              if (field.type == TType.I64) {
10317
                this.end_billing_date = iprot.readI64();
10318
                setEnd_billing_dateIsSet(true);
10319
              } else { 
10320
                TProtocolUtil.skip(iprot, field.type);
10321
              }
10322
              break;
10323
            case WAREHOUSE_ID:
10324
              if (field.type == TType.I64) {
10325
                this.warehouse_id = iprot.readI64();
10326
                setWarehouse_idIsSet(true);
10327
              } else { 
10328
                TProtocolUtil.skip(iprot, field.type);
10329
              }
10330
              break;
10331
          }
10332
          iprot.readFieldEnd();
10333
        }
10334
      }
10335
      iprot.readStructEnd();
10336
      validate();
10337
    }
10338
 
10339
    public void write(TProtocol oprot) throws TException {
10340
      validate();
10341
 
10342
      oprot.writeStructBegin(STRUCT_DESC);
10343
      if (this.status != null) {
10344
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
10345
        oprot.writeI32(this.status.getValue());
10346
        oprot.writeFieldEnd();
10347
      }
10348
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
10349
      oprot.writeI64(this.start_billing_date);
10350
      oprot.writeFieldEnd();
10351
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
10352
      oprot.writeI64(this.end_billing_date);
10353
      oprot.writeFieldEnd();
10354
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
10355
      oprot.writeI64(this.warehouse_id);
10356
      oprot.writeFieldEnd();
10357
      oprot.writeFieldStop();
10358
      oprot.writeStructEnd();
10359
    }
10360
 
10361
    @Override
10362
    public String toString() {
10363
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
10364
      boolean first = true;
10365
 
10366
      sb.append("status:");
10367
      if (this.status == null) {
10368
        sb.append("null");
10369
      } else {
10370
        String status_name = status.name();
10371
        if (status_name != null) {
10372
          sb.append(status_name);
10373
          sb.append(" (");
10374
        }
10375
        sb.append(this.status);
10376
        if (status_name != null) {
10377
          sb.append(")");
10378
        }
10379
      }
10380
      first = false;
10381
      if (!first) sb.append(", ");
10382
      sb.append("start_billing_date:");
10383
      sb.append(this.start_billing_date);
10384
      first = false;
10385
      if (!first) sb.append(", ");
10386
      sb.append("end_billing_date:");
10387
      sb.append(this.end_billing_date);
10388
      first = false;
10389
      if (!first) sb.append(", ");
10390
      sb.append("warehouse_id:");
10391
      sb.append(this.warehouse_id);
10392
      first = false;
10393
      sb.append(")");
10394
      return sb.toString();
10395
    }
10396
 
10397
    public void validate() throws TException {
10398
      // check for required fields
10399
    }
10400
 
10401
  }
10402
 
10403
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
10404
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
10405
 
10406
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10407
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10408
 
10409
    private List<Order> success;
10410
    private TransactionServiceException ex;
10411
 
10412
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10413
    public enum _Fields implements TFieldIdEnum {
10414
      SUCCESS((short)0, "success"),
10415
      EX((short)1, "ex");
10416
 
10417
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10418
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10419
 
10420
      static {
10421
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10422
          byId.put((int)field._thriftId, field);
10423
          byName.put(field.getFieldName(), field);
10424
        }
10425
      }
10426
 
10427
      /**
10428
       * Find the _Fields constant that matches fieldId, or null if its not found.
10429
       */
10430
      public static _Fields findByThriftId(int fieldId) {
10431
        return byId.get(fieldId);
10432
      }
10433
 
10434
      /**
10435
       * Find the _Fields constant that matches fieldId, throwing an exception
10436
       * if it is not found.
10437
       */
10438
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10439
        _Fields fields = findByThriftId(fieldId);
10440
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10441
        return fields;
10442
      }
10443
 
10444
      /**
10445
       * Find the _Fields constant that matches name, or null if its not found.
10446
       */
10447
      public static _Fields findByName(String name) {
10448
        return byName.get(name);
10449
      }
10450
 
10451
      private final short _thriftId;
10452
      private final String _fieldName;
10453
 
10454
      _Fields(short thriftId, String fieldName) {
10455
        _thriftId = thriftId;
10456
        _fieldName = fieldName;
10457
      }
10458
 
10459
      public short getThriftFieldId() {
10460
        return _thriftId;
10461
      }
10462
 
10463
      public String getFieldName() {
10464
        return _fieldName;
10465
      }
10466
    }
10467
 
10468
    // isset id assignments
10469
 
10470
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10471
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10472
          new ListMetaData(TType.LIST, 
10473
              new StructMetaData(TType.STRUCT, Order.class))));
10474
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10475
          new FieldValueMetaData(TType.STRUCT)));
10476
    }});
10477
 
10478
    static {
10479
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
10480
    }
10481
 
10482
    public getOrdersByBillingDate_result() {
10483
    }
10484
 
10485
    public getOrdersByBillingDate_result(
10486
      List<Order> success,
10487
      TransactionServiceException ex)
10488
    {
10489
      this();
10490
      this.success = success;
10491
      this.ex = ex;
10492
    }
10493
 
10494
    /**
10495
     * Performs a deep copy on <i>other</i>.
10496
     */
10497
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
10498
      if (other.isSetSuccess()) {
10499
        List<Order> __this__success = new ArrayList<Order>();
10500
        for (Order other_element : other.success) {
10501
          __this__success.add(new Order(other_element));
10502
        }
10503
        this.success = __this__success;
10504
      }
10505
      if (other.isSetEx()) {
10506
        this.ex = new TransactionServiceException(other.ex);
10507
      }
10508
    }
10509
 
10510
    public getOrdersByBillingDate_result deepCopy() {
10511
      return new getOrdersByBillingDate_result(this);
10512
    }
10513
 
10514
    @Deprecated
10515
    public getOrdersByBillingDate_result clone() {
10516
      return new getOrdersByBillingDate_result(this);
10517
    }
10518
 
10519
    public int getSuccessSize() {
10520
      return (this.success == null) ? 0 : this.success.size();
10521
    }
10522
 
10523
    public java.util.Iterator<Order> getSuccessIterator() {
10524
      return (this.success == null) ? null : this.success.iterator();
10525
    }
10526
 
10527
    public void addToSuccess(Order elem) {
10528
      if (this.success == null) {
10529
        this.success = new ArrayList<Order>();
10530
      }
10531
      this.success.add(elem);
10532
    }
10533
 
10534
    public List<Order> getSuccess() {
10535
      return this.success;
10536
    }
10537
 
10538
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
10539
      this.success = success;
10540
      return this;
10541
    }
10542
 
10543
    public void unsetSuccess() {
10544
      this.success = null;
10545
    }
10546
 
10547
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10548
    public boolean isSetSuccess() {
10549
      return this.success != null;
10550
    }
10551
 
10552
    public void setSuccessIsSet(boolean value) {
10553
      if (!value) {
10554
        this.success = null;
10555
      }
10556
    }
10557
 
10558
    public TransactionServiceException getEx() {
10559
      return this.ex;
10560
    }
10561
 
10562
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
10563
      this.ex = ex;
10564
      return this;
10565
    }
10566
 
10567
    public void unsetEx() {
10568
      this.ex = null;
10569
    }
10570
 
10571
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10572
    public boolean isSetEx() {
10573
      return this.ex != null;
10574
    }
10575
 
10576
    public void setExIsSet(boolean value) {
10577
      if (!value) {
10578
        this.ex = null;
10579
      }
10580
    }
10581
 
10582
    public void setFieldValue(_Fields field, Object value) {
10583
      switch (field) {
10584
      case SUCCESS:
10585
        if (value == null) {
10586
          unsetSuccess();
10587
        } else {
10588
          setSuccess((List<Order>)value);
10589
        }
10590
        break;
10591
 
10592
      case EX:
10593
        if (value == null) {
10594
          unsetEx();
10595
        } else {
10596
          setEx((TransactionServiceException)value);
10597
        }
10598
        break;
10599
 
10600
      }
10601
    }
10602
 
10603
    public void setFieldValue(int fieldID, Object value) {
10604
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10605
    }
10606
 
10607
    public Object getFieldValue(_Fields field) {
10608
      switch (field) {
10609
      case SUCCESS:
10610
        return getSuccess();
10611
 
10612
      case EX:
10613
        return getEx();
10614
 
10615
      }
10616
      throw new IllegalStateException();
10617
    }
10618
 
10619
    public Object getFieldValue(int fieldId) {
10620
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10621
    }
10622
 
10623
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10624
    public boolean isSet(_Fields field) {
10625
      switch (field) {
10626
      case SUCCESS:
10627
        return isSetSuccess();
10628
      case EX:
10629
        return isSetEx();
10630
      }
10631
      throw new IllegalStateException();
10632
    }
10633
 
10634
    public boolean isSet(int fieldID) {
10635
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10636
    }
10637
 
10638
    @Override
10639
    public boolean equals(Object that) {
10640
      if (that == null)
10641
        return false;
10642
      if (that instanceof getOrdersByBillingDate_result)
10643
        return this.equals((getOrdersByBillingDate_result)that);
10644
      return false;
10645
    }
10646
 
10647
    public boolean equals(getOrdersByBillingDate_result that) {
10648
      if (that == null)
10649
        return false;
10650
 
10651
      boolean this_present_success = true && this.isSetSuccess();
10652
      boolean that_present_success = true && that.isSetSuccess();
10653
      if (this_present_success || that_present_success) {
10654
        if (!(this_present_success && that_present_success))
10655
          return false;
10656
        if (!this.success.equals(that.success))
10657
          return false;
10658
      }
10659
 
10660
      boolean this_present_ex = true && this.isSetEx();
10661
      boolean that_present_ex = true && that.isSetEx();
10662
      if (this_present_ex || that_present_ex) {
10663
        if (!(this_present_ex && that_present_ex))
10664
          return false;
10665
        if (!this.ex.equals(that.ex))
10666
          return false;
10667
      }
10668
 
10669
      return true;
10670
    }
10671
 
10672
    @Override
10673
    public int hashCode() {
10674
      return 0;
10675
    }
10676
 
10677
    public int compareTo(getOrdersByBillingDate_result other) {
10678
      if (!getClass().equals(other.getClass())) {
10679
        return getClass().getName().compareTo(other.getClass().getName());
10680
      }
10681
 
10682
      int lastComparison = 0;
10683
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
10684
 
10685
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10686
      if (lastComparison != 0) {
10687
        return lastComparison;
10688
      }
10689
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10690
      if (lastComparison != 0) {
10691
        return lastComparison;
10692
      }
10693
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10694
      if (lastComparison != 0) {
10695
        return lastComparison;
10696
      }
10697
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10698
      if (lastComparison != 0) {
10699
        return lastComparison;
10700
      }
10701
      return 0;
10702
    }
10703
 
10704
    public void read(TProtocol iprot) throws TException {
10705
      TField field;
10706
      iprot.readStructBegin();
10707
      while (true)
10708
      {
10709
        field = iprot.readFieldBegin();
10710
        if (field.type == TType.STOP) { 
10711
          break;
10712
        }
10713
        _Fields fieldId = _Fields.findByThriftId(field.id);
10714
        if (fieldId == null) {
10715
          TProtocolUtil.skip(iprot, field.type);
10716
        } else {
10717
          switch (fieldId) {
10718
            case SUCCESS:
10719
              if (field.type == TType.LIST) {
10720
                {
10721
                  TList _list20 = iprot.readListBegin();
10722
                  this.success = new ArrayList<Order>(_list20.size);
10723
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
10724
                  {
10725
                    Order _elem22;
10726
                    _elem22 = new Order();
10727
                    _elem22.read(iprot);
10728
                    this.success.add(_elem22);
10729
                  }
10730
                  iprot.readListEnd();
10731
                }
10732
              } else { 
10733
                TProtocolUtil.skip(iprot, field.type);
10734
              }
10735
              break;
10736
            case EX:
10737
              if (field.type == TType.STRUCT) {
10738
                this.ex = new TransactionServiceException();
10739
                this.ex.read(iprot);
10740
              } else { 
10741
                TProtocolUtil.skip(iprot, field.type);
10742
              }
10743
              break;
10744
          }
10745
          iprot.readFieldEnd();
10746
        }
10747
      }
10748
      iprot.readStructEnd();
10749
      validate();
10750
    }
10751
 
10752
    public void write(TProtocol oprot) throws TException {
10753
      oprot.writeStructBegin(STRUCT_DESC);
10754
 
10755
      if (this.isSetSuccess()) {
10756
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10757
        {
10758
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
10759
          for (Order _iter23 : this.success)
10760
          {
10761
            _iter23.write(oprot);
10762
          }
10763
          oprot.writeListEnd();
10764
        }
10765
        oprot.writeFieldEnd();
10766
      } else if (this.isSetEx()) {
10767
        oprot.writeFieldBegin(EX_FIELD_DESC);
10768
        this.ex.write(oprot);
10769
        oprot.writeFieldEnd();
10770
      }
10771
      oprot.writeFieldStop();
10772
      oprot.writeStructEnd();
10773
    }
10774
 
10775
    @Override
10776
    public String toString() {
10777
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
10778
      boolean first = true;
10779
 
10780
      sb.append("success:");
10781
      if (this.success == null) {
10782
        sb.append("null");
10783
      } else {
10784
        sb.append(this.success);
10785
      }
10786
      first = false;
10787
      if (!first) sb.append(", ");
10788
      sb.append("ex:");
10789
      if (this.ex == null) {
10790
        sb.append("null");
10791
      } else {
10792
        sb.append(this.ex);
10793
      }
10794
      first = false;
10795
      sb.append(")");
10796
      return sb.toString();
10797
    }
10798
 
10799
    public void validate() throws TException {
10800
      // check for required fields
10801
    }
10802
 
10803
  }
10804
 
1382 varun.gupt 10805
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
10806
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
10807
 
10808
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10809
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10810
 
10811
    private long customer_id;
10812
    private long limit;
10813
 
10814
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10815
    public enum _Fields implements TFieldIdEnum {
10816
      CUSTOMER_ID((short)1, "customer_id"),
10817
      LIMIT((short)2, "limit");
10818
 
10819
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10820
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10821
 
10822
      static {
10823
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10824
          byId.put((int)field._thriftId, field);
10825
          byName.put(field.getFieldName(), field);
10826
        }
10827
      }
10828
 
10829
      /**
10830
       * Find the _Fields constant that matches fieldId, or null if its not found.
10831
       */
10832
      public static _Fields findByThriftId(int fieldId) {
10833
        return byId.get(fieldId);
10834
      }
10835
 
10836
      /**
10837
       * Find the _Fields constant that matches fieldId, throwing an exception
10838
       * if it is not found.
10839
       */
10840
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10841
        _Fields fields = findByThriftId(fieldId);
10842
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10843
        return fields;
10844
      }
10845
 
10846
      /**
10847
       * Find the _Fields constant that matches name, or null if its not found.
10848
       */
10849
      public static _Fields findByName(String name) {
10850
        return byName.get(name);
10851
      }
10852
 
10853
      private final short _thriftId;
10854
      private final String _fieldName;
10855
 
10856
      _Fields(short thriftId, String fieldName) {
10857
        _thriftId = thriftId;
10858
        _fieldName = fieldName;
10859
      }
10860
 
10861
      public short getThriftFieldId() {
10862
        return _thriftId;
10863
      }
10864
 
10865
      public String getFieldName() {
10866
        return _fieldName;
10867
      }
10868
    }
10869
 
10870
    // isset id assignments
10871
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10872
    private static final int __LIMIT_ISSET_ID = 1;
10873
    private BitSet __isset_bit_vector = new BitSet(2);
10874
 
10875
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10876
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10877
          new FieldValueMetaData(TType.I64)));
10878
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10879
          new FieldValueMetaData(TType.I64)));
10880
    }});
10881
 
10882
    static {
10883
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
10884
    }
10885
 
10886
    public getReturnableOrdersForCustomer_args() {
10887
    }
10888
 
10889
    public getReturnableOrdersForCustomer_args(
10890
      long customer_id,
10891
      long limit)
10892
    {
10893
      this();
10894
      this.customer_id = customer_id;
10895
      setCustomer_idIsSet(true);
10896
      this.limit = limit;
10897
      setLimitIsSet(true);
10898
    }
10899
 
10900
    /**
10901
     * Performs a deep copy on <i>other</i>.
10902
     */
10903
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
10904
      __isset_bit_vector.clear();
10905
      __isset_bit_vector.or(other.__isset_bit_vector);
10906
      this.customer_id = other.customer_id;
10907
      this.limit = other.limit;
10908
    }
10909
 
10910
    public getReturnableOrdersForCustomer_args deepCopy() {
10911
      return new getReturnableOrdersForCustomer_args(this);
10912
    }
10913
 
10914
    @Deprecated
10915
    public getReturnableOrdersForCustomer_args clone() {
10916
      return new getReturnableOrdersForCustomer_args(this);
10917
    }
10918
 
10919
    public long getCustomer_id() {
10920
      return this.customer_id;
10921
    }
10922
 
10923
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
10924
      this.customer_id = customer_id;
10925
      setCustomer_idIsSet(true);
10926
      return this;
10927
    }
10928
 
10929
    public void unsetCustomer_id() {
10930
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10931
    }
10932
 
10933
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10934
    public boolean isSetCustomer_id() {
10935
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10936
    }
10937
 
10938
    public void setCustomer_idIsSet(boolean value) {
10939
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10940
    }
10941
 
10942
    public long getLimit() {
10943
      return this.limit;
10944
    }
10945
 
10946
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
10947
      this.limit = limit;
10948
      setLimitIsSet(true);
10949
      return this;
10950
    }
10951
 
10952
    public void unsetLimit() {
10953
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10954
    }
10955
 
10956
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10957
    public boolean isSetLimit() {
10958
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10959
    }
10960
 
10961
    public void setLimitIsSet(boolean value) {
10962
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10963
    }
10964
 
10965
    public void setFieldValue(_Fields field, Object value) {
10966
      switch (field) {
10967
      case CUSTOMER_ID:
10968
        if (value == null) {
10969
          unsetCustomer_id();
10970
        } else {
10971
          setCustomer_id((Long)value);
10972
        }
10973
        break;
10974
 
10975
      case LIMIT:
10976
        if (value == null) {
10977
          unsetLimit();
10978
        } else {
10979
          setLimit((Long)value);
10980
        }
10981
        break;
10982
 
10983
      }
10984
    }
10985
 
10986
    public void setFieldValue(int fieldID, Object value) {
10987
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10988
    }
10989
 
10990
    public Object getFieldValue(_Fields field) {
10991
      switch (field) {
10992
      case CUSTOMER_ID:
10993
        return new Long(getCustomer_id());
10994
 
10995
      case LIMIT:
10996
        return new Long(getLimit());
10997
 
10998
      }
10999
      throw new IllegalStateException();
11000
    }
11001
 
11002
    public Object getFieldValue(int fieldId) {
11003
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11004
    }
11005
 
11006
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11007
    public boolean isSet(_Fields field) {
11008
      switch (field) {
11009
      case CUSTOMER_ID:
11010
        return isSetCustomer_id();
11011
      case LIMIT:
11012
        return isSetLimit();
11013
      }
11014
      throw new IllegalStateException();
11015
    }
11016
 
11017
    public boolean isSet(int fieldID) {
11018
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11019
    }
11020
 
11021
    @Override
11022
    public boolean equals(Object that) {
11023
      if (that == null)
11024
        return false;
11025
      if (that instanceof getReturnableOrdersForCustomer_args)
11026
        return this.equals((getReturnableOrdersForCustomer_args)that);
11027
      return false;
11028
    }
11029
 
11030
    public boolean equals(getReturnableOrdersForCustomer_args that) {
11031
      if (that == null)
11032
        return false;
11033
 
11034
      boolean this_present_customer_id = true;
11035
      boolean that_present_customer_id = true;
11036
      if (this_present_customer_id || that_present_customer_id) {
11037
        if (!(this_present_customer_id && that_present_customer_id))
11038
          return false;
11039
        if (this.customer_id != that.customer_id)
11040
          return false;
11041
      }
11042
 
11043
      boolean this_present_limit = true;
11044
      boolean that_present_limit = true;
11045
      if (this_present_limit || that_present_limit) {
11046
        if (!(this_present_limit && that_present_limit))
11047
          return false;
11048
        if (this.limit != that.limit)
11049
          return false;
11050
      }
11051
 
11052
      return true;
11053
    }
11054
 
11055
    @Override
11056
    public int hashCode() {
11057
      return 0;
11058
    }
11059
 
11060
    public int compareTo(getReturnableOrdersForCustomer_args other) {
11061
      if (!getClass().equals(other.getClass())) {
11062
        return getClass().getName().compareTo(other.getClass().getName());
11063
      }
11064
 
11065
      int lastComparison = 0;
11066
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
11067
 
11068
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
11069
      if (lastComparison != 0) {
11070
        return lastComparison;
11071
      }
11072
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
11073
      if (lastComparison != 0) {
11074
        return lastComparison;
11075
      }
11076
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
11077
      if (lastComparison != 0) {
11078
        return lastComparison;
11079
      }
11080
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
11081
      if (lastComparison != 0) {
11082
        return lastComparison;
11083
      }
11084
      return 0;
11085
    }
11086
 
11087
    public void read(TProtocol iprot) throws TException {
11088
      TField field;
11089
      iprot.readStructBegin();
11090
      while (true)
11091
      {
11092
        field = iprot.readFieldBegin();
11093
        if (field.type == TType.STOP) { 
11094
          break;
11095
        }
11096
        _Fields fieldId = _Fields.findByThriftId(field.id);
11097
        if (fieldId == null) {
11098
          TProtocolUtil.skip(iprot, field.type);
11099
        } else {
11100
          switch (fieldId) {
11101
            case CUSTOMER_ID:
11102
              if (field.type == TType.I64) {
11103
                this.customer_id = iprot.readI64();
11104
                setCustomer_idIsSet(true);
11105
              } else { 
11106
                TProtocolUtil.skip(iprot, field.type);
11107
              }
11108
              break;
11109
            case LIMIT:
11110
              if (field.type == TType.I64) {
11111
                this.limit = iprot.readI64();
11112
                setLimitIsSet(true);
11113
              } else { 
11114
                TProtocolUtil.skip(iprot, field.type);
11115
              }
11116
              break;
11117
          }
11118
          iprot.readFieldEnd();
11119
        }
11120
      }
11121
      iprot.readStructEnd();
11122
      validate();
11123
    }
11124
 
11125
    public void write(TProtocol oprot) throws TException {
11126
      validate();
11127
 
11128
      oprot.writeStructBegin(STRUCT_DESC);
11129
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
11130
      oprot.writeI64(this.customer_id);
11131
      oprot.writeFieldEnd();
11132
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
11133
      oprot.writeI64(this.limit);
11134
      oprot.writeFieldEnd();
11135
      oprot.writeFieldStop();
11136
      oprot.writeStructEnd();
11137
    }
11138
 
11139
    @Override
11140
    public String toString() {
11141
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
11142
      boolean first = true;
11143
 
11144
      sb.append("customer_id:");
11145
      sb.append(this.customer_id);
11146
      first = false;
11147
      if (!first) sb.append(", ");
11148
      sb.append("limit:");
11149
      sb.append(this.limit);
11150
      first = false;
11151
      sb.append(")");
11152
      return sb.toString();
11153
    }
11154
 
11155
    public void validate() throws TException {
11156
      // check for required fields
11157
    }
11158
 
11159
  }
11160
 
11161
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
11162
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
11163
 
11164
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11165
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11166
 
11167
    private List<Long> success;
11168
    private TransactionServiceException ex;
11169
 
11170
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11171
    public enum _Fields implements TFieldIdEnum {
11172
      SUCCESS((short)0, "success"),
11173
      EX((short)1, "ex");
11174
 
11175
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11176
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11177
 
11178
      static {
11179
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11180
          byId.put((int)field._thriftId, field);
11181
          byName.put(field.getFieldName(), field);
11182
        }
11183
      }
11184
 
11185
      /**
11186
       * Find the _Fields constant that matches fieldId, or null if its not found.
11187
       */
11188
      public static _Fields findByThriftId(int fieldId) {
11189
        return byId.get(fieldId);
11190
      }
11191
 
11192
      /**
11193
       * Find the _Fields constant that matches fieldId, throwing an exception
11194
       * if it is not found.
11195
       */
11196
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11197
        _Fields fields = findByThriftId(fieldId);
11198
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11199
        return fields;
11200
      }
11201
 
11202
      /**
11203
       * Find the _Fields constant that matches name, or null if its not found.
11204
       */
11205
      public static _Fields findByName(String name) {
11206
        return byName.get(name);
11207
      }
11208
 
11209
      private final short _thriftId;
11210
      private final String _fieldName;
11211
 
11212
      _Fields(short thriftId, String fieldName) {
11213
        _thriftId = thriftId;
11214
        _fieldName = fieldName;
11215
      }
11216
 
11217
      public short getThriftFieldId() {
11218
        return _thriftId;
11219
      }
11220
 
11221
      public String getFieldName() {
11222
        return _fieldName;
11223
      }
11224
    }
11225
 
11226
    // isset id assignments
11227
 
11228
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11229
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11230
          new ListMetaData(TType.LIST, 
11231
              new FieldValueMetaData(TType.I64))));
11232
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11233
          new FieldValueMetaData(TType.STRUCT)));
11234
    }});
11235
 
11236
    static {
11237
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
11238
    }
11239
 
11240
    public getReturnableOrdersForCustomer_result() {
11241
    }
11242
 
11243
    public getReturnableOrdersForCustomer_result(
11244
      List<Long> success,
11245
      TransactionServiceException ex)
11246
    {
11247
      this();
11248
      this.success = success;
11249
      this.ex = ex;
11250
    }
11251
 
11252
    /**
11253
     * Performs a deep copy on <i>other</i>.
11254
     */
11255
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
11256
      if (other.isSetSuccess()) {
11257
        List<Long> __this__success = new ArrayList<Long>();
11258
        for (Long other_element : other.success) {
11259
          __this__success.add(other_element);
11260
        }
11261
        this.success = __this__success;
11262
      }
11263
      if (other.isSetEx()) {
11264
        this.ex = new TransactionServiceException(other.ex);
11265
      }
11266
    }
11267
 
11268
    public getReturnableOrdersForCustomer_result deepCopy() {
11269
      return new getReturnableOrdersForCustomer_result(this);
11270
    }
11271
 
11272
    @Deprecated
11273
    public getReturnableOrdersForCustomer_result clone() {
11274
      return new getReturnableOrdersForCustomer_result(this);
11275
    }
11276
 
11277
    public int getSuccessSize() {
11278
      return (this.success == null) ? 0 : this.success.size();
11279
    }
11280
 
11281
    public java.util.Iterator<Long> getSuccessIterator() {
11282
      return (this.success == null) ? null : this.success.iterator();
11283
    }
11284
 
11285
    public void addToSuccess(long elem) {
11286
      if (this.success == null) {
11287
        this.success = new ArrayList<Long>();
11288
      }
11289
      this.success.add(elem);
11290
    }
11291
 
11292
    public List<Long> getSuccess() {
11293
      return this.success;
11294
    }
11295
 
11296
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
11297
      this.success = success;
11298
      return this;
11299
    }
11300
 
11301
    public void unsetSuccess() {
11302
      this.success = null;
11303
    }
11304
 
11305
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11306
    public boolean isSetSuccess() {
11307
      return this.success != null;
11308
    }
11309
 
11310
    public void setSuccessIsSet(boolean value) {
11311
      if (!value) {
11312
        this.success = null;
11313
      }
11314
    }
11315
 
11316
    public TransactionServiceException getEx() {
11317
      return this.ex;
11318
    }
11319
 
11320
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11321
      this.ex = ex;
11322
      return this;
11323
    }
11324
 
11325
    public void unsetEx() {
11326
      this.ex = null;
11327
    }
11328
 
11329
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11330
    public boolean isSetEx() {
11331
      return this.ex != null;
11332
    }
11333
 
11334
    public void setExIsSet(boolean value) {
11335
      if (!value) {
11336
        this.ex = null;
11337
      }
11338
    }
11339
 
11340
    public void setFieldValue(_Fields field, Object value) {
11341
      switch (field) {
11342
      case SUCCESS:
11343
        if (value == null) {
11344
          unsetSuccess();
11345
        } else {
11346
          setSuccess((List<Long>)value);
11347
        }
11348
        break;
11349
 
11350
      case EX:
11351
        if (value == null) {
11352
          unsetEx();
11353
        } else {
11354
          setEx((TransactionServiceException)value);
11355
        }
11356
        break;
11357
 
11358
      }
11359
    }
11360
 
11361
    public void setFieldValue(int fieldID, Object value) {
11362
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11363
    }
11364
 
11365
    public Object getFieldValue(_Fields field) {
11366
      switch (field) {
11367
      case SUCCESS:
11368
        return getSuccess();
11369
 
11370
      case EX:
11371
        return getEx();
11372
 
11373
      }
11374
      throw new IllegalStateException();
11375
    }
11376
 
11377
    public Object getFieldValue(int fieldId) {
11378
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11379
    }
11380
 
11381
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11382
    public boolean isSet(_Fields field) {
11383
      switch (field) {
11384
      case SUCCESS:
11385
        return isSetSuccess();
11386
      case EX:
11387
        return isSetEx();
11388
      }
11389
      throw new IllegalStateException();
11390
    }
11391
 
11392
    public boolean isSet(int fieldID) {
11393
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11394
    }
11395
 
11396
    @Override
11397
    public boolean equals(Object that) {
11398
      if (that == null)
11399
        return false;
11400
      if (that instanceof getReturnableOrdersForCustomer_result)
11401
        return this.equals((getReturnableOrdersForCustomer_result)that);
11402
      return false;
11403
    }
11404
 
11405
    public boolean equals(getReturnableOrdersForCustomer_result that) {
11406
      if (that == null)
11407
        return false;
11408
 
11409
      boolean this_present_success = true && this.isSetSuccess();
11410
      boolean that_present_success = true && that.isSetSuccess();
11411
      if (this_present_success || that_present_success) {
11412
        if (!(this_present_success && that_present_success))
11413
          return false;
11414
        if (!this.success.equals(that.success))
11415
          return false;
11416
      }
11417
 
11418
      boolean this_present_ex = true && this.isSetEx();
11419
      boolean that_present_ex = true && that.isSetEx();
11420
      if (this_present_ex || that_present_ex) {
11421
        if (!(this_present_ex && that_present_ex))
11422
          return false;
11423
        if (!this.ex.equals(that.ex))
11424
          return false;
11425
      }
11426
 
11427
      return true;
11428
    }
11429
 
11430
    @Override
11431
    public int hashCode() {
11432
      return 0;
11433
    }
11434
 
11435
    public int compareTo(getReturnableOrdersForCustomer_result other) {
11436
      if (!getClass().equals(other.getClass())) {
11437
        return getClass().getName().compareTo(other.getClass().getName());
11438
      }
11439
 
11440
      int lastComparison = 0;
11441
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
11442
 
11443
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11444
      if (lastComparison != 0) {
11445
        return lastComparison;
11446
      }
11447
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11448
      if (lastComparison != 0) {
11449
        return lastComparison;
11450
      }
11451
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11452
      if (lastComparison != 0) {
11453
        return lastComparison;
11454
      }
11455
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11456
      if (lastComparison != 0) {
11457
        return lastComparison;
11458
      }
11459
      return 0;
11460
    }
11461
 
11462
    public void read(TProtocol iprot) throws TException {
11463
      TField field;
11464
      iprot.readStructBegin();
11465
      while (true)
11466
      {
11467
        field = iprot.readFieldBegin();
11468
        if (field.type == TType.STOP) { 
11469
          break;
11470
        }
11471
        _Fields fieldId = _Fields.findByThriftId(field.id);
11472
        if (fieldId == null) {
11473
          TProtocolUtil.skip(iprot, field.type);
11474
        } else {
11475
          switch (fieldId) {
11476
            case SUCCESS:
11477
              if (field.type == TType.LIST) {
11478
                {
11479
                  TList _list24 = iprot.readListBegin();
11480
                  this.success = new ArrayList<Long>(_list24.size);
11481
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
11482
                  {
11483
                    long _elem26;
11484
                    _elem26 = iprot.readI64();
11485
                    this.success.add(_elem26);
11486
                  }
11487
                  iprot.readListEnd();
11488
                }
11489
              } else { 
11490
                TProtocolUtil.skip(iprot, field.type);
11491
              }
11492
              break;
11493
            case EX:
11494
              if (field.type == TType.STRUCT) {
11495
                this.ex = new TransactionServiceException();
11496
                this.ex.read(iprot);
11497
              } else { 
11498
                TProtocolUtil.skip(iprot, field.type);
11499
              }
11500
              break;
11501
          }
11502
          iprot.readFieldEnd();
11503
        }
11504
      }
11505
      iprot.readStructEnd();
11506
      validate();
11507
    }
11508
 
11509
    public void write(TProtocol oprot) throws TException {
11510
      oprot.writeStructBegin(STRUCT_DESC);
11511
 
11512
      if (this.isSetSuccess()) {
11513
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11514
        {
11515
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11516
          for (long _iter27 : this.success)
11517
          {
11518
            oprot.writeI64(_iter27);
11519
          }
11520
          oprot.writeListEnd();
11521
        }
11522
        oprot.writeFieldEnd();
11523
      } else if (this.isSetEx()) {
11524
        oprot.writeFieldBegin(EX_FIELD_DESC);
11525
        this.ex.write(oprot);
11526
        oprot.writeFieldEnd();
11527
      }
11528
      oprot.writeFieldStop();
11529
      oprot.writeStructEnd();
11530
    }
11531
 
11532
    @Override
11533
    public String toString() {
11534
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
11535
      boolean first = true;
11536
 
11537
      sb.append("success:");
11538
      if (this.success == null) {
11539
        sb.append("null");
11540
      } else {
11541
        sb.append(this.success);
11542
      }
11543
      first = false;
11544
      if (!first) sb.append(", ");
11545
      sb.append("ex:");
11546
      if (this.ex == null) {
11547
        sb.append("null");
11548
      } else {
11549
        sb.append(this.ex);
11550
      }
11551
      first = false;
11552
      sb.append(")");
11553
      return sb.toString();
11554
    }
11555
 
11556
    public void validate() throws TException {
11557
      // check for required fields
11558
    }
11559
 
11560
  }
11561
 
11562
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
11563
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
11564
 
11565
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
11566
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
11567
 
11568
    private long customer_id;
11569
    private long limit;
11570
 
11571
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11572
    public enum _Fields implements TFieldIdEnum {
11573
      CUSTOMER_ID((short)1, "customer_id"),
11574
      LIMIT((short)2, "limit");
11575
 
11576
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11577
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11578
 
11579
      static {
11580
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11581
          byId.put((int)field._thriftId, field);
11582
          byName.put(field.getFieldName(), field);
11583
        }
11584
      }
11585
 
11586
      /**
11587
       * Find the _Fields constant that matches fieldId, or null if its not found.
11588
       */
11589
      public static _Fields findByThriftId(int fieldId) {
11590
        return byId.get(fieldId);
11591
      }
11592
 
11593
      /**
11594
       * Find the _Fields constant that matches fieldId, throwing an exception
11595
       * if it is not found.
11596
       */
11597
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11598
        _Fields fields = findByThriftId(fieldId);
11599
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11600
        return fields;
11601
      }
11602
 
11603
      /**
11604
       * Find the _Fields constant that matches name, or null if its not found.
11605
       */
11606
      public static _Fields findByName(String name) {
11607
        return byName.get(name);
11608
      }
11609
 
11610
      private final short _thriftId;
11611
      private final String _fieldName;
11612
 
11613
      _Fields(short thriftId, String fieldName) {
11614
        _thriftId = thriftId;
11615
        _fieldName = fieldName;
11616
      }
11617
 
11618
      public short getThriftFieldId() {
11619
        return _thriftId;
11620
      }
11621
 
11622
      public String getFieldName() {
11623
        return _fieldName;
11624
      }
11625
    }
11626
 
11627
    // isset id assignments
11628
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
11629
    private static final int __LIMIT_ISSET_ID = 1;
11630
    private BitSet __isset_bit_vector = new BitSet(2);
11631
 
11632
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11633
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
11634
          new FieldValueMetaData(TType.I64)));
11635
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
11636
          new FieldValueMetaData(TType.I64)));
11637
    }});
11638
 
11639
    static {
11640
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
11641
    }
11642
 
11643
    public getCancellableOrdersForCustomer_args() {
11644
    }
11645
 
11646
    public getCancellableOrdersForCustomer_args(
11647
      long customer_id,
11648
      long limit)
11649
    {
11650
      this();
11651
      this.customer_id = customer_id;
11652
      setCustomer_idIsSet(true);
11653
      this.limit = limit;
11654
      setLimitIsSet(true);
11655
    }
11656
 
11657
    /**
11658
     * Performs a deep copy on <i>other</i>.
11659
     */
11660
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
11661
      __isset_bit_vector.clear();
11662
      __isset_bit_vector.or(other.__isset_bit_vector);
11663
      this.customer_id = other.customer_id;
11664
      this.limit = other.limit;
11665
    }
11666
 
11667
    public getCancellableOrdersForCustomer_args deepCopy() {
11668
      return new getCancellableOrdersForCustomer_args(this);
11669
    }
11670
 
11671
    @Deprecated
11672
    public getCancellableOrdersForCustomer_args clone() {
11673
      return new getCancellableOrdersForCustomer_args(this);
11674
    }
11675
 
11676
    public long getCustomer_id() {
11677
      return this.customer_id;
11678
    }
11679
 
11680
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
11681
      this.customer_id = customer_id;
11682
      setCustomer_idIsSet(true);
11683
      return this;
11684
    }
11685
 
11686
    public void unsetCustomer_id() {
11687
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
11688
    }
11689
 
11690
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
11691
    public boolean isSetCustomer_id() {
11692
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
11693
    }
11694
 
11695
    public void setCustomer_idIsSet(boolean value) {
11696
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
11697
    }
11698
 
11699
    public long getLimit() {
11700
      return this.limit;
11701
    }
11702
 
11703
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
11704
      this.limit = limit;
11705
      setLimitIsSet(true);
11706
      return this;
11707
    }
11708
 
11709
    public void unsetLimit() {
11710
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
11711
    }
11712
 
11713
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
11714
    public boolean isSetLimit() {
11715
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
11716
    }
11717
 
11718
    public void setLimitIsSet(boolean value) {
11719
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
11720
    }
11721
 
11722
    public void setFieldValue(_Fields field, Object value) {
11723
      switch (field) {
11724
      case CUSTOMER_ID:
11725
        if (value == null) {
11726
          unsetCustomer_id();
11727
        } else {
11728
          setCustomer_id((Long)value);
11729
        }
11730
        break;
11731
 
11732
      case LIMIT:
11733
        if (value == null) {
11734
          unsetLimit();
11735
        } else {
11736
          setLimit((Long)value);
11737
        }
11738
        break;
11739
 
11740
      }
11741
    }
11742
 
11743
    public void setFieldValue(int fieldID, Object value) {
11744
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11745
    }
11746
 
11747
    public Object getFieldValue(_Fields field) {
11748
      switch (field) {
11749
      case CUSTOMER_ID:
11750
        return new Long(getCustomer_id());
11751
 
11752
      case LIMIT:
11753
        return new Long(getLimit());
11754
 
11755
      }
11756
      throw new IllegalStateException();
11757
    }
11758
 
11759
    public Object getFieldValue(int fieldId) {
11760
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11761
    }
11762
 
11763
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11764
    public boolean isSet(_Fields field) {
11765
      switch (field) {
11766
      case CUSTOMER_ID:
11767
        return isSetCustomer_id();
11768
      case LIMIT:
11769
        return isSetLimit();
11770
      }
11771
      throw new IllegalStateException();
11772
    }
11773
 
11774
    public boolean isSet(int fieldID) {
11775
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11776
    }
11777
 
11778
    @Override
11779
    public boolean equals(Object that) {
11780
      if (that == null)
11781
        return false;
11782
      if (that instanceof getCancellableOrdersForCustomer_args)
11783
        return this.equals((getCancellableOrdersForCustomer_args)that);
11784
      return false;
11785
    }
11786
 
11787
    public boolean equals(getCancellableOrdersForCustomer_args that) {
11788
      if (that == null)
11789
        return false;
11790
 
11791
      boolean this_present_customer_id = true;
11792
      boolean that_present_customer_id = true;
11793
      if (this_present_customer_id || that_present_customer_id) {
11794
        if (!(this_present_customer_id && that_present_customer_id))
11795
          return false;
11796
        if (this.customer_id != that.customer_id)
11797
          return false;
11798
      }
11799
 
11800
      boolean this_present_limit = true;
11801
      boolean that_present_limit = true;
11802
      if (this_present_limit || that_present_limit) {
11803
        if (!(this_present_limit && that_present_limit))
11804
          return false;
11805
        if (this.limit != that.limit)
11806
          return false;
11807
      }
11808
 
11809
      return true;
11810
    }
11811
 
11812
    @Override
11813
    public int hashCode() {
11814
      return 0;
11815
    }
11816
 
11817
    public int compareTo(getCancellableOrdersForCustomer_args other) {
11818
      if (!getClass().equals(other.getClass())) {
11819
        return getClass().getName().compareTo(other.getClass().getName());
11820
      }
11821
 
11822
      int lastComparison = 0;
11823
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
11824
 
11825
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
11826
      if (lastComparison != 0) {
11827
        return lastComparison;
11828
      }
11829
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
11830
      if (lastComparison != 0) {
11831
        return lastComparison;
11832
      }
11833
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
11834
      if (lastComparison != 0) {
11835
        return lastComparison;
11836
      }
11837
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
11838
      if (lastComparison != 0) {
11839
        return lastComparison;
11840
      }
11841
      return 0;
11842
    }
11843
 
11844
    public void read(TProtocol iprot) throws TException {
11845
      TField field;
11846
      iprot.readStructBegin();
11847
      while (true)
11848
      {
11849
        field = iprot.readFieldBegin();
11850
        if (field.type == TType.STOP) { 
11851
          break;
11852
        }
11853
        _Fields fieldId = _Fields.findByThriftId(field.id);
11854
        if (fieldId == null) {
11855
          TProtocolUtil.skip(iprot, field.type);
11856
        } else {
11857
          switch (fieldId) {
11858
            case CUSTOMER_ID:
11859
              if (field.type == TType.I64) {
11860
                this.customer_id = iprot.readI64();
11861
                setCustomer_idIsSet(true);
11862
              } else { 
11863
                TProtocolUtil.skip(iprot, field.type);
11864
              }
11865
              break;
11866
            case LIMIT:
11867
              if (field.type == TType.I64) {
11868
                this.limit = iprot.readI64();
11869
                setLimitIsSet(true);
11870
              } else { 
11871
                TProtocolUtil.skip(iprot, field.type);
11872
              }
11873
              break;
11874
          }
11875
          iprot.readFieldEnd();
11876
        }
11877
      }
11878
      iprot.readStructEnd();
11879
      validate();
11880
    }
11881
 
11882
    public void write(TProtocol oprot) throws TException {
11883
      validate();
11884
 
11885
      oprot.writeStructBegin(STRUCT_DESC);
11886
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
11887
      oprot.writeI64(this.customer_id);
11888
      oprot.writeFieldEnd();
11889
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
11890
      oprot.writeI64(this.limit);
11891
      oprot.writeFieldEnd();
11892
      oprot.writeFieldStop();
11893
      oprot.writeStructEnd();
11894
    }
11895
 
11896
    @Override
11897
    public String toString() {
11898
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
11899
      boolean first = true;
11900
 
11901
      sb.append("customer_id:");
11902
      sb.append(this.customer_id);
11903
      first = false;
11904
      if (!first) sb.append(", ");
11905
      sb.append("limit:");
11906
      sb.append(this.limit);
11907
      first = false;
11908
      sb.append(")");
11909
      return sb.toString();
11910
    }
11911
 
11912
    public void validate() throws TException {
11913
      // check for required fields
11914
    }
11915
 
11916
  }
11917
 
11918
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
11919
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
11920
 
11921
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11922
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11923
 
11924
    private List<Long> success;
11925
    private TransactionServiceException ex;
11926
 
11927
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11928
    public enum _Fields implements TFieldIdEnum {
11929
      SUCCESS((short)0, "success"),
11930
      EX((short)1, "ex");
11931
 
11932
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11933
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11934
 
11935
      static {
11936
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11937
          byId.put((int)field._thriftId, field);
11938
          byName.put(field.getFieldName(), field);
11939
        }
11940
      }
11941
 
11942
      /**
11943
       * Find the _Fields constant that matches fieldId, or null if its not found.
11944
       */
11945
      public static _Fields findByThriftId(int fieldId) {
11946
        return byId.get(fieldId);
11947
      }
11948
 
11949
      /**
11950
       * Find the _Fields constant that matches fieldId, throwing an exception
11951
       * if it is not found.
11952
       */
11953
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11954
        _Fields fields = findByThriftId(fieldId);
11955
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11956
        return fields;
11957
      }
11958
 
11959
      /**
11960
       * Find the _Fields constant that matches name, or null if its not found.
11961
       */
11962
      public static _Fields findByName(String name) {
11963
        return byName.get(name);
11964
      }
11965
 
11966
      private final short _thriftId;
11967
      private final String _fieldName;
11968
 
11969
      _Fields(short thriftId, String fieldName) {
11970
        _thriftId = thriftId;
11971
        _fieldName = fieldName;
11972
      }
11973
 
11974
      public short getThriftFieldId() {
11975
        return _thriftId;
11976
      }
11977
 
11978
      public String getFieldName() {
11979
        return _fieldName;
11980
      }
11981
    }
11982
 
11983
    // isset id assignments
11984
 
11985
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11986
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11987
          new ListMetaData(TType.LIST, 
11988
              new FieldValueMetaData(TType.I64))));
11989
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11990
          new FieldValueMetaData(TType.STRUCT)));
11991
    }});
11992
 
11993
    static {
11994
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
11995
    }
11996
 
11997
    public getCancellableOrdersForCustomer_result() {
11998
    }
11999
 
12000
    public getCancellableOrdersForCustomer_result(
12001
      List<Long> success,
12002
      TransactionServiceException ex)
12003
    {
12004
      this();
12005
      this.success = success;
12006
      this.ex = ex;
12007
    }
12008
 
12009
    /**
12010
     * Performs a deep copy on <i>other</i>.
12011
     */
12012
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
12013
      if (other.isSetSuccess()) {
12014
        List<Long> __this__success = new ArrayList<Long>();
12015
        for (Long other_element : other.success) {
12016
          __this__success.add(other_element);
12017
        }
12018
        this.success = __this__success;
12019
      }
12020
      if (other.isSetEx()) {
12021
        this.ex = new TransactionServiceException(other.ex);
12022
      }
12023
    }
12024
 
12025
    public getCancellableOrdersForCustomer_result deepCopy() {
12026
      return new getCancellableOrdersForCustomer_result(this);
12027
    }
12028
 
12029
    @Deprecated
12030
    public getCancellableOrdersForCustomer_result clone() {
12031
      return new getCancellableOrdersForCustomer_result(this);
12032
    }
12033
 
12034
    public int getSuccessSize() {
12035
      return (this.success == null) ? 0 : this.success.size();
12036
    }
12037
 
12038
    public java.util.Iterator<Long> getSuccessIterator() {
12039
      return (this.success == null) ? null : this.success.iterator();
12040
    }
12041
 
12042
    public void addToSuccess(long elem) {
12043
      if (this.success == null) {
12044
        this.success = new ArrayList<Long>();
12045
      }
12046
      this.success.add(elem);
12047
    }
12048
 
12049
    public List<Long> getSuccess() {
12050
      return this.success;
12051
    }
12052
 
12053
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
12054
      this.success = success;
12055
      return this;
12056
    }
12057
 
12058
    public void unsetSuccess() {
12059
      this.success = null;
12060
    }
12061
 
12062
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12063
    public boolean isSetSuccess() {
12064
      return this.success != null;
12065
    }
12066
 
12067
    public void setSuccessIsSet(boolean value) {
12068
      if (!value) {
12069
        this.success = null;
12070
      }
12071
    }
12072
 
12073
    public TransactionServiceException getEx() {
12074
      return this.ex;
12075
    }
12076
 
12077
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
12078
      this.ex = ex;
12079
      return this;
12080
    }
12081
 
12082
    public void unsetEx() {
12083
      this.ex = null;
12084
    }
12085
 
12086
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12087
    public boolean isSetEx() {
12088
      return this.ex != null;
12089
    }
12090
 
12091
    public void setExIsSet(boolean value) {
12092
      if (!value) {
12093
        this.ex = null;
12094
      }
12095
    }
12096
 
12097
    public void setFieldValue(_Fields field, Object value) {
12098
      switch (field) {
12099
      case SUCCESS:
12100
        if (value == null) {
12101
          unsetSuccess();
12102
        } else {
12103
          setSuccess((List<Long>)value);
12104
        }
12105
        break;
12106
 
12107
      case EX:
12108
        if (value == null) {
12109
          unsetEx();
12110
        } else {
12111
          setEx((TransactionServiceException)value);
12112
        }
12113
        break;
12114
 
12115
      }
12116
    }
12117
 
12118
    public void setFieldValue(int fieldID, Object value) {
12119
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12120
    }
12121
 
12122
    public Object getFieldValue(_Fields field) {
12123
      switch (field) {
12124
      case SUCCESS:
12125
        return getSuccess();
12126
 
12127
      case EX:
12128
        return getEx();
12129
 
12130
      }
12131
      throw new IllegalStateException();
12132
    }
12133
 
12134
    public Object getFieldValue(int fieldId) {
12135
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12136
    }
12137
 
12138
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12139
    public boolean isSet(_Fields field) {
12140
      switch (field) {
12141
      case SUCCESS:
12142
        return isSetSuccess();
12143
      case EX:
12144
        return isSetEx();
12145
      }
12146
      throw new IllegalStateException();
12147
    }
12148
 
12149
    public boolean isSet(int fieldID) {
12150
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12151
    }
12152
 
12153
    @Override
12154
    public boolean equals(Object that) {
12155
      if (that == null)
12156
        return false;
12157
      if (that instanceof getCancellableOrdersForCustomer_result)
12158
        return this.equals((getCancellableOrdersForCustomer_result)that);
12159
      return false;
12160
    }
12161
 
12162
    public boolean equals(getCancellableOrdersForCustomer_result that) {
12163
      if (that == null)
12164
        return false;
12165
 
12166
      boolean this_present_success = true && this.isSetSuccess();
12167
      boolean that_present_success = true && that.isSetSuccess();
12168
      if (this_present_success || that_present_success) {
12169
        if (!(this_present_success && that_present_success))
12170
          return false;
12171
        if (!this.success.equals(that.success))
12172
          return false;
12173
      }
12174
 
12175
      boolean this_present_ex = true && this.isSetEx();
12176
      boolean that_present_ex = true && that.isSetEx();
12177
      if (this_present_ex || that_present_ex) {
12178
        if (!(this_present_ex && that_present_ex))
12179
          return false;
12180
        if (!this.ex.equals(that.ex))
12181
          return false;
12182
      }
12183
 
12184
      return true;
12185
    }
12186
 
12187
    @Override
12188
    public int hashCode() {
12189
      return 0;
12190
    }
12191
 
12192
    public int compareTo(getCancellableOrdersForCustomer_result other) {
12193
      if (!getClass().equals(other.getClass())) {
12194
        return getClass().getName().compareTo(other.getClass().getName());
12195
      }
12196
 
12197
      int lastComparison = 0;
12198
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
12199
 
12200
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12201
      if (lastComparison != 0) {
12202
        return lastComparison;
12203
      }
12204
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12205
      if (lastComparison != 0) {
12206
        return lastComparison;
12207
      }
12208
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12209
      if (lastComparison != 0) {
12210
        return lastComparison;
12211
      }
12212
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12213
      if (lastComparison != 0) {
12214
        return lastComparison;
12215
      }
12216
      return 0;
12217
    }
12218
 
12219
    public void read(TProtocol iprot) throws TException {
12220
      TField field;
12221
      iprot.readStructBegin();
12222
      while (true)
12223
      {
12224
        field = iprot.readFieldBegin();
12225
        if (field.type == TType.STOP) { 
12226
          break;
12227
        }
12228
        _Fields fieldId = _Fields.findByThriftId(field.id);
12229
        if (fieldId == null) {
12230
          TProtocolUtil.skip(iprot, field.type);
12231
        } else {
12232
          switch (fieldId) {
12233
            case SUCCESS:
12234
              if (field.type == TType.LIST) {
12235
                {
12236
                  TList _list28 = iprot.readListBegin();
12237
                  this.success = new ArrayList<Long>(_list28.size);
12238
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
12239
                  {
12240
                    long _elem30;
12241
                    _elem30 = iprot.readI64();
12242
                    this.success.add(_elem30);
12243
                  }
12244
                  iprot.readListEnd();
12245
                }
12246
              } else { 
12247
                TProtocolUtil.skip(iprot, field.type);
12248
              }
12249
              break;
12250
            case EX:
12251
              if (field.type == TType.STRUCT) {
12252
                this.ex = new TransactionServiceException();
12253
                this.ex.read(iprot);
12254
              } else { 
12255
                TProtocolUtil.skip(iprot, field.type);
12256
              }
12257
              break;
12258
          }
12259
          iprot.readFieldEnd();
12260
        }
12261
      }
12262
      iprot.readStructEnd();
12263
      validate();
12264
    }
12265
 
12266
    public void write(TProtocol oprot) throws TException {
12267
      oprot.writeStructBegin(STRUCT_DESC);
12268
 
12269
      if (this.isSetSuccess()) {
12270
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12271
        {
12272
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
12273
          for (long _iter31 : this.success)
12274
          {
12275
            oprot.writeI64(_iter31);
12276
          }
12277
          oprot.writeListEnd();
12278
        }
12279
        oprot.writeFieldEnd();
12280
      } else if (this.isSetEx()) {
12281
        oprot.writeFieldBegin(EX_FIELD_DESC);
12282
        this.ex.write(oprot);
12283
        oprot.writeFieldEnd();
12284
      }
12285
      oprot.writeFieldStop();
12286
      oprot.writeStructEnd();
12287
    }
12288
 
12289
    @Override
12290
    public String toString() {
12291
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
12292
      boolean first = true;
12293
 
12294
      sb.append("success:");
12295
      if (this.success == null) {
12296
        sb.append("null");
12297
      } else {
12298
        sb.append(this.success);
12299
      }
12300
      first = false;
12301
      if (!first) sb.append(", ");
12302
      sb.append("ex:");
12303
      if (this.ex == null) {
12304
        sb.append("null");
12305
      } else {
12306
        sb.append(this.ex);
12307
      }
12308
      first = false;
12309
      sb.append(")");
12310
      return sb.toString();
12311
    }
12312
 
12313
    public void validate() throws TException {
12314
      // check for required fields
12315
    }
12316
 
12317
  }
12318
 
483 rajveer 12319
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
12320
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 12321
 
483 rajveer 12322
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12323
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
12324
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 12325
 
483 rajveer 12326
    private long orderId;
12327
    private OrderStatus status;
12328
    private String description;
68 ashish 12329
 
12330
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12331
    public enum _Fields implements TFieldIdEnum {
483 rajveer 12332
      ORDER_ID((short)1, "orderId"),
12333
      /**
12334
       * 
12335
       * @see OrderStatus
12336
       */
12337
      STATUS((short)2, "status"),
12338
      DESCRIPTION((short)3, "description");
68 ashish 12339
 
12340
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12341
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12342
 
12343
      static {
12344
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12345
          byId.put((int)field._thriftId, field);
12346
          byName.put(field.getFieldName(), field);
12347
        }
12348
      }
12349
 
12350
      /**
12351
       * Find the _Fields constant that matches fieldId, or null if its not found.
12352
       */
12353
      public static _Fields findByThriftId(int fieldId) {
12354
        return byId.get(fieldId);
12355
      }
12356
 
12357
      /**
12358
       * Find the _Fields constant that matches fieldId, throwing an exception
12359
       * if it is not found.
12360
       */
12361
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12362
        _Fields fields = findByThriftId(fieldId);
12363
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12364
        return fields;
12365
      }
12366
 
12367
      /**
12368
       * Find the _Fields constant that matches name, or null if its not found.
12369
       */
12370
      public static _Fields findByName(String name) {
12371
        return byName.get(name);
12372
      }
12373
 
12374
      private final short _thriftId;
12375
      private final String _fieldName;
12376
 
12377
      _Fields(short thriftId, String fieldName) {
12378
        _thriftId = thriftId;
12379
        _fieldName = fieldName;
12380
      }
12381
 
12382
      public short getThriftFieldId() {
12383
        return _thriftId;
12384
      }
12385
 
12386
      public String getFieldName() {
12387
        return _fieldName;
12388
      }
12389
    }
12390
 
12391
    // isset id assignments
483 rajveer 12392
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 12393
    private BitSet __isset_bit_vector = new BitSet(1);
12394
 
12395
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 12396
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 12397
          new FieldValueMetaData(TType.I64)));
483 rajveer 12398
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
12399
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
12400
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
12401
          new FieldValueMetaData(TType.STRING)));
68 ashish 12402
    }});
12403
 
12404
    static {
483 rajveer 12405
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 12406
    }
12407
 
483 rajveer 12408
    public changeOrderStatus_args() {
68 ashish 12409
    }
12410
 
483 rajveer 12411
    public changeOrderStatus_args(
12412
      long orderId,
12413
      OrderStatus status,
12414
      String description)
68 ashish 12415
    {
12416
      this();
483 rajveer 12417
      this.orderId = orderId;
12418
      setOrderIdIsSet(true);
12419
      this.status = status;
12420
      this.description = description;
68 ashish 12421
    }
12422
 
12423
    /**
12424
     * Performs a deep copy on <i>other</i>.
12425
     */
483 rajveer 12426
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 12427
      __isset_bit_vector.clear();
12428
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 12429
      this.orderId = other.orderId;
12430
      if (other.isSetStatus()) {
12431
        this.status = other.status;
12432
      }
12433
      if (other.isSetDescription()) {
12434
        this.description = other.description;
12435
      }
68 ashish 12436
    }
12437
 
483 rajveer 12438
    public changeOrderStatus_args deepCopy() {
12439
      return new changeOrderStatus_args(this);
68 ashish 12440
    }
12441
 
12442
    @Deprecated
483 rajveer 12443
    public changeOrderStatus_args clone() {
12444
      return new changeOrderStatus_args(this);
68 ashish 12445
    }
12446
 
483 rajveer 12447
    public long getOrderId() {
12448
      return this.orderId;
68 ashish 12449
    }
12450
 
483 rajveer 12451
    public changeOrderStatus_args setOrderId(long orderId) {
12452
      this.orderId = orderId;
12453
      setOrderIdIsSet(true);
68 ashish 12454
      return this;
12455
    }
12456
 
483 rajveer 12457
    public void unsetOrderId() {
12458
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 12459
    }
12460
 
483 rajveer 12461
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12462
    public boolean isSetOrderId() {
12463
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 12464
    }
12465
 
483 rajveer 12466
    public void setOrderIdIsSet(boolean value) {
12467
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 12468
    }
12469
 
483 rajveer 12470
    /**
12471
     * 
12472
     * @see OrderStatus
12473
     */
12474
    public OrderStatus getStatus() {
12475
      return this.status;
68 ashish 12476
    }
12477
 
12478
    /**
483 rajveer 12479
     * 
12480
     * @see OrderStatus
68 ashish 12481
     */
483 rajveer 12482
    public changeOrderStatus_args setStatus(OrderStatus status) {
12483
      this.status = status;
68 ashish 12484
      return this;
12485
    }
12486
 
483 rajveer 12487
    public void unsetStatus() {
12488
      this.status = null;
68 ashish 12489
    }
12490
 
483 rajveer 12491
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
12492
    public boolean isSetStatus() {
12493
      return this.status != null;
68 ashish 12494
    }
12495
 
483 rajveer 12496
    public void setStatusIsSet(boolean value) {
68 ashish 12497
      if (!value) {
483 rajveer 12498
        this.status = null;
68 ashish 12499
      }
12500
    }
12501
 
483 rajveer 12502
    public String getDescription() {
12503
      return this.description;
68 ashish 12504
    }
12505
 
483 rajveer 12506
    public changeOrderStatus_args setDescription(String description) {
12507
      this.description = description;
68 ashish 12508
      return this;
12509
    }
12510
 
483 rajveer 12511
    public void unsetDescription() {
12512
      this.description = null;
68 ashish 12513
    }
12514
 
483 rajveer 12515
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
12516
    public boolean isSetDescription() {
12517
      return this.description != null;
68 ashish 12518
    }
12519
 
483 rajveer 12520
    public void setDescriptionIsSet(boolean value) {
68 ashish 12521
      if (!value) {
483 rajveer 12522
        this.description = null;
68 ashish 12523
      }
12524
    }
12525
 
12526
    public void setFieldValue(_Fields field, Object value) {
12527
      switch (field) {
483 rajveer 12528
      case ORDER_ID:
68 ashish 12529
        if (value == null) {
483 rajveer 12530
          unsetOrderId();
68 ashish 12531
        } else {
483 rajveer 12532
          setOrderId((Long)value);
68 ashish 12533
        }
12534
        break;
12535
 
483 rajveer 12536
      case STATUS:
68 ashish 12537
        if (value == null) {
483 rajveer 12538
          unsetStatus();
68 ashish 12539
        } else {
483 rajveer 12540
          setStatus((OrderStatus)value);
68 ashish 12541
        }
12542
        break;
12543
 
483 rajveer 12544
      case DESCRIPTION:
12545
        if (value == null) {
12546
          unsetDescription();
12547
        } else {
12548
          setDescription((String)value);
12549
        }
12550
        break;
12551
 
68 ashish 12552
      }
12553
    }
12554
 
12555
    public void setFieldValue(int fieldID, Object value) {
12556
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12557
    }
12558
 
12559
    public Object getFieldValue(_Fields field) {
12560
      switch (field) {
483 rajveer 12561
      case ORDER_ID:
12562
        return new Long(getOrderId());
68 ashish 12563
 
483 rajveer 12564
      case STATUS:
12565
        return getStatus();
68 ashish 12566
 
483 rajveer 12567
      case DESCRIPTION:
12568
        return getDescription();
12569
 
68 ashish 12570
      }
12571
      throw new IllegalStateException();
12572
    }
12573
 
12574
    public Object getFieldValue(int fieldId) {
12575
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12576
    }
12577
 
12578
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12579
    public boolean isSet(_Fields field) {
12580
      switch (field) {
483 rajveer 12581
      case ORDER_ID:
12582
        return isSetOrderId();
12583
      case STATUS:
12584
        return isSetStatus();
12585
      case DESCRIPTION:
12586
        return isSetDescription();
68 ashish 12587
      }
12588
      throw new IllegalStateException();
12589
    }
12590
 
12591
    public boolean isSet(int fieldID) {
12592
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12593
    }
12594
 
12595
    @Override
12596
    public boolean equals(Object that) {
12597
      if (that == null)
12598
        return false;
483 rajveer 12599
      if (that instanceof changeOrderStatus_args)
12600
        return this.equals((changeOrderStatus_args)that);
68 ashish 12601
      return false;
12602
    }
12603
 
483 rajveer 12604
    public boolean equals(changeOrderStatus_args that) {
68 ashish 12605
      if (that == null)
12606
        return false;
12607
 
483 rajveer 12608
      boolean this_present_orderId = true;
12609
      boolean that_present_orderId = true;
12610
      if (this_present_orderId || that_present_orderId) {
12611
        if (!(this_present_orderId && that_present_orderId))
68 ashish 12612
          return false;
483 rajveer 12613
        if (this.orderId != that.orderId)
68 ashish 12614
          return false;
12615
      }
12616
 
483 rajveer 12617
      boolean this_present_status = true && this.isSetStatus();
12618
      boolean that_present_status = true && that.isSetStatus();
12619
      if (this_present_status || that_present_status) {
12620
        if (!(this_present_status && that_present_status))
68 ashish 12621
          return false;
483 rajveer 12622
        if (!this.status.equals(that.status))
68 ashish 12623
          return false;
12624
      }
12625
 
483 rajveer 12626
      boolean this_present_description = true && this.isSetDescription();
12627
      boolean that_present_description = true && that.isSetDescription();
12628
      if (this_present_description || that_present_description) {
12629
        if (!(this_present_description && that_present_description))
12630
          return false;
12631
        if (!this.description.equals(that.description))
12632
          return false;
12633
      }
12634
 
68 ashish 12635
      return true;
12636
    }
12637
 
12638
    @Override
12639
    public int hashCode() {
12640
      return 0;
12641
    }
12642
 
483 rajveer 12643
    public int compareTo(changeOrderStatus_args other) {
12644
      if (!getClass().equals(other.getClass())) {
12645
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 12646
      }
12647
 
483 rajveer 12648
      int lastComparison = 0;
12649
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 12650
 
483 rajveer 12651
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12652
      if (lastComparison != 0) {
12653
        return lastComparison;
68 ashish 12654
      }
483 rajveer 12655
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12656
      if (lastComparison != 0) {
12657
        return lastComparison;
68 ashish 12658
      }
483 rajveer 12659
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
12660
      if (lastComparison != 0) {
12661
        return lastComparison;
68 ashish 12662
      }
483 rajveer 12663
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
12664
      if (lastComparison != 0) {
12665
        return lastComparison;
68 ashish 12666
      }
483 rajveer 12667
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
12668
      if (lastComparison != 0) {
12669
        return lastComparison;
68 ashish 12670
      }
483 rajveer 12671
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
12672
      if (lastComparison != 0) {
12673
        return lastComparison;
68 ashish 12674
      }
12675
      return 0;
12676
    }
12677
 
12678
    public void read(TProtocol iprot) throws TException {
12679
      TField field;
12680
      iprot.readStructBegin();
12681
      while (true)
12682
      {
12683
        field = iprot.readFieldBegin();
12684
        if (field.type == TType.STOP) { 
12685
          break;
12686
        }
12687
        _Fields fieldId = _Fields.findByThriftId(field.id);
12688
        if (fieldId == null) {
12689
          TProtocolUtil.skip(iprot, field.type);
12690
        } else {
12691
          switch (fieldId) {
483 rajveer 12692
            case ORDER_ID:
68 ashish 12693
              if (field.type == TType.I64) {
483 rajveer 12694
                this.orderId = iprot.readI64();
12695
                setOrderIdIsSet(true);
68 ashish 12696
              } else { 
12697
                TProtocolUtil.skip(iprot, field.type);
12698
              }
12699
              break;
483 rajveer 12700
            case STATUS:
12701
              if (field.type == TType.I32) {
12702
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 12703
              } else { 
12704
                TProtocolUtil.skip(iprot, field.type);
12705
              }
12706
              break;
483 rajveer 12707
            case DESCRIPTION:
12708
              if (field.type == TType.STRING) {
12709
                this.description = iprot.readString();
12710
              } else { 
12711
                TProtocolUtil.skip(iprot, field.type);
12712
              }
12713
              break;
68 ashish 12714
          }
12715
          iprot.readFieldEnd();
12716
        }
12717
      }
12718
      iprot.readStructEnd();
12719
      validate();
12720
    }
12721
 
12722
    public void write(TProtocol oprot) throws TException {
12723
      validate();
12724
 
12725
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12726
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12727
      oprot.writeI64(this.orderId);
68 ashish 12728
      oprot.writeFieldEnd();
483 rajveer 12729
      if (this.status != null) {
12730
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
12731
        oprot.writeI32(this.status.getValue());
68 ashish 12732
        oprot.writeFieldEnd();
12733
      }
483 rajveer 12734
      if (this.description != null) {
12735
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
12736
        oprot.writeString(this.description);
12737
        oprot.writeFieldEnd();
12738
      }
68 ashish 12739
      oprot.writeFieldStop();
12740
      oprot.writeStructEnd();
12741
    }
12742
 
12743
    @Override
12744
    public String toString() {
483 rajveer 12745
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 12746
      boolean first = true;
12747
 
483 rajveer 12748
      sb.append("orderId:");
12749
      sb.append(this.orderId);
68 ashish 12750
      first = false;
12751
      if (!first) sb.append(", ");
483 rajveer 12752
      sb.append("status:");
12753
      if (this.status == null) {
68 ashish 12754
        sb.append("null");
12755
      } else {
483 rajveer 12756
        String status_name = status.name();
12757
        if (status_name != null) {
12758
          sb.append(status_name);
12759
          sb.append(" (");
12760
        }
12761
        sb.append(this.status);
12762
        if (status_name != null) {
12763
          sb.append(")");
12764
        }
68 ashish 12765
      }
12766
      first = false;
483 rajveer 12767
      if (!first) sb.append(", ");
12768
      sb.append("description:");
12769
      if (this.description == null) {
12770
        sb.append("null");
12771
      } else {
12772
        sb.append(this.description);
12773
      }
12774
      first = false;
68 ashish 12775
      sb.append(")");
12776
      return sb.toString();
12777
    }
12778
 
12779
    public void validate() throws TException {
12780
      // check for required fields
12781
    }
12782
 
12783
  }
12784
 
483 rajveer 12785
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
12786
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 12787
 
12788
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12789
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12790
 
12791
    private boolean success;
12792
    private TransactionServiceException ex;
12793
 
12794
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12795
    public enum _Fields implements TFieldIdEnum {
12796
      SUCCESS((short)0, "success"),
12797
      EX((short)1, "ex");
12798
 
12799
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12800
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12801
 
12802
      static {
12803
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12804
          byId.put((int)field._thriftId, field);
12805
          byName.put(field.getFieldName(), field);
12806
        }
12807
      }
12808
 
12809
      /**
12810
       * Find the _Fields constant that matches fieldId, or null if its not found.
12811
       */
12812
      public static _Fields findByThriftId(int fieldId) {
12813
        return byId.get(fieldId);
12814
      }
12815
 
12816
      /**
12817
       * Find the _Fields constant that matches fieldId, throwing an exception
12818
       * if it is not found.
12819
       */
12820
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12821
        _Fields fields = findByThriftId(fieldId);
12822
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12823
        return fields;
12824
      }
12825
 
12826
      /**
12827
       * Find the _Fields constant that matches name, or null if its not found.
12828
       */
12829
      public static _Fields findByName(String name) {
12830
        return byName.get(name);
12831
      }
12832
 
12833
      private final short _thriftId;
12834
      private final String _fieldName;
12835
 
12836
      _Fields(short thriftId, String fieldName) {
12837
        _thriftId = thriftId;
12838
        _fieldName = fieldName;
12839
      }
12840
 
12841
      public short getThriftFieldId() {
12842
        return _thriftId;
12843
      }
12844
 
12845
      public String getFieldName() {
12846
        return _fieldName;
12847
      }
12848
    }
12849
 
12850
    // isset id assignments
12851
    private static final int __SUCCESS_ISSET_ID = 0;
12852
    private BitSet __isset_bit_vector = new BitSet(1);
12853
 
12854
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12855
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12856
          new FieldValueMetaData(TType.BOOL)));
12857
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12858
          new FieldValueMetaData(TType.STRUCT)));
12859
    }});
12860
 
12861
    static {
483 rajveer 12862
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 12863
    }
12864
 
483 rajveer 12865
    public changeOrderStatus_result() {
68 ashish 12866
    }
12867
 
483 rajveer 12868
    public changeOrderStatus_result(
68 ashish 12869
      boolean success,
12870
      TransactionServiceException ex)
12871
    {
12872
      this();
12873
      this.success = success;
12874
      setSuccessIsSet(true);
12875
      this.ex = ex;
12876
    }
12877
 
12878
    /**
12879
     * Performs a deep copy on <i>other</i>.
12880
     */
483 rajveer 12881
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 12882
      __isset_bit_vector.clear();
12883
      __isset_bit_vector.or(other.__isset_bit_vector);
12884
      this.success = other.success;
12885
      if (other.isSetEx()) {
12886
        this.ex = new TransactionServiceException(other.ex);
12887
      }
12888
    }
12889
 
483 rajveer 12890
    public changeOrderStatus_result deepCopy() {
12891
      return new changeOrderStatus_result(this);
68 ashish 12892
    }
12893
 
12894
    @Deprecated
483 rajveer 12895
    public changeOrderStatus_result clone() {
12896
      return new changeOrderStatus_result(this);
68 ashish 12897
    }
12898
 
12899
    public boolean isSuccess() {
12900
      return this.success;
12901
    }
12902
 
483 rajveer 12903
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 12904
      this.success = success;
12905
      setSuccessIsSet(true);
12906
      return this;
12907
    }
12908
 
12909
    public void unsetSuccess() {
12910
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12911
    }
12912
 
12913
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12914
    public boolean isSetSuccess() {
12915
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12916
    }
12917
 
12918
    public void setSuccessIsSet(boolean value) {
12919
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12920
    }
12921
 
12922
    public TransactionServiceException getEx() {
12923
      return this.ex;
12924
    }
12925
 
483 rajveer 12926
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 12927
      this.ex = ex;
12928
      return this;
12929
    }
12930
 
12931
    public void unsetEx() {
12932
      this.ex = null;
12933
    }
12934
 
12935
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12936
    public boolean isSetEx() {
12937
      return this.ex != null;
12938
    }
12939
 
12940
    public void setExIsSet(boolean value) {
12941
      if (!value) {
12942
        this.ex = null;
12943
      }
12944
    }
12945
 
12946
    public void setFieldValue(_Fields field, Object value) {
12947
      switch (field) {
12948
      case SUCCESS:
12949
        if (value == null) {
12950
          unsetSuccess();
12951
        } else {
12952
          setSuccess((Boolean)value);
12953
        }
12954
        break;
12955
 
12956
      case EX:
12957
        if (value == null) {
12958
          unsetEx();
12959
        } else {
12960
          setEx((TransactionServiceException)value);
12961
        }
12962
        break;
12963
 
12964
      }
12965
    }
12966
 
12967
    public void setFieldValue(int fieldID, Object value) {
12968
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12969
    }
12970
 
12971
    public Object getFieldValue(_Fields field) {
12972
      switch (field) {
12973
      case SUCCESS:
12974
        return new Boolean(isSuccess());
12975
 
12976
      case EX:
12977
        return getEx();
12978
 
12979
      }
12980
      throw new IllegalStateException();
12981
    }
12982
 
12983
    public Object getFieldValue(int fieldId) {
12984
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12985
    }
12986
 
12987
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12988
    public boolean isSet(_Fields field) {
12989
      switch (field) {
12990
      case SUCCESS:
12991
        return isSetSuccess();
12992
      case EX:
12993
        return isSetEx();
12994
      }
12995
      throw new IllegalStateException();
12996
    }
12997
 
12998
    public boolean isSet(int fieldID) {
12999
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13000
    }
13001
 
13002
    @Override
13003
    public boolean equals(Object that) {
13004
      if (that == null)
13005
        return false;
483 rajveer 13006
      if (that instanceof changeOrderStatus_result)
13007
        return this.equals((changeOrderStatus_result)that);
68 ashish 13008
      return false;
13009
    }
13010
 
483 rajveer 13011
    public boolean equals(changeOrderStatus_result that) {
68 ashish 13012
      if (that == null)
13013
        return false;
13014
 
13015
      boolean this_present_success = true;
13016
      boolean that_present_success = true;
13017
      if (this_present_success || that_present_success) {
13018
        if (!(this_present_success && that_present_success))
13019
          return false;
13020
        if (this.success != that.success)
13021
          return false;
13022
      }
13023
 
13024
      boolean this_present_ex = true && this.isSetEx();
13025
      boolean that_present_ex = true && that.isSetEx();
13026
      if (this_present_ex || that_present_ex) {
13027
        if (!(this_present_ex && that_present_ex))
13028
          return false;
13029
        if (!this.ex.equals(that.ex))
13030
          return false;
13031
      }
13032
 
13033
      return true;
13034
    }
13035
 
13036
    @Override
13037
    public int hashCode() {
13038
      return 0;
13039
    }
13040
 
483 rajveer 13041
    public int compareTo(changeOrderStatus_result other) {
68 ashish 13042
      if (!getClass().equals(other.getClass())) {
13043
        return getClass().getName().compareTo(other.getClass().getName());
13044
      }
13045
 
13046
      int lastComparison = 0;
483 rajveer 13047
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 13048
 
13049
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13050
      if (lastComparison != 0) {
13051
        return lastComparison;
13052
      }
13053
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13054
      if (lastComparison != 0) {
13055
        return lastComparison;
13056
      }
13057
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13058
      if (lastComparison != 0) {
13059
        return lastComparison;
13060
      }
13061
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13062
      if (lastComparison != 0) {
13063
        return lastComparison;
13064
      }
13065
      return 0;
13066
    }
13067
 
13068
    public void read(TProtocol iprot) throws TException {
13069
      TField field;
13070
      iprot.readStructBegin();
13071
      while (true)
13072
      {
13073
        field = iprot.readFieldBegin();
13074
        if (field.type == TType.STOP) { 
13075
          break;
13076
        }
13077
        _Fields fieldId = _Fields.findByThriftId(field.id);
13078
        if (fieldId == null) {
13079
          TProtocolUtil.skip(iprot, field.type);
13080
        } else {
13081
          switch (fieldId) {
13082
            case SUCCESS:
13083
              if (field.type == TType.BOOL) {
13084
                this.success = iprot.readBool();
13085
                setSuccessIsSet(true);
13086
              } else { 
13087
                TProtocolUtil.skip(iprot, field.type);
13088
              }
13089
              break;
13090
            case EX:
13091
              if (field.type == TType.STRUCT) {
13092
                this.ex = new TransactionServiceException();
13093
                this.ex.read(iprot);
13094
              } else { 
13095
                TProtocolUtil.skip(iprot, field.type);
13096
              }
13097
              break;
13098
          }
13099
          iprot.readFieldEnd();
13100
        }
13101
      }
13102
      iprot.readStructEnd();
13103
      validate();
13104
    }
13105
 
13106
    public void write(TProtocol oprot) throws TException {
13107
      oprot.writeStructBegin(STRUCT_DESC);
13108
 
13109
      if (this.isSetSuccess()) {
13110
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13111
        oprot.writeBool(this.success);
13112
        oprot.writeFieldEnd();
13113
      } else if (this.isSetEx()) {
13114
        oprot.writeFieldBegin(EX_FIELD_DESC);
13115
        this.ex.write(oprot);
13116
        oprot.writeFieldEnd();
13117
      }
13118
      oprot.writeFieldStop();
13119
      oprot.writeStructEnd();
13120
    }
13121
 
13122
    @Override
13123
    public String toString() {
483 rajveer 13124
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 13125
      boolean first = true;
13126
 
13127
      sb.append("success:");
13128
      sb.append(this.success);
13129
      first = false;
13130
      if (!first) sb.append(", ");
13131
      sb.append("ex:");
13132
      if (this.ex == null) {
13133
        sb.append("null");
13134
      } else {
13135
        sb.append(this.ex);
13136
      }
13137
      first = false;
13138
      sb.append(")");
13139
      return sb.toString();
13140
    }
13141
 
13142
    public void validate() throws TException {
13143
      // check for required fields
13144
    }
13145
 
13146
  }
13147
 
495 rajveer 13148
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
13149
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
13150
 
13151
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13152
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 13153
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 13154
 
13155
    private long orderId;
13156
    private String invoice_number;
13157
    private String billed_by;
13158
 
13159
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13160
    public enum _Fields implements TFieldIdEnum {
13161
      ORDER_ID((short)1, "orderId"),
13162
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 13163
      BILLED_BY((short)3, "billed_by");
495 rajveer 13164
 
13165
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13166
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13167
 
13168
      static {
13169
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13170
          byId.put((int)field._thriftId, field);
13171
          byName.put(field.getFieldName(), field);
13172
        }
13173
      }
13174
 
13175
      /**
13176
       * Find the _Fields constant that matches fieldId, or null if its not found.
13177
       */
13178
      public static _Fields findByThriftId(int fieldId) {
13179
        return byId.get(fieldId);
13180
      }
13181
 
13182
      /**
13183
       * Find the _Fields constant that matches fieldId, throwing an exception
13184
       * if it is not found.
13185
       */
13186
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13187
        _Fields fields = findByThriftId(fieldId);
13188
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13189
        return fields;
13190
      }
13191
 
13192
      /**
13193
       * Find the _Fields constant that matches name, or null if its not found.
13194
       */
13195
      public static _Fields findByName(String name) {
13196
        return byName.get(name);
13197
      }
13198
 
13199
      private final short _thriftId;
13200
      private final String _fieldName;
13201
 
13202
      _Fields(short thriftId, String fieldName) {
13203
        _thriftId = thriftId;
13204
        _fieldName = fieldName;
13205
      }
13206
 
13207
      public short getThriftFieldId() {
13208
        return _thriftId;
13209
      }
13210
 
13211
      public String getFieldName() {
13212
        return _fieldName;
13213
      }
13214
    }
13215
 
13216
    // isset id assignments
13217
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 13218
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 13219
 
13220
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13221
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13222
          new FieldValueMetaData(TType.I64)));
13223
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
13224
          new FieldValueMetaData(TType.STRING)));
13225
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
13226
          new FieldValueMetaData(TType.STRING)));
13227
    }});
13228
 
13229
    static {
13230
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
13231
    }
13232
 
13233
    public addBillingDetails_args() {
13234
    }
13235
 
13236
    public addBillingDetails_args(
13237
      long orderId,
13238
      String invoice_number,
13239
      String billed_by)
13240
    {
13241
      this();
13242
      this.orderId = orderId;
13243
      setOrderIdIsSet(true);
13244
      this.invoice_number = invoice_number;
13245
      this.billed_by = billed_by;
13246
    }
13247
 
13248
    /**
13249
     * Performs a deep copy on <i>other</i>.
13250
     */
13251
    public addBillingDetails_args(addBillingDetails_args other) {
13252
      __isset_bit_vector.clear();
13253
      __isset_bit_vector.or(other.__isset_bit_vector);
13254
      this.orderId = other.orderId;
13255
      if (other.isSetInvoice_number()) {
13256
        this.invoice_number = other.invoice_number;
13257
      }
13258
      if (other.isSetBilled_by()) {
13259
        this.billed_by = other.billed_by;
13260
      }
13261
    }
13262
 
13263
    public addBillingDetails_args deepCopy() {
13264
      return new addBillingDetails_args(this);
13265
    }
13266
 
13267
    @Deprecated
13268
    public addBillingDetails_args clone() {
13269
      return new addBillingDetails_args(this);
13270
    }
13271
 
13272
    public long getOrderId() {
13273
      return this.orderId;
13274
    }
13275
 
13276
    public addBillingDetails_args setOrderId(long orderId) {
13277
      this.orderId = orderId;
13278
      setOrderIdIsSet(true);
13279
      return this;
13280
    }
13281
 
13282
    public void unsetOrderId() {
13283
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13284
    }
13285
 
13286
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13287
    public boolean isSetOrderId() {
13288
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13289
    }
13290
 
13291
    public void setOrderIdIsSet(boolean value) {
13292
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13293
    }
13294
 
13295
    public String getInvoice_number() {
13296
      return this.invoice_number;
13297
    }
13298
 
13299
    public addBillingDetails_args setInvoice_number(String invoice_number) {
13300
      this.invoice_number = invoice_number;
13301
      return this;
13302
    }
13303
 
13304
    public void unsetInvoice_number() {
13305
      this.invoice_number = null;
13306
    }
13307
 
13308
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
13309
    public boolean isSetInvoice_number() {
13310
      return this.invoice_number != null;
13311
    }
13312
 
13313
    public void setInvoice_numberIsSet(boolean value) {
13314
      if (!value) {
13315
        this.invoice_number = null;
13316
      }
13317
    }
13318
 
13319
    public String getBilled_by() {
13320
      return this.billed_by;
13321
    }
13322
 
13323
    public addBillingDetails_args setBilled_by(String billed_by) {
13324
      this.billed_by = billed_by;
13325
      return this;
13326
    }
13327
 
13328
    public void unsetBilled_by() {
13329
      this.billed_by = null;
13330
    }
13331
 
13332
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
13333
    public boolean isSetBilled_by() {
13334
      return this.billed_by != null;
13335
    }
13336
 
13337
    public void setBilled_byIsSet(boolean value) {
13338
      if (!value) {
13339
        this.billed_by = null;
13340
      }
13341
    }
13342
 
13343
    public void setFieldValue(_Fields field, Object value) {
13344
      switch (field) {
13345
      case ORDER_ID:
13346
        if (value == null) {
13347
          unsetOrderId();
13348
        } else {
13349
          setOrderId((Long)value);
13350
        }
13351
        break;
13352
 
13353
      case INVOICE_NUMBER:
13354
        if (value == null) {
13355
          unsetInvoice_number();
13356
        } else {
13357
          setInvoice_number((String)value);
13358
        }
13359
        break;
13360
 
13361
      case BILLED_BY:
13362
        if (value == null) {
13363
          unsetBilled_by();
13364
        } else {
13365
          setBilled_by((String)value);
13366
        }
13367
        break;
13368
 
13369
      }
13370
    }
13371
 
13372
    public void setFieldValue(int fieldID, Object value) {
13373
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13374
    }
13375
 
13376
    public Object getFieldValue(_Fields field) {
13377
      switch (field) {
13378
      case ORDER_ID:
13379
        return new Long(getOrderId());
13380
 
13381
      case INVOICE_NUMBER:
13382
        return getInvoice_number();
13383
 
13384
      case BILLED_BY:
13385
        return getBilled_by();
13386
 
13387
      }
13388
      throw new IllegalStateException();
13389
    }
13390
 
13391
    public Object getFieldValue(int fieldId) {
13392
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13393
    }
13394
 
13395
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13396
    public boolean isSet(_Fields field) {
13397
      switch (field) {
13398
      case ORDER_ID:
13399
        return isSetOrderId();
13400
      case INVOICE_NUMBER:
13401
        return isSetInvoice_number();
13402
      case BILLED_BY:
13403
        return isSetBilled_by();
13404
      }
13405
      throw new IllegalStateException();
13406
    }
13407
 
13408
    public boolean isSet(int fieldID) {
13409
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13410
    }
13411
 
13412
    @Override
13413
    public boolean equals(Object that) {
13414
      if (that == null)
13415
        return false;
13416
      if (that instanceof addBillingDetails_args)
13417
        return this.equals((addBillingDetails_args)that);
13418
      return false;
13419
    }
13420
 
13421
    public boolean equals(addBillingDetails_args that) {
13422
      if (that == null)
13423
        return false;
13424
 
13425
      boolean this_present_orderId = true;
13426
      boolean that_present_orderId = true;
13427
      if (this_present_orderId || that_present_orderId) {
13428
        if (!(this_present_orderId && that_present_orderId))
13429
          return false;
13430
        if (this.orderId != that.orderId)
13431
          return false;
13432
      }
13433
 
13434
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
13435
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
13436
      if (this_present_invoice_number || that_present_invoice_number) {
13437
        if (!(this_present_invoice_number && that_present_invoice_number))
13438
          return false;
13439
        if (!this.invoice_number.equals(that.invoice_number))
13440
          return false;
13441
      }
13442
 
13443
      boolean this_present_billed_by = true && this.isSetBilled_by();
13444
      boolean that_present_billed_by = true && that.isSetBilled_by();
13445
      if (this_present_billed_by || that_present_billed_by) {
13446
        if (!(this_present_billed_by && that_present_billed_by))
13447
          return false;
13448
        if (!this.billed_by.equals(that.billed_by))
13449
          return false;
13450
      }
13451
 
13452
      return true;
13453
    }
13454
 
13455
    @Override
13456
    public int hashCode() {
13457
      return 0;
13458
    }
13459
 
13460
    public int compareTo(addBillingDetails_args other) {
13461
      if (!getClass().equals(other.getClass())) {
13462
        return getClass().getName().compareTo(other.getClass().getName());
13463
      }
13464
 
13465
      int lastComparison = 0;
13466
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
13467
 
13468
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13469
      if (lastComparison != 0) {
13470
        return lastComparison;
13471
      }
13472
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13473
      if (lastComparison != 0) {
13474
        return lastComparison;
13475
      }
13476
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
13477
      if (lastComparison != 0) {
13478
        return lastComparison;
13479
      }
13480
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
13481
      if (lastComparison != 0) {
13482
        return lastComparison;
13483
      }
13484
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
13485
      if (lastComparison != 0) {
13486
        return lastComparison;
13487
      }
13488
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
13489
      if (lastComparison != 0) {
13490
        return lastComparison;
13491
      }
13492
      return 0;
13493
    }
13494
 
13495
    public void read(TProtocol iprot) throws TException {
13496
      TField field;
13497
      iprot.readStructBegin();
13498
      while (true)
13499
      {
13500
        field = iprot.readFieldBegin();
13501
        if (field.type == TType.STOP) { 
13502
          break;
13503
        }
13504
        _Fields fieldId = _Fields.findByThriftId(field.id);
13505
        if (fieldId == null) {
13506
          TProtocolUtil.skip(iprot, field.type);
13507
        } else {
13508
          switch (fieldId) {
13509
            case ORDER_ID:
13510
              if (field.type == TType.I64) {
13511
                this.orderId = iprot.readI64();
13512
                setOrderIdIsSet(true);
13513
              } else { 
13514
                TProtocolUtil.skip(iprot, field.type);
13515
              }
13516
              break;
13517
            case INVOICE_NUMBER:
13518
              if (field.type == TType.STRING) {
13519
                this.invoice_number = iprot.readString();
13520
              } else { 
13521
                TProtocolUtil.skip(iprot, field.type);
13522
              }
13523
              break;
13524
            case BILLED_BY:
13525
              if (field.type == TType.STRING) {
13526
                this.billed_by = iprot.readString();
13527
              } else { 
13528
                TProtocolUtil.skip(iprot, field.type);
13529
              }
13530
              break;
13531
          }
13532
          iprot.readFieldEnd();
13533
        }
13534
      }
13535
      iprot.readStructEnd();
13536
      validate();
13537
    }
13538
 
13539
    public void write(TProtocol oprot) throws TException {
13540
      validate();
13541
 
13542
      oprot.writeStructBegin(STRUCT_DESC);
13543
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13544
      oprot.writeI64(this.orderId);
13545
      oprot.writeFieldEnd();
13546
      if (this.invoice_number != null) {
13547
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
13548
        oprot.writeString(this.invoice_number);
13549
        oprot.writeFieldEnd();
13550
      }
13551
      if (this.billed_by != null) {
13552
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
13553
        oprot.writeString(this.billed_by);
13554
        oprot.writeFieldEnd();
13555
      }
13556
      oprot.writeFieldStop();
13557
      oprot.writeStructEnd();
13558
    }
13559
 
13560
    @Override
13561
    public String toString() {
13562
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
13563
      boolean first = true;
13564
 
13565
      sb.append("orderId:");
13566
      sb.append(this.orderId);
13567
      first = false;
13568
      if (!first) sb.append(", ");
13569
      sb.append("invoice_number:");
13570
      if (this.invoice_number == null) {
13571
        sb.append("null");
13572
      } else {
13573
        sb.append(this.invoice_number);
13574
      }
13575
      first = false;
13576
      if (!first) sb.append(", ");
13577
      sb.append("billed_by:");
13578
      if (this.billed_by == null) {
13579
        sb.append("null");
13580
      } else {
13581
        sb.append(this.billed_by);
13582
      }
13583
      first = false;
13584
      sb.append(")");
13585
      return sb.toString();
13586
    }
13587
 
13588
    public void validate() throws TException {
13589
      // check for required fields
13590
    }
13591
 
13592
  }
13593
 
13594
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
13595
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
13596
 
13597
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13598
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13599
 
13600
    private boolean success;
13601
    private TransactionServiceException ex;
13602
 
13603
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13604
    public enum _Fields implements TFieldIdEnum {
13605
      SUCCESS((short)0, "success"),
13606
      EX((short)1, "ex");
13607
 
13608
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13609
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13610
 
13611
      static {
13612
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13613
          byId.put((int)field._thriftId, field);
13614
          byName.put(field.getFieldName(), field);
13615
        }
13616
      }
13617
 
13618
      /**
13619
       * Find the _Fields constant that matches fieldId, or null if its not found.
13620
       */
13621
      public static _Fields findByThriftId(int fieldId) {
13622
        return byId.get(fieldId);
13623
      }
13624
 
13625
      /**
13626
       * Find the _Fields constant that matches fieldId, throwing an exception
13627
       * if it is not found.
13628
       */
13629
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13630
        _Fields fields = findByThriftId(fieldId);
13631
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13632
        return fields;
13633
      }
13634
 
13635
      /**
13636
       * Find the _Fields constant that matches name, or null if its not found.
13637
       */
13638
      public static _Fields findByName(String name) {
13639
        return byName.get(name);
13640
      }
13641
 
13642
      private final short _thriftId;
13643
      private final String _fieldName;
13644
 
13645
      _Fields(short thriftId, String fieldName) {
13646
        _thriftId = thriftId;
13647
        _fieldName = fieldName;
13648
      }
13649
 
13650
      public short getThriftFieldId() {
13651
        return _thriftId;
13652
      }
13653
 
13654
      public String getFieldName() {
13655
        return _fieldName;
13656
      }
13657
    }
13658
 
13659
    // isset id assignments
13660
    private static final int __SUCCESS_ISSET_ID = 0;
13661
    private BitSet __isset_bit_vector = new BitSet(1);
13662
 
13663
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13664
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13665
          new FieldValueMetaData(TType.BOOL)));
13666
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13667
          new FieldValueMetaData(TType.STRUCT)));
13668
    }});
13669
 
13670
    static {
13671
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
13672
    }
13673
 
13674
    public addBillingDetails_result() {
13675
    }
13676
 
13677
    public addBillingDetails_result(
13678
      boolean success,
13679
      TransactionServiceException ex)
13680
    {
13681
      this();
13682
      this.success = success;
13683
      setSuccessIsSet(true);
13684
      this.ex = ex;
13685
    }
13686
 
13687
    /**
13688
     * Performs a deep copy on <i>other</i>.
13689
     */
13690
    public addBillingDetails_result(addBillingDetails_result other) {
13691
      __isset_bit_vector.clear();
13692
      __isset_bit_vector.or(other.__isset_bit_vector);
13693
      this.success = other.success;
13694
      if (other.isSetEx()) {
13695
        this.ex = new TransactionServiceException(other.ex);
13696
      }
13697
    }
13698
 
13699
    public addBillingDetails_result deepCopy() {
13700
      return new addBillingDetails_result(this);
13701
    }
13702
 
13703
    @Deprecated
13704
    public addBillingDetails_result clone() {
13705
      return new addBillingDetails_result(this);
13706
    }
13707
 
13708
    public boolean isSuccess() {
13709
      return this.success;
13710
    }
13711
 
13712
    public addBillingDetails_result setSuccess(boolean success) {
13713
      this.success = success;
13714
      setSuccessIsSet(true);
13715
      return this;
13716
    }
13717
 
13718
    public void unsetSuccess() {
13719
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13720
    }
13721
 
13722
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13723
    public boolean isSetSuccess() {
13724
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13725
    }
13726
 
13727
    public void setSuccessIsSet(boolean value) {
13728
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13729
    }
13730
 
13731
    public TransactionServiceException getEx() {
13732
      return this.ex;
13733
    }
13734
 
13735
    public addBillingDetails_result setEx(TransactionServiceException ex) {
13736
      this.ex = ex;
13737
      return this;
13738
    }
13739
 
13740
    public void unsetEx() {
13741
      this.ex = null;
13742
    }
13743
 
13744
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13745
    public boolean isSetEx() {
13746
      return this.ex != null;
13747
    }
13748
 
13749
    public void setExIsSet(boolean value) {
13750
      if (!value) {
13751
        this.ex = null;
13752
      }
13753
    }
13754
 
13755
    public void setFieldValue(_Fields field, Object value) {
13756
      switch (field) {
13757
      case SUCCESS:
13758
        if (value == null) {
13759
          unsetSuccess();
13760
        } else {
13761
          setSuccess((Boolean)value);
13762
        }
13763
        break;
13764
 
13765
      case EX:
13766
        if (value == null) {
13767
          unsetEx();
13768
        } else {
13769
          setEx((TransactionServiceException)value);
13770
        }
13771
        break;
13772
 
13773
      }
13774
    }
13775
 
13776
    public void setFieldValue(int fieldID, Object value) {
13777
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13778
    }
13779
 
13780
    public Object getFieldValue(_Fields field) {
13781
      switch (field) {
13782
      case SUCCESS:
13783
        return new Boolean(isSuccess());
13784
 
13785
      case EX:
13786
        return getEx();
13787
 
13788
      }
13789
      throw new IllegalStateException();
13790
    }
13791
 
13792
    public Object getFieldValue(int fieldId) {
13793
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13794
    }
13795
 
13796
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13797
    public boolean isSet(_Fields field) {
13798
      switch (field) {
13799
      case SUCCESS:
13800
        return isSetSuccess();
13801
      case EX:
13802
        return isSetEx();
13803
      }
13804
      throw new IllegalStateException();
13805
    }
13806
 
13807
    public boolean isSet(int fieldID) {
13808
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13809
    }
13810
 
13811
    @Override
13812
    public boolean equals(Object that) {
13813
      if (that == null)
13814
        return false;
13815
      if (that instanceof addBillingDetails_result)
13816
        return this.equals((addBillingDetails_result)that);
13817
      return false;
13818
    }
13819
 
13820
    public boolean equals(addBillingDetails_result that) {
13821
      if (that == null)
13822
        return false;
13823
 
13824
      boolean this_present_success = true;
13825
      boolean that_present_success = true;
13826
      if (this_present_success || that_present_success) {
13827
        if (!(this_present_success && that_present_success))
13828
          return false;
13829
        if (this.success != that.success)
13830
          return false;
13831
      }
13832
 
13833
      boolean this_present_ex = true && this.isSetEx();
13834
      boolean that_present_ex = true && that.isSetEx();
13835
      if (this_present_ex || that_present_ex) {
13836
        if (!(this_present_ex && that_present_ex))
13837
          return false;
13838
        if (!this.ex.equals(that.ex))
13839
          return false;
13840
      }
13841
 
13842
      return true;
13843
    }
13844
 
13845
    @Override
13846
    public int hashCode() {
13847
      return 0;
13848
    }
13849
 
13850
    public int compareTo(addBillingDetails_result other) {
13851
      if (!getClass().equals(other.getClass())) {
13852
        return getClass().getName().compareTo(other.getClass().getName());
13853
      }
13854
 
13855
      int lastComparison = 0;
13856
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
13857
 
13858
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13859
      if (lastComparison != 0) {
13860
        return lastComparison;
13861
      }
13862
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13863
      if (lastComparison != 0) {
13864
        return lastComparison;
13865
      }
13866
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13867
      if (lastComparison != 0) {
13868
        return lastComparison;
13869
      }
13870
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13871
      if (lastComparison != 0) {
13872
        return lastComparison;
13873
      }
13874
      return 0;
13875
    }
13876
 
13877
    public void read(TProtocol iprot) throws TException {
13878
      TField field;
13879
      iprot.readStructBegin();
13880
      while (true)
13881
      {
13882
        field = iprot.readFieldBegin();
13883
        if (field.type == TType.STOP) { 
13884
          break;
13885
        }
13886
        _Fields fieldId = _Fields.findByThriftId(field.id);
13887
        if (fieldId == null) {
13888
          TProtocolUtil.skip(iprot, field.type);
13889
        } else {
13890
          switch (fieldId) {
13891
            case SUCCESS:
13892
              if (field.type == TType.BOOL) {
13893
                this.success = iprot.readBool();
13894
                setSuccessIsSet(true);
13895
              } else { 
13896
                TProtocolUtil.skip(iprot, field.type);
13897
              }
13898
              break;
13899
            case EX:
13900
              if (field.type == TType.STRUCT) {
13901
                this.ex = new TransactionServiceException();
13902
                this.ex.read(iprot);
13903
              } else { 
13904
                TProtocolUtil.skip(iprot, field.type);
13905
              }
13906
              break;
13907
          }
13908
          iprot.readFieldEnd();
13909
        }
13910
      }
13911
      iprot.readStructEnd();
13912
      validate();
13913
    }
13914
 
13915
    public void write(TProtocol oprot) throws TException {
13916
      oprot.writeStructBegin(STRUCT_DESC);
13917
 
13918
      if (this.isSetSuccess()) {
13919
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13920
        oprot.writeBool(this.success);
13921
        oprot.writeFieldEnd();
13922
      } else if (this.isSetEx()) {
13923
        oprot.writeFieldBegin(EX_FIELD_DESC);
13924
        this.ex.write(oprot);
13925
        oprot.writeFieldEnd();
13926
      }
13927
      oprot.writeFieldStop();
13928
      oprot.writeStructEnd();
13929
    }
13930
 
13931
    @Override
13932
    public String toString() {
13933
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
13934
      boolean first = true;
13935
 
13936
      sb.append("success:");
13937
      sb.append(this.success);
13938
      first = false;
13939
      if (!first) sb.append(", ");
13940
      sb.append("ex:");
13941
      if (this.ex == null) {
13942
        sb.append("null");
13943
      } else {
13944
        sb.append(this.ex);
13945
      }
13946
      first = false;
13947
      sb.append(")");
13948
      return sb.toString();
13949
    }
13950
 
13951
    public void validate() throws TException {
13952
      // check for required fields
13953
    }
13954
 
13955
  }
13956
 
1148 chandransh 13957
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
13958
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
13959
 
13960
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13961
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
2779 chandransh 13962
    private static final TField IMEI_NUMBER_FIELD_DESC = new TField("imeiNumber", TType.I64, (short)3);
13963
    private static final TField ITEM_NUMBER_FIELD_DESC = new TField("itemNumber", TType.STRING, (short)4);
13964
    private static final TField BILLED_BY_FIELD_DESC = new TField("billedBy", TType.STRING, (short)5);
2842 chandransh 13965
    private static final TField BILLING_TYPE_FIELD_DESC = new TField("billingType", TType.I64, (short)6);
1148 chandransh 13966
 
13967
    private long orderId;
13968
    private long jacketNumber;
2779 chandransh 13969
    private long imeiNumber;
13970
    private String itemNumber;
13971
    private String billedBy;
2842 chandransh 13972
    private long billingType;
1148 chandransh 13973
 
13974
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13975
    public enum _Fields implements TFieldIdEnum {
13976
      ORDER_ID((short)1, "orderId"),
2779 chandransh 13977
      JACKET_NUMBER((short)2, "jacketNumber"),
13978
      IMEI_NUMBER((short)3, "imeiNumber"),
13979
      ITEM_NUMBER((short)4, "itemNumber"),
2842 chandransh 13980
      BILLED_BY((short)5, "billedBy"),
13981
      BILLING_TYPE((short)6, "billingType");
1148 chandransh 13982
 
13983
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13984
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13985
 
13986
      static {
13987
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13988
          byId.put((int)field._thriftId, field);
13989
          byName.put(field.getFieldName(), field);
13990
        }
13991
      }
13992
 
13993
      /**
13994
       * Find the _Fields constant that matches fieldId, or null if its not found.
13995
       */
13996
      public static _Fields findByThriftId(int fieldId) {
13997
        return byId.get(fieldId);
13998
      }
13999
 
14000
      /**
14001
       * Find the _Fields constant that matches fieldId, throwing an exception
14002
       * if it is not found.
14003
       */
14004
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14005
        _Fields fields = findByThriftId(fieldId);
14006
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14007
        return fields;
14008
      }
14009
 
14010
      /**
14011
       * Find the _Fields constant that matches name, or null if its not found.
14012
       */
14013
      public static _Fields findByName(String name) {
14014
        return byName.get(name);
14015
      }
14016
 
14017
      private final short _thriftId;
14018
      private final String _fieldName;
14019
 
14020
      _Fields(short thriftId, String fieldName) {
14021
        _thriftId = thriftId;
14022
        _fieldName = fieldName;
14023
      }
14024
 
14025
      public short getThriftFieldId() {
14026
        return _thriftId;
14027
      }
14028
 
14029
      public String getFieldName() {
14030
        return _fieldName;
14031
      }
14032
    }
14033
 
14034
    // isset id assignments
14035
    private static final int __ORDERID_ISSET_ID = 0;
14036
    private static final int __JACKETNUMBER_ISSET_ID = 1;
2779 chandransh 14037
    private static final int __IMEINUMBER_ISSET_ID = 2;
2842 chandransh 14038
    private static final int __BILLINGTYPE_ISSET_ID = 3;
14039
    private BitSet __isset_bit_vector = new BitSet(4);
1148 chandransh 14040
 
14041
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14042
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14043
          new FieldValueMetaData(TType.I64)));
14044
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
14045
          new FieldValueMetaData(TType.I64)));
2779 chandransh 14046
      put(_Fields.IMEI_NUMBER, new FieldMetaData("imeiNumber", TFieldRequirementType.DEFAULT, 
14047
          new FieldValueMetaData(TType.I64)));
14048
      put(_Fields.ITEM_NUMBER, new FieldMetaData("itemNumber", TFieldRequirementType.DEFAULT, 
14049
          new FieldValueMetaData(TType.STRING)));
14050
      put(_Fields.BILLED_BY, new FieldMetaData("billedBy", TFieldRequirementType.DEFAULT, 
14051
          new FieldValueMetaData(TType.STRING)));
2842 chandransh 14052
      put(_Fields.BILLING_TYPE, new FieldMetaData("billingType", TFieldRequirementType.DEFAULT, 
14053
          new FieldValueMetaData(TType.I64)));
1148 chandransh 14054
    }});
14055
 
14056
    static {
14057
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
14058
    }
14059
 
14060
    public addJacketNumber_args() {
14061
    }
14062
 
14063
    public addJacketNumber_args(
14064
      long orderId,
2779 chandransh 14065
      long jacketNumber,
14066
      long imeiNumber,
14067
      String itemNumber,
2842 chandransh 14068
      String billedBy,
14069
      long billingType)
1148 chandransh 14070
    {
14071
      this();
14072
      this.orderId = orderId;
14073
      setOrderIdIsSet(true);
14074
      this.jacketNumber = jacketNumber;
14075
      setJacketNumberIsSet(true);
2779 chandransh 14076
      this.imeiNumber = imeiNumber;
14077
      setImeiNumberIsSet(true);
14078
      this.itemNumber = itemNumber;
14079
      this.billedBy = billedBy;
2842 chandransh 14080
      this.billingType = billingType;
14081
      setBillingTypeIsSet(true);
1148 chandransh 14082
    }
14083
 
14084
    /**
14085
     * Performs a deep copy on <i>other</i>.
14086
     */
14087
    public addJacketNumber_args(addJacketNumber_args other) {
14088
      __isset_bit_vector.clear();
14089
      __isset_bit_vector.or(other.__isset_bit_vector);
14090
      this.orderId = other.orderId;
14091
      this.jacketNumber = other.jacketNumber;
2779 chandransh 14092
      this.imeiNumber = other.imeiNumber;
14093
      if (other.isSetItemNumber()) {
14094
        this.itemNumber = other.itemNumber;
14095
      }
14096
      if (other.isSetBilledBy()) {
14097
        this.billedBy = other.billedBy;
14098
      }
2842 chandransh 14099
      this.billingType = other.billingType;
1148 chandransh 14100
    }
14101
 
14102
    public addJacketNumber_args deepCopy() {
14103
      return new addJacketNumber_args(this);
14104
    }
14105
 
14106
    @Deprecated
14107
    public addJacketNumber_args clone() {
14108
      return new addJacketNumber_args(this);
14109
    }
14110
 
14111
    public long getOrderId() {
14112
      return this.orderId;
14113
    }
14114
 
14115
    public addJacketNumber_args setOrderId(long orderId) {
14116
      this.orderId = orderId;
14117
      setOrderIdIsSet(true);
14118
      return this;
14119
    }
14120
 
14121
    public void unsetOrderId() {
14122
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14123
    }
14124
 
14125
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14126
    public boolean isSetOrderId() {
14127
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14128
    }
14129
 
14130
    public void setOrderIdIsSet(boolean value) {
14131
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14132
    }
14133
 
14134
    public long getJacketNumber() {
14135
      return this.jacketNumber;
14136
    }
14137
 
14138
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
14139
      this.jacketNumber = jacketNumber;
14140
      setJacketNumberIsSet(true);
14141
      return this;
14142
    }
14143
 
14144
    public void unsetJacketNumber() {
14145
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
14146
    }
14147
 
14148
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
14149
    public boolean isSetJacketNumber() {
14150
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
14151
    }
14152
 
14153
    public void setJacketNumberIsSet(boolean value) {
14154
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
14155
    }
14156
 
2779 chandransh 14157
    public long getImeiNumber() {
14158
      return this.imeiNumber;
14159
    }
14160
 
14161
    public addJacketNumber_args setImeiNumber(long imeiNumber) {
14162
      this.imeiNumber = imeiNumber;
14163
      setImeiNumberIsSet(true);
14164
      return this;
14165
    }
14166
 
14167
    public void unsetImeiNumber() {
14168
      __isset_bit_vector.clear(__IMEINUMBER_ISSET_ID);
14169
    }
14170
 
14171
    /** Returns true if field imeiNumber is set (has been asigned a value) and false otherwise */
14172
    public boolean isSetImeiNumber() {
14173
      return __isset_bit_vector.get(__IMEINUMBER_ISSET_ID);
14174
    }
14175
 
14176
    public void setImeiNumberIsSet(boolean value) {
14177
      __isset_bit_vector.set(__IMEINUMBER_ISSET_ID, value);
14178
    }
14179
 
14180
    public String getItemNumber() {
14181
      return this.itemNumber;
14182
    }
14183
 
14184
    public addJacketNumber_args setItemNumber(String itemNumber) {
14185
      this.itemNumber = itemNumber;
14186
      return this;
14187
    }
14188
 
14189
    public void unsetItemNumber() {
14190
      this.itemNumber = null;
14191
    }
14192
 
14193
    /** Returns true if field itemNumber is set (has been asigned a value) and false otherwise */
14194
    public boolean isSetItemNumber() {
14195
      return this.itemNumber != null;
14196
    }
14197
 
14198
    public void setItemNumberIsSet(boolean value) {
14199
      if (!value) {
14200
        this.itemNumber = null;
14201
      }
14202
    }
14203
 
14204
    public String getBilledBy() {
14205
      return this.billedBy;
14206
    }
14207
 
14208
    public addJacketNumber_args setBilledBy(String billedBy) {
14209
      this.billedBy = billedBy;
14210
      return this;
14211
    }
14212
 
14213
    public void unsetBilledBy() {
14214
      this.billedBy = null;
14215
    }
14216
 
14217
    /** Returns true if field billedBy is set (has been asigned a value) and false otherwise */
14218
    public boolean isSetBilledBy() {
14219
      return this.billedBy != null;
14220
    }
14221
 
14222
    public void setBilledByIsSet(boolean value) {
14223
      if (!value) {
14224
        this.billedBy = null;
14225
      }
14226
    }
14227
 
2842 chandransh 14228
    public long getBillingType() {
14229
      return this.billingType;
14230
    }
14231
 
14232
    public addJacketNumber_args setBillingType(long billingType) {
14233
      this.billingType = billingType;
14234
      setBillingTypeIsSet(true);
14235
      return this;
14236
    }
14237
 
14238
    public void unsetBillingType() {
14239
      __isset_bit_vector.clear(__BILLINGTYPE_ISSET_ID);
14240
    }
14241
 
14242
    /** Returns true if field billingType is set (has been asigned a value) and false otherwise */
14243
    public boolean isSetBillingType() {
14244
      return __isset_bit_vector.get(__BILLINGTYPE_ISSET_ID);
14245
    }
14246
 
14247
    public void setBillingTypeIsSet(boolean value) {
14248
      __isset_bit_vector.set(__BILLINGTYPE_ISSET_ID, value);
14249
    }
14250
 
1148 chandransh 14251
    public void setFieldValue(_Fields field, Object value) {
14252
      switch (field) {
14253
      case ORDER_ID:
14254
        if (value == null) {
14255
          unsetOrderId();
14256
        } else {
14257
          setOrderId((Long)value);
14258
        }
14259
        break;
14260
 
14261
      case JACKET_NUMBER:
14262
        if (value == null) {
14263
          unsetJacketNumber();
14264
        } else {
14265
          setJacketNumber((Long)value);
14266
        }
14267
        break;
14268
 
2779 chandransh 14269
      case IMEI_NUMBER:
14270
        if (value == null) {
14271
          unsetImeiNumber();
14272
        } else {
14273
          setImeiNumber((Long)value);
14274
        }
14275
        break;
14276
 
14277
      case ITEM_NUMBER:
14278
        if (value == null) {
14279
          unsetItemNumber();
14280
        } else {
14281
          setItemNumber((String)value);
14282
        }
14283
        break;
14284
 
14285
      case BILLED_BY:
14286
        if (value == null) {
14287
          unsetBilledBy();
14288
        } else {
14289
          setBilledBy((String)value);
14290
        }
14291
        break;
14292
 
2842 chandransh 14293
      case BILLING_TYPE:
14294
        if (value == null) {
14295
          unsetBillingType();
14296
        } else {
14297
          setBillingType((Long)value);
14298
        }
14299
        break;
14300
 
1148 chandransh 14301
      }
14302
    }
14303
 
14304
    public void setFieldValue(int fieldID, Object value) {
14305
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14306
    }
14307
 
14308
    public Object getFieldValue(_Fields field) {
14309
      switch (field) {
14310
      case ORDER_ID:
14311
        return new Long(getOrderId());
14312
 
14313
      case JACKET_NUMBER:
14314
        return new Long(getJacketNumber());
14315
 
2779 chandransh 14316
      case IMEI_NUMBER:
14317
        return new Long(getImeiNumber());
14318
 
14319
      case ITEM_NUMBER:
14320
        return getItemNumber();
14321
 
14322
      case BILLED_BY:
14323
        return getBilledBy();
14324
 
2842 chandransh 14325
      case BILLING_TYPE:
14326
        return new Long(getBillingType());
14327
 
1148 chandransh 14328
      }
14329
      throw new IllegalStateException();
14330
    }
14331
 
14332
    public Object getFieldValue(int fieldId) {
14333
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14334
    }
14335
 
14336
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14337
    public boolean isSet(_Fields field) {
14338
      switch (field) {
14339
      case ORDER_ID:
14340
        return isSetOrderId();
14341
      case JACKET_NUMBER:
14342
        return isSetJacketNumber();
2779 chandransh 14343
      case IMEI_NUMBER:
14344
        return isSetImeiNumber();
14345
      case ITEM_NUMBER:
14346
        return isSetItemNumber();
14347
      case BILLED_BY:
14348
        return isSetBilledBy();
2842 chandransh 14349
      case BILLING_TYPE:
14350
        return isSetBillingType();
1148 chandransh 14351
      }
14352
      throw new IllegalStateException();
14353
    }
14354
 
14355
    public boolean isSet(int fieldID) {
14356
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14357
    }
14358
 
14359
    @Override
14360
    public boolean equals(Object that) {
14361
      if (that == null)
14362
        return false;
14363
      if (that instanceof addJacketNumber_args)
14364
        return this.equals((addJacketNumber_args)that);
14365
      return false;
14366
    }
14367
 
14368
    public boolean equals(addJacketNumber_args that) {
14369
      if (that == null)
14370
        return false;
14371
 
14372
      boolean this_present_orderId = true;
14373
      boolean that_present_orderId = true;
14374
      if (this_present_orderId || that_present_orderId) {
14375
        if (!(this_present_orderId && that_present_orderId))
14376
          return false;
14377
        if (this.orderId != that.orderId)
14378
          return false;
14379
      }
14380
 
14381
      boolean this_present_jacketNumber = true;
14382
      boolean that_present_jacketNumber = true;
14383
      if (this_present_jacketNumber || that_present_jacketNumber) {
14384
        if (!(this_present_jacketNumber && that_present_jacketNumber))
14385
          return false;
14386
        if (this.jacketNumber != that.jacketNumber)
14387
          return false;
14388
      }
14389
 
2779 chandransh 14390
      boolean this_present_imeiNumber = true;
14391
      boolean that_present_imeiNumber = true;
14392
      if (this_present_imeiNumber || that_present_imeiNumber) {
14393
        if (!(this_present_imeiNumber && that_present_imeiNumber))
14394
          return false;
14395
        if (this.imeiNumber != that.imeiNumber)
14396
          return false;
14397
      }
14398
 
14399
      boolean this_present_itemNumber = true && this.isSetItemNumber();
14400
      boolean that_present_itemNumber = true && that.isSetItemNumber();
14401
      if (this_present_itemNumber || that_present_itemNumber) {
14402
        if (!(this_present_itemNumber && that_present_itemNumber))
14403
          return false;
14404
        if (!this.itemNumber.equals(that.itemNumber))
14405
          return false;
14406
      }
14407
 
14408
      boolean this_present_billedBy = true && this.isSetBilledBy();
14409
      boolean that_present_billedBy = true && that.isSetBilledBy();
14410
      if (this_present_billedBy || that_present_billedBy) {
14411
        if (!(this_present_billedBy && that_present_billedBy))
14412
          return false;
14413
        if (!this.billedBy.equals(that.billedBy))
14414
          return false;
14415
      }
14416
 
2842 chandransh 14417
      boolean this_present_billingType = true;
14418
      boolean that_present_billingType = true;
14419
      if (this_present_billingType || that_present_billingType) {
14420
        if (!(this_present_billingType && that_present_billingType))
14421
          return false;
14422
        if (this.billingType != that.billingType)
14423
          return false;
14424
      }
14425
 
1148 chandransh 14426
      return true;
14427
    }
14428
 
14429
    @Override
14430
    public int hashCode() {
14431
      return 0;
14432
    }
14433
 
14434
    public int compareTo(addJacketNumber_args other) {
14435
      if (!getClass().equals(other.getClass())) {
14436
        return getClass().getName().compareTo(other.getClass().getName());
14437
      }
14438
 
14439
      int lastComparison = 0;
14440
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
14441
 
14442
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14443
      if (lastComparison != 0) {
14444
        return lastComparison;
14445
      }
14446
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14447
      if (lastComparison != 0) {
14448
        return lastComparison;
14449
      }
14450
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
14451
      if (lastComparison != 0) {
14452
        return lastComparison;
14453
      }
14454
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
14455
      if (lastComparison != 0) {
14456
        return lastComparison;
14457
      }
2779 chandransh 14458
      lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(isSetImeiNumber());
14459
      if (lastComparison != 0) {
14460
        return lastComparison;
14461
      }
14462
      lastComparison = TBaseHelper.compareTo(imeiNumber, typedOther.imeiNumber);
14463
      if (lastComparison != 0) {
14464
        return lastComparison;
14465
      }
14466
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(isSetItemNumber());
14467
      if (lastComparison != 0) {
14468
        return lastComparison;
14469
      }
14470
      lastComparison = TBaseHelper.compareTo(itemNumber, typedOther.itemNumber);
14471
      if (lastComparison != 0) {
14472
        return lastComparison;
14473
      }
14474
      lastComparison = Boolean.valueOf(isSetBilledBy()).compareTo(isSetBilledBy());
14475
      if (lastComparison != 0) {
14476
        return lastComparison;
14477
      }
14478
      lastComparison = TBaseHelper.compareTo(billedBy, typedOther.billedBy);
14479
      if (lastComparison != 0) {
14480
        return lastComparison;
14481
      }
2842 chandransh 14482
      lastComparison = Boolean.valueOf(isSetBillingType()).compareTo(isSetBillingType());
14483
      if (lastComparison != 0) {
14484
        return lastComparison;
14485
      }
14486
      lastComparison = TBaseHelper.compareTo(billingType, typedOther.billingType);
14487
      if (lastComparison != 0) {
14488
        return lastComparison;
14489
      }
1148 chandransh 14490
      return 0;
14491
    }
14492
 
14493
    public void read(TProtocol iprot) throws TException {
14494
      TField field;
14495
      iprot.readStructBegin();
14496
      while (true)
14497
      {
14498
        field = iprot.readFieldBegin();
14499
        if (field.type == TType.STOP) { 
14500
          break;
14501
        }
14502
        _Fields fieldId = _Fields.findByThriftId(field.id);
14503
        if (fieldId == null) {
14504
          TProtocolUtil.skip(iprot, field.type);
14505
        } else {
14506
          switch (fieldId) {
14507
            case ORDER_ID:
14508
              if (field.type == TType.I64) {
14509
                this.orderId = iprot.readI64();
14510
                setOrderIdIsSet(true);
14511
              } else { 
14512
                TProtocolUtil.skip(iprot, field.type);
14513
              }
14514
              break;
14515
            case JACKET_NUMBER:
14516
              if (field.type == TType.I64) {
14517
                this.jacketNumber = iprot.readI64();
14518
                setJacketNumberIsSet(true);
14519
              } else { 
14520
                TProtocolUtil.skip(iprot, field.type);
14521
              }
14522
              break;
2779 chandransh 14523
            case IMEI_NUMBER:
14524
              if (field.type == TType.I64) {
14525
                this.imeiNumber = iprot.readI64();
14526
                setImeiNumberIsSet(true);
14527
              } else { 
14528
                TProtocolUtil.skip(iprot, field.type);
14529
              }
14530
              break;
14531
            case ITEM_NUMBER:
14532
              if (field.type == TType.STRING) {
14533
                this.itemNumber = iprot.readString();
14534
              } else { 
14535
                TProtocolUtil.skip(iprot, field.type);
14536
              }
14537
              break;
14538
            case BILLED_BY:
14539
              if (field.type == TType.STRING) {
14540
                this.billedBy = iprot.readString();
14541
              } else { 
14542
                TProtocolUtil.skip(iprot, field.type);
14543
              }
14544
              break;
2842 chandransh 14545
            case BILLING_TYPE:
14546
              if (field.type == TType.I64) {
14547
                this.billingType = iprot.readI64();
14548
                setBillingTypeIsSet(true);
14549
              } else { 
14550
                TProtocolUtil.skip(iprot, field.type);
14551
              }
14552
              break;
1148 chandransh 14553
          }
14554
          iprot.readFieldEnd();
14555
        }
14556
      }
14557
      iprot.readStructEnd();
14558
      validate();
14559
    }
14560
 
14561
    public void write(TProtocol oprot) throws TException {
14562
      validate();
14563
 
14564
      oprot.writeStructBegin(STRUCT_DESC);
14565
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14566
      oprot.writeI64(this.orderId);
14567
      oprot.writeFieldEnd();
14568
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
14569
      oprot.writeI64(this.jacketNumber);
14570
      oprot.writeFieldEnd();
2779 chandransh 14571
      oprot.writeFieldBegin(IMEI_NUMBER_FIELD_DESC);
14572
      oprot.writeI64(this.imeiNumber);
14573
      oprot.writeFieldEnd();
14574
      if (this.itemNumber != null) {
14575
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
14576
        oprot.writeString(this.itemNumber);
14577
        oprot.writeFieldEnd();
14578
      }
14579
      if (this.billedBy != null) {
14580
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
14581
        oprot.writeString(this.billedBy);
14582
        oprot.writeFieldEnd();
14583
      }
2842 chandransh 14584
      oprot.writeFieldBegin(BILLING_TYPE_FIELD_DESC);
14585
      oprot.writeI64(this.billingType);
14586
      oprot.writeFieldEnd();
1148 chandransh 14587
      oprot.writeFieldStop();
14588
      oprot.writeStructEnd();
14589
    }
14590
 
14591
    @Override
14592
    public String toString() {
14593
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
14594
      boolean first = true;
14595
 
14596
      sb.append("orderId:");
14597
      sb.append(this.orderId);
14598
      first = false;
14599
      if (!first) sb.append(", ");
14600
      sb.append("jacketNumber:");
14601
      sb.append(this.jacketNumber);
14602
      first = false;
2779 chandransh 14603
      if (!first) sb.append(", ");
14604
      sb.append("imeiNumber:");
14605
      sb.append(this.imeiNumber);
14606
      first = false;
14607
      if (!first) sb.append(", ");
14608
      sb.append("itemNumber:");
14609
      if (this.itemNumber == null) {
14610
        sb.append("null");
14611
      } else {
14612
        sb.append(this.itemNumber);
14613
      }
14614
      first = false;
14615
      if (!first) sb.append(", ");
14616
      sb.append("billedBy:");
14617
      if (this.billedBy == null) {
14618
        sb.append("null");
14619
      } else {
14620
        sb.append(this.billedBy);
14621
      }
14622
      first = false;
2842 chandransh 14623
      if (!first) sb.append(", ");
14624
      sb.append("billingType:");
14625
      sb.append(this.billingType);
14626
      first = false;
1148 chandransh 14627
      sb.append(")");
14628
      return sb.toString();
14629
    }
14630
 
14631
    public void validate() throws TException {
14632
      // check for required fields
14633
    }
14634
 
14635
  }
14636
 
14637
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
14638
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
14639
 
14640
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14641
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14642
 
14643
    private boolean success;
14644
    private TransactionServiceException ex;
14645
 
14646
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14647
    public enum _Fields implements TFieldIdEnum {
14648
      SUCCESS((short)0, "success"),
14649
      EX((short)1, "ex");
14650
 
14651
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14652
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14653
 
14654
      static {
14655
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14656
          byId.put((int)field._thriftId, field);
14657
          byName.put(field.getFieldName(), field);
14658
        }
14659
      }
14660
 
14661
      /**
14662
       * Find the _Fields constant that matches fieldId, or null if its not found.
14663
       */
14664
      public static _Fields findByThriftId(int fieldId) {
14665
        return byId.get(fieldId);
14666
      }
14667
 
14668
      /**
14669
       * Find the _Fields constant that matches fieldId, throwing an exception
14670
       * if it is not found.
14671
       */
14672
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14673
        _Fields fields = findByThriftId(fieldId);
14674
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14675
        return fields;
14676
      }
14677
 
14678
      /**
14679
       * Find the _Fields constant that matches name, or null if its not found.
14680
       */
14681
      public static _Fields findByName(String name) {
14682
        return byName.get(name);
14683
      }
14684
 
14685
      private final short _thriftId;
14686
      private final String _fieldName;
14687
 
14688
      _Fields(short thriftId, String fieldName) {
14689
        _thriftId = thriftId;
14690
        _fieldName = fieldName;
14691
      }
14692
 
14693
      public short getThriftFieldId() {
14694
        return _thriftId;
14695
      }
14696
 
14697
      public String getFieldName() {
14698
        return _fieldName;
14699
      }
14700
    }
14701
 
14702
    // isset id assignments
14703
    private static final int __SUCCESS_ISSET_ID = 0;
14704
    private BitSet __isset_bit_vector = new BitSet(1);
14705
 
14706
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14707
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14708
          new FieldValueMetaData(TType.BOOL)));
14709
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14710
          new FieldValueMetaData(TType.STRUCT)));
14711
    }});
14712
 
14713
    static {
14714
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
14715
    }
14716
 
14717
    public addJacketNumber_result() {
14718
    }
14719
 
14720
    public addJacketNumber_result(
14721
      boolean success,
14722
      TransactionServiceException ex)
14723
    {
14724
      this();
14725
      this.success = success;
14726
      setSuccessIsSet(true);
14727
      this.ex = ex;
14728
    }
14729
 
14730
    /**
14731
     * Performs a deep copy on <i>other</i>.
14732
     */
14733
    public addJacketNumber_result(addJacketNumber_result other) {
14734
      __isset_bit_vector.clear();
14735
      __isset_bit_vector.or(other.__isset_bit_vector);
14736
      this.success = other.success;
14737
      if (other.isSetEx()) {
14738
        this.ex = new TransactionServiceException(other.ex);
14739
      }
14740
    }
14741
 
14742
    public addJacketNumber_result deepCopy() {
14743
      return new addJacketNumber_result(this);
14744
    }
14745
 
14746
    @Deprecated
14747
    public addJacketNumber_result clone() {
14748
      return new addJacketNumber_result(this);
14749
    }
14750
 
14751
    public boolean isSuccess() {
14752
      return this.success;
14753
    }
14754
 
14755
    public addJacketNumber_result setSuccess(boolean success) {
14756
      this.success = success;
14757
      setSuccessIsSet(true);
14758
      return this;
14759
    }
14760
 
14761
    public void unsetSuccess() {
14762
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14763
    }
14764
 
14765
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14766
    public boolean isSetSuccess() {
14767
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14768
    }
14769
 
14770
    public void setSuccessIsSet(boolean value) {
14771
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14772
    }
14773
 
14774
    public TransactionServiceException getEx() {
14775
      return this.ex;
14776
    }
14777
 
14778
    public addJacketNumber_result setEx(TransactionServiceException ex) {
14779
      this.ex = ex;
14780
      return this;
14781
    }
14782
 
14783
    public void unsetEx() {
14784
      this.ex = null;
14785
    }
14786
 
14787
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14788
    public boolean isSetEx() {
14789
      return this.ex != null;
14790
    }
14791
 
14792
    public void setExIsSet(boolean value) {
14793
      if (!value) {
14794
        this.ex = null;
14795
      }
14796
    }
14797
 
14798
    public void setFieldValue(_Fields field, Object value) {
14799
      switch (field) {
14800
      case SUCCESS:
14801
        if (value == null) {
14802
          unsetSuccess();
14803
        } else {
14804
          setSuccess((Boolean)value);
14805
        }
14806
        break;
14807
 
14808
      case EX:
14809
        if (value == null) {
14810
          unsetEx();
14811
        } else {
14812
          setEx((TransactionServiceException)value);
14813
        }
14814
        break;
14815
 
14816
      }
14817
    }
14818
 
14819
    public void setFieldValue(int fieldID, Object value) {
14820
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14821
    }
14822
 
14823
    public Object getFieldValue(_Fields field) {
14824
      switch (field) {
14825
      case SUCCESS:
14826
        return new Boolean(isSuccess());
14827
 
14828
      case EX:
14829
        return getEx();
14830
 
14831
      }
14832
      throw new IllegalStateException();
14833
    }
14834
 
14835
    public Object getFieldValue(int fieldId) {
14836
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14837
    }
14838
 
14839
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14840
    public boolean isSet(_Fields field) {
14841
      switch (field) {
14842
      case SUCCESS:
14843
        return isSetSuccess();
14844
      case EX:
14845
        return isSetEx();
14846
      }
14847
      throw new IllegalStateException();
14848
    }
14849
 
14850
    public boolean isSet(int fieldID) {
14851
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14852
    }
14853
 
14854
    @Override
14855
    public boolean equals(Object that) {
14856
      if (that == null)
14857
        return false;
14858
      if (that instanceof addJacketNumber_result)
14859
        return this.equals((addJacketNumber_result)that);
14860
      return false;
14861
    }
14862
 
14863
    public boolean equals(addJacketNumber_result that) {
14864
      if (that == null)
14865
        return false;
14866
 
14867
      boolean this_present_success = true;
14868
      boolean that_present_success = true;
14869
      if (this_present_success || that_present_success) {
14870
        if (!(this_present_success && that_present_success))
14871
          return false;
14872
        if (this.success != that.success)
14873
          return false;
14874
      }
14875
 
14876
      boolean this_present_ex = true && this.isSetEx();
14877
      boolean that_present_ex = true && that.isSetEx();
14878
      if (this_present_ex || that_present_ex) {
14879
        if (!(this_present_ex && that_present_ex))
14880
          return false;
14881
        if (!this.ex.equals(that.ex))
14882
          return false;
14883
      }
14884
 
14885
      return true;
14886
    }
14887
 
14888
    @Override
14889
    public int hashCode() {
14890
      return 0;
14891
    }
14892
 
14893
    public int compareTo(addJacketNumber_result other) {
14894
      if (!getClass().equals(other.getClass())) {
14895
        return getClass().getName().compareTo(other.getClass().getName());
14896
      }
14897
 
14898
      int lastComparison = 0;
14899
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
14900
 
14901
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14902
      if (lastComparison != 0) {
14903
        return lastComparison;
14904
      }
14905
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14906
      if (lastComparison != 0) {
14907
        return lastComparison;
14908
      }
14909
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14910
      if (lastComparison != 0) {
14911
        return lastComparison;
14912
      }
14913
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14914
      if (lastComparison != 0) {
14915
        return lastComparison;
14916
      }
14917
      return 0;
14918
    }
14919
 
14920
    public void read(TProtocol iprot) throws TException {
14921
      TField field;
14922
      iprot.readStructBegin();
14923
      while (true)
14924
      {
14925
        field = iprot.readFieldBegin();
14926
        if (field.type == TType.STOP) { 
14927
          break;
14928
        }
14929
        _Fields fieldId = _Fields.findByThriftId(field.id);
14930
        if (fieldId == null) {
14931
          TProtocolUtil.skip(iprot, field.type);
14932
        } else {
14933
          switch (fieldId) {
14934
            case SUCCESS:
14935
              if (field.type == TType.BOOL) {
14936
                this.success = iprot.readBool();
14937
                setSuccessIsSet(true);
14938
              } else { 
14939
                TProtocolUtil.skip(iprot, field.type);
14940
              }
14941
              break;
14942
            case EX:
14943
              if (field.type == TType.STRUCT) {
14944
                this.ex = new TransactionServiceException();
14945
                this.ex.read(iprot);
14946
              } else { 
14947
                TProtocolUtil.skip(iprot, field.type);
14948
              }
14949
              break;
14950
          }
14951
          iprot.readFieldEnd();
14952
        }
14953
      }
14954
      iprot.readStructEnd();
14955
      validate();
14956
    }
14957
 
14958
    public void write(TProtocol oprot) throws TException {
14959
      oprot.writeStructBegin(STRUCT_DESC);
14960
 
14961
      if (this.isSetSuccess()) {
14962
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14963
        oprot.writeBool(this.success);
14964
        oprot.writeFieldEnd();
14965
      } else if (this.isSetEx()) {
14966
        oprot.writeFieldBegin(EX_FIELD_DESC);
14967
        this.ex.write(oprot);
14968
        oprot.writeFieldEnd();
14969
      }
14970
      oprot.writeFieldStop();
14971
      oprot.writeStructEnd();
14972
    }
14973
 
14974
    @Override
14975
    public String toString() {
14976
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
14977
      boolean first = true;
14978
 
14979
      sb.append("success:");
14980
      sb.append(this.success);
14981
      first = false;
14982
      if (!first) sb.append(", ");
14983
      sb.append("ex:");
14984
      if (this.ex == null) {
14985
        sb.append("null");
14986
      } else {
14987
        sb.append(this.ex);
14988
      }
14989
      first = false;
14990
      sb.append(")");
14991
      return sb.toString();
14992
    }
14993
 
14994
    public void validate() throws TException {
14995
      // check for required fields
14996
    }
14997
 
14998
  }
14999
 
923 rajveer 15000
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
15001
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
15002
 
15003
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
15004
 
15005
    private long orderId;
15006
 
15007
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15008
    public enum _Fields implements TFieldIdEnum {
15009
      ORDER_ID((short)1, "orderId");
15010
 
15011
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15012
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15013
 
15014
      static {
15015
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15016
          byId.put((int)field._thriftId, field);
15017
          byName.put(field.getFieldName(), field);
15018
        }
15019
      }
15020
 
15021
      /**
15022
       * Find the _Fields constant that matches fieldId, or null if its not found.
15023
       */
15024
      public static _Fields findByThriftId(int fieldId) {
15025
        return byId.get(fieldId);
15026
      }
15027
 
15028
      /**
15029
       * Find the _Fields constant that matches fieldId, throwing an exception
15030
       * if it is not found.
15031
       */
15032
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15033
        _Fields fields = findByThriftId(fieldId);
15034
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15035
        return fields;
15036
      }
15037
 
15038
      /**
15039
       * Find the _Fields constant that matches name, or null if its not found.
15040
       */
15041
      public static _Fields findByName(String name) {
15042
        return byName.get(name);
15043
      }
15044
 
15045
      private final short _thriftId;
15046
      private final String _fieldName;
15047
 
15048
      _Fields(short thriftId, String fieldName) {
15049
        _thriftId = thriftId;
15050
        _fieldName = fieldName;
15051
      }
15052
 
15053
      public short getThriftFieldId() {
15054
        return _thriftId;
15055
      }
15056
 
15057
      public String getFieldName() {
15058
        return _fieldName;
15059
      }
15060
    }
15061
 
15062
    // isset id assignments
15063
    private static final int __ORDERID_ISSET_ID = 0;
15064
    private BitSet __isset_bit_vector = new BitSet(1);
15065
 
15066
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15067
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
15068
          new FieldValueMetaData(TType.I64)));
15069
    }});
15070
 
15071
    static {
15072
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
15073
    }
15074
 
15075
    public acceptOrder_args() {
15076
    }
15077
 
15078
    public acceptOrder_args(
15079
      long orderId)
15080
    {
15081
      this();
15082
      this.orderId = orderId;
15083
      setOrderIdIsSet(true);
15084
    }
15085
 
15086
    /**
15087
     * Performs a deep copy on <i>other</i>.
15088
     */
15089
    public acceptOrder_args(acceptOrder_args other) {
15090
      __isset_bit_vector.clear();
15091
      __isset_bit_vector.or(other.__isset_bit_vector);
15092
      this.orderId = other.orderId;
15093
    }
15094
 
15095
    public acceptOrder_args deepCopy() {
15096
      return new acceptOrder_args(this);
15097
    }
15098
 
15099
    @Deprecated
15100
    public acceptOrder_args clone() {
15101
      return new acceptOrder_args(this);
15102
    }
15103
 
15104
    public long getOrderId() {
15105
      return this.orderId;
15106
    }
15107
 
15108
    public acceptOrder_args setOrderId(long orderId) {
15109
      this.orderId = orderId;
15110
      setOrderIdIsSet(true);
15111
      return this;
15112
    }
15113
 
15114
    public void unsetOrderId() {
15115
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
15116
    }
15117
 
15118
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15119
    public boolean isSetOrderId() {
15120
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
15121
    }
15122
 
15123
    public void setOrderIdIsSet(boolean value) {
15124
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
15125
    }
15126
 
15127
    public void setFieldValue(_Fields field, Object value) {
15128
      switch (field) {
15129
      case ORDER_ID:
15130
        if (value == null) {
15131
          unsetOrderId();
15132
        } else {
15133
          setOrderId((Long)value);
15134
        }
15135
        break;
15136
 
15137
      }
15138
    }
15139
 
15140
    public void setFieldValue(int fieldID, Object value) {
15141
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15142
    }
15143
 
15144
    public Object getFieldValue(_Fields field) {
15145
      switch (field) {
15146
      case ORDER_ID:
15147
        return new Long(getOrderId());
15148
 
15149
      }
15150
      throw new IllegalStateException();
15151
    }
15152
 
15153
    public Object getFieldValue(int fieldId) {
15154
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15155
    }
15156
 
15157
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15158
    public boolean isSet(_Fields field) {
15159
      switch (field) {
15160
      case ORDER_ID:
15161
        return isSetOrderId();
15162
      }
15163
      throw new IllegalStateException();
15164
    }
15165
 
15166
    public boolean isSet(int fieldID) {
15167
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15168
    }
15169
 
15170
    @Override
15171
    public boolean equals(Object that) {
15172
      if (that == null)
15173
        return false;
15174
      if (that instanceof acceptOrder_args)
15175
        return this.equals((acceptOrder_args)that);
15176
      return false;
15177
    }
15178
 
15179
    public boolean equals(acceptOrder_args that) {
15180
      if (that == null)
15181
        return false;
15182
 
15183
      boolean this_present_orderId = true;
15184
      boolean that_present_orderId = true;
15185
      if (this_present_orderId || that_present_orderId) {
15186
        if (!(this_present_orderId && that_present_orderId))
15187
          return false;
15188
        if (this.orderId != that.orderId)
15189
          return false;
15190
      }
15191
 
15192
      return true;
15193
    }
15194
 
15195
    @Override
15196
    public int hashCode() {
15197
      return 0;
15198
    }
15199
 
15200
    public int compareTo(acceptOrder_args other) {
15201
      if (!getClass().equals(other.getClass())) {
15202
        return getClass().getName().compareTo(other.getClass().getName());
15203
      }
15204
 
15205
      int lastComparison = 0;
15206
      acceptOrder_args typedOther = (acceptOrder_args)other;
15207
 
15208
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
15209
      if (lastComparison != 0) {
15210
        return lastComparison;
15211
      }
15212
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
15213
      if (lastComparison != 0) {
15214
        return lastComparison;
15215
      }
15216
      return 0;
15217
    }
15218
 
15219
    public void read(TProtocol iprot) throws TException {
15220
      TField field;
15221
      iprot.readStructBegin();
15222
      while (true)
15223
      {
15224
        field = iprot.readFieldBegin();
15225
        if (field.type == TType.STOP) { 
15226
          break;
15227
        }
15228
        _Fields fieldId = _Fields.findByThriftId(field.id);
15229
        if (fieldId == null) {
15230
          TProtocolUtil.skip(iprot, field.type);
15231
        } else {
15232
          switch (fieldId) {
15233
            case ORDER_ID:
15234
              if (field.type == TType.I64) {
15235
                this.orderId = iprot.readI64();
15236
                setOrderIdIsSet(true);
15237
              } else { 
15238
                TProtocolUtil.skip(iprot, field.type);
15239
              }
15240
              break;
15241
          }
15242
          iprot.readFieldEnd();
15243
        }
15244
      }
15245
      iprot.readStructEnd();
15246
      validate();
15247
    }
15248
 
15249
    public void write(TProtocol oprot) throws TException {
15250
      validate();
15251
 
15252
      oprot.writeStructBegin(STRUCT_DESC);
15253
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15254
      oprot.writeI64(this.orderId);
15255
      oprot.writeFieldEnd();
15256
      oprot.writeFieldStop();
15257
      oprot.writeStructEnd();
15258
    }
15259
 
15260
    @Override
15261
    public String toString() {
15262
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
15263
      boolean first = true;
15264
 
15265
      sb.append("orderId:");
15266
      sb.append(this.orderId);
15267
      first = false;
15268
      sb.append(")");
15269
      return sb.toString();
15270
    }
15271
 
15272
    public void validate() throws TException {
15273
      // check for required fields
15274
    }
15275
 
15276
  }
15277
 
15278
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
15279
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
15280
 
15281
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15282
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15283
 
15284
    private boolean success;
15285
    private TransactionServiceException ex;
15286
 
15287
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15288
    public enum _Fields implements TFieldIdEnum {
15289
      SUCCESS((short)0, "success"),
15290
      EX((short)1, "ex");
15291
 
15292
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15293
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15294
 
15295
      static {
15296
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15297
          byId.put((int)field._thriftId, field);
15298
          byName.put(field.getFieldName(), field);
15299
        }
15300
      }
15301
 
15302
      /**
15303
       * Find the _Fields constant that matches fieldId, or null if its not found.
15304
       */
15305
      public static _Fields findByThriftId(int fieldId) {
15306
        return byId.get(fieldId);
15307
      }
15308
 
15309
      /**
15310
       * Find the _Fields constant that matches fieldId, throwing an exception
15311
       * if it is not found.
15312
       */
15313
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15314
        _Fields fields = findByThriftId(fieldId);
15315
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15316
        return fields;
15317
      }
15318
 
15319
      /**
15320
       * Find the _Fields constant that matches name, or null if its not found.
15321
       */
15322
      public static _Fields findByName(String name) {
15323
        return byName.get(name);
15324
      }
15325
 
15326
      private final short _thriftId;
15327
      private final String _fieldName;
15328
 
15329
      _Fields(short thriftId, String fieldName) {
15330
        _thriftId = thriftId;
15331
        _fieldName = fieldName;
15332
      }
15333
 
15334
      public short getThriftFieldId() {
15335
        return _thriftId;
15336
      }
15337
 
15338
      public String getFieldName() {
15339
        return _fieldName;
15340
      }
15341
    }
15342
 
15343
    // isset id assignments
15344
    private static final int __SUCCESS_ISSET_ID = 0;
15345
    private BitSet __isset_bit_vector = new BitSet(1);
15346
 
15347
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15348
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15349
          new FieldValueMetaData(TType.BOOL)));
15350
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15351
          new FieldValueMetaData(TType.STRUCT)));
15352
    }});
15353
 
15354
    static {
15355
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
15356
    }
15357
 
15358
    public acceptOrder_result() {
15359
    }
15360
 
15361
    public acceptOrder_result(
15362
      boolean success,
15363
      TransactionServiceException ex)
15364
    {
15365
      this();
15366
      this.success = success;
15367
      setSuccessIsSet(true);
15368
      this.ex = ex;
15369
    }
15370
 
15371
    /**
15372
     * Performs a deep copy on <i>other</i>.
15373
     */
15374
    public acceptOrder_result(acceptOrder_result other) {
15375
      __isset_bit_vector.clear();
15376
      __isset_bit_vector.or(other.__isset_bit_vector);
15377
      this.success = other.success;
15378
      if (other.isSetEx()) {
15379
        this.ex = new TransactionServiceException(other.ex);
15380
      }
15381
    }
15382
 
15383
    public acceptOrder_result deepCopy() {
15384
      return new acceptOrder_result(this);
15385
    }
15386
 
15387
    @Deprecated
15388
    public acceptOrder_result clone() {
15389
      return new acceptOrder_result(this);
15390
    }
15391
 
15392
    public boolean isSuccess() {
15393
      return this.success;
15394
    }
15395
 
15396
    public acceptOrder_result setSuccess(boolean success) {
15397
      this.success = success;
15398
      setSuccessIsSet(true);
15399
      return this;
15400
    }
15401
 
15402
    public void unsetSuccess() {
15403
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15404
    }
15405
 
15406
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15407
    public boolean isSetSuccess() {
15408
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15409
    }
15410
 
15411
    public void setSuccessIsSet(boolean value) {
15412
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15413
    }
15414
 
15415
    public TransactionServiceException getEx() {
15416
      return this.ex;
15417
    }
15418
 
15419
    public acceptOrder_result setEx(TransactionServiceException ex) {
15420
      this.ex = ex;
15421
      return this;
15422
    }
15423
 
15424
    public void unsetEx() {
15425
      this.ex = null;
15426
    }
15427
 
15428
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15429
    public boolean isSetEx() {
15430
      return this.ex != null;
15431
    }
15432
 
15433
    public void setExIsSet(boolean value) {
15434
      if (!value) {
15435
        this.ex = null;
15436
      }
15437
    }
15438
 
15439
    public void setFieldValue(_Fields field, Object value) {
15440
      switch (field) {
15441
      case SUCCESS:
15442
        if (value == null) {
15443
          unsetSuccess();
15444
        } else {
15445
          setSuccess((Boolean)value);
15446
        }
15447
        break;
15448
 
15449
      case EX:
15450
        if (value == null) {
15451
          unsetEx();
15452
        } else {
15453
          setEx((TransactionServiceException)value);
15454
        }
15455
        break;
15456
 
15457
      }
15458
    }
15459
 
15460
    public void setFieldValue(int fieldID, Object value) {
15461
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15462
    }
15463
 
15464
    public Object getFieldValue(_Fields field) {
15465
      switch (field) {
15466
      case SUCCESS:
15467
        return new Boolean(isSuccess());
15468
 
15469
      case EX:
15470
        return getEx();
15471
 
15472
      }
15473
      throw new IllegalStateException();
15474
    }
15475
 
15476
    public Object getFieldValue(int fieldId) {
15477
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15478
    }
15479
 
15480
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15481
    public boolean isSet(_Fields field) {
15482
      switch (field) {
15483
      case SUCCESS:
15484
        return isSetSuccess();
15485
      case EX:
15486
        return isSetEx();
15487
      }
15488
      throw new IllegalStateException();
15489
    }
15490
 
15491
    public boolean isSet(int fieldID) {
15492
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15493
    }
15494
 
15495
    @Override
15496
    public boolean equals(Object that) {
15497
      if (that == null)
15498
        return false;
15499
      if (that instanceof acceptOrder_result)
15500
        return this.equals((acceptOrder_result)that);
15501
      return false;
15502
    }
15503
 
15504
    public boolean equals(acceptOrder_result that) {
15505
      if (that == null)
15506
        return false;
15507
 
15508
      boolean this_present_success = true;
15509
      boolean that_present_success = true;
15510
      if (this_present_success || that_present_success) {
15511
        if (!(this_present_success && that_present_success))
15512
          return false;
15513
        if (this.success != that.success)
15514
          return false;
15515
      }
15516
 
15517
      boolean this_present_ex = true && this.isSetEx();
15518
      boolean that_present_ex = true && that.isSetEx();
15519
      if (this_present_ex || that_present_ex) {
15520
        if (!(this_present_ex && that_present_ex))
15521
          return false;
15522
        if (!this.ex.equals(that.ex))
15523
          return false;
15524
      }
15525
 
15526
      return true;
15527
    }
15528
 
15529
    @Override
15530
    public int hashCode() {
15531
      return 0;
15532
    }
15533
 
15534
    public int compareTo(acceptOrder_result other) {
15535
      if (!getClass().equals(other.getClass())) {
15536
        return getClass().getName().compareTo(other.getClass().getName());
15537
      }
15538
 
15539
      int lastComparison = 0;
15540
      acceptOrder_result typedOther = (acceptOrder_result)other;
15541
 
15542
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15543
      if (lastComparison != 0) {
15544
        return lastComparison;
15545
      }
15546
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15547
      if (lastComparison != 0) {
15548
        return lastComparison;
15549
      }
15550
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15551
      if (lastComparison != 0) {
15552
        return lastComparison;
15553
      }
15554
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15555
      if (lastComparison != 0) {
15556
        return lastComparison;
15557
      }
15558
      return 0;
15559
    }
15560
 
15561
    public void read(TProtocol iprot) throws TException {
15562
      TField field;
15563
      iprot.readStructBegin();
15564
      while (true)
15565
      {
15566
        field = iprot.readFieldBegin();
15567
        if (field.type == TType.STOP) { 
15568
          break;
15569
        }
15570
        _Fields fieldId = _Fields.findByThriftId(field.id);
15571
        if (fieldId == null) {
15572
          TProtocolUtil.skip(iprot, field.type);
15573
        } else {
15574
          switch (fieldId) {
15575
            case SUCCESS:
15576
              if (field.type == TType.BOOL) {
15577
                this.success = iprot.readBool();
15578
                setSuccessIsSet(true);
15579
              } else { 
15580
                TProtocolUtil.skip(iprot, field.type);
15581
              }
15582
              break;
15583
            case EX:
15584
              if (field.type == TType.STRUCT) {
15585
                this.ex = new TransactionServiceException();
15586
                this.ex.read(iprot);
15587
              } else { 
15588
                TProtocolUtil.skip(iprot, field.type);
15589
              }
15590
              break;
15591
          }
15592
          iprot.readFieldEnd();
15593
        }
15594
      }
15595
      iprot.readStructEnd();
15596
      validate();
15597
    }
15598
 
15599
    public void write(TProtocol oprot) throws TException {
15600
      oprot.writeStructBegin(STRUCT_DESC);
15601
 
15602
      if (this.isSetSuccess()) {
15603
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15604
        oprot.writeBool(this.success);
15605
        oprot.writeFieldEnd();
15606
      } else if (this.isSetEx()) {
15607
        oprot.writeFieldBegin(EX_FIELD_DESC);
15608
        this.ex.write(oprot);
15609
        oprot.writeFieldEnd();
15610
      }
15611
      oprot.writeFieldStop();
15612
      oprot.writeStructEnd();
15613
    }
15614
 
15615
    @Override
15616
    public String toString() {
15617
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
15618
      boolean first = true;
15619
 
15620
      sb.append("success:");
15621
      sb.append(this.success);
15622
      first = false;
15623
      if (!first) sb.append(", ");
15624
      sb.append("ex:");
15625
      if (this.ex == null) {
15626
        sb.append("null");
15627
      } else {
15628
        sb.append(this.ex);
15629
      }
15630
      first = false;
15631
      sb.append(")");
15632
      return sb.toString();
15633
    }
15634
 
15635
    public void validate() throws TException {
15636
      // check for required fields
15637
    }
15638
 
15639
  }
15640
 
15641
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
15642
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
15643
 
15644
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
15645
 
15646
    private long orderId;
15647
 
15648
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15649
    public enum _Fields implements TFieldIdEnum {
15650
      ORDER_ID((short)1, "orderId");
15651
 
15652
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15653
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15654
 
15655
      static {
15656
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15657
          byId.put((int)field._thriftId, field);
15658
          byName.put(field.getFieldName(), field);
15659
        }
15660
      }
15661
 
15662
      /**
15663
       * Find the _Fields constant that matches fieldId, or null if its not found.
15664
       */
15665
      public static _Fields findByThriftId(int fieldId) {
15666
        return byId.get(fieldId);
15667
      }
15668
 
15669
      /**
15670
       * Find the _Fields constant that matches fieldId, throwing an exception
15671
       * if it is not found.
15672
       */
15673
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15674
        _Fields fields = findByThriftId(fieldId);
15675
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15676
        return fields;
15677
      }
15678
 
15679
      /**
15680
       * Find the _Fields constant that matches name, or null if its not found.
15681
       */
15682
      public static _Fields findByName(String name) {
15683
        return byName.get(name);
15684
      }
15685
 
15686
      private final short _thriftId;
15687
      private final String _fieldName;
15688
 
15689
      _Fields(short thriftId, String fieldName) {
15690
        _thriftId = thriftId;
15691
        _fieldName = fieldName;
15692
      }
15693
 
15694
      public short getThriftFieldId() {
15695
        return _thriftId;
15696
      }
15697
 
15698
      public String getFieldName() {
15699
        return _fieldName;
15700
      }
15701
    }
15702
 
15703
    // isset id assignments
15704
    private static final int __ORDERID_ISSET_ID = 0;
15705
    private BitSet __isset_bit_vector = new BitSet(1);
15706
 
15707
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15708
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
15709
          new FieldValueMetaData(TType.I64)));
15710
    }});
15711
 
15712
    static {
15713
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
15714
    }
15715
 
15716
    public billOrder_args() {
15717
    }
15718
 
15719
    public billOrder_args(
15720
      long orderId)
15721
    {
15722
      this();
15723
      this.orderId = orderId;
15724
      setOrderIdIsSet(true);
15725
    }
15726
 
15727
    /**
15728
     * Performs a deep copy on <i>other</i>.
15729
     */
15730
    public billOrder_args(billOrder_args other) {
15731
      __isset_bit_vector.clear();
15732
      __isset_bit_vector.or(other.__isset_bit_vector);
15733
      this.orderId = other.orderId;
15734
    }
15735
 
15736
    public billOrder_args deepCopy() {
15737
      return new billOrder_args(this);
15738
    }
15739
 
15740
    @Deprecated
15741
    public billOrder_args clone() {
15742
      return new billOrder_args(this);
15743
    }
15744
 
15745
    public long getOrderId() {
15746
      return this.orderId;
15747
    }
15748
 
15749
    public billOrder_args setOrderId(long orderId) {
15750
      this.orderId = orderId;
15751
      setOrderIdIsSet(true);
15752
      return this;
15753
    }
15754
 
15755
    public void unsetOrderId() {
15756
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
15757
    }
15758
 
15759
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
15760
    public boolean isSetOrderId() {
15761
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
15762
    }
15763
 
15764
    public void setOrderIdIsSet(boolean value) {
15765
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
15766
    }
15767
 
15768
    public void setFieldValue(_Fields field, Object value) {
15769
      switch (field) {
15770
      case ORDER_ID:
15771
        if (value == null) {
15772
          unsetOrderId();
15773
        } else {
15774
          setOrderId((Long)value);
15775
        }
15776
        break;
15777
 
15778
      }
15779
    }
15780
 
15781
    public void setFieldValue(int fieldID, Object value) {
15782
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15783
    }
15784
 
15785
    public Object getFieldValue(_Fields field) {
15786
      switch (field) {
15787
      case ORDER_ID:
15788
        return new Long(getOrderId());
15789
 
15790
      }
15791
      throw new IllegalStateException();
15792
    }
15793
 
15794
    public Object getFieldValue(int fieldId) {
15795
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15796
    }
15797
 
15798
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15799
    public boolean isSet(_Fields field) {
15800
      switch (field) {
15801
      case ORDER_ID:
15802
        return isSetOrderId();
15803
      }
15804
      throw new IllegalStateException();
15805
    }
15806
 
15807
    public boolean isSet(int fieldID) {
15808
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15809
    }
15810
 
15811
    @Override
15812
    public boolean equals(Object that) {
15813
      if (that == null)
15814
        return false;
15815
      if (that instanceof billOrder_args)
15816
        return this.equals((billOrder_args)that);
15817
      return false;
15818
    }
15819
 
15820
    public boolean equals(billOrder_args that) {
15821
      if (that == null)
15822
        return false;
15823
 
15824
      boolean this_present_orderId = true;
15825
      boolean that_present_orderId = true;
15826
      if (this_present_orderId || that_present_orderId) {
15827
        if (!(this_present_orderId && that_present_orderId))
15828
          return false;
15829
        if (this.orderId != that.orderId)
15830
          return false;
15831
      }
15832
 
15833
      return true;
15834
    }
15835
 
15836
    @Override
15837
    public int hashCode() {
15838
      return 0;
15839
    }
15840
 
15841
    public int compareTo(billOrder_args other) {
15842
      if (!getClass().equals(other.getClass())) {
15843
        return getClass().getName().compareTo(other.getClass().getName());
15844
      }
15845
 
15846
      int lastComparison = 0;
15847
      billOrder_args typedOther = (billOrder_args)other;
15848
 
15849
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
15850
      if (lastComparison != 0) {
15851
        return lastComparison;
15852
      }
15853
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
15854
      if (lastComparison != 0) {
15855
        return lastComparison;
15856
      }
15857
      return 0;
15858
    }
15859
 
15860
    public void read(TProtocol iprot) throws TException {
15861
      TField field;
15862
      iprot.readStructBegin();
15863
      while (true)
15864
      {
15865
        field = iprot.readFieldBegin();
15866
        if (field.type == TType.STOP) { 
15867
          break;
15868
        }
15869
        _Fields fieldId = _Fields.findByThriftId(field.id);
15870
        if (fieldId == null) {
15871
          TProtocolUtil.skip(iprot, field.type);
15872
        } else {
15873
          switch (fieldId) {
15874
            case ORDER_ID:
15875
              if (field.type == TType.I64) {
15876
                this.orderId = iprot.readI64();
15877
                setOrderIdIsSet(true);
15878
              } else { 
15879
                TProtocolUtil.skip(iprot, field.type);
15880
              }
15881
              break;
15882
          }
15883
          iprot.readFieldEnd();
15884
        }
15885
      }
15886
      iprot.readStructEnd();
15887
      validate();
15888
    }
15889
 
15890
    public void write(TProtocol oprot) throws TException {
15891
      validate();
15892
 
15893
      oprot.writeStructBegin(STRUCT_DESC);
15894
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15895
      oprot.writeI64(this.orderId);
15896
      oprot.writeFieldEnd();
15897
      oprot.writeFieldStop();
15898
      oprot.writeStructEnd();
15899
    }
15900
 
15901
    @Override
15902
    public String toString() {
15903
      StringBuilder sb = new StringBuilder("billOrder_args(");
15904
      boolean first = true;
15905
 
15906
      sb.append("orderId:");
15907
      sb.append(this.orderId);
15908
      first = false;
15909
      sb.append(")");
15910
      return sb.toString();
15911
    }
15912
 
15913
    public void validate() throws TException {
15914
      // check for required fields
15915
    }
15916
 
15917
  }
15918
 
15919
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
15920
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
15921
 
15922
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15923
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15924
 
15925
    private boolean success;
15926
    private TransactionServiceException ex;
15927
 
15928
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15929
    public enum _Fields implements TFieldIdEnum {
15930
      SUCCESS((short)0, "success"),
15931
      EX((short)1, "ex");
15932
 
15933
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15934
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15935
 
15936
      static {
15937
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15938
          byId.put((int)field._thriftId, field);
15939
          byName.put(field.getFieldName(), field);
15940
        }
15941
      }
15942
 
15943
      /**
15944
       * Find the _Fields constant that matches fieldId, or null if its not found.
15945
       */
15946
      public static _Fields findByThriftId(int fieldId) {
15947
        return byId.get(fieldId);
15948
      }
15949
 
15950
      /**
15951
       * Find the _Fields constant that matches fieldId, throwing an exception
15952
       * if it is not found.
15953
       */
15954
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15955
        _Fields fields = findByThriftId(fieldId);
15956
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15957
        return fields;
15958
      }
15959
 
15960
      /**
15961
       * Find the _Fields constant that matches name, or null if its not found.
15962
       */
15963
      public static _Fields findByName(String name) {
15964
        return byName.get(name);
15965
      }
15966
 
15967
      private final short _thriftId;
15968
      private final String _fieldName;
15969
 
15970
      _Fields(short thriftId, String fieldName) {
15971
        _thriftId = thriftId;
15972
        _fieldName = fieldName;
15973
      }
15974
 
15975
      public short getThriftFieldId() {
15976
        return _thriftId;
15977
      }
15978
 
15979
      public String getFieldName() {
15980
        return _fieldName;
15981
      }
15982
    }
15983
 
15984
    // isset id assignments
15985
    private static final int __SUCCESS_ISSET_ID = 0;
15986
    private BitSet __isset_bit_vector = new BitSet(1);
15987
 
15988
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15989
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15990
          new FieldValueMetaData(TType.BOOL)));
15991
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15992
          new FieldValueMetaData(TType.STRUCT)));
15993
    }});
15994
 
15995
    static {
15996
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
15997
    }
15998
 
15999
    public billOrder_result() {
16000
    }
16001
 
16002
    public billOrder_result(
16003
      boolean success,
16004
      TransactionServiceException ex)
16005
    {
16006
      this();
16007
      this.success = success;
16008
      setSuccessIsSet(true);
16009
      this.ex = ex;
16010
    }
16011
 
16012
    /**
16013
     * Performs a deep copy on <i>other</i>.
16014
     */
16015
    public billOrder_result(billOrder_result other) {
16016
      __isset_bit_vector.clear();
16017
      __isset_bit_vector.or(other.__isset_bit_vector);
16018
      this.success = other.success;
16019
      if (other.isSetEx()) {
16020
        this.ex = new TransactionServiceException(other.ex);
16021
      }
16022
    }
16023
 
16024
    public billOrder_result deepCopy() {
16025
      return new billOrder_result(this);
16026
    }
16027
 
16028
    @Deprecated
16029
    public billOrder_result clone() {
16030
      return new billOrder_result(this);
16031
    }
16032
 
16033
    public boolean isSuccess() {
16034
      return this.success;
16035
    }
16036
 
16037
    public billOrder_result setSuccess(boolean success) {
16038
      this.success = success;
16039
      setSuccessIsSet(true);
16040
      return this;
16041
    }
16042
 
16043
    public void unsetSuccess() {
16044
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16045
    }
16046
 
16047
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16048
    public boolean isSetSuccess() {
16049
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16050
    }
16051
 
16052
    public void setSuccessIsSet(boolean value) {
16053
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16054
    }
16055
 
16056
    public TransactionServiceException getEx() {
16057
      return this.ex;
16058
    }
16059
 
16060
    public billOrder_result setEx(TransactionServiceException ex) {
16061
      this.ex = ex;
16062
      return this;
16063
    }
16064
 
16065
    public void unsetEx() {
16066
      this.ex = null;
16067
    }
16068
 
16069
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16070
    public boolean isSetEx() {
16071
      return this.ex != null;
16072
    }
16073
 
16074
    public void setExIsSet(boolean value) {
16075
      if (!value) {
16076
        this.ex = null;
16077
      }
16078
    }
16079
 
16080
    public void setFieldValue(_Fields field, Object value) {
16081
      switch (field) {
16082
      case SUCCESS:
16083
        if (value == null) {
16084
          unsetSuccess();
16085
        } else {
16086
          setSuccess((Boolean)value);
16087
        }
16088
        break;
16089
 
16090
      case EX:
16091
        if (value == null) {
16092
          unsetEx();
16093
        } else {
16094
          setEx((TransactionServiceException)value);
16095
        }
16096
        break;
16097
 
16098
      }
16099
    }
16100
 
16101
    public void setFieldValue(int fieldID, Object value) {
16102
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16103
    }
16104
 
16105
    public Object getFieldValue(_Fields field) {
16106
      switch (field) {
16107
      case SUCCESS:
16108
        return new Boolean(isSuccess());
16109
 
16110
      case EX:
16111
        return getEx();
16112
 
16113
      }
16114
      throw new IllegalStateException();
16115
    }
16116
 
16117
    public Object getFieldValue(int fieldId) {
16118
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16119
    }
16120
 
16121
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16122
    public boolean isSet(_Fields field) {
16123
      switch (field) {
16124
      case SUCCESS:
16125
        return isSetSuccess();
16126
      case EX:
16127
        return isSetEx();
16128
      }
16129
      throw new IllegalStateException();
16130
    }
16131
 
16132
    public boolean isSet(int fieldID) {
16133
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16134
    }
16135
 
16136
    @Override
16137
    public boolean equals(Object that) {
16138
      if (that == null)
16139
        return false;
16140
      if (that instanceof billOrder_result)
16141
        return this.equals((billOrder_result)that);
16142
      return false;
16143
    }
16144
 
16145
    public boolean equals(billOrder_result that) {
16146
      if (that == null)
16147
        return false;
16148
 
16149
      boolean this_present_success = true;
16150
      boolean that_present_success = true;
16151
      if (this_present_success || that_present_success) {
16152
        if (!(this_present_success && that_present_success))
16153
          return false;
16154
        if (this.success != that.success)
16155
          return false;
16156
      }
16157
 
16158
      boolean this_present_ex = true && this.isSetEx();
16159
      boolean that_present_ex = true && that.isSetEx();
16160
      if (this_present_ex || that_present_ex) {
16161
        if (!(this_present_ex && that_present_ex))
16162
          return false;
16163
        if (!this.ex.equals(that.ex))
16164
          return false;
16165
      }
16166
 
16167
      return true;
16168
    }
16169
 
16170
    @Override
16171
    public int hashCode() {
16172
      return 0;
16173
    }
16174
 
16175
    public int compareTo(billOrder_result other) {
16176
      if (!getClass().equals(other.getClass())) {
16177
        return getClass().getName().compareTo(other.getClass().getName());
16178
      }
16179
 
16180
      int lastComparison = 0;
16181
      billOrder_result typedOther = (billOrder_result)other;
16182
 
16183
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16184
      if (lastComparison != 0) {
16185
        return lastComparison;
16186
      }
16187
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16188
      if (lastComparison != 0) {
16189
        return lastComparison;
16190
      }
16191
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16192
      if (lastComparison != 0) {
16193
        return lastComparison;
16194
      }
16195
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16196
      if (lastComparison != 0) {
16197
        return lastComparison;
16198
      }
16199
      return 0;
16200
    }
16201
 
16202
    public void read(TProtocol iprot) throws TException {
16203
      TField field;
16204
      iprot.readStructBegin();
16205
      while (true)
16206
      {
16207
        field = iprot.readFieldBegin();
16208
        if (field.type == TType.STOP) { 
16209
          break;
16210
        }
16211
        _Fields fieldId = _Fields.findByThriftId(field.id);
16212
        if (fieldId == null) {
16213
          TProtocolUtil.skip(iprot, field.type);
16214
        } else {
16215
          switch (fieldId) {
16216
            case SUCCESS:
16217
              if (field.type == TType.BOOL) {
16218
                this.success = iprot.readBool();
16219
                setSuccessIsSet(true);
16220
              } else { 
16221
                TProtocolUtil.skip(iprot, field.type);
16222
              }
16223
              break;
16224
            case EX:
16225
              if (field.type == TType.STRUCT) {
16226
                this.ex = new TransactionServiceException();
16227
                this.ex.read(iprot);
16228
              } else { 
16229
                TProtocolUtil.skip(iprot, field.type);
16230
              }
16231
              break;
16232
          }
16233
          iprot.readFieldEnd();
16234
        }
16235
      }
16236
      iprot.readStructEnd();
16237
      validate();
16238
    }
16239
 
16240
    public void write(TProtocol oprot) throws TException {
16241
      oprot.writeStructBegin(STRUCT_DESC);
16242
 
16243
      if (this.isSetSuccess()) {
16244
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16245
        oprot.writeBool(this.success);
16246
        oprot.writeFieldEnd();
16247
      } else if (this.isSetEx()) {
16248
        oprot.writeFieldBegin(EX_FIELD_DESC);
16249
        this.ex.write(oprot);
16250
        oprot.writeFieldEnd();
16251
      }
16252
      oprot.writeFieldStop();
16253
      oprot.writeStructEnd();
16254
    }
16255
 
16256
    @Override
16257
    public String toString() {
16258
      StringBuilder sb = new StringBuilder("billOrder_result(");
16259
      boolean first = true;
16260
 
16261
      sb.append("success:");
16262
      sb.append(this.success);
16263
      first = false;
16264
      if (!first) sb.append(", ");
16265
      sb.append("ex:");
16266
      if (this.ex == null) {
16267
        sb.append("null");
16268
      } else {
16269
        sb.append(this.ex);
16270
      }
16271
      first = false;
16272
      sb.append(")");
16273
      return sb.toString();
16274
    }
16275
 
16276
    public void validate() throws TException {
16277
      // check for required fields
16278
    }
16279
 
16280
  }
16281
 
483 rajveer 16282
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
16283
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 16284
 
16285
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 16286
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 16287
 
16288
    private long transactionId;
1529 ankur.sing 16289
    private long customerId;
68 ashish 16290
 
16291
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16292
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 16293
      TRANSACTION_ID((short)1, "transactionId"),
16294
      CUSTOMER_ID((short)2, "customerId");
68 ashish 16295
 
16296
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16297
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16298
 
16299
      static {
16300
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16301
          byId.put((int)field._thriftId, field);
16302
          byName.put(field.getFieldName(), field);
16303
        }
16304
      }
16305
 
16306
      /**
16307
       * Find the _Fields constant that matches fieldId, or null if its not found.
16308
       */
16309
      public static _Fields findByThriftId(int fieldId) {
16310
        return byId.get(fieldId);
16311
      }
16312
 
16313
      /**
16314
       * Find the _Fields constant that matches fieldId, throwing an exception
16315
       * if it is not found.
16316
       */
16317
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16318
        _Fields fields = findByThriftId(fieldId);
16319
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16320
        return fields;
16321
      }
16322
 
16323
      /**
16324
       * Find the _Fields constant that matches name, or null if its not found.
16325
       */
16326
      public static _Fields findByName(String name) {
16327
        return byName.get(name);
16328
      }
16329
 
16330
      private final short _thriftId;
16331
      private final String _fieldName;
16332
 
16333
      _Fields(short thriftId, String fieldName) {
16334
        _thriftId = thriftId;
16335
        _fieldName = fieldName;
16336
      }
16337
 
16338
      public short getThriftFieldId() {
16339
        return _thriftId;
16340
      }
16341
 
16342
      public String getFieldName() {
16343
        return _fieldName;
16344
      }
16345
    }
16346
 
16347
    // isset id assignments
16348
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 16349
    private static final int __CUSTOMERID_ISSET_ID = 1;
16350
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 16351
 
16352
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16353
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
16354
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 16355
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
16356
          new FieldValueMetaData(TType.I64)));
68 ashish 16357
    }});
16358
 
16359
    static {
483 rajveer 16360
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 16361
    }
16362
 
483 rajveer 16363
    public getOrdersForTransaction_args() {
68 ashish 16364
    }
16365
 
483 rajveer 16366
    public getOrdersForTransaction_args(
1529 ankur.sing 16367
      long transactionId,
16368
      long customerId)
68 ashish 16369
    {
16370
      this();
16371
      this.transactionId = transactionId;
16372
      setTransactionIdIsSet(true);
1529 ankur.sing 16373
      this.customerId = customerId;
16374
      setCustomerIdIsSet(true);
68 ashish 16375
    }
16376
 
16377
    /**
16378
     * Performs a deep copy on <i>other</i>.
16379
     */
483 rajveer 16380
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 16381
      __isset_bit_vector.clear();
16382
      __isset_bit_vector.or(other.__isset_bit_vector);
16383
      this.transactionId = other.transactionId;
1529 ankur.sing 16384
      this.customerId = other.customerId;
68 ashish 16385
    }
16386
 
483 rajveer 16387
    public getOrdersForTransaction_args deepCopy() {
16388
      return new getOrdersForTransaction_args(this);
68 ashish 16389
    }
16390
 
16391
    @Deprecated
483 rajveer 16392
    public getOrdersForTransaction_args clone() {
16393
      return new getOrdersForTransaction_args(this);
68 ashish 16394
    }
16395
 
16396
    public long getTransactionId() {
16397
      return this.transactionId;
16398
    }
16399
 
483 rajveer 16400
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 16401
      this.transactionId = transactionId;
16402
      setTransactionIdIsSet(true);
16403
      return this;
16404
    }
16405
 
16406
    public void unsetTransactionId() {
16407
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
16408
    }
16409
 
16410
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
16411
    public boolean isSetTransactionId() {
16412
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
16413
    }
16414
 
16415
    public void setTransactionIdIsSet(boolean value) {
16416
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
16417
    }
16418
 
1529 ankur.sing 16419
    public long getCustomerId() {
16420
      return this.customerId;
16421
    }
16422
 
16423
    public getOrdersForTransaction_args setCustomerId(long customerId) {
16424
      this.customerId = customerId;
16425
      setCustomerIdIsSet(true);
16426
      return this;
16427
    }
16428
 
16429
    public void unsetCustomerId() {
16430
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
16431
    }
16432
 
16433
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
16434
    public boolean isSetCustomerId() {
16435
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
16436
    }
16437
 
16438
    public void setCustomerIdIsSet(boolean value) {
16439
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
16440
    }
16441
 
68 ashish 16442
    public void setFieldValue(_Fields field, Object value) {
16443
      switch (field) {
16444
      case TRANSACTION_ID:
16445
        if (value == null) {
16446
          unsetTransactionId();
16447
        } else {
16448
          setTransactionId((Long)value);
16449
        }
16450
        break;
16451
 
1529 ankur.sing 16452
      case CUSTOMER_ID:
16453
        if (value == null) {
16454
          unsetCustomerId();
16455
        } else {
16456
          setCustomerId((Long)value);
16457
        }
16458
        break;
16459
 
68 ashish 16460
      }
16461
    }
16462
 
16463
    public void setFieldValue(int fieldID, Object value) {
16464
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16465
    }
16466
 
16467
    public Object getFieldValue(_Fields field) {
16468
      switch (field) {
16469
      case TRANSACTION_ID:
16470
        return new Long(getTransactionId());
16471
 
1529 ankur.sing 16472
      case CUSTOMER_ID:
16473
        return new Long(getCustomerId());
16474
 
68 ashish 16475
      }
16476
      throw new IllegalStateException();
16477
    }
16478
 
16479
    public Object getFieldValue(int fieldId) {
16480
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16481
    }
16482
 
16483
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16484
    public boolean isSet(_Fields field) {
16485
      switch (field) {
16486
      case TRANSACTION_ID:
16487
        return isSetTransactionId();
1529 ankur.sing 16488
      case CUSTOMER_ID:
16489
        return isSetCustomerId();
68 ashish 16490
      }
16491
      throw new IllegalStateException();
16492
    }
16493
 
16494
    public boolean isSet(int fieldID) {
16495
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16496
    }
16497
 
16498
    @Override
16499
    public boolean equals(Object that) {
16500
      if (that == null)
16501
        return false;
483 rajveer 16502
      if (that instanceof getOrdersForTransaction_args)
16503
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 16504
      return false;
16505
    }
16506
 
483 rajveer 16507
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 16508
      if (that == null)
16509
        return false;
16510
 
16511
      boolean this_present_transactionId = true;
16512
      boolean that_present_transactionId = true;
16513
      if (this_present_transactionId || that_present_transactionId) {
16514
        if (!(this_present_transactionId && that_present_transactionId))
16515
          return false;
16516
        if (this.transactionId != that.transactionId)
16517
          return false;
16518
      }
16519
 
1529 ankur.sing 16520
      boolean this_present_customerId = true;
16521
      boolean that_present_customerId = true;
16522
      if (this_present_customerId || that_present_customerId) {
16523
        if (!(this_present_customerId && that_present_customerId))
16524
          return false;
16525
        if (this.customerId != that.customerId)
16526
          return false;
16527
      }
16528
 
68 ashish 16529
      return true;
16530
    }
16531
 
16532
    @Override
16533
    public int hashCode() {
16534
      return 0;
16535
    }
16536
 
483 rajveer 16537
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 16538
      if (!getClass().equals(other.getClass())) {
16539
        return getClass().getName().compareTo(other.getClass().getName());
16540
      }
16541
 
16542
      int lastComparison = 0;
483 rajveer 16543
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 16544
 
16545
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
16546
      if (lastComparison != 0) {
16547
        return lastComparison;
16548
      }
16549
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
16550
      if (lastComparison != 0) {
16551
        return lastComparison;
16552
      }
1529 ankur.sing 16553
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
16554
      if (lastComparison != 0) {
16555
        return lastComparison;
16556
      }
16557
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
16558
      if (lastComparison != 0) {
16559
        return lastComparison;
16560
      }
68 ashish 16561
      return 0;
16562
    }
16563
 
16564
    public void read(TProtocol iprot) throws TException {
16565
      TField field;
16566
      iprot.readStructBegin();
16567
      while (true)
16568
      {
16569
        field = iprot.readFieldBegin();
16570
        if (field.type == TType.STOP) { 
16571
          break;
16572
        }
16573
        _Fields fieldId = _Fields.findByThriftId(field.id);
16574
        if (fieldId == null) {
16575
          TProtocolUtil.skip(iprot, field.type);
16576
        } else {
16577
          switch (fieldId) {
16578
            case TRANSACTION_ID:
16579
              if (field.type == TType.I64) {
16580
                this.transactionId = iprot.readI64();
16581
                setTransactionIdIsSet(true);
16582
              } else { 
16583
                TProtocolUtil.skip(iprot, field.type);
16584
              }
16585
              break;
1529 ankur.sing 16586
            case CUSTOMER_ID:
16587
              if (field.type == TType.I64) {
16588
                this.customerId = iprot.readI64();
16589
                setCustomerIdIsSet(true);
16590
              } else { 
16591
                TProtocolUtil.skip(iprot, field.type);
16592
              }
16593
              break;
68 ashish 16594
          }
16595
          iprot.readFieldEnd();
16596
        }
16597
      }
16598
      iprot.readStructEnd();
16599
      validate();
16600
    }
16601
 
16602
    public void write(TProtocol oprot) throws TException {
16603
      validate();
16604
 
16605
      oprot.writeStructBegin(STRUCT_DESC);
16606
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
16607
      oprot.writeI64(this.transactionId);
16608
      oprot.writeFieldEnd();
1529 ankur.sing 16609
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16610
      oprot.writeI64(this.customerId);
16611
      oprot.writeFieldEnd();
68 ashish 16612
      oprot.writeFieldStop();
16613
      oprot.writeStructEnd();
16614
    }
16615
 
16616
    @Override
16617
    public String toString() {
483 rajveer 16618
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 16619
      boolean first = true;
16620
 
16621
      sb.append("transactionId:");
16622
      sb.append(this.transactionId);
16623
      first = false;
1529 ankur.sing 16624
      if (!first) sb.append(", ");
16625
      sb.append("customerId:");
16626
      sb.append(this.customerId);
16627
      first = false;
68 ashish 16628
      sb.append(")");
16629
      return sb.toString();
16630
    }
16631
 
16632
    public void validate() throws TException {
16633
      // check for required fields
16634
    }
16635
 
16636
  }
16637
 
483 rajveer 16638
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
16639
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 16640
 
483 rajveer 16641
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16642
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16643
 
483 rajveer 16644
    private List<Order> success;
68 ashish 16645
    private TransactionServiceException ex;
16646
 
16647
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16648
    public enum _Fields implements TFieldIdEnum {
16649
      SUCCESS((short)0, "success"),
16650
      EX((short)1, "ex");
16651
 
16652
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16653
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16654
 
16655
      static {
16656
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16657
          byId.put((int)field._thriftId, field);
16658
          byName.put(field.getFieldName(), field);
16659
        }
16660
      }
16661
 
16662
      /**
16663
       * Find the _Fields constant that matches fieldId, or null if its not found.
16664
       */
16665
      public static _Fields findByThriftId(int fieldId) {
16666
        return byId.get(fieldId);
16667
      }
16668
 
16669
      /**
16670
       * Find the _Fields constant that matches fieldId, throwing an exception
16671
       * if it is not found.
16672
       */
16673
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16674
        _Fields fields = findByThriftId(fieldId);
16675
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16676
        return fields;
16677
      }
16678
 
16679
      /**
16680
       * Find the _Fields constant that matches name, or null if its not found.
16681
       */
16682
      public static _Fields findByName(String name) {
16683
        return byName.get(name);
16684
      }
16685
 
16686
      private final short _thriftId;
16687
      private final String _fieldName;
16688
 
16689
      _Fields(short thriftId, String fieldName) {
16690
        _thriftId = thriftId;
16691
        _fieldName = fieldName;
16692
      }
16693
 
16694
      public short getThriftFieldId() {
16695
        return _thriftId;
16696
      }
16697
 
16698
      public String getFieldName() {
16699
        return _fieldName;
16700
      }
16701
    }
16702
 
16703
    // isset id assignments
16704
 
16705
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16706
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16707
          new ListMetaData(TType.LIST, 
16708
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16709
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16710
          new FieldValueMetaData(TType.STRUCT)));
16711
    }});
16712
 
16713
    static {
483 rajveer 16714
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 16715
    }
16716
 
483 rajveer 16717
    public getOrdersForTransaction_result() {
68 ashish 16718
    }
16719
 
483 rajveer 16720
    public getOrdersForTransaction_result(
16721
      List<Order> success,
68 ashish 16722
      TransactionServiceException ex)
16723
    {
16724
      this();
16725
      this.success = success;
16726
      this.ex = ex;
16727
    }
16728
 
16729
    /**
16730
     * Performs a deep copy on <i>other</i>.
16731
     */
483 rajveer 16732
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
16733
      if (other.isSetSuccess()) {
16734
        List<Order> __this__success = new ArrayList<Order>();
16735
        for (Order other_element : other.success) {
16736
          __this__success.add(new Order(other_element));
16737
        }
16738
        this.success = __this__success;
16739
      }
68 ashish 16740
      if (other.isSetEx()) {
16741
        this.ex = new TransactionServiceException(other.ex);
16742
      }
16743
    }
16744
 
483 rajveer 16745
    public getOrdersForTransaction_result deepCopy() {
16746
      return new getOrdersForTransaction_result(this);
68 ashish 16747
    }
16748
 
16749
    @Deprecated
483 rajveer 16750
    public getOrdersForTransaction_result clone() {
16751
      return new getOrdersForTransaction_result(this);
68 ashish 16752
    }
16753
 
483 rajveer 16754
    public int getSuccessSize() {
16755
      return (this.success == null) ? 0 : this.success.size();
16756
    }
16757
 
16758
    public java.util.Iterator<Order> getSuccessIterator() {
16759
      return (this.success == null) ? null : this.success.iterator();
16760
    }
16761
 
16762
    public void addToSuccess(Order elem) {
16763
      if (this.success == null) {
16764
        this.success = new ArrayList<Order>();
16765
      }
16766
      this.success.add(elem);
16767
    }
16768
 
16769
    public List<Order> getSuccess() {
68 ashish 16770
      return this.success;
16771
    }
16772
 
483 rajveer 16773
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 16774
      this.success = success;
16775
      return this;
16776
    }
16777
 
16778
    public void unsetSuccess() {
483 rajveer 16779
      this.success = null;
68 ashish 16780
    }
16781
 
16782
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16783
    public boolean isSetSuccess() {
483 rajveer 16784
      return this.success != null;
68 ashish 16785
    }
16786
 
16787
    public void setSuccessIsSet(boolean value) {
483 rajveer 16788
      if (!value) {
16789
        this.success = null;
16790
      }
68 ashish 16791
    }
16792
 
16793
    public TransactionServiceException getEx() {
16794
      return this.ex;
16795
    }
16796
 
483 rajveer 16797
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 16798
      this.ex = ex;
16799
      return this;
16800
    }
16801
 
16802
    public void unsetEx() {
16803
      this.ex = null;
16804
    }
16805
 
16806
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16807
    public boolean isSetEx() {
16808
      return this.ex != null;
16809
    }
16810
 
16811
    public void setExIsSet(boolean value) {
16812
      if (!value) {
16813
        this.ex = null;
16814
      }
16815
    }
16816
 
16817
    public void setFieldValue(_Fields field, Object value) {
16818
      switch (field) {
16819
      case SUCCESS:
16820
        if (value == null) {
16821
          unsetSuccess();
16822
        } else {
483 rajveer 16823
          setSuccess((List<Order>)value);
68 ashish 16824
        }
16825
        break;
16826
 
16827
      case EX:
16828
        if (value == null) {
16829
          unsetEx();
16830
        } else {
16831
          setEx((TransactionServiceException)value);
16832
        }
16833
        break;
16834
 
16835
      }
16836
    }
16837
 
16838
    public void setFieldValue(int fieldID, Object value) {
16839
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16840
    }
16841
 
16842
    public Object getFieldValue(_Fields field) {
16843
      switch (field) {
16844
      case SUCCESS:
483 rajveer 16845
        return getSuccess();
68 ashish 16846
 
16847
      case EX:
16848
        return getEx();
16849
 
16850
      }
16851
      throw new IllegalStateException();
16852
    }
16853
 
16854
    public Object getFieldValue(int fieldId) {
16855
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16856
    }
16857
 
16858
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16859
    public boolean isSet(_Fields field) {
16860
      switch (field) {
16861
      case SUCCESS:
16862
        return isSetSuccess();
16863
      case EX:
16864
        return isSetEx();
16865
      }
16866
      throw new IllegalStateException();
16867
    }
16868
 
16869
    public boolean isSet(int fieldID) {
16870
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16871
    }
16872
 
16873
    @Override
16874
    public boolean equals(Object that) {
16875
      if (that == null)
16876
        return false;
483 rajveer 16877
      if (that instanceof getOrdersForTransaction_result)
16878
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 16879
      return false;
16880
    }
16881
 
483 rajveer 16882
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 16883
      if (that == null)
16884
        return false;
16885
 
483 rajveer 16886
      boolean this_present_success = true && this.isSetSuccess();
16887
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16888
      if (this_present_success || that_present_success) {
16889
        if (!(this_present_success && that_present_success))
16890
          return false;
483 rajveer 16891
        if (!this.success.equals(that.success))
68 ashish 16892
          return false;
16893
      }
16894
 
16895
      boolean this_present_ex = true && this.isSetEx();
16896
      boolean that_present_ex = true && that.isSetEx();
16897
      if (this_present_ex || that_present_ex) {
16898
        if (!(this_present_ex && that_present_ex))
16899
          return false;
16900
        if (!this.ex.equals(that.ex))
16901
          return false;
16902
      }
16903
 
16904
      return true;
16905
    }
16906
 
16907
    @Override
16908
    public int hashCode() {
16909
      return 0;
16910
    }
16911
 
483 rajveer 16912
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 16913
      if (!getClass().equals(other.getClass())) {
16914
        return getClass().getName().compareTo(other.getClass().getName());
16915
      }
16916
 
16917
      int lastComparison = 0;
483 rajveer 16918
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 16919
 
16920
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16921
      if (lastComparison != 0) {
16922
        return lastComparison;
16923
      }
16924
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16925
      if (lastComparison != 0) {
16926
        return lastComparison;
16927
      }
16928
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16929
      if (lastComparison != 0) {
16930
        return lastComparison;
16931
      }
16932
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16933
      if (lastComparison != 0) {
16934
        return lastComparison;
16935
      }
16936
      return 0;
16937
    }
16938
 
16939
    public void read(TProtocol iprot) throws TException {
16940
      TField field;
16941
      iprot.readStructBegin();
16942
      while (true)
16943
      {
16944
        field = iprot.readFieldBegin();
16945
        if (field.type == TType.STOP) { 
16946
          break;
16947
        }
16948
        _Fields fieldId = _Fields.findByThriftId(field.id);
16949
        if (fieldId == null) {
16950
          TProtocolUtil.skip(iprot, field.type);
16951
        } else {
16952
          switch (fieldId) {
16953
            case SUCCESS:
483 rajveer 16954
              if (field.type == TType.LIST) {
16955
                {
1382 varun.gupt 16956
                  TList _list32 = iprot.readListBegin();
16957
                  this.success = new ArrayList<Order>(_list32.size);
16958
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 16959
                  {
1382 varun.gupt 16960
                    Order _elem34;
16961
                    _elem34 = new Order();
16962
                    _elem34.read(iprot);
16963
                    this.success.add(_elem34);
483 rajveer 16964
                  }
16965
                  iprot.readListEnd();
16966
                }
68 ashish 16967
              } else { 
16968
                TProtocolUtil.skip(iprot, field.type);
16969
              }
16970
              break;
16971
            case EX:
16972
              if (field.type == TType.STRUCT) {
16973
                this.ex = new TransactionServiceException();
16974
                this.ex.read(iprot);
16975
              } else { 
16976
                TProtocolUtil.skip(iprot, field.type);
16977
              }
16978
              break;
16979
          }
16980
          iprot.readFieldEnd();
16981
        }
16982
      }
16983
      iprot.readStructEnd();
16984
      validate();
16985
    }
16986
 
16987
    public void write(TProtocol oprot) throws TException {
16988
      oprot.writeStructBegin(STRUCT_DESC);
16989
 
16990
      if (this.isSetSuccess()) {
16991
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16992
        {
16993
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16994
          for (Order _iter35 : this.success)
483 rajveer 16995
          {
1382 varun.gupt 16996
            _iter35.write(oprot);
483 rajveer 16997
          }
16998
          oprot.writeListEnd();
16999
        }
68 ashish 17000
        oprot.writeFieldEnd();
17001
      } else if (this.isSetEx()) {
17002
        oprot.writeFieldBegin(EX_FIELD_DESC);
17003
        this.ex.write(oprot);
17004
        oprot.writeFieldEnd();
17005
      }
17006
      oprot.writeFieldStop();
17007
      oprot.writeStructEnd();
17008
    }
17009
 
17010
    @Override
17011
    public String toString() {
483 rajveer 17012
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 17013
      boolean first = true;
17014
 
17015
      sb.append("success:");
483 rajveer 17016
      if (this.success == null) {
17017
        sb.append("null");
17018
      } else {
17019
        sb.append(this.success);
17020
      }
68 ashish 17021
      first = false;
17022
      if (!first) sb.append(", ");
17023
      sb.append("ex:");
17024
      if (this.ex == null) {
17025
        sb.append("null");
17026
      } else {
17027
        sb.append(this.ex);
17028
      }
17029
      first = false;
17030
      sb.append(")");
17031
      return sb.toString();
17032
    }
17033
 
17034
    public void validate() throws TException {
17035
      // check for required fields
17036
    }
17037
 
17038
  }
17039
 
483 rajveer 17040
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
17041
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 17042
 
483 rajveer 17043
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
17044
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
17045
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
17046
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 17047
 
483 rajveer 17048
    private long customerId;
17049
    private long from_date;
17050
    private long to_date;
17051
    private OrderStatus status;
68 ashish 17052
 
17053
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17054
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17055
      CUSTOMER_ID((short)1, "customerId"),
17056
      FROM_DATE((short)2, "from_date"),
17057
      TO_DATE((short)3, "to_date"),
17058
      /**
17059
       * 
17060
       * @see OrderStatus
17061
       */
17062
      STATUS((short)4, "status");
68 ashish 17063
 
17064
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17065
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17066
 
17067
      static {
17068
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17069
          byId.put((int)field._thriftId, field);
17070
          byName.put(field.getFieldName(), field);
17071
        }
17072
      }
17073
 
17074
      /**
17075
       * Find the _Fields constant that matches fieldId, or null if its not found.
17076
       */
17077
      public static _Fields findByThriftId(int fieldId) {
17078
        return byId.get(fieldId);
17079
      }
17080
 
17081
      /**
17082
       * Find the _Fields constant that matches fieldId, throwing an exception
17083
       * if it is not found.
17084
       */
17085
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17086
        _Fields fields = findByThriftId(fieldId);
17087
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17088
        return fields;
17089
      }
17090
 
17091
      /**
17092
       * Find the _Fields constant that matches name, or null if its not found.
17093
       */
17094
      public static _Fields findByName(String name) {
17095
        return byName.get(name);
17096
      }
17097
 
17098
      private final short _thriftId;
17099
      private final String _fieldName;
17100
 
17101
      _Fields(short thriftId, String fieldName) {
17102
        _thriftId = thriftId;
17103
        _fieldName = fieldName;
17104
      }
17105
 
17106
      public short getThriftFieldId() {
17107
        return _thriftId;
17108
      }
17109
 
17110
      public String getFieldName() {
17111
        return _fieldName;
17112
      }
17113
    }
17114
 
17115
    // isset id assignments
483 rajveer 17116
    private static final int __CUSTOMERID_ISSET_ID = 0;
17117
    private static final int __FROM_DATE_ISSET_ID = 1;
17118
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 17119
    private BitSet __isset_bit_vector = new BitSet(3);
17120
 
17121
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17122
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 17123
          new FieldValueMetaData(TType.I64)));
483 rajveer 17124
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 17125
          new FieldValueMetaData(TType.I64)));
483 rajveer 17126
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 17127
          new FieldValueMetaData(TType.I64)));
483 rajveer 17128
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
17129
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 17130
    }});
17131
 
17132
    static {
483 rajveer 17133
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 17134
    }
17135
 
483 rajveer 17136
    public getOrdersForCustomer_args() {
68 ashish 17137
    }
17138
 
483 rajveer 17139
    public getOrdersForCustomer_args(
17140
      long customerId,
17141
      long from_date,
17142
      long to_date,
17143
      OrderStatus status)
68 ashish 17144
    {
17145
      this();
483 rajveer 17146
      this.customerId = customerId;
17147
      setCustomerIdIsSet(true);
17148
      this.from_date = from_date;
17149
      setFrom_dateIsSet(true);
17150
      this.to_date = to_date;
17151
      setTo_dateIsSet(true);
17152
      this.status = status;
68 ashish 17153
    }
17154
 
17155
    /**
17156
     * Performs a deep copy on <i>other</i>.
17157
     */
483 rajveer 17158
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 17159
      __isset_bit_vector.clear();
17160
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17161
      this.customerId = other.customerId;
17162
      this.from_date = other.from_date;
17163
      this.to_date = other.to_date;
17164
      if (other.isSetStatus()) {
17165
        this.status = other.status;
17166
      }
68 ashish 17167
    }
17168
 
483 rajveer 17169
    public getOrdersForCustomer_args deepCopy() {
17170
      return new getOrdersForCustomer_args(this);
68 ashish 17171
    }
17172
 
17173
    @Deprecated
483 rajveer 17174
    public getOrdersForCustomer_args clone() {
17175
      return new getOrdersForCustomer_args(this);
68 ashish 17176
    }
17177
 
483 rajveer 17178
    public long getCustomerId() {
17179
      return this.customerId;
68 ashish 17180
    }
17181
 
483 rajveer 17182
    public getOrdersForCustomer_args setCustomerId(long customerId) {
17183
      this.customerId = customerId;
17184
      setCustomerIdIsSet(true);
68 ashish 17185
      return this;
17186
    }
17187
 
483 rajveer 17188
    public void unsetCustomerId() {
17189
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 17190
    }
17191
 
483 rajveer 17192
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
17193
    public boolean isSetCustomerId() {
17194
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 17195
    }
17196
 
483 rajveer 17197
    public void setCustomerIdIsSet(boolean value) {
17198
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 17199
    }
17200
 
483 rajveer 17201
    public long getFrom_date() {
17202
      return this.from_date;
68 ashish 17203
    }
17204
 
483 rajveer 17205
    public getOrdersForCustomer_args setFrom_date(long from_date) {
17206
      this.from_date = from_date;
17207
      setFrom_dateIsSet(true);
68 ashish 17208
      return this;
17209
    }
17210
 
483 rajveer 17211
    public void unsetFrom_date() {
17212
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 17213
    }
17214
 
483 rajveer 17215
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
17216
    public boolean isSetFrom_date() {
17217
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 17218
    }
17219
 
483 rajveer 17220
    public void setFrom_dateIsSet(boolean value) {
17221
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 17222
    }
17223
 
483 rajveer 17224
    public long getTo_date() {
17225
      return this.to_date;
68 ashish 17226
    }
17227
 
483 rajveer 17228
    public getOrdersForCustomer_args setTo_date(long to_date) {
17229
      this.to_date = to_date;
17230
      setTo_dateIsSet(true);
68 ashish 17231
      return this;
17232
    }
17233
 
483 rajveer 17234
    public void unsetTo_date() {
17235
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 17236
    }
17237
 
483 rajveer 17238
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
17239
    public boolean isSetTo_date() {
17240
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 17241
    }
17242
 
483 rajveer 17243
    public void setTo_dateIsSet(boolean value) {
17244
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 17245
    }
17246
 
483 rajveer 17247
    /**
17248
     * 
17249
     * @see OrderStatus
17250
     */
17251
    public OrderStatus getStatus() {
17252
      return this.status;
17253
    }
17254
 
17255
    /**
17256
     * 
17257
     * @see OrderStatus
17258
     */
17259
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
17260
      this.status = status;
17261
      return this;
17262
    }
17263
 
17264
    public void unsetStatus() {
17265
      this.status = null;
17266
    }
17267
 
17268
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17269
    public boolean isSetStatus() {
17270
      return this.status != null;
17271
    }
17272
 
17273
    public void setStatusIsSet(boolean value) {
17274
      if (!value) {
17275
        this.status = null;
17276
      }
17277
    }
17278
 
68 ashish 17279
    public void setFieldValue(_Fields field, Object value) {
17280
      switch (field) {
483 rajveer 17281
      case CUSTOMER_ID:
68 ashish 17282
        if (value == null) {
483 rajveer 17283
          unsetCustomerId();
68 ashish 17284
        } else {
483 rajveer 17285
          setCustomerId((Long)value);
68 ashish 17286
        }
17287
        break;
17288
 
483 rajveer 17289
      case FROM_DATE:
68 ashish 17290
        if (value == null) {
483 rajveer 17291
          unsetFrom_date();
68 ashish 17292
        } else {
483 rajveer 17293
          setFrom_date((Long)value);
68 ashish 17294
        }
17295
        break;
17296
 
483 rajveer 17297
      case TO_DATE:
68 ashish 17298
        if (value == null) {
483 rajveer 17299
          unsetTo_date();
68 ashish 17300
        } else {
483 rajveer 17301
          setTo_date((Long)value);
68 ashish 17302
        }
17303
        break;
17304
 
483 rajveer 17305
      case STATUS:
17306
        if (value == null) {
17307
          unsetStatus();
17308
        } else {
17309
          setStatus((OrderStatus)value);
17310
        }
17311
        break;
17312
 
68 ashish 17313
      }
17314
    }
17315
 
17316
    public void setFieldValue(int fieldID, Object value) {
17317
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17318
    }
17319
 
17320
    public Object getFieldValue(_Fields field) {
17321
      switch (field) {
483 rajveer 17322
      case CUSTOMER_ID:
17323
        return new Long(getCustomerId());
68 ashish 17324
 
483 rajveer 17325
      case FROM_DATE:
17326
        return new Long(getFrom_date());
68 ashish 17327
 
483 rajveer 17328
      case TO_DATE:
17329
        return new Long(getTo_date());
68 ashish 17330
 
483 rajveer 17331
      case STATUS:
17332
        return getStatus();
17333
 
68 ashish 17334
      }
17335
      throw new IllegalStateException();
17336
    }
17337
 
17338
    public Object getFieldValue(int fieldId) {
17339
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17340
    }
17341
 
17342
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17343
    public boolean isSet(_Fields field) {
17344
      switch (field) {
483 rajveer 17345
      case CUSTOMER_ID:
17346
        return isSetCustomerId();
17347
      case FROM_DATE:
17348
        return isSetFrom_date();
17349
      case TO_DATE:
17350
        return isSetTo_date();
17351
      case STATUS:
17352
        return isSetStatus();
68 ashish 17353
      }
17354
      throw new IllegalStateException();
17355
    }
17356
 
17357
    public boolean isSet(int fieldID) {
17358
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17359
    }
17360
 
17361
    @Override
17362
    public boolean equals(Object that) {
17363
      if (that == null)
17364
        return false;
483 rajveer 17365
      if (that instanceof getOrdersForCustomer_args)
17366
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 17367
      return false;
17368
    }
17369
 
483 rajveer 17370
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 17371
      if (that == null)
17372
        return false;
17373
 
483 rajveer 17374
      boolean this_present_customerId = true;
17375
      boolean that_present_customerId = true;
17376
      if (this_present_customerId || that_present_customerId) {
17377
        if (!(this_present_customerId && that_present_customerId))
68 ashish 17378
          return false;
483 rajveer 17379
        if (this.customerId != that.customerId)
68 ashish 17380
          return false;
17381
      }
17382
 
483 rajveer 17383
      boolean this_present_from_date = true;
17384
      boolean that_present_from_date = true;
17385
      if (this_present_from_date || that_present_from_date) {
17386
        if (!(this_present_from_date && that_present_from_date))
68 ashish 17387
          return false;
483 rajveer 17388
        if (this.from_date != that.from_date)
68 ashish 17389
          return false;
17390
      }
17391
 
483 rajveer 17392
      boolean this_present_to_date = true;
17393
      boolean that_present_to_date = true;
17394
      if (this_present_to_date || that_present_to_date) {
17395
        if (!(this_present_to_date && that_present_to_date))
68 ashish 17396
          return false;
483 rajveer 17397
        if (this.to_date != that.to_date)
68 ashish 17398
          return false;
17399
      }
17400
 
483 rajveer 17401
      boolean this_present_status = true && this.isSetStatus();
17402
      boolean that_present_status = true && that.isSetStatus();
17403
      if (this_present_status || that_present_status) {
17404
        if (!(this_present_status && that_present_status))
17405
          return false;
17406
        if (!this.status.equals(that.status))
17407
          return false;
17408
      }
17409
 
68 ashish 17410
      return true;
17411
    }
17412
 
17413
    @Override
17414
    public int hashCode() {
17415
      return 0;
17416
    }
17417
 
483 rajveer 17418
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 17419
      if (!getClass().equals(other.getClass())) {
17420
        return getClass().getName().compareTo(other.getClass().getName());
17421
      }
17422
 
17423
      int lastComparison = 0;
483 rajveer 17424
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 17425
 
483 rajveer 17426
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 17427
      if (lastComparison != 0) {
17428
        return lastComparison;
17429
      }
483 rajveer 17430
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 17431
      if (lastComparison != 0) {
17432
        return lastComparison;
17433
      }
483 rajveer 17434
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 17435
      if (lastComparison != 0) {
17436
        return lastComparison;
17437
      }
483 rajveer 17438
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 17439
      if (lastComparison != 0) {
17440
        return lastComparison;
17441
      }
483 rajveer 17442
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 17443
      if (lastComparison != 0) {
17444
        return lastComparison;
17445
      }
483 rajveer 17446
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 17447
      if (lastComparison != 0) {
17448
        return lastComparison;
17449
      }
483 rajveer 17450
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
17451
      if (lastComparison != 0) {
17452
        return lastComparison;
17453
      }
17454
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
17455
      if (lastComparison != 0) {
17456
        return lastComparison;
17457
      }
68 ashish 17458
      return 0;
17459
    }
17460
 
17461
    public void read(TProtocol iprot) throws TException {
17462
      TField field;
17463
      iprot.readStructBegin();
17464
      while (true)
17465
      {
17466
        field = iprot.readFieldBegin();
17467
        if (field.type == TType.STOP) { 
17468
          break;
17469
        }
17470
        _Fields fieldId = _Fields.findByThriftId(field.id);
17471
        if (fieldId == null) {
17472
          TProtocolUtil.skip(iprot, field.type);
17473
        } else {
17474
          switch (fieldId) {
483 rajveer 17475
            case CUSTOMER_ID:
68 ashish 17476
              if (field.type == TType.I64) {
483 rajveer 17477
                this.customerId = iprot.readI64();
17478
                setCustomerIdIsSet(true);
68 ashish 17479
              } else { 
17480
                TProtocolUtil.skip(iprot, field.type);
17481
              }
17482
              break;
483 rajveer 17483
            case FROM_DATE:
68 ashish 17484
              if (field.type == TType.I64) {
483 rajveer 17485
                this.from_date = iprot.readI64();
17486
                setFrom_dateIsSet(true);
68 ashish 17487
              } else { 
17488
                TProtocolUtil.skip(iprot, field.type);
17489
              }
17490
              break;
483 rajveer 17491
            case TO_DATE:
68 ashish 17492
              if (field.type == TType.I64) {
483 rajveer 17493
                this.to_date = iprot.readI64();
17494
                setTo_dateIsSet(true);
68 ashish 17495
              } else { 
17496
                TProtocolUtil.skip(iprot, field.type);
17497
              }
17498
              break;
483 rajveer 17499
            case STATUS:
17500
              if (field.type == TType.I32) {
17501
                this.status = OrderStatus.findByValue(iprot.readI32());
17502
              } else { 
17503
                TProtocolUtil.skip(iprot, field.type);
17504
              }
17505
              break;
68 ashish 17506
          }
17507
          iprot.readFieldEnd();
17508
        }
17509
      }
17510
      iprot.readStructEnd();
17511
      validate();
17512
    }
17513
 
17514
    public void write(TProtocol oprot) throws TException {
17515
      validate();
17516
 
17517
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17518
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
17519
      oprot.writeI64(this.customerId);
68 ashish 17520
      oprot.writeFieldEnd();
483 rajveer 17521
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
17522
      oprot.writeI64(this.from_date);
68 ashish 17523
      oprot.writeFieldEnd();
483 rajveer 17524
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
17525
      oprot.writeI64(this.to_date);
68 ashish 17526
      oprot.writeFieldEnd();
483 rajveer 17527
      if (this.status != null) {
17528
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17529
        oprot.writeI32(this.status.getValue());
17530
        oprot.writeFieldEnd();
17531
      }
68 ashish 17532
      oprot.writeFieldStop();
17533
      oprot.writeStructEnd();
17534
    }
17535
 
17536
    @Override
17537
    public String toString() {
483 rajveer 17538
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 17539
      boolean first = true;
17540
 
483 rajveer 17541
      sb.append("customerId:");
17542
      sb.append(this.customerId);
68 ashish 17543
      first = false;
17544
      if (!first) sb.append(", ");
483 rajveer 17545
      sb.append("from_date:");
17546
      sb.append(this.from_date);
68 ashish 17547
      first = false;
17548
      if (!first) sb.append(", ");
483 rajveer 17549
      sb.append("to_date:");
17550
      sb.append(this.to_date);
68 ashish 17551
      first = false;
483 rajveer 17552
      if (!first) sb.append(", ");
17553
      sb.append("status:");
17554
      if (this.status == null) {
17555
        sb.append("null");
17556
      } else {
17557
        String status_name = status.name();
17558
        if (status_name != null) {
17559
          sb.append(status_name);
17560
          sb.append(" (");
17561
        }
17562
        sb.append(this.status);
17563
        if (status_name != null) {
17564
          sb.append(")");
17565
        }
17566
      }
17567
      first = false;
68 ashish 17568
      sb.append(")");
17569
      return sb.toString();
17570
    }
17571
 
17572
    public void validate() throws TException {
17573
      // check for required fields
17574
    }
17575
 
17576
  }
17577
 
483 rajveer 17578
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
17579
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 17580
 
483 rajveer 17581
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 17582
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17583
 
483 rajveer 17584
    private List<Order> success;
68 ashish 17585
    private TransactionServiceException ex;
17586
 
17587
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17588
    public enum _Fields implements TFieldIdEnum {
17589
      SUCCESS((short)0, "success"),
17590
      EX((short)1, "ex");
17591
 
17592
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17593
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17594
 
17595
      static {
17596
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17597
          byId.put((int)field._thriftId, field);
17598
          byName.put(field.getFieldName(), field);
17599
        }
17600
      }
17601
 
17602
      /**
17603
       * Find the _Fields constant that matches fieldId, or null if its not found.
17604
       */
17605
      public static _Fields findByThriftId(int fieldId) {
17606
        return byId.get(fieldId);
17607
      }
17608
 
17609
      /**
17610
       * Find the _Fields constant that matches fieldId, throwing an exception
17611
       * if it is not found.
17612
       */
17613
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17614
        _Fields fields = findByThriftId(fieldId);
17615
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17616
        return fields;
17617
      }
17618
 
17619
      /**
17620
       * Find the _Fields constant that matches name, or null if its not found.
17621
       */
17622
      public static _Fields findByName(String name) {
17623
        return byName.get(name);
17624
      }
17625
 
17626
      private final short _thriftId;
17627
      private final String _fieldName;
17628
 
17629
      _Fields(short thriftId, String fieldName) {
17630
        _thriftId = thriftId;
17631
        _fieldName = fieldName;
17632
      }
17633
 
17634
      public short getThriftFieldId() {
17635
        return _thriftId;
17636
      }
17637
 
17638
      public String getFieldName() {
17639
        return _fieldName;
17640
      }
17641
    }
17642
 
17643
    // isset id assignments
17644
 
17645
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17646
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17647
          new ListMetaData(TType.LIST, 
17648
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 17649
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17650
          new FieldValueMetaData(TType.STRUCT)));
17651
    }});
17652
 
17653
    static {
483 rajveer 17654
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 17655
    }
17656
 
483 rajveer 17657
    public getOrdersForCustomer_result() {
68 ashish 17658
    }
17659
 
483 rajveer 17660
    public getOrdersForCustomer_result(
17661
      List<Order> success,
68 ashish 17662
      TransactionServiceException ex)
17663
    {
17664
      this();
17665
      this.success = success;
17666
      this.ex = ex;
17667
    }
17668
 
17669
    /**
17670
     * Performs a deep copy on <i>other</i>.
17671
     */
483 rajveer 17672
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
17673
      if (other.isSetSuccess()) {
17674
        List<Order> __this__success = new ArrayList<Order>();
17675
        for (Order other_element : other.success) {
17676
          __this__success.add(new Order(other_element));
17677
        }
17678
        this.success = __this__success;
17679
      }
68 ashish 17680
      if (other.isSetEx()) {
17681
        this.ex = new TransactionServiceException(other.ex);
17682
      }
17683
    }
17684
 
483 rajveer 17685
    public getOrdersForCustomer_result deepCopy() {
17686
      return new getOrdersForCustomer_result(this);
68 ashish 17687
    }
17688
 
17689
    @Deprecated
483 rajveer 17690
    public getOrdersForCustomer_result clone() {
17691
      return new getOrdersForCustomer_result(this);
68 ashish 17692
    }
17693
 
483 rajveer 17694
    public int getSuccessSize() {
17695
      return (this.success == null) ? 0 : this.success.size();
17696
    }
17697
 
17698
    public java.util.Iterator<Order> getSuccessIterator() {
17699
      return (this.success == null) ? null : this.success.iterator();
17700
    }
17701
 
17702
    public void addToSuccess(Order elem) {
17703
      if (this.success == null) {
17704
        this.success = new ArrayList<Order>();
17705
      }
17706
      this.success.add(elem);
17707
    }
17708
 
17709
    public List<Order> getSuccess() {
68 ashish 17710
      return this.success;
17711
    }
17712
 
483 rajveer 17713
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 17714
      this.success = success;
17715
      return this;
17716
    }
17717
 
17718
    public void unsetSuccess() {
483 rajveer 17719
      this.success = null;
68 ashish 17720
    }
17721
 
17722
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17723
    public boolean isSetSuccess() {
483 rajveer 17724
      return this.success != null;
68 ashish 17725
    }
17726
 
17727
    public void setSuccessIsSet(boolean value) {
483 rajveer 17728
      if (!value) {
17729
        this.success = null;
17730
      }
68 ashish 17731
    }
17732
 
17733
    public TransactionServiceException getEx() {
17734
      return this.ex;
17735
    }
17736
 
483 rajveer 17737
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 17738
      this.ex = ex;
17739
      return this;
17740
    }
17741
 
17742
    public void unsetEx() {
17743
      this.ex = null;
17744
    }
17745
 
17746
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17747
    public boolean isSetEx() {
17748
      return this.ex != null;
17749
    }
17750
 
17751
    public void setExIsSet(boolean value) {
17752
      if (!value) {
17753
        this.ex = null;
17754
      }
17755
    }
17756
 
17757
    public void setFieldValue(_Fields field, Object value) {
17758
      switch (field) {
17759
      case SUCCESS:
17760
        if (value == null) {
17761
          unsetSuccess();
17762
        } else {
483 rajveer 17763
          setSuccess((List<Order>)value);
68 ashish 17764
        }
17765
        break;
17766
 
17767
      case EX:
17768
        if (value == null) {
17769
          unsetEx();
17770
        } else {
17771
          setEx((TransactionServiceException)value);
17772
        }
17773
        break;
17774
 
17775
      }
17776
    }
17777
 
17778
    public void setFieldValue(int fieldID, Object value) {
17779
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17780
    }
17781
 
17782
    public Object getFieldValue(_Fields field) {
17783
      switch (field) {
17784
      case SUCCESS:
483 rajveer 17785
        return getSuccess();
68 ashish 17786
 
17787
      case EX:
17788
        return getEx();
17789
 
17790
      }
17791
      throw new IllegalStateException();
17792
    }
17793
 
17794
    public Object getFieldValue(int fieldId) {
17795
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17796
    }
17797
 
17798
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17799
    public boolean isSet(_Fields field) {
17800
      switch (field) {
17801
      case SUCCESS:
17802
        return isSetSuccess();
17803
      case EX:
17804
        return isSetEx();
17805
      }
17806
      throw new IllegalStateException();
17807
    }
17808
 
17809
    public boolean isSet(int fieldID) {
17810
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17811
    }
17812
 
17813
    @Override
17814
    public boolean equals(Object that) {
17815
      if (that == null)
17816
        return false;
483 rajveer 17817
      if (that instanceof getOrdersForCustomer_result)
17818
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 17819
      return false;
17820
    }
17821
 
483 rajveer 17822
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 17823
      if (that == null)
17824
        return false;
17825
 
483 rajveer 17826
      boolean this_present_success = true && this.isSetSuccess();
17827
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17828
      if (this_present_success || that_present_success) {
17829
        if (!(this_present_success && that_present_success))
17830
          return false;
483 rajveer 17831
        if (!this.success.equals(that.success))
68 ashish 17832
          return false;
17833
      }
17834
 
17835
      boolean this_present_ex = true && this.isSetEx();
17836
      boolean that_present_ex = true && that.isSetEx();
17837
      if (this_present_ex || that_present_ex) {
17838
        if (!(this_present_ex && that_present_ex))
17839
          return false;
17840
        if (!this.ex.equals(that.ex))
17841
          return false;
17842
      }
17843
 
17844
      return true;
17845
    }
17846
 
17847
    @Override
17848
    public int hashCode() {
17849
      return 0;
17850
    }
17851
 
483 rajveer 17852
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 17853
      if (!getClass().equals(other.getClass())) {
17854
        return getClass().getName().compareTo(other.getClass().getName());
17855
      }
17856
 
17857
      int lastComparison = 0;
483 rajveer 17858
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 17859
 
17860
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17861
      if (lastComparison != 0) {
17862
        return lastComparison;
17863
      }
17864
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17865
      if (lastComparison != 0) {
17866
        return lastComparison;
17867
      }
17868
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17869
      if (lastComparison != 0) {
17870
        return lastComparison;
17871
      }
17872
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17873
      if (lastComparison != 0) {
17874
        return lastComparison;
17875
      }
17876
      return 0;
17877
    }
17878
 
17879
    public void read(TProtocol iprot) throws TException {
17880
      TField field;
17881
      iprot.readStructBegin();
17882
      while (true)
17883
      {
17884
        field = iprot.readFieldBegin();
17885
        if (field.type == TType.STOP) { 
17886
          break;
17887
        }
17888
        _Fields fieldId = _Fields.findByThriftId(field.id);
17889
        if (fieldId == null) {
17890
          TProtocolUtil.skip(iprot, field.type);
17891
        } else {
17892
          switch (fieldId) {
17893
            case SUCCESS:
483 rajveer 17894
              if (field.type == TType.LIST) {
17895
                {
1382 varun.gupt 17896
                  TList _list36 = iprot.readListBegin();
17897
                  this.success = new ArrayList<Order>(_list36.size);
17898
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 17899
                  {
1382 varun.gupt 17900
                    Order _elem38;
17901
                    _elem38 = new Order();
17902
                    _elem38.read(iprot);
17903
                    this.success.add(_elem38);
483 rajveer 17904
                  }
17905
                  iprot.readListEnd();
17906
                }
68 ashish 17907
              } else { 
17908
                TProtocolUtil.skip(iprot, field.type);
17909
              }
17910
              break;
17911
            case EX:
17912
              if (field.type == TType.STRUCT) {
17913
                this.ex = new TransactionServiceException();
17914
                this.ex.read(iprot);
17915
              } else { 
17916
                TProtocolUtil.skip(iprot, field.type);
17917
              }
17918
              break;
17919
          }
17920
          iprot.readFieldEnd();
17921
        }
17922
      }
17923
      iprot.readStructEnd();
17924
      validate();
17925
    }
17926
 
17927
    public void write(TProtocol oprot) throws TException {
17928
      oprot.writeStructBegin(STRUCT_DESC);
17929
 
17930
      if (this.isSetSuccess()) {
17931
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17932
        {
17933
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 17934
          for (Order _iter39 : this.success)
483 rajveer 17935
          {
1382 varun.gupt 17936
            _iter39.write(oprot);
483 rajveer 17937
          }
17938
          oprot.writeListEnd();
17939
        }
68 ashish 17940
        oprot.writeFieldEnd();
17941
      } else if (this.isSetEx()) {
17942
        oprot.writeFieldBegin(EX_FIELD_DESC);
17943
        this.ex.write(oprot);
17944
        oprot.writeFieldEnd();
17945
      }
17946
      oprot.writeFieldStop();
17947
      oprot.writeStructEnd();
17948
    }
17949
 
17950
    @Override
17951
    public String toString() {
483 rajveer 17952
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 17953
      boolean first = true;
17954
 
17955
      sb.append("success:");
483 rajveer 17956
      if (this.success == null) {
17957
        sb.append("null");
17958
      } else {
17959
        sb.append(this.success);
17960
      }
68 ashish 17961
      first = false;
17962
      if (!first) sb.append(", ");
17963
      sb.append("ex:");
17964
      if (this.ex == null) {
17965
        sb.append("null");
17966
      } else {
17967
        sb.append(this.ex);
17968
      }
17969
      first = false;
17970
      sb.append(")");
17971
      return sb.toString();
17972
    }
17973
 
17974
    public void validate() throws TException {
17975
      // check for required fields
17976
    }
17977
 
17978
  }
17979
 
483 rajveer 17980
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
17981
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 17982
 
483 rajveer 17983
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 17984
 
483 rajveer 17985
    private Order order;
68 ashish 17986
 
17987
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17988
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17989
      ORDER((short)1, "order");
68 ashish 17990
 
17991
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17992
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17993
 
17994
      static {
17995
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17996
          byId.put((int)field._thriftId, field);
17997
          byName.put(field.getFieldName(), field);
17998
        }
17999
      }
18000
 
18001
      /**
18002
       * Find the _Fields constant that matches fieldId, or null if its not found.
18003
       */
18004
      public static _Fields findByThriftId(int fieldId) {
18005
        return byId.get(fieldId);
18006
      }
18007
 
18008
      /**
18009
       * Find the _Fields constant that matches fieldId, throwing an exception
18010
       * if it is not found.
18011
       */
18012
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18013
        _Fields fields = findByThriftId(fieldId);
18014
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18015
        return fields;
18016
      }
18017
 
18018
      /**
18019
       * Find the _Fields constant that matches name, or null if its not found.
18020
       */
18021
      public static _Fields findByName(String name) {
18022
        return byName.get(name);
18023
      }
18024
 
18025
      private final short _thriftId;
18026
      private final String _fieldName;
18027
 
18028
      _Fields(short thriftId, String fieldName) {
18029
        _thriftId = thriftId;
18030
        _fieldName = fieldName;
18031
      }
18032
 
18033
      public short getThriftFieldId() {
18034
        return _thriftId;
18035
      }
18036
 
18037
      public String getFieldName() {
18038
        return _fieldName;
18039
      }
18040
    }
18041
 
18042
    // isset id assignments
18043
 
18044
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18045
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
18046
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 18047
    }});
18048
 
18049
    static {
483 rajveer 18050
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 18051
    }
18052
 
483 rajveer 18053
    public createOrder_args() {
68 ashish 18054
    }
18055
 
483 rajveer 18056
    public createOrder_args(
18057
      Order order)
68 ashish 18058
    {
18059
      this();
483 rajveer 18060
      this.order = order;
68 ashish 18061
    }
18062
 
18063
    /**
18064
     * Performs a deep copy on <i>other</i>.
18065
     */
483 rajveer 18066
    public createOrder_args(createOrder_args other) {
18067
      if (other.isSetOrder()) {
18068
        this.order = new Order(other.order);
18069
      }
68 ashish 18070
    }
18071
 
483 rajveer 18072
    public createOrder_args deepCopy() {
18073
      return new createOrder_args(this);
68 ashish 18074
    }
18075
 
18076
    @Deprecated
483 rajveer 18077
    public createOrder_args clone() {
18078
      return new createOrder_args(this);
68 ashish 18079
    }
18080
 
483 rajveer 18081
    public Order getOrder() {
18082
      return this.order;
68 ashish 18083
    }
18084
 
483 rajveer 18085
    public createOrder_args setOrder(Order order) {
18086
      this.order = order;
68 ashish 18087
      return this;
18088
    }
18089
 
483 rajveer 18090
    public void unsetOrder() {
18091
      this.order = null;
68 ashish 18092
    }
18093
 
483 rajveer 18094
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
18095
    public boolean isSetOrder() {
18096
      return this.order != null;
68 ashish 18097
    }
18098
 
483 rajveer 18099
    public void setOrderIsSet(boolean value) {
18100
      if (!value) {
18101
        this.order = null;
18102
      }
68 ashish 18103
    }
18104
 
18105
    public void setFieldValue(_Fields field, Object value) {
18106
      switch (field) {
483 rajveer 18107
      case ORDER:
68 ashish 18108
        if (value == null) {
483 rajveer 18109
          unsetOrder();
68 ashish 18110
        } else {
483 rajveer 18111
          setOrder((Order)value);
68 ashish 18112
        }
18113
        break;
18114
 
18115
      }
18116
    }
18117
 
18118
    public void setFieldValue(int fieldID, Object value) {
18119
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18120
    }
18121
 
18122
    public Object getFieldValue(_Fields field) {
18123
      switch (field) {
483 rajveer 18124
      case ORDER:
18125
        return getOrder();
68 ashish 18126
 
18127
      }
18128
      throw new IllegalStateException();
18129
    }
18130
 
18131
    public Object getFieldValue(int fieldId) {
18132
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18133
    }
18134
 
18135
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18136
    public boolean isSet(_Fields field) {
18137
      switch (field) {
483 rajveer 18138
      case ORDER:
18139
        return isSetOrder();
68 ashish 18140
      }
18141
      throw new IllegalStateException();
18142
    }
18143
 
18144
    public boolean isSet(int fieldID) {
18145
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18146
    }
18147
 
18148
    @Override
18149
    public boolean equals(Object that) {
18150
      if (that == null)
18151
        return false;
483 rajveer 18152
      if (that instanceof createOrder_args)
18153
        return this.equals((createOrder_args)that);
68 ashish 18154
      return false;
18155
    }
18156
 
483 rajveer 18157
    public boolean equals(createOrder_args that) {
68 ashish 18158
      if (that == null)
18159
        return false;
18160
 
483 rajveer 18161
      boolean this_present_order = true && this.isSetOrder();
18162
      boolean that_present_order = true && that.isSetOrder();
18163
      if (this_present_order || that_present_order) {
18164
        if (!(this_present_order && that_present_order))
68 ashish 18165
          return false;
483 rajveer 18166
        if (!this.order.equals(that.order))
68 ashish 18167
          return false;
18168
      }
18169
 
18170
      return true;
18171
    }
18172
 
18173
    @Override
18174
    public int hashCode() {
18175
      return 0;
18176
    }
18177
 
483 rajveer 18178
    public int compareTo(createOrder_args other) {
68 ashish 18179
      if (!getClass().equals(other.getClass())) {
18180
        return getClass().getName().compareTo(other.getClass().getName());
18181
      }
18182
 
18183
      int lastComparison = 0;
483 rajveer 18184
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 18185
 
483 rajveer 18186
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 18187
      if (lastComparison != 0) {
18188
        return lastComparison;
18189
      }
483 rajveer 18190
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 18191
      if (lastComparison != 0) {
18192
        return lastComparison;
18193
      }
18194
      return 0;
18195
    }
18196
 
18197
    public void read(TProtocol iprot) throws TException {
18198
      TField field;
18199
      iprot.readStructBegin();
18200
      while (true)
18201
      {
18202
        field = iprot.readFieldBegin();
18203
        if (field.type == TType.STOP) { 
18204
          break;
18205
        }
18206
        _Fields fieldId = _Fields.findByThriftId(field.id);
18207
        if (fieldId == null) {
18208
          TProtocolUtil.skip(iprot, field.type);
18209
        } else {
18210
          switch (fieldId) {
483 rajveer 18211
            case ORDER:
18212
              if (field.type == TType.STRUCT) {
18213
                this.order = new Order();
18214
                this.order.read(iprot);
68 ashish 18215
              } else { 
18216
                TProtocolUtil.skip(iprot, field.type);
18217
              }
18218
              break;
18219
          }
18220
          iprot.readFieldEnd();
18221
        }
18222
      }
18223
      iprot.readStructEnd();
18224
      validate();
18225
    }
18226
 
18227
    public void write(TProtocol oprot) throws TException {
18228
      validate();
18229
 
18230
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18231
      if (this.order != null) {
18232
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
18233
        this.order.write(oprot);
18234
        oprot.writeFieldEnd();
18235
      }
68 ashish 18236
      oprot.writeFieldStop();
18237
      oprot.writeStructEnd();
18238
    }
18239
 
18240
    @Override
18241
    public String toString() {
483 rajveer 18242
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 18243
      boolean first = true;
18244
 
483 rajveer 18245
      sb.append("order:");
18246
      if (this.order == null) {
18247
        sb.append("null");
18248
      } else {
18249
        sb.append(this.order);
18250
      }
68 ashish 18251
      first = false;
18252
      sb.append(")");
18253
      return sb.toString();
18254
    }
18255
 
18256
    public void validate() throws TException {
18257
      // check for required fields
18258
    }
18259
 
18260
  }
18261
 
483 rajveer 18262
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
18263
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 18264
 
483 rajveer 18265
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 18266
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18267
 
483 rajveer 18268
    private long success;
68 ashish 18269
    private TransactionServiceException ex;
18270
 
18271
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18272
    public enum _Fields implements TFieldIdEnum {
18273
      SUCCESS((short)0, "success"),
18274
      EX((short)1, "ex");
18275
 
18276
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18277
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18278
 
18279
      static {
18280
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18281
          byId.put((int)field._thriftId, field);
18282
          byName.put(field.getFieldName(), field);
18283
        }
18284
      }
18285
 
18286
      /**
18287
       * Find the _Fields constant that matches fieldId, or null if its not found.
18288
       */
18289
      public static _Fields findByThriftId(int fieldId) {
18290
        return byId.get(fieldId);
18291
      }
18292
 
18293
      /**
18294
       * Find the _Fields constant that matches fieldId, throwing an exception
18295
       * if it is not found.
18296
       */
18297
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18298
        _Fields fields = findByThriftId(fieldId);
18299
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18300
        return fields;
18301
      }
18302
 
18303
      /**
18304
       * Find the _Fields constant that matches name, or null if its not found.
18305
       */
18306
      public static _Fields findByName(String name) {
18307
        return byName.get(name);
18308
      }
18309
 
18310
      private final short _thriftId;
18311
      private final String _fieldName;
18312
 
18313
      _Fields(short thriftId, String fieldName) {
18314
        _thriftId = thriftId;
18315
        _fieldName = fieldName;
18316
      }
18317
 
18318
      public short getThriftFieldId() {
18319
        return _thriftId;
18320
      }
18321
 
18322
      public String getFieldName() {
18323
        return _fieldName;
18324
      }
18325
    }
18326
 
18327
    // isset id assignments
18328
    private static final int __SUCCESS_ISSET_ID = 0;
18329
    private BitSet __isset_bit_vector = new BitSet(1);
18330
 
18331
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18332
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18333
          new FieldValueMetaData(TType.I64)));
68 ashish 18334
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18335
          new FieldValueMetaData(TType.STRUCT)));
18336
    }});
18337
 
18338
    static {
483 rajveer 18339
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 18340
    }
18341
 
483 rajveer 18342
    public createOrder_result() {
68 ashish 18343
    }
18344
 
483 rajveer 18345
    public createOrder_result(
18346
      long success,
68 ashish 18347
      TransactionServiceException ex)
18348
    {
18349
      this();
18350
      this.success = success;
18351
      setSuccessIsSet(true);
18352
      this.ex = ex;
18353
    }
18354
 
18355
    /**
18356
     * Performs a deep copy on <i>other</i>.
18357
     */
483 rajveer 18358
    public createOrder_result(createOrder_result other) {
68 ashish 18359
      __isset_bit_vector.clear();
18360
      __isset_bit_vector.or(other.__isset_bit_vector);
18361
      this.success = other.success;
18362
      if (other.isSetEx()) {
18363
        this.ex = new TransactionServiceException(other.ex);
18364
      }
18365
    }
18366
 
483 rajveer 18367
    public createOrder_result deepCopy() {
18368
      return new createOrder_result(this);
68 ashish 18369
    }
18370
 
18371
    @Deprecated
483 rajveer 18372
    public createOrder_result clone() {
18373
      return new createOrder_result(this);
68 ashish 18374
    }
18375
 
483 rajveer 18376
    public long getSuccess() {
68 ashish 18377
      return this.success;
18378
    }
18379
 
483 rajveer 18380
    public createOrder_result setSuccess(long success) {
68 ashish 18381
      this.success = success;
18382
      setSuccessIsSet(true);
18383
      return this;
18384
    }
18385
 
18386
    public void unsetSuccess() {
18387
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18388
    }
18389
 
18390
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18391
    public boolean isSetSuccess() {
18392
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18393
    }
18394
 
18395
    public void setSuccessIsSet(boolean value) {
18396
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18397
    }
18398
 
18399
    public TransactionServiceException getEx() {
18400
      return this.ex;
18401
    }
18402
 
483 rajveer 18403
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 18404
      this.ex = ex;
18405
      return this;
18406
    }
18407
 
18408
    public void unsetEx() {
18409
      this.ex = null;
18410
    }
18411
 
18412
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18413
    public boolean isSetEx() {
18414
      return this.ex != null;
18415
    }
18416
 
18417
    public void setExIsSet(boolean value) {
18418
      if (!value) {
18419
        this.ex = null;
18420
      }
18421
    }
18422
 
18423
    public void setFieldValue(_Fields field, Object value) {
18424
      switch (field) {
18425
      case SUCCESS:
18426
        if (value == null) {
18427
          unsetSuccess();
18428
        } else {
483 rajveer 18429
          setSuccess((Long)value);
68 ashish 18430
        }
18431
        break;
18432
 
18433
      case EX:
18434
        if (value == null) {
18435
          unsetEx();
18436
        } else {
18437
          setEx((TransactionServiceException)value);
18438
        }
18439
        break;
18440
 
18441
      }
18442
    }
18443
 
18444
    public void setFieldValue(int fieldID, Object value) {
18445
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18446
    }
18447
 
18448
    public Object getFieldValue(_Fields field) {
18449
      switch (field) {
18450
      case SUCCESS:
483 rajveer 18451
        return new Long(getSuccess());
68 ashish 18452
 
18453
      case EX:
18454
        return getEx();
18455
 
18456
      }
18457
      throw new IllegalStateException();
18458
    }
18459
 
18460
    public Object getFieldValue(int fieldId) {
18461
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18462
    }
18463
 
18464
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18465
    public boolean isSet(_Fields field) {
18466
      switch (field) {
18467
      case SUCCESS:
18468
        return isSetSuccess();
18469
      case EX:
18470
        return isSetEx();
18471
      }
18472
      throw new IllegalStateException();
18473
    }
18474
 
18475
    public boolean isSet(int fieldID) {
18476
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18477
    }
18478
 
18479
    @Override
18480
    public boolean equals(Object that) {
18481
      if (that == null)
18482
        return false;
483 rajveer 18483
      if (that instanceof createOrder_result)
18484
        return this.equals((createOrder_result)that);
68 ashish 18485
      return false;
18486
    }
18487
 
483 rajveer 18488
    public boolean equals(createOrder_result that) {
68 ashish 18489
      if (that == null)
18490
        return false;
18491
 
18492
      boolean this_present_success = true;
18493
      boolean that_present_success = true;
18494
      if (this_present_success || that_present_success) {
18495
        if (!(this_present_success && that_present_success))
18496
          return false;
18497
        if (this.success != that.success)
18498
          return false;
18499
      }
18500
 
18501
      boolean this_present_ex = true && this.isSetEx();
18502
      boolean that_present_ex = true && that.isSetEx();
18503
      if (this_present_ex || that_present_ex) {
18504
        if (!(this_present_ex && that_present_ex))
18505
          return false;
18506
        if (!this.ex.equals(that.ex))
18507
          return false;
18508
      }
18509
 
18510
      return true;
18511
    }
18512
 
18513
    @Override
18514
    public int hashCode() {
18515
      return 0;
18516
    }
18517
 
483 rajveer 18518
    public int compareTo(createOrder_result other) {
68 ashish 18519
      if (!getClass().equals(other.getClass())) {
18520
        return getClass().getName().compareTo(other.getClass().getName());
18521
      }
18522
 
18523
      int lastComparison = 0;
483 rajveer 18524
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 18525
 
18526
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18527
      if (lastComparison != 0) {
18528
        return lastComparison;
18529
      }
18530
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18531
      if (lastComparison != 0) {
18532
        return lastComparison;
18533
      }
18534
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18535
      if (lastComparison != 0) {
18536
        return lastComparison;
18537
      }
18538
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18539
      if (lastComparison != 0) {
18540
        return lastComparison;
18541
      }
18542
      return 0;
18543
    }
18544
 
18545
    public void read(TProtocol iprot) throws TException {
18546
      TField field;
18547
      iprot.readStructBegin();
18548
      while (true)
18549
      {
18550
        field = iprot.readFieldBegin();
18551
        if (field.type == TType.STOP) { 
18552
          break;
18553
        }
18554
        _Fields fieldId = _Fields.findByThriftId(field.id);
18555
        if (fieldId == null) {
18556
          TProtocolUtil.skip(iprot, field.type);
18557
        } else {
18558
          switch (fieldId) {
18559
            case SUCCESS:
483 rajveer 18560
              if (field.type == TType.I64) {
18561
                this.success = iprot.readI64();
68 ashish 18562
                setSuccessIsSet(true);
18563
              } else { 
18564
                TProtocolUtil.skip(iprot, field.type);
18565
              }
18566
              break;
18567
            case EX:
18568
              if (field.type == TType.STRUCT) {
18569
                this.ex = new TransactionServiceException();
18570
                this.ex.read(iprot);
18571
              } else { 
18572
                TProtocolUtil.skip(iprot, field.type);
18573
              }
18574
              break;
18575
          }
18576
          iprot.readFieldEnd();
18577
        }
18578
      }
18579
      iprot.readStructEnd();
18580
      validate();
18581
    }
18582
 
18583
    public void write(TProtocol oprot) throws TException {
18584
      oprot.writeStructBegin(STRUCT_DESC);
18585
 
18586
      if (this.isSetSuccess()) {
18587
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18588
        oprot.writeI64(this.success);
68 ashish 18589
        oprot.writeFieldEnd();
18590
      } else if (this.isSetEx()) {
18591
        oprot.writeFieldBegin(EX_FIELD_DESC);
18592
        this.ex.write(oprot);
18593
        oprot.writeFieldEnd();
18594
      }
18595
      oprot.writeFieldStop();
18596
      oprot.writeStructEnd();
18597
    }
18598
 
18599
    @Override
18600
    public String toString() {
483 rajveer 18601
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 18602
      boolean first = true;
18603
 
18604
      sb.append("success:");
18605
      sb.append(this.success);
18606
      first = false;
18607
      if (!first) sb.append(", ");
18608
      sb.append("ex:");
18609
      if (this.ex == null) {
18610
        sb.append("null");
18611
      } else {
18612
        sb.append(this.ex);
18613
      }
18614
      first = false;
18615
      sb.append(")");
18616
      return sb.toString();
18617
    }
18618
 
18619
    public void validate() throws TException {
18620
      // check for required fields
18621
    }
18622
 
18623
  }
18624
 
483 rajveer 18625
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
18626
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 18627
 
483 rajveer 18628
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 18629
 
483 rajveer 18630
    private long id;
68 ashish 18631
 
18632
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18633
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18634
      ID((short)1, "id");
68 ashish 18635
 
18636
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18637
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18638
 
18639
      static {
18640
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18641
          byId.put((int)field._thriftId, field);
18642
          byName.put(field.getFieldName(), field);
18643
        }
18644
      }
18645
 
18646
      /**
18647
       * Find the _Fields constant that matches fieldId, or null if its not found.
18648
       */
18649
      public static _Fields findByThriftId(int fieldId) {
18650
        return byId.get(fieldId);
18651
      }
18652
 
18653
      /**
18654
       * Find the _Fields constant that matches fieldId, throwing an exception
18655
       * if it is not found.
18656
       */
18657
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18658
        _Fields fields = findByThriftId(fieldId);
18659
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18660
        return fields;
18661
      }
18662
 
18663
      /**
18664
       * Find the _Fields constant that matches name, or null if its not found.
18665
       */
18666
      public static _Fields findByName(String name) {
18667
        return byName.get(name);
18668
      }
18669
 
18670
      private final short _thriftId;
18671
      private final String _fieldName;
18672
 
18673
      _Fields(short thriftId, String fieldName) {
18674
        _thriftId = thriftId;
18675
        _fieldName = fieldName;
18676
      }
18677
 
18678
      public short getThriftFieldId() {
18679
        return _thriftId;
18680
      }
18681
 
18682
      public String getFieldName() {
18683
        return _fieldName;
18684
      }
18685
    }
18686
 
18687
    // isset id assignments
483 rajveer 18688
    private static final int __ID_ISSET_ID = 0;
18689
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 18690
 
18691
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18692
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 18693
          new FieldValueMetaData(TType.I64)));
18694
    }});
18695
 
18696
    static {
483 rajveer 18697
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 18698
    }
18699
 
483 rajveer 18700
    public getOrder_args() {
68 ashish 18701
    }
18702
 
483 rajveer 18703
    public getOrder_args(
18704
      long id)
68 ashish 18705
    {
18706
      this();
483 rajveer 18707
      this.id = id;
18708
      setIdIsSet(true);
68 ashish 18709
    }
18710
 
18711
    /**
18712
     * Performs a deep copy on <i>other</i>.
18713
     */
483 rajveer 18714
    public getOrder_args(getOrder_args other) {
68 ashish 18715
      __isset_bit_vector.clear();
18716
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18717
      this.id = other.id;
68 ashish 18718
    }
18719
 
483 rajveer 18720
    public getOrder_args deepCopy() {
18721
      return new getOrder_args(this);
68 ashish 18722
    }
18723
 
18724
    @Deprecated
483 rajveer 18725
    public getOrder_args clone() {
18726
      return new getOrder_args(this);
68 ashish 18727
    }
18728
 
483 rajveer 18729
    public long getId() {
18730
      return this.id;
68 ashish 18731
    }
18732
 
483 rajveer 18733
    public getOrder_args setId(long id) {
18734
      this.id = id;
18735
      setIdIsSet(true);
68 ashish 18736
      return this;
18737
    }
18738
 
483 rajveer 18739
    public void unsetId() {
18740
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 18741
    }
18742
 
483 rajveer 18743
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
18744
    public boolean isSetId() {
18745
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 18746
    }
18747
 
483 rajveer 18748
    public void setIdIsSet(boolean value) {
18749
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 18750
    }
18751
 
18752
    public void setFieldValue(_Fields field, Object value) {
18753
      switch (field) {
483 rajveer 18754
      case ID:
68 ashish 18755
        if (value == null) {
483 rajveer 18756
          unsetId();
68 ashish 18757
        } else {
483 rajveer 18758
          setId((Long)value);
68 ashish 18759
        }
18760
        break;
18761
 
18762
      }
18763
    }
18764
 
18765
    public void setFieldValue(int fieldID, Object value) {
18766
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18767
    }
18768
 
18769
    public Object getFieldValue(_Fields field) {
18770
      switch (field) {
483 rajveer 18771
      case ID:
18772
        return new Long(getId());
68 ashish 18773
 
18774
      }
18775
      throw new IllegalStateException();
18776
    }
18777
 
18778
    public Object getFieldValue(int fieldId) {
18779
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18780
    }
18781
 
18782
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18783
    public boolean isSet(_Fields field) {
18784
      switch (field) {
483 rajveer 18785
      case ID:
18786
        return isSetId();
68 ashish 18787
      }
18788
      throw new IllegalStateException();
18789
    }
18790
 
18791
    public boolean isSet(int fieldID) {
18792
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18793
    }
18794
 
18795
    @Override
18796
    public boolean equals(Object that) {
18797
      if (that == null)
18798
        return false;
483 rajveer 18799
      if (that instanceof getOrder_args)
18800
        return this.equals((getOrder_args)that);
68 ashish 18801
      return false;
18802
    }
18803
 
483 rajveer 18804
    public boolean equals(getOrder_args that) {
68 ashish 18805
      if (that == null)
18806
        return false;
18807
 
483 rajveer 18808
      boolean this_present_id = true;
18809
      boolean that_present_id = true;
18810
      if (this_present_id || that_present_id) {
18811
        if (!(this_present_id && that_present_id))
68 ashish 18812
          return false;
483 rajveer 18813
        if (this.id != that.id)
68 ashish 18814
          return false;
18815
      }
18816
 
18817
      return true;
18818
    }
18819
 
18820
    @Override
18821
    public int hashCode() {
18822
      return 0;
18823
    }
18824
 
483 rajveer 18825
    public int compareTo(getOrder_args other) {
68 ashish 18826
      if (!getClass().equals(other.getClass())) {
18827
        return getClass().getName().compareTo(other.getClass().getName());
18828
      }
18829
 
18830
      int lastComparison = 0;
483 rajveer 18831
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 18832
 
483 rajveer 18833
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 18834
      if (lastComparison != 0) {
18835
        return lastComparison;
18836
      }
483 rajveer 18837
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 18838
      if (lastComparison != 0) {
18839
        return lastComparison;
18840
      }
18841
      return 0;
18842
    }
18843
 
18844
    public void read(TProtocol iprot) throws TException {
18845
      TField field;
18846
      iprot.readStructBegin();
18847
      while (true)
18848
      {
18849
        field = iprot.readFieldBegin();
18850
        if (field.type == TType.STOP) { 
18851
          break;
18852
        }
18853
        _Fields fieldId = _Fields.findByThriftId(field.id);
18854
        if (fieldId == null) {
18855
          TProtocolUtil.skip(iprot, field.type);
18856
        } else {
18857
          switch (fieldId) {
483 rajveer 18858
            case ID:
68 ashish 18859
              if (field.type == TType.I64) {
483 rajveer 18860
                this.id = iprot.readI64();
18861
                setIdIsSet(true);
68 ashish 18862
              } else { 
18863
                TProtocolUtil.skip(iprot, field.type);
18864
              }
18865
              break;
18866
          }
18867
          iprot.readFieldEnd();
18868
        }
18869
      }
18870
      iprot.readStructEnd();
18871
      validate();
18872
    }
18873
 
18874
    public void write(TProtocol oprot) throws TException {
18875
      validate();
18876
 
18877
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18878
      oprot.writeFieldBegin(ID_FIELD_DESC);
18879
      oprot.writeI64(this.id);
68 ashish 18880
      oprot.writeFieldEnd();
18881
      oprot.writeFieldStop();
18882
      oprot.writeStructEnd();
18883
    }
18884
 
18885
    @Override
18886
    public String toString() {
483 rajveer 18887
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 18888
      boolean first = true;
18889
 
483 rajveer 18890
      sb.append("id:");
18891
      sb.append(this.id);
68 ashish 18892
      first = false;
18893
      sb.append(")");
18894
      return sb.toString();
18895
    }
18896
 
18897
    public void validate() throws TException {
18898
      // check for required fields
18899
    }
18900
 
18901
  }
18902
 
483 rajveer 18903
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
18904
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 18905
 
483 rajveer 18906
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 18907
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18908
 
483 rajveer 18909
    private Order success;
68 ashish 18910
    private TransactionServiceException ex;
18911
 
18912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18913
    public enum _Fields implements TFieldIdEnum {
18914
      SUCCESS((short)0, "success"),
18915
      EX((short)1, "ex");
18916
 
18917
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18918
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18919
 
18920
      static {
18921
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18922
          byId.put((int)field._thriftId, field);
18923
          byName.put(field.getFieldName(), field);
18924
        }
18925
      }
18926
 
18927
      /**
18928
       * Find the _Fields constant that matches fieldId, or null if its not found.
18929
       */
18930
      public static _Fields findByThriftId(int fieldId) {
18931
        return byId.get(fieldId);
18932
      }
18933
 
18934
      /**
18935
       * Find the _Fields constant that matches fieldId, throwing an exception
18936
       * if it is not found.
18937
       */
18938
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18939
        _Fields fields = findByThriftId(fieldId);
18940
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18941
        return fields;
18942
      }
18943
 
18944
      /**
18945
       * Find the _Fields constant that matches name, or null if its not found.
18946
       */
18947
      public static _Fields findByName(String name) {
18948
        return byName.get(name);
18949
      }
18950
 
18951
      private final short _thriftId;
18952
      private final String _fieldName;
18953
 
18954
      _Fields(short thriftId, String fieldName) {
18955
        _thriftId = thriftId;
18956
        _fieldName = fieldName;
18957
      }
18958
 
18959
      public short getThriftFieldId() {
18960
        return _thriftId;
18961
      }
18962
 
18963
      public String getFieldName() {
18964
        return _fieldName;
18965
      }
18966
    }
18967
 
18968
    // isset id assignments
18969
 
18970
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18971
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18972
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 18973
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18974
          new FieldValueMetaData(TType.STRUCT)));
18975
    }});
18976
 
18977
    static {
483 rajveer 18978
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 18979
    }
18980
 
483 rajveer 18981
    public getOrder_result() {
68 ashish 18982
    }
18983
 
483 rajveer 18984
    public getOrder_result(
18985
      Order success,
68 ashish 18986
      TransactionServiceException ex)
18987
    {
18988
      this();
18989
      this.success = success;
18990
      this.ex = ex;
18991
    }
18992
 
18993
    /**
18994
     * Performs a deep copy on <i>other</i>.
18995
     */
483 rajveer 18996
    public getOrder_result(getOrder_result other) {
18997
      if (other.isSetSuccess()) {
18998
        this.success = new Order(other.success);
18999
      }
68 ashish 19000
      if (other.isSetEx()) {
19001
        this.ex = new TransactionServiceException(other.ex);
19002
      }
19003
    }
19004
 
483 rajveer 19005
    public getOrder_result deepCopy() {
19006
      return new getOrder_result(this);
68 ashish 19007
    }
19008
 
19009
    @Deprecated
483 rajveer 19010
    public getOrder_result clone() {
19011
      return new getOrder_result(this);
68 ashish 19012
    }
19013
 
483 rajveer 19014
    public Order getSuccess() {
68 ashish 19015
      return this.success;
19016
    }
19017
 
483 rajveer 19018
    public getOrder_result setSuccess(Order success) {
68 ashish 19019
      this.success = success;
19020
      return this;
19021
    }
19022
 
19023
    public void unsetSuccess() {
483 rajveer 19024
      this.success = null;
68 ashish 19025
    }
19026
 
19027
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19028
    public boolean isSetSuccess() {
483 rajveer 19029
      return this.success != null;
68 ashish 19030
    }
19031
 
19032
    public void setSuccessIsSet(boolean value) {
483 rajveer 19033
      if (!value) {
19034
        this.success = null;
19035
      }
68 ashish 19036
    }
19037
 
19038
    public TransactionServiceException getEx() {
19039
      return this.ex;
19040
    }
19041
 
483 rajveer 19042
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 19043
      this.ex = ex;
19044
      return this;
19045
    }
19046
 
19047
    public void unsetEx() {
19048
      this.ex = null;
19049
    }
19050
 
19051
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19052
    public boolean isSetEx() {
19053
      return this.ex != null;
19054
    }
19055
 
19056
    public void setExIsSet(boolean value) {
19057
      if (!value) {
19058
        this.ex = null;
19059
      }
19060
    }
19061
 
19062
    public void setFieldValue(_Fields field, Object value) {
19063
      switch (field) {
19064
      case SUCCESS:
19065
        if (value == null) {
19066
          unsetSuccess();
19067
        } else {
483 rajveer 19068
          setSuccess((Order)value);
68 ashish 19069
        }
19070
        break;
19071
 
19072
      case EX:
19073
        if (value == null) {
19074
          unsetEx();
19075
        } else {
19076
          setEx((TransactionServiceException)value);
19077
        }
19078
        break;
19079
 
19080
      }
19081
    }
19082
 
19083
    public void setFieldValue(int fieldID, Object value) {
19084
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19085
    }
19086
 
19087
    public Object getFieldValue(_Fields field) {
19088
      switch (field) {
19089
      case SUCCESS:
483 rajveer 19090
        return getSuccess();
68 ashish 19091
 
19092
      case EX:
19093
        return getEx();
19094
 
19095
      }
19096
      throw new IllegalStateException();
19097
    }
19098
 
19099
    public Object getFieldValue(int fieldId) {
19100
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19101
    }
19102
 
19103
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19104
    public boolean isSet(_Fields field) {
19105
      switch (field) {
19106
      case SUCCESS:
19107
        return isSetSuccess();
19108
      case EX:
19109
        return isSetEx();
19110
      }
19111
      throw new IllegalStateException();
19112
    }
19113
 
19114
    public boolean isSet(int fieldID) {
19115
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19116
    }
19117
 
19118
    @Override
19119
    public boolean equals(Object that) {
19120
      if (that == null)
19121
        return false;
483 rajveer 19122
      if (that instanceof getOrder_result)
19123
        return this.equals((getOrder_result)that);
68 ashish 19124
      return false;
19125
    }
19126
 
483 rajveer 19127
    public boolean equals(getOrder_result that) {
68 ashish 19128
      if (that == null)
19129
        return false;
19130
 
483 rajveer 19131
      boolean this_present_success = true && this.isSetSuccess();
19132
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 19133
      if (this_present_success || that_present_success) {
19134
        if (!(this_present_success && that_present_success))
19135
          return false;
483 rajveer 19136
        if (!this.success.equals(that.success))
68 ashish 19137
          return false;
19138
      }
19139
 
19140
      boolean this_present_ex = true && this.isSetEx();
19141
      boolean that_present_ex = true && that.isSetEx();
19142
      if (this_present_ex || that_present_ex) {
19143
        if (!(this_present_ex && that_present_ex))
19144
          return false;
19145
        if (!this.ex.equals(that.ex))
19146
          return false;
19147
      }
19148
 
19149
      return true;
19150
    }
19151
 
19152
    @Override
19153
    public int hashCode() {
19154
      return 0;
19155
    }
19156
 
483 rajveer 19157
    public int compareTo(getOrder_result other) {
68 ashish 19158
      if (!getClass().equals(other.getClass())) {
19159
        return getClass().getName().compareTo(other.getClass().getName());
19160
      }
19161
 
19162
      int lastComparison = 0;
483 rajveer 19163
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 19164
 
19165
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19166
      if (lastComparison != 0) {
19167
        return lastComparison;
19168
      }
19169
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19170
      if (lastComparison != 0) {
19171
        return lastComparison;
19172
      }
19173
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19174
      if (lastComparison != 0) {
19175
        return lastComparison;
19176
      }
19177
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19178
      if (lastComparison != 0) {
19179
        return lastComparison;
19180
      }
19181
      return 0;
19182
    }
19183
 
19184
    public void read(TProtocol iprot) throws TException {
19185
      TField field;
19186
      iprot.readStructBegin();
19187
      while (true)
19188
      {
19189
        field = iprot.readFieldBegin();
19190
        if (field.type == TType.STOP) { 
19191
          break;
19192
        }
19193
        _Fields fieldId = _Fields.findByThriftId(field.id);
19194
        if (fieldId == null) {
19195
          TProtocolUtil.skip(iprot, field.type);
19196
        } else {
19197
          switch (fieldId) {
19198
            case SUCCESS:
483 rajveer 19199
              if (field.type == TType.STRUCT) {
19200
                this.success = new Order();
19201
                this.success.read(iprot);
68 ashish 19202
              } else { 
19203
                TProtocolUtil.skip(iprot, field.type);
19204
              }
19205
              break;
19206
            case EX:
19207
              if (field.type == TType.STRUCT) {
19208
                this.ex = new TransactionServiceException();
19209
                this.ex.read(iprot);
19210
              } else { 
19211
                TProtocolUtil.skip(iprot, field.type);
19212
              }
19213
              break;
19214
          }
19215
          iprot.readFieldEnd();
19216
        }
19217
      }
19218
      iprot.readStructEnd();
19219
      validate();
19220
    }
19221
 
19222
    public void write(TProtocol oprot) throws TException {
19223
      oprot.writeStructBegin(STRUCT_DESC);
19224
 
19225
      if (this.isSetSuccess()) {
19226
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 19227
        this.success.write(oprot);
68 ashish 19228
        oprot.writeFieldEnd();
19229
      } else if (this.isSetEx()) {
19230
        oprot.writeFieldBegin(EX_FIELD_DESC);
19231
        this.ex.write(oprot);
19232
        oprot.writeFieldEnd();
19233
      }
19234
      oprot.writeFieldStop();
19235
      oprot.writeStructEnd();
19236
    }
19237
 
19238
    @Override
19239
    public String toString() {
483 rajveer 19240
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 19241
      boolean first = true;
19242
 
19243
      sb.append("success:");
483 rajveer 19244
      if (this.success == null) {
19245
        sb.append("null");
19246
      } else {
19247
        sb.append(this.success);
19248
      }
68 ashish 19249
      first = false;
19250
      if (!first) sb.append(", ");
19251
      sb.append("ex:");
19252
      if (this.ex == null) {
19253
        sb.append("null");
19254
      } else {
19255
        sb.append(this.ex);
19256
      }
19257
      first = false;
19258
      sb.append(")");
19259
      return sb.toString();
19260
    }
19261
 
19262
    public void validate() throws TException {
19263
      // check for required fields
19264
    }
19265
 
19266
  }
19267
 
483 rajveer 19268
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
19269
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 19270
 
483 rajveer 19271
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 19272
 
483 rajveer 19273
    private long orderId;
68 ashish 19274
 
19275
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19276
    public enum _Fields implements TFieldIdEnum {
483 rajveer 19277
      ORDER_ID((short)1, "orderId");
68 ashish 19278
 
19279
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19280
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19281
 
19282
      static {
19283
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19284
          byId.put((int)field._thriftId, field);
19285
          byName.put(field.getFieldName(), field);
19286
        }
19287
      }
19288
 
19289
      /**
19290
       * Find the _Fields constant that matches fieldId, or null if its not found.
19291
       */
19292
      public static _Fields findByThriftId(int fieldId) {
19293
        return byId.get(fieldId);
19294
      }
19295
 
19296
      /**
19297
       * Find the _Fields constant that matches fieldId, throwing an exception
19298
       * if it is not found.
19299
       */
19300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19301
        _Fields fields = findByThriftId(fieldId);
19302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19303
        return fields;
19304
      }
19305
 
19306
      /**
19307
       * Find the _Fields constant that matches name, or null if its not found.
19308
       */
19309
      public static _Fields findByName(String name) {
19310
        return byName.get(name);
19311
      }
19312
 
19313
      private final short _thriftId;
19314
      private final String _fieldName;
19315
 
19316
      _Fields(short thriftId, String fieldName) {
19317
        _thriftId = thriftId;
19318
        _fieldName = fieldName;
19319
      }
19320
 
19321
      public short getThriftFieldId() {
19322
        return _thriftId;
19323
      }
19324
 
19325
      public String getFieldName() {
19326
        return _fieldName;
19327
      }
19328
    }
19329
 
19330
    // isset id assignments
483 rajveer 19331
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 19332
    private BitSet __isset_bit_vector = new BitSet(1);
19333
 
19334
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 19335
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 19336
          new FieldValueMetaData(TType.I64)));
19337
    }});
19338
 
19339
    static {
483 rajveer 19340
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 19341
    }
19342
 
483 rajveer 19343
    public getLineItemsForOrder_args() {
68 ashish 19344
    }
19345
 
483 rajveer 19346
    public getLineItemsForOrder_args(
19347
      long orderId)
68 ashish 19348
    {
19349
      this();
483 rajveer 19350
      this.orderId = orderId;
19351
      setOrderIdIsSet(true);
68 ashish 19352
    }
19353
 
19354
    /**
19355
     * Performs a deep copy on <i>other</i>.
19356
     */
483 rajveer 19357
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 19358
      __isset_bit_vector.clear();
19359
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 19360
      this.orderId = other.orderId;
68 ashish 19361
    }
19362
 
483 rajveer 19363
    public getLineItemsForOrder_args deepCopy() {
19364
      return new getLineItemsForOrder_args(this);
68 ashish 19365
    }
19366
 
19367
    @Deprecated
483 rajveer 19368
    public getLineItemsForOrder_args clone() {
19369
      return new getLineItemsForOrder_args(this);
68 ashish 19370
    }
19371
 
483 rajveer 19372
    public long getOrderId() {
19373
      return this.orderId;
68 ashish 19374
    }
19375
 
483 rajveer 19376
    public getLineItemsForOrder_args setOrderId(long orderId) {
19377
      this.orderId = orderId;
19378
      setOrderIdIsSet(true);
68 ashish 19379
      return this;
19380
    }
19381
 
483 rajveer 19382
    public void unsetOrderId() {
19383
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 19384
    }
19385
 
483 rajveer 19386
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19387
    public boolean isSetOrderId() {
19388
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 19389
    }
19390
 
483 rajveer 19391
    public void setOrderIdIsSet(boolean value) {
19392
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 19393
    }
19394
 
19395
    public void setFieldValue(_Fields field, Object value) {
19396
      switch (field) {
483 rajveer 19397
      case ORDER_ID:
68 ashish 19398
        if (value == null) {
483 rajveer 19399
          unsetOrderId();
68 ashish 19400
        } else {
483 rajveer 19401
          setOrderId((Long)value);
68 ashish 19402
        }
19403
        break;
19404
 
19405
      }
19406
    }
19407
 
19408
    public void setFieldValue(int fieldID, Object value) {
19409
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19410
    }
19411
 
19412
    public Object getFieldValue(_Fields field) {
19413
      switch (field) {
483 rajveer 19414
      case ORDER_ID:
19415
        return new Long(getOrderId());
68 ashish 19416
 
19417
      }
19418
      throw new IllegalStateException();
19419
    }
19420
 
19421
    public Object getFieldValue(int fieldId) {
19422
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19423
    }
19424
 
19425
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19426
    public boolean isSet(_Fields field) {
19427
      switch (field) {
483 rajveer 19428
      case ORDER_ID:
19429
        return isSetOrderId();
68 ashish 19430
      }
19431
      throw new IllegalStateException();
19432
    }
19433
 
19434
    public boolean isSet(int fieldID) {
19435
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19436
    }
19437
 
19438
    @Override
19439
    public boolean equals(Object that) {
19440
      if (that == null)
19441
        return false;
483 rajveer 19442
      if (that instanceof getLineItemsForOrder_args)
19443
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 19444
      return false;
19445
    }
19446
 
483 rajveer 19447
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 19448
      if (that == null)
19449
        return false;
19450
 
483 rajveer 19451
      boolean this_present_orderId = true;
19452
      boolean that_present_orderId = true;
19453
      if (this_present_orderId || that_present_orderId) {
19454
        if (!(this_present_orderId && that_present_orderId))
68 ashish 19455
          return false;
483 rajveer 19456
        if (this.orderId != that.orderId)
68 ashish 19457
          return false;
19458
      }
19459
 
19460
      return true;
19461
    }
19462
 
19463
    @Override
19464
    public int hashCode() {
19465
      return 0;
19466
    }
19467
 
483 rajveer 19468
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 19469
      if (!getClass().equals(other.getClass())) {
19470
        return getClass().getName().compareTo(other.getClass().getName());
19471
      }
19472
 
19473
      int lastComparison = 0;
483 rajveer 19474
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 19475
 
483 rajveer 19476
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 19477
      if (lastComparison != 0) {
19478
        return lastComparison;
19479
      }
483 rajveer 19480
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 19481
      if (lastComparison != 0) {
19482
        return lastComparison;
19483
      }
19484
      return 0;
19485
    }
19486
 
19487
    public void read(TProtocol iprot) throws TException {
19488
      TField field;
19489
      iprot.readStructBegin();
19490
      while (true)
19491
      {
19492
        field = iprot.readFieldBegin();
19493
        if (field.type == TType.STOP) { 
19494
          break;
19495
        }
19496
        _Fields fieldId = _Fields.findByThriftId(field.id);
19497
        if (fieldId == null) {
19498
          TProtocolUtil.skip(iprot, field.type);
19499
        } else {
19500
          switch (fieldId) {
483 rajveer 19501
            case ORDER_ID:
68 ashish 19502
              if (field.type == TType.I64) {
483 rajveer 19503
                this.orderId = iprot.readI64();
19504
                setOrderIdIsSet(true);
68 ashish 19505
              } else { 
19506
                TProtocolUtil.skip(iprot, field.type);
19507
              }
19508
              break;
19509
          }
19510
          iprot.readFieldEnd();
19511
        }
19512
      }
19513
      iprot.readStructEnd();
19514
      validate();
19515
    }
19516
 
19517
    public void write(TProtocol oprot) throws TException {
19518
      validate();
19519
 
19520
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 19521
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19522
      oprot.writeI64(this.orderId);
68 ashish 19523
      oprot.writeFieldEnd();
19524
      oprot.writeFieldStop();
19525
      oprot.writeStructEnd();
19526
    }
19527
 
19528
    @Override
19529
    public String toString() {
483 rajveer 19530
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 19531
      boolean first = true;
19532
 
483 rajveer 19533
      sb.append("orderId:");
19534
      sb.append(this.orderId);
68 ashish 19535
      first = false;
19536
      sb.append(")");
19537
      return sb.toString();
19538
    }
19539
 
19540
    public void validate() throws TException {
19541
      // check for required fields
19542
    }
19543
 
19544
  }
19545
 
483 rajveer 19546
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
19547
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 19548
 
483 rajveer 19549
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 19550
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19551
 
483 rajveer 19552
    private List<LineItem> success;
68 ashish 19553
    private TransactionServiceException ex;
19554
 
19555
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19556
    public enum _Fields implements TFieldIdEnum {
19557
      SUCCESS((short)0, "success"),
19558
      EX((short)1, "ex");
19559
 
19560
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19561
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19562
 
19563
      static {
19564
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19565
          byId.put((int)field._thriftId, field);
19566
          byName.put(field.getFieldName(), field);
19567
        }
19568
      }
19569
 
19570
      /**
19571
       * Find the _Fields constant that matches fieldId, or null if its not found.
19572
       */
19573
      public static _Fields findByThriftId(int fieldId) {
19574
        return byId.get(fieldId);
19575
      }
19576
 
19577
      /**
19578
       * Find the _Fields constant that matches fieldId, throwing an exception
19579
       * if it is not found.
19580
       */
19581
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19582
        _Fields fields = findByThriftId(fieldId);
19583
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19584
        return fields;
19585
      }
19586
 
19587
      /**
19588
       * Find the _Fields constant that matches name, or null if its not found.
19589
       */
19590
      public static _Fields findByName(String name) {
19591
        return byName.get(name);
19592
      }
19593
 
19594
      private final short _thriftId;
19595
      private final String _fieldName;
19596
 
19597
      _Fields(short thriftId, String fieldName) {
19598
        _thriftId = thriftId;
19599
        _fieldName = fieldName;
19600
      }
19601
 
19602
      public short getThriftFieldId() {
19603
        return _thriftId;
19604
      }
19605
 
19606
      public String getFieldName() {
19607
        return _fieldName;
19608
      }
19609
    }
19610
 
19611
    // isset id assignments
19612
 
19613
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19614
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 19615
          new ListMetaData(TType.LIST, 
19616
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 19617
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19618
          new FieldValueMetaData(TType.STRUCT)));
19619
    }});
19620
 
19621
    static {
483 rajveer 19622
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 19623
    }
19624
 
483 rajveer 19625
    public getLineItemsForOrder_result() {
68 ashish 19626
    }
19627
 
483 rajveer 19628
    public getLineItemsForOrder_result(
19629
      List<LineItem> success,
68 ashish 19630
      TransactionServiceException ex)
19631
    {
19632
      this();
19633
      this.success = success;
19634
      this.ex = ex;
19635
    }
19636
 
19637
    /**
19638
     * Performs a deep copy on <i>other</i>.
19639
     */
483 rajveer 19640
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
19641
      if (other.isSetSuccess()) {
19642
        List<LineItem> __this__success = new ArrayList<LineItem>();
19643
        for (LineItem other_element : other.success) {
19644
          __this__success.add(new LineItem(other_element));
19645
        }
19646
        this.success = __this__success;
19647
      }
68 ashish 19648
      if (other.isSetEx()) {
19649
        this.ex = new TransactionServiceException(other.ex);
19650
      }
19651
    }
19652
 
483 rajveer 19653
    public getLineItemsForOrder_result deepCopy() {
19654
      return new getLineItemsForOrder_result(this);
68 ashish 19655
    }
19656
 
19657
    @Deprecated
483 rajveer 19658
    public getLineItemsForOrder_result clone() {
19659
      return new getLineItemsForOrder_result(this);
68 ashish 19660
    }
19661
 
483 rajveer 19662
    public int getSuccessSize() {
19663
      return (this.success == null) ? 0 : this.success.size();
19664
    }
19665
 
19666
    public java.util.Iterator<LineItem> getSuccessIterator() {
19667
      return (this.success == null) ? null : this.success.iterator();
19668
    }
19669
 
19670
    public void addToSuccess(LineItem elem) {
19671
      if (this.success == null) {
19672
        this.success = new ArrayList<LineItem>();
19673
      }
19674
      this.success.add(elem);
19675
    }
19676
 
19677
    public List<LineItem> getSuccess() {
68 ashish 19678
      return this.success;
19679
    }
19680
 
483 rajveer 19681
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 19682
      this.success = success;
19683
      return this;
19684
    }
19685
 
19686
    public void unsetSuccess() {
483 rajveer 19687
      this.success = null;
68 ashish 19688
    }
19689
 
19690
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19691
    public boolean isSetSuccess() {
483 rajveer 19692
      return this.success != null;
68 ashish 19693
    }
19694
 
19695
    public void setSuccessIsSet(boolean value) {
483 rajveer 19696
      if (!value) {
19697
        this.success = null;
19698
      }
68 ashish 19699
    }
19700
 
19701
    public TransactionServiceException getEx() {
19702
      return this.ex;
19703
    }
19704
 
483 rajveer 19705
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 19706
      this.ex = ex;
19707
      return this;
19708
    }
19709
 
19710
    public void unsetEx() {
19711
      this.ex = null;
19712
    }
19713
 
19714
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19715
    public boolean isSetEx() {
19716
      return this.ex != null;
19717
    }
19718
 
19719
    public void setExIsSet(boolean value) {
19720
      if (!value) {
19721
        this.ex = null;
19722
      }
19723
    }
19724
 
19725
    public void setFieldValue(_Fields field, Object value) {
19726
      switch (field) {
19727
      case SUCCESS:
19728
        if (value == null) {
19729
          unsetSuccess();
19730
        } else {
483 rajveer 19731
          setSuccess((List<LineItem>)value);
68 ashish 19732
        }
19733
        break;
19734
 
19735
      case EX:
19736
        if (value == null) {
19737
          unsetEx();
19738
        } else {
19739
          setEx((TransactionServiceException)value);
19740
        }
19741
        break;
19742
 
19743
      }
19744
    }
19745
 
19746
    public void setFieldValue(int fieldID, Object value) {
19747
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19748
    }
19749
 
19750
    public Object getFieldValue(_Fields field) {
19751
      switch (field) {
19752
      case SUCCESS:
483 rajveer 19753
        return getSuccess();
68 ashish 19754
 
19755
      case EX:
19756
        return getEx();
19757
 
19758
      }
19759
      throw new IllegalStateException();
19760
    }
19761
 
19762
    public Object getFieldValue(int fieldId) {
19763
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19764
    }
19765
 
19766
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19767
    public boolean isSet(_Fields field) {
19768
      switch (field) {
19769
      case SUCCESS:
19770
        return isSetSuccess();
19771
      case EX:
19772
        return isSetEx();
19773
      }
19774
      throw new IllegalStateException();
19775
    }
19776
 
19777
    public boolean isSet(int fieldID) {
19778
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19779
    }
19780
 
19781
    @Override
19782
    public boolean equals(Object that) {
19783
      if (that == null)
19784
        return false;
483 rajveer 19785
      if (that instanceof getLineItemsForOrder_result)
19786
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 19787
      return false;
19788
    }
19789
 
483 rajveer 19790
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 19791
      if (that == null)
19792
        return false;
19793
 
483 rajveer 19794
      boolean this_present_success = true && this.isSetSuccess();
19795
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 19796
      if (this_present_success || that_present_success) {
19797
        if (!(this_present_success && that_present_success))
19798
          return false;
483 rajveer 19799
        if (!this.success.equals(that.success))
68 ashish 19800
          return false;
19801
      }
19802
 
19803
      boolean this_present_ex = true && this.isSetEx();
19804
      boolean that_present_ex = true && that.isSetEx();
19805
      if (this_present_ex || that_present_ex) {
19806
        if (!(this_present_ex && that_present_ex))
19807
          return false;
19808
        if (!this.ex.equals(that.ex))
19809
          return false;
19810
      }
19811
 
19812
      return true;
19813
    }
19814
 
19815
    @Override
19816
    public int hashCode() {
19817
      return 0;
19818
    }
19819
 
483 rajveer 19820
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 19821
      if (!getClass().equals(other.getClass())) {
19822
        return getClass().getName().compareTo(other.getClass().getName());
19823
      }
19824
 
19825
      int lastComparison = 0;
483 rajveer 19826
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 19827
 
19828
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19829
      if (lastComparison != 0) {
19830
        return lastComparison;
19831
      }
19832
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19833
      if (lastComparison != 0) {
19834
        return lastComparison;
19835
      }
19836
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19837
      if (lastComparison != 0) {
19838
        return lastComparison;
19839
      }
19840
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19841
      if (lastComparison != 0) {
19842
        return lastComparison;
19843
      }
19844
      return 0;
19845
    }
19846
 
19847
    public void read(TProtocol iprot) throws TException {
19848
      TField field;
19849
      iprot.readStructBegin();
19850
      while (true)
19851
      {
19852
        field = iprot.readFieldBegin();
19853
        if (field.type == TType.STOP) { 
19854
          break;
19855
        }
19856
        _Fields fieldId = _Fields.findByThriftId(field.id);
19857
        if (fieldId == null) {
19858
          TProtocolUtil.skip(iprot, field.type);
19859
        } else {
19860
          switch (fieldId) {
19861
            case SUCCESS:
483 rajveer 19862
              if (field.type == TType.LIST) {
19863
                {
1382 varun.gupt 19864
                  TList _list40 = iprot.readListBegin();
19865
                  this.success = new ArrayList<LineItem>(_list40.size);
19866
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 19867
                  {
1382 varun.gupt 19868
                    LineItem _elem42;
19869
                    _elem42 = new LineItem();
19870
                    _elem42.read(iprot);
19871
                    this.success.add(_elem42);
483 rajveer 19872
                  }
19873
                  iprot.readListEnd();
19874
                }
68 ashish 19875
              } else { 
19876
                TProtocolUtil.skip(iprot, field.type);
19877
              }
19878
              break;
19879
            case EX:
19880
              if (field.type == TType.STRUCT) {
19881
                this.ex = new TransactionServiceException();
19882
                this.ex.read(iprot);
19883
              } else { 
19884
                TProtocolUtil.skip(iprot, field.type);
19885
              }
19886
              break;
19887
          }
19888
          iprot.readFieldEnd();
19889
        }
19890
      }
19891
      iprot.readStructEnd();
19892
      validate();
19893
    }
19894
 
19895
    public void write(TProtocol oprot) throws TException {
19896
      oprot.writeStructBegin(STRUCT_DESC);
19897
 
19898
      if (this.isSetSuccess()) {
19899
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 19900
        {
19901
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 19902
          for (LineItem _iter43 : this.success)
483 rajveer 19903
          {
1382 varun.gupt 19904
            _iter43.write(oprot);
483 rajveer 19905
          }
19906
          oprot.writeListEnd();
19907
        }
68 ashish 19908
        oprot.writeFieldEnd();
19909
      } else if (this.isSetEx()) {
19910
        oprot.writeFieldBegin(EX_FIELD_DESC);
19911
        this.ex.write(oprot);
19912
        oprot.writeFieldEnd();
19913
      }
19914
      oprot.writeFieldStop();
19915
      oprot.writeStructEnd();
19916
    }
19917
 
19918
    @Override
19919
    public String toString() {
483 rajveer 19920
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 19921
      boolean first = true;
19922
 
19923
      sb.append("success:");
483 rajveer 19924
      if (this.success == null) {
19925
        sb.append("null");
19926
      } else {
19927
        sb.append(this.success);
19928
      }
68 ashish 19929
      first = false;
19930
      if (!first) sb.append(", ");
19931
      sb.append("ex:");
19932
      if (this.ex == null) {
19933
        sb.append("null");
19934
      } else {
19935
        sb.append(this.ex);
19936
      }
19937
      first = false;
19938
      sb.append(")");
19939
      return sb.toString();
19940
    }
19941
 
19942
    public void validate() throws TException {
19943
      // check for required fields
19944
    }
19945
 
19946
  }
19947
 
1529 ankur.sing 19948
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
19949
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
19950
 
19951
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
19952
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
19953
 
19954
    private long orderId;
19955
    private long customerId;
19956
 
19957
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19958
    public enum _Fields implements TFieldIdEnum {
19959
      ORDER_ID((short)1, "orderId"),
19960
      CUSTOMER_ID((short)2, "customerId");
19961
 
19962
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19963
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19964
 
19965
      static {
19966
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19967
          byId.put((int)field._thriftId, field);
19968
          byName.put(field.getFieldName(), field);
19969
        }
19970
      }
19971
 
19972
      /**
19973
       * Find the _Fields constant that matches fieldId, or null if its not found.
19974
       */
19975
      public static _Fields findByThriftId(int fieldId) {
19976
        return byId.get(fieldId);
19977
      }
19978
 
19979
      /**
19980
       * Find the _Fields constant that matches fieldId, throwing an exception
19981
       * if it is not found.
19982
       */
19983
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19984
        _Fields fields = findByThriftId(fieldId);
19985
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19986
        return fields;
19987
      }
19988
 
19989
      /**
19990
       * Find the _Fields constant that matches name, or null if its not found.
19991
       */
19992
      public static _Fields findByName(String name) {
19993
        return byName.get(name);
19994
      }
19995
 
19996
      private final short _thriftId;
19997
      private final String _fieldName;
19998
 
19999
      _Fields(short thriftId, String fieldName) {
20000
        _thriftId = thriftId;
20001
        _fieldName = fieldName;
20002
      }
20003
 
20004
      public short getThriftFieldId() {
20005
        return _thriftId;
20006
      }
20007
 
20008
      public String getFieldName() {
20009
        return _fieldName;
20010
      }
20011
    }
20012
 
20013
    // isset id assignments
20014
    private static final int __ORDERID_ISSET_ID = 0;
20015
    private static final int __CUSTOMERID_ISSET_ID = 1;
20016
    private BitSet __isset_bit_vector = new BitSet(2);
20017
 
20018
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20019
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
20020
          new FieldValueMetaData(TType.I64)));
20021
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
20022
          new FieldValueMetaData(TType.I64)));
20023
    }});
20024
 
20025
    static {
20026
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
20027
    }
20028
 
20029
    public getOrderForCustomer_args() {
20030
    }
20031
 
20032
    public getOrderForCustomer_args(
20033
      long orderId,
20034
      long customerId)
20035
    {
20036
      this();
20037
      this.orderId = orderId;
20038
      setOrderIdIsSet(true);
20039
      this.customerId = customerId;
20040
      setCustomerIdIsSet(true);
20041
    }
20042
 
20043
    /**
20044
     * Performs a deep copy on <i>other</i>.
20045
     */
20046
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
20047
      __isset_bit_vector.clear();
20048
      __isset_bit_vector.or(other.__isset_bit_vector);
20049
      this.orderId = other.orderId;
20050
      this.customerId = other.customerId;
20051
    }
20052
 
20053
    public getOrderForCustomer_args deepCopy() {
20054
      return new getOrderForCustomer_args(this);
20055
    }
20056
 
20057
    @Deprecated
20058
    public getOrderForCustomer_args clone() {
20059
      return new getOrderForCustomer_args(this);
20060
    }
20061
 
20062
    public long getOrderId() {
20063
      return this.orderId;
20064
    }
20065
 
20066
    public getOrderForCustomer_args setOrderId(long orderId) {
20067
      this.orderId = orderId;
20068
      setOrderIdIsSet(true);
20069
      return this;
20070
    }
20071
 
20072
    public void unsetOrderId() {
20073
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20074
    }
20075
 
20076
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20077
    public boolean isSetOrderId() {
20078
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20079
    }
20080
 
20081
    public void setOrderIdIsSet(boolean value) {
20082
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20083
    }
20084
 
20085
    public long getCustomerId() {
20086
      return this.customerId;
20087
    }
20088
 
20089
    public getOrderForCustomer_args setCustomerId(long customerId) {
20090
      this.customerId = customerId;
20091
      setCustomerIdIsSet(true);
20092
      return this;
20093
    }
20094
 
20095
    public void unsetCustomerId() {
20096
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
20097
    }
20098
 
20099
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
20100
    public boolean isSetCustomerId() {
20101
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
20102
    }
20103
 
20104
    public void setCustomerIdIsSet(boolean value) {
20105
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
20106
    }
20107
 
20108
    public void setFieldValue(_Fields field, Object value) {
20109
      switch (field) {
20110
      case ORDER_ID:
20111
        if (value == null) {
20112
          unsetOrderId();
20113
        } else {
20114
          setOrderId((Long)value);
20115
        }
20116
        break;
20117
 
20118
      case CUSTOMER_ID:
20119
        if (value == null) {
20120
          unsetCustomerId();
20121
        } else {
20122
          setCustomerId((Long)value);
20123
        }
20124
        break;
20125
 
20126
      }
20127
    }
20128
 
20129
    public void setFieldValue(int fieldID, Object value) {
20130
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20131
    }
20132
 
20133
    public Object getFieldValue(_Fields field) {
20134
      switch (field) {
20135
      case ORDER_ID:
20136
        return new Long(getOrderId());
20137
 
20138
      case CUSTOMER_ID:
20139
        return new Long(getCustomerId());
20140
 
20141
      }
20142
      throw new IllegalStateException();
20143
    }
20144
 
20145
    public Object getFieldValue(int fieldId) {
20146
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20147
    }
20148
 
20149
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20150
    public boolean isSet(_Fields field) {
20151
      switch (field) {
20152
      case ORDER_ID:
20153
        return isSetOrderId();
20154
      case CUSTOMER_ID:
20155
        return isSetCustomerId();
20156
      }
20157
      throw new IllegalStateException();
20158
    }
20159
 
20160
    public boolean isSet(int fieldID) {
20161
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20162
    }
20163
 
20164
    @Override
20165
    public boolean equals(Object that) {
20166
      if (that == null)
20167
        return false;
20168
      if (that instanceof getOrderForCustomer_args)
20169
        return this.equals((getOrderForCustomer_args)that);
20170
      return false;
20171
    }
20172
 
20173
    public boolean equals(getOrderForCustomer_args that) {
20174
      if (that == null)
20175
        return false;
20176
 
20177
      boolean this_present_orderId = true;
20178
      boolean that_present_orderId = true;
20179
      if (this_present_orderId || that_present_orderId) {
20180
        if (!(this_present_orderId && that_present_orderId))
20181
          return false;
20182
        if (this.orderId != that.orderId)
20183
          return false;
20184
      }
20185
 
20186
      boolean this_present_customerId = true;
20187
      boolean that_present_customerId = true;
20188
      if (this_present_customerId || that_present_customerId) {
20189
        if (!(this_present_customerId && that_present_customerId))
20190
          return false;
20191
        if (this.customerId != that.customerId)
20192
          return false;
20193
      }
20194
 
20195
      return true;
20196
    }
20197
 
20198
    @Override
20199
    public int hashCode() {
20200
      return 0;
20201
    }
20202
 
20203
    public int compareTo(getOrderForCustomer_args other) {
20204
      if (!getClass().equals(other.getClass())) {
20205
        return getClass().getName().compareTo(other.getClass().getName());
20206
      }
20207
 
20208
      int lastComparison = 0;
20209
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
20210
 
20211
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20212
      if (lastComparison != 0) {
20213
        return lastComparison;
20214
      }
20215
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20216
      if (lastComparison != 0) {
20217
        return lastComparison;
20218
      }
20219
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
20220
      if (lastComparison != 0) {
20221
        return lastComparison;
20222
      }
20223
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
20224
      if (lastComparison != 0) {
20225
        return lastComparison;
20226
      }
20227
      return 0;
20228
    }
20229
 
20230
    public void read(TProtocol iprot) throws TException {
20231
      TField field;
20232
      iprot.readStructBegin();
20233
      while (true)
20234
      {
20235
        field = iprot.readFieldBegin();
20236
        if (field.type == TType.STOP) { 
20237
          break;
20238
        }
20239
        _Fields fieldId = _Fields.findByThriftId(field.id);
20240
        if (fieldId == null) {
20241
          TProtocolUtil.skip(iprot, field.type);
20242
        } else {
20243
          switch (fieldId) {
20244
            case ORDER_ID:
20245
              if (field.type == TType.I64) {
20246
                this.orderId = iprot.readI64();
20247
                setOrderIdIsSet(true);
20248
              } else { 
20249
                TProtocolUtil.skip(iprot, field.type);
20250
              }
20251
              break;
20252
            case CUSTOMER_ID:
20253
              if (field.type == TType.I64) {
20254
                this.customerId = iprot.readI64();
20255
                setCustomerIdIsSet(true);
20256
              } else { 
20257
                TProtocolUtil.skip(iprot, field.type);
20258
              }
20259
              break;
20260
          }
20261
          iprot.readFieldEnd();
20262
        }
20263
      }
20264
      iprot.readStructEnd();
20265
      validate();
20266
    }
20267
 
20268
    public void write(TProtocol oprot) throws TException {
20269
      validate();
20270
 
20271
      oprot.writeStructBegin(STRUCT_DESC);
20272
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20273
      oprot.writeI64(this.orderId);
20274
      oprot.writeFieldEnd();
20275
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
20276
      oprot.writeI64(this.customerId);
20277
      oprot.writeFieldEnd();
20278
      oprot.writeFieldStop();
20279
      oprot.writeStructEnd();
20280
    }
20281
 
20282
    @Override
20283
    public String toString() {
20284
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
20285
      boolean first = true;
20286
 
20287
      sb.append("orderId:");
20288
      sb.append(this.orderId);
20289
      first = false;
20290
      if (!first) sb.append(", ");
20291
      sb.append("customerId:");
20292
      sb.append(this.customerId);
20293
      first = false;
20294
      sb.append(")");
20295
      return sb.toString();
20296
    }
20297
 
20298
    public void validate() throws TException {
20299
      // check for required fields
20300
    }
20301
 
20302
  }
20303
 
20304
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
20305
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
20306
 
20307
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
20308
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20309
 
20310
    private Order success;
20311
    private TransactionServiceException ex;
20312
 
20313
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20314
    public enum _Fields implements TFieldIdEnum {
20315
      SUCCESS((short)0, "success"),
20316
      EX((short)1, "ex");
20317
 
20318
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20319
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20320
 
20321
      static {
20322
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20323
          byId.put((int)field._thriftId, field);
20324
          byName.put(field.getFieldName(), field);
20325
        }
20326
      }
20327
 
20328
      /**
20329
       * Find the _Fields constant that matches fieldId, or null if its not found.
20330
       */
20331
      public static _Fields findByThriftId(int fieldId) {
20332
        return byId.get(fieldId);
20333
      }
20334
 
20335
      /**
20336
       * Find the _Fields constant that matches fieldId, throwing an exception
20337
       * if it is not found.
20338
       */
20339
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20340
        _Fields fields = findByThriftId(fieldId);
20341
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20342
        return fields;
20343
      }
20344
 
20345
      /**
20346
       * Find the _Fields constant that matches name, or null if its not found.
20347
       */
20348
      public static _Fields findByName(String name) {
20349
        return byName.get(name);
20350
      }
20351
 
20352
      private final short _thriftId;
20353
      private final String _fieldName;
20354
 
20355
      _Fields(short thriftId, String fieldName) {
20356
        _thriftId = thriftId;
20357
        _fieldName = fieldName;
20358
      }
20359
 
20360
      public short getThriftFieldId() {
20361
        return _thriftId;
20362
      }
20363
 
20364
      public String getFieldName() {
20365
        return _fieldName;
20366
      }
20367
    }
20368
 
20369
    // isset id assignments
20370
 
20371
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20372
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20373
          new StructMetaData(TType.STRUCT, Order.class)));
20374
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20375
          new FieldValueMetaData(TType.STRUCT)));
20376
    }});
20377
 
20378
    static {
20379
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
20380
    }
20381
 
20382
    public getOrderForCustomer_result() {
20383
    }
20384
 
20385
    public getOrderForCustomer_result(
20386
      Order success,
20387
      TransactionServiceException ex)
20388
    {
20389
      this();
20390
      this.success = success;
20391
      this.ex = ex;
20392
    }
20393
 
20394
    /**
20395
     * Performs a deep copy on <i>other</i>.
20396
     */
20397
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
20398
      if (other.isSetSuccess()) {
20399
        this.success = new Order(other.success);
20400
      }
20401
      if (other.isSetEx()) {
20402
        this.ex = new TransactionServiceException(other.ex);
20403
      }
20404
    }
20405
 
20406
    public getOrderForCustomer_result deepCopy() {
20407
      return new getOrderForCustomer_result(this);
20408
    }
20409
 
20410
    @Deprecated
20411
    public getOrderForCustomer_result clone() {
20412
      return new getOrderForCustomer_result(this);
20413
    }
20414
 
20415
    public Order getSuccess() {
20416
      return this.success;
20417
    }
20418
 
20419
    public getOrderForCustomer_result setSuccess(Order success) {
20420
      this.success = success;
20421
      return this;
20422
    }
20423
 
20424
    public void unsetSuccess() {
20425
      this.success = null;
20426
    }
20427
 
20428
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20429
    public boolean isSetSuccess() {
20430
      return this.success != null;
20431
    }
20432
 
20433
    public void setSuccessIsSet(boolean value) {
20434
      if (!value) {
20435
        this.success = null;
20436
      }
20437
    }
20438
 
20439
    public TransactionServiceException getEx() {
20440
      return this.ex;
20441
    }
20442
 
20443
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
20444
      this.ex = ex;
20445
      return this;
20446
    }
20447
 
20448
    public void unsetEx() {
20449
      this.ex = null;
20450
    }
20451
 
20452
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20453
    public boolean isSetEx() {
20454
      return this.ex != null;
20455
    }
20456
 
20457
    public void setExIsSet(boolean value) {
20458
      if (!value) {
20459
        this.ex = null;
20460
      }
20461
    }
20462
 
20463
    public void setFieldValue(_Fields field, Object value) {
20464
      switch (field) {
20465
      case SUCCESS:
20466
        if (value == null) {
20467
          unsetSuccess();
20468
        } else {
20469
          setSuccess((Order)value);
20470
        }
20471
        break;
20472
 
20473
      case EX:
20474
        if (value == null) {
20475
          unsetEx();
20476
        } else {
20477
          setEx((TransactionServiceException)value);
20478
        }
20479
        break;
20480
 
20481
      }
20482
    }
20483
 
20484
    public void setFieldValue(int fieldID, Object value) {
20485
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20486
    }
20487
 
20488
    public Object getFieldValue(_Fields field) {
20489
      switch (field) {
20490
      case SUCCESS:
20491
        return getSuccess();
20492
 
20493
      case EX:
20494
        return getEx();
20495
 
20496
      }
20497
      throw new IllegalStateException();
20498
    }
20499
 
20500
    public Object getFieldValue(int fieldId) {
20501
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20502
    }
20503
 
20504
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20505
    public boolean isSet(_Fields field) {
20506
      switch (field) {
20507
      case SUCCESS:
20508
        return isSetSuccess();
20509
      case EX:
20510
        return isSetEx();
20511
      }
20512
      throw new IllegalStateException();
20513
    }
20514
 
20515
    public boolean isSet(int fieldID) {
20516
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20517
    }
20518
 
20519
    @Override
20520
    public boolean equals(Object that) {
20521
      if (that == null)
20522
        return false;
20523
      if (that instanceof getOrderForCustomer_result)
20524
        return this.equals((getOrderForCustomer_result)that);
20525
      return false;
20526
    }
20527
 
20528
    public boolean equals(getOrderForCustomer_result that) {
20529
      if (that == null)
20530
        return false;
20531
 
20532
      boolean this_present_success = true && this.isSetSuccess();
20533
      boolean that_present_success = true && that.isSetSuccess();
20534
      if (this_present_success || that_present_success) {
20535
        if (!(this_present_success && that_present_success))
20536
          return false;
20537
        if (!this.success.equals(that.success))
20538
          return false;
20539
      }
20540
 
20541
      boolean this_present_ex = true && this.isSetEx();
20542
      boolean that_present_ex = true && that.isSetEx();
20543
      if (this_present_ex || that_present_ex) {
20544
        if (!(this_present_ex && that_present_ex))
20545
          return false;
20546
        if (!this.ex.equals(that.ex))
20547
          return false;
20548
      }
20549
 
20550
      return true;
20551
    }
20552
 
20553
    @Override
20554
    public int hashCode() {
20555
      return 0;
20556
    }
20557
 
20558
    public int compareTo(getOrderForCustomer_result other) {
20559
      if (!getClass().equals(other.getClass())) {
20560
        return getClass().getName().compareTo(other.getClass().getName());
20561
      }
20562
 
20563
      int lastComparison = 0;
20564
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
20565
 
20566
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20567
      if (lastComparison != 0) {
20568
        return lastComparison;
20569
      }
20570
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20571
      if (lastComparison != 0) {
20572
        return lastComparison;
20573
      }
20574
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20575
      if (lastComparison != 0) {
20576
        return lastComparison;
20577
      }
20578
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20579
      if (lastComparison != 0) {
20580
        return lastComparison;
20581
      }
20582
      return 0;
20583
    }
20584
 
20585
    public void read(TProtocol iprot) throws TException {
20586
      TField field;
20587
      iprot.readStructBegin();
20588
      while (true)
20589
      {
20590
        field = iprot.readFieldBegin();
20591
        if (field.type == TType.STOP) { 
20592
          break;
20593
        }
20594
        _Fields fieldId = _Fields.findByThriftId(field.id);
20595
        if (fieldId == null) {
20596
          TProtocolUtil.skip(iprot, field.type);
20597
        } else {
20598
          switch (fieldId) {
20599
            case SUCCESS:
20600
              if (field.type == TType.STRUCT) {
20601
                this.success = new Order();
20602
                this.success.read(iprot);
20603
              } else { 
20604
                TProtocolUtil.skip(iprot, field.type);
20605
              }
20606
              break;
20607
            case EX:
20608
              if (field.type == TType.STRUCT) {
20609
                this.ex = new TransactionServiceException();
20610
                this.ex.read(iprot);
20611
              } else { 
20612
                TProtocolUtil.skip(iprot, field.type);
20613
              }
20614
              break;
20615
          }
20616
          iprot.readFieldEnd();
20617
        }
20618
      }
20619
      iprot.readStructEnd();
20620
      validate();
20621
    }
20622
 
20623
    public void write(TProtocol oprot) throws TException {
20624
      oprot.writeStructBegin(STRUCT_DESC);
20625
 
20626
      if (this.isSetSuccess()) {
20627
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20628
        this.success.write(oprot);
20629
        oprot.writeFieldEnd();
20630
      } else if (this.isSetEx()) {
20631
        oprot.writeFieldBegin(EX_FIELD_DESC);
20632
        this.ex.write(oprot);
20633
        oprot.writeFieldEnd();
20634
      }
20635
      oprot.writeFieldStop();
20636
      oprot.writeStructEnd();
20637
    }
20638
 
20639
    @Override
20640
    public String toString() {
20641
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
20642
      boolean first = true;
20643
 
20644
      sb.append("success:");
20645
      if (this.success == null) {
20646
        sb.append("null");
20647
      } else {
20648
        sb.append(this.success);
20649
      }
20650
      first = false;
20651
      if (!first) sb.append(", ");
20652
      sb.append("ex:");
20653
      if (this.ex == null) {
20654
        sb.append("null");
20655
      } else {
20656
        sb.append(this.ex);
20657
      }
20658
      first = false;
20659
      sb.append(")");
20660
      return sb.toString();
20661
    }
20662
 
20663
    public void validate() throws TException {
20664
      // check for required fields
20665
    }
20666
 
20667
  }
20668
 
1221 chandransh 20669
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
20670
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
20671
 
20672
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
20673
 
20674
    private long warehouseId;
20675
 
20676
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20677
    public enum _Fields implements TFieldIdEnum {
20678
      WAREHOUSE_ID((short)1, "warehouseId");
20679
 
20680
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20681
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20682
 
20683
      static {
20684
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20685
          byId.put((int)field._thriftId, field);
20686
          byName.put(field.getFieldName(), field);
20687
        }
20688
      }
20689
 
20690
      /**
20691
       * Find the _Fields constant that matches fieldId, or null if its not found.
20692
       */
20693
      public static _Fields findByThriftId(int fieldId) {
20694
        return byId.get(fieldId);
20695
      }
20696
 
20697
      /**
20698
       * Find the _Fields constant that matches fieldId, throwing an exception
20699
       * if it is not found.
20700
       */
20701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20702
        _Fields fields = findByThriftId(fieldId);
20703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20704
        return fields;
20705
      }
20706
 
20707
      /**
20708
       * Find the _Fields constant that matches name, or null if its not found.
20709
       */
20710
      public static _Fields findByName(String name) {
20711
        return byName.get(name);
20712
      }
20713
 
20714
      private final short _thriftId;
20715
      private final String _fieldName;
20716
 
20717
      _Fields(short thriftId, String fieldName) {
20718
        _thriftId = thriftId;
20719
        _fieldName = fieldName;
20720
      }
20721
 
20722
      public short getThriftFieldId() {
20723
        return _thriftId;
20724
      }
20725
 
20726
      public String getFieldName() {
20727
        return _fieldName;
20728
      }
20729
    }
20730
 
20731
    // isset id assignments
20732
    private static final int __WAREHOUSEID_ISSET_ID = 0;
20733
    private BitSet __isset_bit_vector = new BitSet(1);
20734
 
20735
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20736
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
20737
          new FieldValueMetaData(TType.I64)));
20738
    }});
20739
 
20740
    static {
20741
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
20742
    }
20743
 
20744
    public batchOrders_args() {
20745
    }
20746
 
20747
    public batchOrders_args(
20748
      long warehouseId)
20749
    {
20750
      this();
20751
      this.warehouseId = warehouseId;
20752
      setWarehouseIdIsSet(true);
20753
    }
20754
 
20755
    /**
20756
     * Performs a deep copy on <i>other</i>.
20757
     */
20758
    public batchOrders_args(batchOrders_args other) {
20759
      __isset_bit_vector.clear();
20760
      __isset_bit_vector.or(other.__isset_bit_vector);
20761
      this.warehouseId = other.warehouseId;
20762
    }
20763
 
20764
    public batchOrders_args deepCopy() {
20765
      return new batchOrders_args(this);
20766
    }
20767
 
20768
    @Deprecated
20769
    public batchOrders_args clone() {
20770
      return new batchOrders_args(this);
20771
    }
20772
 
20773
    public long getWarehouseId() {
20774
      return this.warehouseId;
20775
    }
20776
 
20777
    public batchOrders_args setWarehouseId(long warehouseId) {
20778
      this.warehouseId = warehouseId;
20779
      setWarehouseIdIsSet(true);
20780
      return this;
20781
    }
20782
 
20783
    public void unsetWarehouseId() {
20784
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20785
    }
20786
 
20787
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
20788
    public boolean isSetWarehouseId() {
20789
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20790
    }
20791
 
20792
    public void setWarehouseIdIsSet(boolean value) {
20793
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20794
    }
20795
 
20796
    public void setFieldValue(_Fields field, Object value) {
20797
      switch (field) {
20798
      case WAREHOUSE_ID:
20799
        if (value == null) {
20800
          unsetWarehouseId();
20801
        } else {
20802
          setWarehouseId((Long)value);
20803
        }
20804
        break;
20805
 
20806
      }
20807
    }
20808
 
20809
    public void setFieldValue(int fieldID, Object value) {
20810
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20811
    }
20812
 
20813
    public Object getFieldValue(_Fields field) {
20814
      switch (field) {
20815
      case WAREHOUSE_ID:
20816
        return new Long(getWarehouseId());
20817
 
20818
      }
20819
      throw new IllegalStateException();
20820
    }
20821
 
20822
    public Object getFieldValue(int fieldId) {
20823
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20824
    }
20825
 
20826
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20827
    public boolean isSet(_Fields field) {
20828
      switch (field) {
20829
      case WAREHOUSE_ID:
20830
        return isSetWarehouseId();
20831
      }
20832
      throw new IllegalStateException();
20833
    }
20834
 
20835
    public boolean isSet(int fieldID) {
20836
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20837
    }
20838
 
20839
    @Override
20840
    public boolean equals(Object that) {
20841
      if (that == null)
20842
        return false;
20843
      if (that instanceof batchOrders_args)
20844
        return this.equals((batchOrders_args)that);
20845
      return false;
20846
    }
20847
 
20848
    public boolean equals(batchOrders_args that) {
20849
      if (that == null)
20850
        return false;
20851
 
20852
      boolean this_present_warehouseId = true;
20853
      boolean that_present_warehouseId = true;
20854
      if (this_present_warehouseId || that_present_warehouseId) {
20855
        if (!(this_present_warehouseId && that_present_warehouseId))
20856
          return false;
20857
        if (this.warehouseId != that.warehouseId)
20858
          return false;
20859
      }
20860
 
20861
      return true;
20862
    }
20863
 
20864
    @Override
20865
    public int hashCode() {
20866
      return 0;
20867
    }
20868
 
20869
    public int compareTo(batchOrders_args other) {
20870
      if (!getClass().equals(other.getClass())) {
20871
        return getClass().getName().compareTo(other.getClass().getName());
20872
      }
20873
 
20874
      int lastComparison = 0;
20875
      batchOrders_args typedOther = (batchOrders_args)other;
20876
 
20877
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
20878
      if (lastComparison != 0) {
20879
        return lastComparison;
20880
      }
20881
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
20882
      if (lastComparison != 0) {
20883
        return lastComparison;
20884
      }
20885
      return 0;
20886
    }
20887
 
20888
    public void read(TProtocol iprot) throws TException {
20889
      TField field;
20890
      iprot.readStructBegin();
20891
      while (true)
20892
      {
20893
        field = iprot.readFieldBegin();
20894
        if (field.type == TType.STOP) { 
20895
          break;
20896
        }
20897
        _Fields fieldId = _Fields.findByThriftId(field.id);
20898
        if (fieldId == null) {
20899
          TProtocolUtil.skip(iprot, field.type);
20900
        } else {
20901
          switch (fieldId) {
20902
            case WAREHOUSE_ID:
20903
              if (field.type == TType.I64) {
20904
                this.warehouseId = iprot.readI64();
20905
                setWarehouseIdIsSet(true);
20906
              } else { 
20907
                TProtocolUtil.skip(iprot, field.type);
20908
              }
20909
              break;
20910
          }
20911
          iprot.readFieldEnd();
20912
        }
20913
      }
20914
      iprot.readStructEnd();
20915
      validate();
20916
    }
20917
 
20918
    public void write(TProtocol oprot) throws TException {
20919
      validate();
20920
 
20921
      oprot.writeStructBegin(STRUCT_DESC);
20922
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20923
      oprot.writeI64(this.warehouseId);
20924
      oprot.writeFieldEnd();
20925
      oprot.writeFieldStop();
20926
      oprot.writeStructEnd();
20927
    }
20928
 
20929
    @Override
20930
    public String toString() {
20931
      StringBuilder sb = new StringBuilder("batchOrders_args(");
20932
      boolean first = true;
20933
 
20934
      sb.append("warehouseId:");
20935
      sb.append(this.warehouseId);
20936
      first = false;
20937
      sb.append(")");
20938
      return sb.toString();
20939
    }
20940
 
20941
    public void validate() throws TException {
20942
      // check for required fields
20943
    }
20944
 
20945
  }
20946
 
20947
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
20948
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
20949
 
20950
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20951
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20952
 
20953
    private List<Order> success;
20954
    private TransactionServiceException ex;
20955
 
20956
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20957
    public enum _Fields implements TFieldIdEnum {
20958
      SUCCESS((short)0, "success"),
20959
      EX((short)1, "ex");
20960
 
20961
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20962
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20963
 
20964
      static {
20965
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20966
          byId.put((int)field._thriftId, field);
20967
          byName.put(field.getFieldName(), field);
20968
        }
20969
      }
20970
 
20971
      /**
20972
       * Find the _Fields constant that matches fieldId, or null if its not found.
20973
       */
20974
      public static _Fields findByThriftId(int fieldId) {
20975
        return byId.get(fieldId);
20976
      }
20977
 
20978
      /**
20979
       * Find the _Fields constant that matches fieldId, throwing an exception
20980
       * if it is not found.
20981
       */
20982
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20983
        _Fields fields = findByThriftId(fieldId);
20984
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20985
        return fields;
20986
      }
20987
 
20988
      /**
20989
       * Find the _Fields constant that matches name, or null if its not found.
20990
       */
20991
      public static _Fields findByName(String name) {
20992
        return byName.get(name);
20993
      }
20994
 
20995
      private final short _thriftId;
20996
      private final String _fieldName;
20997
 
20998
      _Fields(short thriftId, String fieldName) {
20999
        _thriftId = thriftId;
21000
        _fieldName = fieldName;
21001
      }
21002
 
21003
      public short getThriftFieldId() {
21004
        return _thriftId;
21005
      }
21006
 
21007
      public String getFieldName() {
21008
        return _fieldName;
21009
      }
21010
    }
21011
 
21012
    // isset id assignments
21013
 
21014
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21015
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21016
          new ListMetaData(TType.LIST, 
21017
              new StructMetaData(TType.STRUCT, Order.class))));
21018
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21019
          new FieldValueMetaData(TType.STRUCT)));
21020
    }});
21021
 
21022
    static {
21023
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
21024
    }
21025
 
21026
    public batchOrders_result() {
21027
    }
21028
 
21029
    public batchOrders_result(
21030
      List<Order> success,
21031
      TransactionServiceException ex)
21032
    {
21033
      this();
21034
      this.success = success;
21035
      this.ex = ex;
21036
    }
21037
 
21038
    /**
21039
     * Performs a deep copy on <i>other</i>.
21040
     */
21041
    public batchOrders_result(batchOrders_result other) {
21042
      if (other.isSetSuccess()) {
21043
        List<Order> __this__success = new ArrayList<Order>();
21044
        for (Order other_element : other.success) {
21045
          __this__success.add(new Order(other_element));
21046
        }
21047
        this.success = __this__success;
21048
      }
21049
      if (other.isSetEx()) {
21050
        this.ex = new TransactionServiceException(other.ex);
21051
      }
21052
    }
21053
 
21054
    public batchOrders_result deepCopy() {
21055
      return new batchOrders_result(this);
21056
    }
21057
 
21058
    @Deprecated
21059
    public batchOrders_result clone() {
21060
      return new batchOrders_result(this);
21061
    }
21062
 
21063
    public int getSuccessSize() {
21064
      return (this.success == null) ? 0 : this.success.size();
21065
    }
21066
 
21067
    public java.util.Iterator<Order> getSuccessIterator() {
21068
      return (this.success == null) ? null : this.success.iterator();
21069
    }
21070
 
21071
    public void addToSuccess(Order elem) {
21072
      if (this.success == null) {
21073
        this.success = new ArrayList<Order>();
21074
      }
21075
      this.success.add(elem);
21076
    }
21077
 
21078
    public List<Order> getSuccess() {
21079
      return this.success;
21080
    }
21081
 
21082
    public batchOrders_result setSuccess(List<Order> success) {
21083
      this.success = success;
21084
      return this;
21085
    }
21086
 
21087
    public void unsetSuccess() {
21088
      this.success = null;
21089
    }
21090
 
21091
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21092
    public boolean isSetSuccess() {
21093
      return this.success != null;
21094
    }
21095
 
21096
    public void setSuccessIsSet(boolean value) {
21097
      if (!value) {
21098
        this.success = null;
21099
      }
21100
    }
21101
 
21102
    public TransactionServiceException getEx() {
21103
      return this.ex;
21104
    }
21105
 
21106
    public batchOrders_result setEx(TransactionServiceException ex) {
21107
      this.ex = ex;
21108
      return this;
21109
    }
21110
 
21111
    public void unsetEx() {
21112
      this.ex = null;
21113
    }
21114
 
21115
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21116
    public boolean isSetEx() {
21117
      return this.ex != null;
21118
    }
21119
 
21120
    public void setExIsSet(boolean value) {
21121
      if (!value) {
21122
        this.ex = null;
21123
      }
21124
    }
21125
 
21126
    public void setFieldValue(_Fields field, Object value) {
21127
      switch (field) {
21128
      case SUCCESS:
21129
        if (value == null) {
21130
          unsetSuccess();
21131
        } else {
21132
          setSuccess((List<Order>)value);
21133
        }
21134
        break;
21135
 
21136
      case EX:
21137
        if (value == null) {
21138
          unsetEx();
21139
        } else {
21140
          setEx((TransactionServiceException)value);
21141
        }
21142
        break;
21143
 
21144
      }
21145
    }
21146
 
21147
    public void setFieldValue(int fieldID, Object value) {
21148
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21149
    }
21150
 
21151
    public Object getFieldValue(_Fields field) {
21152
      switch (field) {
21153
      case SUCCESS:
21154
        return getSuccess();
21155
 
21156
      case EX:
21157
        return getEx();
21158
 
21159
      }
21160
      throw new IllegalStateException();
21161
    }
21162
 
21163
    public Object getFieldValue(int fieldId) {
21164
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21165
    }
21166
 
21167
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21168
    public boolean isSet(_Fields field) {
21169
      switch (field) {
21170
      case SUCCESS:
21171
        return isSetSuccess();
21172
      case EX:
21173
        return isSetEx();
21174
      }
21175
      throw new IllegalStateException();
21176
    }
21177
 
21178
    public boolean isSet(int fieldID) {
21179
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21180
    }
21181
 
21182
    @Override
21183
    public boolean equals(Object that) {
21184
      if (that == null)
21185
        return false;
21186
      if (that instanceof batchOrders_result)
21187
        return this.equals((batchOrders_result)that);
21188
      return false;
21189
    }
21190
 
21191
    public boolean equals(batchOrders_result that) {
21192
      if (that == null)
21193
        return false;
21194
 
21195
      boolean this_present_success = true && this.isSetSuccess();
21196
      boolean that_present_success = true && that.isSetSuccess();
21197
      if (this_present_success || that_present_success) {
21198
        if (!(this_present_success && that_present_success))
21199
          return false;
21200
        if (!this.success.equals(that.success))
21201
          return false;
21202
      }
21203
 
21204
      boolean this_present_ex = true && this.isSetEx();
21205
      boolean that_present_ex = true && that.isSetEx();
21206
      if (this_present_ex || that_present_ex) {
21207
        if (!(this_present_ex && that_present_ex))
21208
          return false;
21209
        if (!this.ex.equals(that.ex))
21210
          return false;
21211
      }
21212
 
21213
      return true;
21214
    }
21215
 
21216
    @Override
21217
    public int hashCode() {
21218
      return 0;
21219
    }
21220
 
21221
    public int compareTo(batchOrders_result other) {
21222
      if (!getClass().equals(other.getClass())) {
21223
        return getClass().getName().compareTo(other.getClass().getName());
21224
      }
21225
 
21226
      int lastComparison = 0;
21227
      batchOrders_result typedOther = (batchOrders_result)other;
21228
 
21229
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21230
      if (lastComparison != 0) {
21231
        return lastComparison;
21232
      }
21233
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21234
      if (lastComparison != 0) {
21235
        return lastComparison;
21236
      }
21237
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21238
      if (lastComparison != 0) {
21239
        return lastComparison;
21240
      }
21241
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21242
      if (lastComparison != 0) {
21243
        return lastComparison;
21244
      }
21245
      return 0;
21246
    }
21247
 
21248
    public void read(TProtocol iprot) throws TException {
21249
      TField field;
21250
      iprot.readStructBegin();
21251
      while (true)
21252
      {
21253
        field = iprot.readFieldBegin();
21254
        if (field.type == TType.STOP) { 
21255
          break;
21256
        }
21257
        _Fields fieldId = _Fields.findByThriftId(field.id);
21258
        if (fieldId == null) {
21259
          TProtocolUtil.skip(iprot, field.type);
21260
        } else {
21261
          switch (fieldId) {
21262
            case SUCCESS:
21263
              if (field.type == TType.LIST) {
21264
                {
1382 varun.gupt 21265
                  TList _list44 = iprot.readListBegin();
21266
                  this.success = new ArrayList<Order>(_list44.size);
21267
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 21268
                  {
1382 varun.gupt 21269
                    Order _elem46;
21270
                    _elem46 = new Order();
21271
                    _elem46.read(iprot);
21272
                    this.success.add(_elem46);
1221 chandransh 21273
                  }
21274
                  iprot.readListEnd();
21275
                }
21276
              } else { 
21277
                TProtocolUtil.skip(iprot, field.type);
21278
              }
21279
              break;
21280
            case EX:
21281
              if (field.type == TType.STRUCT) {
21282
                this.ex = new TransactionServiceException();
21283
                this.ex.read(iprot);
21284
              } else { 
21285
                TProtocolUtil.skip(iprot, field.type);
21286
              }
21287
              break;
21288
          }
21289
          iprot.readFieldEnd();
21290
        }
21291
      }
21292
      iprot.readStructEnd();
21293
      validate();
21294
    }
21295
 
21296
    public void write(TProtocol oprot) throws TException {
21297
      oprot.writeStructBegin(STRUCT_DESC);
21298
 
21299
      if (this.isSetSuccess()) {
21300
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21301
        {
21302
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 21303
          for (Order _iter47 : this.success)
1221 chandransh 21304
          {
1382 varun.gupt 21305
            _iter47.write(oprot);
1221 chandransh 21306
          }
21307
          oprot.writeListEnd();
21308
        }
21309
        oprot.writeFieldEnd();
21310
      } else if (this.isSetEx()) {
21311
        oprot.writeFieldBegin(EX_FIELD_DESC);
21312
        this.ex.write(oprot);
21313
        oprot.writeFieldEnd();
21314
      }
21315
      oprot.writeFieldStop();
21316
      oprot.writeStructEnd();
21317
    }
21318
 
21319
    @Override
21320
    public String toString() {
21321
      StringBuilder sb = new StringBuilder("batchOrders_result(");
21322
      boolean first = true;
21323
 
21324
      sb.append("success:");
21325
      if (this.success == null) {
21326
        sb.append("null");
21327
      } else {
21328
        sb.append(this.success);
21329
      }
21330
      first = false;
21331
      if (!first) sb.append(", ");
21332
      sb.append("ex:");
21333
      if (this.ex == null) {
21334
        sb.append("null");
21335
      } else {
21336
        sb.append(this.ex);
21337
      }
21338
      first = false;
21339
      sb.append(")");
21340
      return sb.toString();
21341
    }
21342
 
21343
    public void validate() throws TException {
21344
      // check for required fields
21345
    }
21346
 
21347
  }
21348
 
1209 chandransh 21349
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
21350
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
21351
 
21352
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
21353
 
21354
    private long orderId;
21355
 
21356
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21357
    public enum _Fields implements TFieldIdEnum {
21358
      ORDER_ID((short)1, "orderId");
21359
 
21360
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21361
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21362
 
21363
      static {
21364
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21365
          byId.put((int)field._thriftId, field);
21366
          byName.put(field.getFieldName(), field);
21367
        }
21368
      }
21369
 
21370
      /**
21371
       * Find the _Fields constant that matches fieldId, or null if its not found.
21372
       */
21373
      public static _Fields findByThriftId(int fieldId) {
21374
        return byId.get(fieldId);
21375
      }
21376
 
21377
      /**
21378
       * Find the _Fields constant that matches fieldId, throwing an exception
21379
       * if it is not found.
21380
       */
21381
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21382
        _Fields fields = findByThriftId(fieldId);
21383
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21384
        return fields;
21385
      }
21386
 
21387
      /**
21388
       * Find the _Fields constant that matches name, or null if its not found.
21389
       */
21390
      public static _Fields findByName(String name) {
21391
        return byName.get(name);
21392
      }
21393
 
21394
      private final short _thriftId;
21395
      private final String _fieldName;
21396
 
21397
      _Fields(short thriftId, String fieldName) {
21398
        _thriftId = thriftId;
21399
        _fieldName = fieldName;
21400
      }
21401
 
21402
      public short getThriftFieldId() {
21403
        return _thriftId;
21404
      }
21405
 
21406
      public String getFieldName() {
21407
        return _fieldName;
21408
      }
21409
    }
21410
 
21411
    // isset id assignments
21412
    private static final int __ORDERID_ISSET_ID = 0;
21413
    private BitSet __isset_bit_vector = new BitSet(1);
21414
 
21415
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21416
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
21417
          new FieldValueMetaData(TType.I64)));
21418
    }});
21419
 
21420
    static {
21421
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
21422
    }
21423
 
21424
    public markOrderAsOutOfStock_args() {
21425
    }
21426
 
21427
    public markOrderAsOutOfStock_args(
21428
      long orderId)
21429
    {
21430
      this();
21431
      this.orderId = orderId;
21432
      setOrderIdIsSet(true);
21433
    }
21434
 
21435
    /**
21436
     * Performs a deep copy on <i>other</i>.
21437
     */
21438
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
21439
      __isset_bit_vector.clear();
21440
      __isset_bit_vector.or(other.__isset_bit_vector);
21441
      this.orderId = other.orderId;
21442
    }
21443
 
21444
    public markOrderAsOutOfStock_args deepCopy() {
21445
      return new markOrderAsOutOfStock_args(this);
21446
    }
21447
 
21448
    @Deprecated
21449
    public markOrderAsOutOfStock_args clone() {
21450
      return new markOrderAsOutOfStock_args(this);
21451
    }
21452
 
21453
    public long getOrderId() {
21454
      return this.orderId;
21455
    }
21456
 
21457
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
21458
      this.orderId = orderId;
21459
      setOrderIdIsSet(true);
21460
      return this;
21461
    }
21462
 
21463
    public void unsetOrderId() {
21464
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
21465
    }
21466
 
21467
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
21468
    public boolean isSetOrderId() {
21469
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
21470
    }
21471
 
21472
    public void setOrderIdIsSet(boolean value) {
21473
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
21474
    }
21475
 
21476
    public void setFieldValue(_Fields field, Object value) {
21477
      switch (field) {
21478
      case ORDER_ID:
21479
        if (value == null) {
21480
          unsetOrderId();
21481
        } else {
21482
          setOrderId((Long)value);
21483
        }
21484
        break;
21485
 
21486
      }
21487
    }
21488
 
21489
    public void setFieldValue(int fieldID, Object value) {
21490
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21491
    }
21492
 
21493
    public Object getFieldValue(_Fields field) {
21494
      switch (field) {
21495
      case ORDER_ID:
21496
        return new Long(getOrderId());
21497
 
21498
      }
21499
      throw new IllegalStateException();
21500
    }
21501
 
21502
    public Object getFieldValue(int fieldId) {
21503
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21504
    }
21505
 
21506
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21507
    public boolean isSet(_Fields field) {
21508
      switch (field) {
21509
      case ORDER_ID:
21510
        return isSetOrderId();
21511
      }
21512
      throw new IllegalStateException();
21513
    }
21514
 
21515
    public boolean isSet(int fieldID) {
21516
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21517
    }
21518
 
21519
    @Override
21520
    public boolean equals(Object that) {
21521
      if (that == null)
21522
        return false;
21523
      if (that instanceof markOrderAsOutOfStock_args)
21524
        return this.equals((markOrderAsOutOfStock_args)that);
21525
      return false;
21526
    }
21527
 
21528
    public boolean equals(markOrderAsOutOfStock_args that) {
21529
      if (that == null)
21530
        return false;
21531
 
21532
      boolean this_present_orderId = true;
21533
      boolean that_present_orderId = true;
21534
      if (this_present_orderId || that_present_orderId) {
21535
        if (!(this_present_orderId && that_present_orderId))
21536
          return false;
21537
        if (this.orderId != that.orderId)
21538
          return false;
21539
      }
21540
 
21541
      return true;
21542
    }
21543
 
21544
    @Override
21545
    public int hashCode() {
21546
      return 0;
21547
    }
21548
 
21549
    public int compareTo(markOrderAsOutOfStock_args other) {
21550
      if (!getClass().equals(other.getClass())) {
21551
        return getClass().getName().compareTo(other.getClass().getName());
21552
      }
21553
 
21554
      int lastComparison = 0;
21555
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
21556
 
21557
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
21558
      if (lastComparison != 0) {
21559
        return lastComparison;
21560
      }
21561
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
21562
      if (lastComparison != 0) {
21563
        return lastComparison;
21564
      }
21565
      return 0;
21566
    }
21567
 
21568
    public void read(TProtocol iprot) throws TException {
21569
      TField field;
21570
      iprot.readStructBegin();
21571
      while (true)
21572
      {
21573
        field = iprot.readFieldBegin();
21574
        if (field.type == TType.STOP) { 
21575
          break;
21576
        }
21577
        _Fields fieldId = _Fields.findByThriftId(field.id);
21578
        if (fieldId == null) {
21579
          TProtocolUtil.skip(iprot, field.type);
21580
        } else {
21581
          switch (fieldId) {
21582
            case ORDER_ID:
21583
              if (field.type == TType.I64) {
21584
                this.orderId = iprot.readI64();
21585
                setOrderIdIsSet(true);
21586
              } else { 
21587
                TProtocolUtil.skip(iprot, field.type);
21588
              }
21589
              break;
21590
          }
21591
          iprot.readFieldEnd();
21592
        }
21593
      }
21594
      iprot.readStructEnd();
21595
      validate();
21596
    }
21597
 
21598
    public void write(TProtocol oprot) throws TException {
21599
      validate();
21600
 
21601
      oprot.writeStructBegin(STRUCT_DESC);
21602
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
21603
      oprot.writeI64(this.orderId);
21604
      oprot.writeFieldEnd();
21605
      oprot.writeFieldStop();
21606
      oprot.writeStructEnd();
21607
    }
21608
 
21609
    @Override
21610
    public String toString() {
21611
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
21612
      boolean first = true;
21613
 
21614
      sb.append("orderId:");
21615
      sb.append(this.orderId);
21616
      first = false;
21617
      sb.append(")");
21618
      return sb.toString();
21619
    }
21620
 
21621
    public void validate() throws TException {
21622
      // check for required fields
21623
    }
21624
 
21625
  }
21626
 
21627
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
21628
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
21629
 
21630
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21631
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21632
 
21633
    private boolean success;
21634
    private TransactionServiceException ex;
21635
 
21636
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21637
    public enum _Fields implements TFieldIdEnum {
21638
      SUCCESS((short)0, "success"),
21639
      EX((short)1, "ex");
21640
 
21641
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21642
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21643
 
21644
      static {
21645
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21646
          byId.put((int)field._thriftId, field);
21647
          byName.put(field.getFieldName(), field);
21648
        }
21649
      }
21650
 
21651
      /**
21652
       * Find the _Fields constant that matches fieldId, or null if its not found.
21653
       */
21654
      public static _Fields findByThriftId(int fieldId) {
21655
        return byId.get(fieldId);
21656
      }
21657
 
21658
      /**
21659
       * Find the _Fields constant that matches fieldId, throwing an exception
21660
       * if it is not found.
21661
       */
21662
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21663
        _Fields fields = findByThriftId(fieldId);
21664
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21665
        return fields;
21666
      }
21667
 
21668
      /**
21669
       * Find the _Fields constant that matches name, or null if its not found.
21670
       */
21671
      public static _Fields findByName(String name) {
21672
        return byName.get(name);
21673
      }
21674
 
21675
      private final short _thriftId;
21676
      private final String _fieldName;
21677
 
21678
      _Fields(short thriftId, String fieldName) {
21679
        _thriftId = thriftId;
21680
        _fieldName = fieldName;
21681
      }
21682
 
21683
      public short getThriftFieldId() {
21684
        return _thriftId;
21685
      }
21686
 
21687
      public String getFieldName() {
21688
        return _fieldName;
21689
      }
21690
    }
21691
 
21692
    // isset id assignments
21693
    private static final int __SUCCESS_ISSET_ID = 0;
21694
    private BitSet __isset_bit_vector = new BitSet(1);
21695
 
21696
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21697
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21698
          new FieldValueMetaData(TType.BOOL)));
21699
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21700
          new FieldValueMetaData(TType.STRUCT)));
21701
    }});
21702
 
21703
    static {
21704
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
21705
    }
21706
 
21707
    public markOrderAsOutOfStock_result() {
21708
    }
21709
 
21710
    public markOrderAsOutOfStock_result(
21711
      boolean success,
21712
      TransactionServiceException ex)
21713
    {
21714
      this();
21715
      this.success = success;
21716
      setSuccessIsSet(true);
21717
      this.ex = ex;
21718
    }
21719
 
21720
    /**
21721
     * Performs a deep copy on <i>other</i>.
21722
     */
21723
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
21724
      __isset_bit_vector.clear();
21725
      __isset_bit_vector.or(other.__isset_bit_vector);
21726
      this.success = other.success;
21727
      if (other.isSetEx()) {
21728
        this.ex = new TransactionServiceException(other.ex);
21729
      }
21730
    }
21731
 
21732
    public markOrderAsOutOfStock_result deepCopy() {
21733
      return new markOrderAsOutOfStock_result(this);
21734
    }
21735
 
21736
    @Deprecated
21737
    public markOrderAsOutOfStock_result clone() {
21738
      return new markOrderAsOutOfStock_result(this);
21739
    }
21740
 
21741
    public boolean isSuccess() {
21742
      return this.success;
21743
    }
21744
 
21745
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
21746
      this.success = success;
21747
      setSuccessIsSet(true);
21748
      return this;
21749
    }
21750
 
21751
    public void unsetSuccess() {
21752
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21753
    }
21754
 
21755
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21756
    public boolean isSetSuccess() {
21757
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21758
    }
21759
 
21760
    public void setSuccessIsSet(boolean value) {
21761
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21762
    }
21763
 
21764
    public TransactionServiceException getEx() {
21765
      return this.ex;
21766
    }
21767
 
21768
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
21769
      this.ex = ex;
21770
      return this;
21771
    }
21772
 
21773
    public void unsetEx() {
21774
      this.ex = null;
21775
    }
21776
 
21777
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21778
    public boolean isSetEx() {
21779
      return this.ex != null;
21780
    }
21781
 
21782
    public void setExIsSet(boolean value) {
21783
      if (!value) {
21784
        this.ex = null;
21785
      }
21786
    }
21787
 
21788
    public void setFieldValue(_Fields field, Object value) {
21789
      switch (field) {
21790
      case SUCCESS:
21791
        if (value == null) {
21792
          unsetSuccess();
21793
        } else {
21794
          setSuccess((Boolean)value);
21795
        }
21796
        break;
21797
 
21798
      case EX:
21799
        if (value == null) {
21800
          unsetEx();
21801
        } else {
21802
          setEx((TransactionServiceException)value);
21803
        }
21804
        break;
21805
 
21806
      }
21807
    }
21808
 
21809
    public void setFieldValue(int fieldID, Object value) {
21810
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21811
    }
21812
 
21813
    public Object getFieldValue(_Fields field) {
21814
      switch (field) {
21815
      case SUCCESS:
21816
        return new Boolean(isSuccess());
21817
 
21818
      case EX:
21819
        return getEx();
21820
 
21821
      }
21822
      throw new IllegalStateException();
21823
    }
21824
 
21825
    public Object getFieldValue(int fieldId) {
21826
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21827
    }
21828
 
21829
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21830
    public boolean isSet(_Fields field) {
21831
      switch (field) {
21832
      case SUCCESS:
21833
        return isSetSuccess();
21834
      case EX:
21835
        return isSetEx();
21836
      }
21837
      throw new IllegalStateException();
21838
    }
21839
 
21840
    public boolean isSet(int fieldID) {
21841
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21842
    }
21843
 
21844
    @Override
21845
    public boolean equals(Object that) {
21846
      if (that == null)
21847
        return false;
21848
      if (that instanceof markOrderAsOutOfStock_result)
21849
        return this.equals((markOrderAsOutOfStock_result)that);
21850
      return false;
21851
    }
21852
 
21853
    public boolean equals(markOrderAsOutOfStock_result that) {
21854
      if (that == null)
21855
        return false;
21856
 
21857
      boolean this_present_success = true;
21858
      boolean that_present_success = true;
21859
      if (this_present_success || that_present_success) {
21860
        if (!(this_present_success && that_present_success))
21861
          return false;
21862
        if (this.success != that.success)
21863
          return false;
21864
      }
21865
 
21866
      boolean this_present_ex = true && this.isSetEx();
21867
      boolean that_present_ex = true && that.isSetEx();
21868
      if (this_present_ex || that_present_ex) {
21869
        if (!(this_present_ex && that_present_ex))
21870
          return false;
21871
        if (!this.ex.equals(that.ex))
21872
          return false;
21873
      }
21874
 
21875
      return true;
21876
    }
21877
 
21878
    @Override
21879
    public int hashCode() {
21880
      return 0;
21881
    }
21882
 
21883
    public int compareTo(markOrderAsOutOfStock_result other) {
21884
      if (!getClass().equals(other.getClass())) {
21885
        return getClass().getName().compareTo(other.getClass().getName());
21886
      }
21887
 
21888
      int lastComparison = 0;
21889
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
21890
 
21891
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21892
      if (lastComparison != 0) {
21893
        return lastComparison;
21894
      }
21895
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21896
      if (lastComparison != 0) {
21897
        return lastComparison;
21898
      }
21899
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21900
      if (lastComparison != 0) {
21901
        return lastComparison;
21902
      }
21903
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21904
      if (lastComparison != 0) {
21905
        return lastComparison;
21906
      }
21907
      return 0;
21908
    }
21909
 
21910
    public void read(TProtocol iprot) throws TException {
21911
      TField field;
21912
      iprot.readStructBegin();
21913
      while (true)
21914
      {
21915
        field = iprot.readFieldBegin();
21916
        if (field.type == TType.STOP) { 
21917
          break;
21918
        }
21919
        _Fields fieldId = _Fields.findByThriftId(field.id);
21920
        if (fieldId == null) {
21921
          TProtocolUtil.skip(iprot, field.type);
21922
        } else {
21923
          switch (fieldId) {
21924
            case SUCCESS:
21925
              if (field.type == TType.BOOL) {
21926
                this.success = iprot.readBool();
21927
                setSuccessIsSet(true);
21928
              } else { 
21929
                TProtocolUtil.skip(iprot, field.type);
21930
              }
21931
              break;
21932
            case EX:
21933
              if (field.type == TType.STRUCT) {
21934
                this.ex = new TransactionServiceException();
21935
                this.ex.read(iprot);
21936
              } else { 
21937
                TProtocolUtil.skip(iprot, field.type);
21938
              }
21939
              break;
21940
          }
21941
          iprot.readFieldEnd();
21942
        }
21943
      }
21944
      iprot.readStructEnd();
21945
      validate();
21946
    }
21947
 
21948
    public void write(TProtocol oprot) throws TException {
21949
      oprot.writeStructBegin(STRUCT_DESC);
21950
 
21951
      if (this.isSetSuccess()) {
21952
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21953
        oprot.writeBool(this.success);
21954
        oprot.writeFieldEnd();
21955
      } else if (this.isSetEx()) {
21956
        oprot.writeFieldBegin(EX_FIELD_DESC);
21957
        this.ex.write(oprot);
21958
        oprot.writeFieldEnd();
21959
      }
21960
      oprot.writeFieldStop();
21961
      oprot.writeStructEnd();
21962
    }
21963
 
21964
    @Override
21965
    public String toString() {
21966
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
21967
      boolean first = true;
21968
 
21969
      sb.append("success:");
21970
      sb.append(this.success);
21971
      first = false;
21972
      if (!first) sb.append(", ");
21973
      sb.append("ex:");
21974
      if (this.ex == null) {
21975
        sb.append("null");
21976
      } else {
21977
        sb.append(this.ex);
21978
      }
21979
      first = false;
21980
      sb.append(")");
21981
      return sb.toString();
21982
    }
21983
 
21984
    public void validate() throws TException {
21985
      // check for required fields
21986
    }
21987
 
21988
  }
21989
 
758 chandransh 21990
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
21991
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
21992
 
21993
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
21994
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
21995
 
21996
    private long warehouseId;
21997
    private long providerId;
21998
 
21999
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22000
    public enum _Fields implements TFieldIdEnum {
22001
      WAREHOUSE_ID((short)1, "warehouseId"),
22002
      PROVIDER_ID((short)2, "providerId");
22003
 
22004
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22005
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22006
 
22007
      static {
22008
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22009
          byId.put((int)field._thriftId, field);
22010
          byName.put(field.getFieldName(), field);
22011
        }
22012
      }
22013
 
22014
      /**
22015
       * Find the _Fields constant that matches fieldId, or null if its not found.
22016
       */
22017
      public static _Fields findByThriftId(int fieldId) {
22018
        return byId.get(fieldId);
22019
      }
22020
 
22021
      /**
22022
       * Find the _Fields constant that matches fieldId, throwing an exception
22023
       * if it is not found.
22024
       */
22025
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22026
        _Fields fields = findByThriftId(fieldId);
22027
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22028
        return fields;
22029
      }
22030
 
22031
      /**
22032
       * Find the _Fields constant that matches name, or null if its not found.
22033
       */
22034
      public static _Fields findByName(String name) {
22035
        return byName.get(name);
22036
      }
22037
 
22038
      private final short _thriftId;
22039
      private final String _fieldName;
22040
 
22041
      _Fields(short thriftId, String fieldName) {
22042
        _thriftId = thriftId;
22043
        _fieldName = fieldName;
22044
      }
22045
 
22046
      public short getThriftFieldId() {
22047
        return _thriftId;
22048
      }
22049
 
22050
      public String getFieldName() {
22051
        return _fieldName;
22052
      }
22053
    }
22054
 
22055
    // isset id assignments
22056
    private static final int __WAREHOUSEID_ISSET_ID = 0;
22057
    private static final int __PROVIDERID_ISSET_ID = 1;
22058
    private BitSet __isset_bit_vector = new BitSet(2);
22059
 
22060
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22061
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
22062
          new FieldValueMetaData(TType.I64)));
22063
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22064
          new FieldValueMetaData(TType.I64)));
22065
    }});
22066
 
22067
    static {
22068
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
22069
    }
22070
 
22071
    public markOrdersAsManifested_args() {
22072
    }
22073
 
22074
    public markOrdersAsManifested_args(
22075
      long warehouseId,
22076
      long providerId)
22077
    {
22078
      this();
22079
      this.warehouseId = warehouseId;
22080
      setWarehouseIdIsSet(true);
22081
      this.providerId = providerId;
22082
      setProviderIdIsSet(true);
22083
    }
22084
 
22085
    /**
22086
     * Performs a deep copy on <i>other</i>.
22087
     */
22088
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
22089
      __isset_bit_vector.clear();
22090
      __isset_bit_vector.or(other.__isset_bit_vector);
22091
      this.warehouseId = other.warehouseId;
22092
      this.providerId = other.providerId;
22093
    }
22094
 
22095
    public markOrdersAsManifested_args deepCopy() {
22096
      return new markOrdersAsManifested_args(this);
22097
    }
22098
 
22099
    @Deprecated
22100
    public markOrdersAsManifested_args clone() {
22101
      return new markOrdersAsManifested_args(this);
22102
    }
22103
 
22104
    public long getWarehouseId() {
22105
      return this.warehouseId;
22106
    }
22107
 
22108
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
22109
      this.warehouseId = warehouseId;
22110
      setWarehouseIdIsSet(true);
22111
      return this;
22112
    }
22113
 
22114
    public void unsetWarehouseId() {
22115
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
22116
    }
22117
 
22118
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
22119
    public boolean isSetWarehouseId() {
22120
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
22121
    }
22122
 
22123
    public void setWarehouseIdIsSet(boolean value) {
22124
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
22125
    }
22126
 
22127
    public long getProviderId() {
22128
      return this.providerId;
22129
    }
22130
 
22131
    public markOrdersAsManifested_args setProviderId(long providerId) {
22132
      this.providerId = providerId;
22133
      setProviderIdIsSet(true);
22134
      return this;
22135
    }
22136
 
22137
    public void unsetProviderId() {
22138
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22139
    }
22140
 
22141
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22142
    public boolean isSetProviderId() {
22143
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22144
    }
22145
 
22146
    public void setProviderIdIsSet(boolean value) {
22147
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22148
    }
22149
 
22150
    public void setFieldValue(_Fields field, Object value) {
22151
      switch (field) {
22152
      case WAREHOUSE_ID:
22153
        if (value == null) {
22154
          unsetWarehouseId();
22155
        } else {
22156
          setWarehouseId((Long)value);
22157
        }
22158
        break;
22159
 
22160
      case PROVIDER_ID:
22161
        if (value == null) {
22162
          unsetProviderId();
22163
        } else {
22164
          setProviderId((Long)value);
22165
        }
22166
        break;
22167
 
22168
      }
22169
    }
22170
 
22171
    public void setFieldValue(int fieldID, Object value) {
22172
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22173
    }
22174
 
22175
    public Object getFieldValue(_Fields field) {
22176
      switch (field) {
22177
      case WAREHOUSE_ID:
22178
        return new Long(getWarehouseId());
22179
 
22180
      case PROVIDER_ID:
22181
        return new Long(getProviderId());
22182
 
22183
      }
22184
      throw new IllegalStateException();
22185
    }
22186
 
22187
    public Object getFieldValue(int fieldId) {
22188
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22189
    }
22190
 
22191
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22192
    public boolean isSet(_Fields field) {
22193
      switch (field) {
22194
      case WAREHOUSE_ID:
22195
        return isSetWarehouseId();
22196
      case PROVIDER_ID:
22197
        return isSetProviderId();
22198
      }
22199
      throw new IllegalStateException();
22200
    }
22201
 
22202
    public boolean isSet(int fieldID) {
22203
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22204
    }
22205
 
22206
    @Override
22207
    public boolean equals(Object that) {
22208
      if (that == null)
22209
        return false;
22210
      if (that instanceof markOrdersAsManifested_args)
22211
        return this.equals((markOrdersAsManifested_args)that);
22212
      return false;
22213
    }
22214
 
22215
    public boolean equals(markOrdersAsManifested_args that) {
22216
      if (that == null)
22217
        return false;
22218
 
22219
      boolean this_present_warehouseId = true;
22220
      boolean that_present_warehouseId = true;
22221
      if (this_present_warehouseId || that_present_warehouseId) {
22222
        if (!(this_present_warehouseId && that_present_warehouseId))
22223
          return false;
22224
        if (this.warehouseId != that.warehouseId)
22225
          return false;
22226
      }
22227
 
22228
      boolean this_present_providerId = true;
22229
      boolean that_present_providerId = true;
22230
      if (this_present_providerId || that_present_providerId) {
22231
        if (!(this_present_providerId && that_present_providerId))
22232
          return false;
22233
        if (this.providerId != that.providerId)
22234
          return false;
22235
      }
22236
 
22237
      return true;
22238
    }
22239
 
22240
    @Override
22241
    public int hashCode() {
22242
      return 0;
22243
    }
22244
 
22245
    public int compareTo(markOrdersAsManifested_args other) {
22246
      if (!getClass().equals(other.getClass())) {
22247
        return getClass().getName().compareTo(other.getClass().getName());
22248
      }
22249
 
22250
      int lastComparison = 0;
22251
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
22252
 
22253
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
22254
      if (lastComparison != 0) {
22255
        return lastComparison;
22256
      }
22257
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
22258
      if (lastComparison != 0) {
22259
        return lastComparison;
22260
      }
22261
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
22262
      if (lastComparison != 0) {
22263
        return lastComparison;
22264
      }
22265
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
22266
      if (lastComparison != 0) {
22267
        return lastComparison;
22268
      }
22269
      return 0;
22270
    }
22271
 
22272
    public void read(TProtocol iprot) throws TException {
22273
      TField field;
22274
      iprot.readStructBegin();
22275
      while (true)
22276
      {
22277
        field = iprot.readFieldBegin();
22278
        if (field.type == TType.STOP) { 
22279
          break;
22280
        }
22281
        _Fields fieldId = _Fields.findByThriftId(field.id);
22282
        if (fieldId == null) {
22283
          TProtocolUtil.skip(iprot, field.type);
22284
        } else {
22285
          switch (fieldId) {
22286
            case WAREHOUSE_ID:
22287
              if (field.type == TType.I64) {
22288
                this.warehouseId = iprot.readI64();
22289
                setWarehouseIdIsSet(true);
22290
              } else { 
22291
                TProtocolUtil.skip(iprot, field.type);
22292
              }
22293
              break;
22294
            case PROVIDER_ID:
22295
              if (field.type == TType.I64) {
22296
                this.providerId = iprot.readI64();
22297
                setProviderIdIsSet(true);
22298
              } else { 
22299
                TProtocolUtil.skip(iprot, field.type);
22300
              }
22301
              break;
22302
          }
22303
          iprot.readFieldEnd();
22304
        }
22305
      }
22306
      iprot.readStructEnd();
22307
      validate();
22308
    }
22309
 
22310
    public void write(TProtocol oprot) throws TException {
22311
      validate();
22312
 
22313
      oprot.writeStructBegin(STRUCT_DESC);
22314
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
22315
      oprot.writeI64(this.warehouseId);
22316
      oprot.writeFieldEnd();
22317
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22318
      oprot.writeI64(this.providerId);
22319
      oprot.writeFieldEnd();
22320
      oprot.writeFieldStop();
22321
      oprot.writeStructEnd();
22322
    }
22323
 
22324
    @Override
22325
    public String toString() {
22326
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
22327
      boolean first = true;
22328
 
22329
      sb.append("warehouseId:");
22330
      sb.append(this.warehouseId);
22331
      first = false;
22332
      if (!first) sb.append(", ");
22333
      sb.append("providerId:");
22334
      sb.append(this.providerId);
22335
      first = false;
22336
      sb.append(")");
22337
      return sb.toString();
22338
    }
22339
 
22340
    public void validate() throws TException {
22341
      // check for required fields
22342
    }
22343
 
22344
  }
22345
 
22346
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
22347
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
22348
 
22349
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
22350
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22351
 
22352
    private boolean success;
22353
    private TransactionServiceException ex;
22354
 
22355
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22356
    public enum _Fields implements TFieldIdEnum {
22357
      SUCCESS((short)0, "success"),
22358
      EX((short)1, "ex");
22359
 
22360
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22361
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22362
 
22363
      static {
22364
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22365
          byId.put((int)field._thriftId, field);
22366
          byName.put(field.getFieldName(), field);
22367
        }
22368
      }
22369
 
22370
      /**
22371
       * Find the _Fields constant that matches fieldId, or null if its not found.
22372
       */
22373
      public static _Fields findByThriftId(int fieldId) {
22374
        return byId.get(fieldId);
22375
      }
22376
 
22377
      /**
22378
       * Find the _Fields constant that matches fieldId, throwing an exception
22379
       * if it is not found.
22380
       */
22381
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22382
        _Fields fields = findByThriftId(fieldId);
22383
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22384
        return fields;
22385
      }
22386
 
22387
      /**
22388
       * Find the _Fields constant that matches name, or null if its not found.
22389
       */
22390
      public static _Fields findByName(String name) {
22391
        return byName.get(name);
22392
      }
22393
 
22394
      private final short _thriftId;
22395
      private final String _fieldName;
22396
 
22397
      _Fields(short thriftId, String fieldName) {
22398
        _thriftId = thriftId;
22399
        _fieldName = fieldName;
22400
      }
22401
 
22402
      public short getThriftFieldId() {
22403
        return _thriftId;
22404
      }
22405
 
22406
      public String getFieldName() {
22407
        return _fieldName;
22408
      }
22409
    }
22410
 
22411
    // isset id assignments
22412
    private static final int __SUCCESS_ISSET_ID = 0;
22413
    private BitSet __isset_bit_vector = new BitSet(1);
22414
 
22415
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22416
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
22417
          new FieldValueMetaData(TType.BOOL)));
22418
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22419
          new FieldValueMetaData(TType.STRUCT)));
22420
    }});
22421
 
22422
    static {
22423
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
22424
    }
22425
 
22426
    public markOrdersAsManifested_result() {
22427
    }
22428
 
22429
    public markOrdersAsManifested_result(
22430
      boolean success,
22431
      TransactionServiceException ex)
22432
    {
22433
      this();
22434
      this.success = success;
22435
      setSuccessIsSet(true);
22436
      this.ex = ex;
22437
    }
22438
 
22439
    /**
22440
     * Performs a deep copy on <i>other</i>.
22441
     */
22442
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
22443
      __isset_bit_vector.clear();
22444
      __isset_bit_vector.or(other.__isset_bit_vector);
22445
      this.success = other.success;
22446
      if (other.isSetEx()) {
22447
        this.ex = new TransactionServiceException(other.ex);
22448
      }
22449
    }
22450
 
22451
    public markOrdersAsManifested_result deepCopy() {
22452
      return new markOrdersAsManifested_result(this);
22453
    }
22454
 
22455
    @Deprecated
22456
    public markOrdersAsManifested_result clone() {
22457
      return new markOrdersAsManifested_result(this);
22458
    }
22459
 
22460
    public boolean isSuccess() {
22461
      return this.success;
22462
    }
22463
 
22464
    public markOrdersAsManifested_result setSuccess(boolean success) {
22465
      this.success = success;
22466
      setSuccessIsSet(true);
22467
      return this;
22468
    }
22469
 
22470
    public void unsetSuccess() {
22471
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
22472
    }
22473
 
22474
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22475
    public boolean isSetSuccess() {
22476
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
22477
    }
22478
 
22479
    public void setSuccessIsSet(boolean value) {
22480
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
22481
    }
22482
 
22483
    public TransactionServiceException getEx() {
22484
      return this.ex;
22485
    }
22486
 
22487
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
22488
      this.ex = ex;
22489
      return this;
22490
    }
22491
 
22492
    public void unsetEx() {
22493
      this.ex = null;
22494
    }
22495
 
22496
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22497
    public boolean isSetEx() {
22498
      return this.ex != null;
22499
    }
22500
 
22501
    public void setExIsSet(boolean value) {
22502
      if (!value) {
22503
        this.ex = null;
22504
      }
22505
    }
22506
 
22507
    public void setFieldValue(_Fields field, Object value) {
22508
      switch (field) {
22509
      case SUCCESS:
22510
        if (value == null) {
22511
          unsetSuccess();
22512
        } else {
22513
          setSuccess((Boolean)value);
22514
        }
22515
        break;
22516
 
22517
      case EX:
22518
        if (value == null) {
22519
          unsetEx();
22520
        } else {
22521
          setEx((TransactionServiceException)value);
22522
        }
22523
        break;
22524
 
22525
      }
22526
    }
22527
 
22528
    public void setFieldValue(int fieldID, Object value) {
22529
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22530
    }
22531
 
22532
    public Object getFieldValue(_Fields field) {
22533
      switch (field) {
22534
      case SUCCESS:
22535
        return new Boolean(isSuccess());
22536
 
22537
      case EX:
22538
        return getEx();
22539
 
22540
      }
22541
      throw new IllegalStateException();
22542
    }
22543
 
22544
    public Object getFieldValue(int fieldId) {
22545
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22546
    }
22547
 
22548
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22549
    public boolean isSet(_Fields field) {
22550
      switch (field) {
22551
      case SUCCESS:
22552
        return isSetSuccess();
22553
      case EX:
22554
        return isSetEx();
22555
      }
22556
      throw new IllegalStateException();
22557
    }
22558
 
22559
    public boolean isSet(int fieldID) {
22560
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22561
    }
22562
 
22563
    @Override
22564
    public boolean equals(Object that) {
22565
      if (that == null)
22566
        return false;
22567
      if (that instanceof markOrdersAsManifested_result)
22568
        return this.equals((markOrdersAsManifested_result)that);
22569
      return false;
22570
    }
22571
 
22572
    public boolean equals(markOrdersAsManifested_result that) {
22573
      if (that == null)
22574
        return false;
22575
 
22576
      boolean this_present_success = true;
22577
      boolean that_present_success = true;
22578
      if (this_present_success || that_present_success) {
22579
        if (!(this_present_success && that_present_success))
22580
          return false;
22581
        if (this.success != that.success)
22582
          return false;
22583
      }
22584
 
22585
      boolean this_present_ex = true && this.isSetEx();
22586
      boolean that_present_ex = true && that.isSetEx();
22587
      if (this_present_ex || that_present_ex) {
22588
        if (!(this_present_ex && that_present_ex))
22589
          return false;
22590
        if (!this.ex.equals(that.ex))
22591
          return false;
22592
      }
22593
 
22594
      return true;
22595
    }
22596
 
22597
    @Override
22598
    public int hashCode() {
22599
      return 0;
22600
    }
22601
 
22602
    public int compareTo(markOrdersAsManifested_result other) {
22603
      if (!getClass().equals(other.getClass())) {
22604
        return getClass().getName().compareTo(other.getClass().getName());
22605
      }
22606
 
22607
      int lastComparison = 0;
22608
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
22609
 
22610
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22611
      if (lastComparison != 0) {
22612
        return lastComparison;
22613
      }
22614
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22615
      if (lastComparison != 0) {
22616
        return lastComparison;
22617
      }
22618
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22619
      if (lastComparison != 0) {
22620
        return lastComparison;
22621
      }
22622
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22623
      if (lastComparison != 0) {
22624
        return lastComparison;
22625
      }
22626
      return 0;
22627
    }
22628
 
22629
    public void read(TProtocol iprot) throws TException {
22630
      TField field;
22631
      iprot.readStructBegin();
22632
      while (true)
22633
      {
22634
        field = iprot.readFieldBegin();
22635
        if (field.type == TType.STOP) { 
22636
          break;
22637
        }
22638
        _Fields fieldId = _Fields.findByThriftId(field.id);
22639
        if (fieldId == null) {
22640
          TProtocolUtil.skip(iprot, field.type);
22641
        } else {
22642
          switch (fieldId) {
22643
            case SUCCESS:
22644
              if (field.type == TType.BOOL) {
22645
                this.success = iprot.readBool();
22646
                setSuccessIsSet(true);
22647
              } else { 
22648
                TProtocolUtil.skip(iprot, field.type);
22649
              }
22650
              break;
22651
            case EX:
22652
              if (field.type == TType.STRUCT) {
22653
                this.ex = new TransactionServiceException();
22654
                this.ex.read(iprot);
22655
              } else { 
22656
                TProtocolUtil.skip(iprot, field.type);
22657
              }
22658
              break;
22659
          }
22660
          iprot.readFieldEnd();
22661
        }
22662
      }
22663
      iprot.readStructEnd();
22664
      validate();
22665
    }
22666
 
22667
    public void write(TProtocol oprot) throws TException {
22668
      oprot.writeStructBegin(STRUCT_DESC);
22669
 
22670
      if (this.isSetSuccess()) {
22671
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22672
        oprot.writeBool(this.success);
22673
        oprot.writeFieldEnd();
22674
      } else if (this.isSetEx()) {
22675
        oprot.writeFieldBegin(EX_FIELD_DESC);
22676
        this.ex.write(oprot);
22677
        oprot.writeFieldEnd();
22678
      }
22679
      oprot.writeFieldStop();
22680
      oprot.writeStructEnd();
22681
    }
22682
 
22683
    @Override
22684
    public String toString() {
22685
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
22686
      boolean first = true;
22687
 
22688
      sb.append("success:");
22689
      sb.append(this.success);
22690
      first = false;
22691
      if (!first) sb.append(", ");
22692
      sb.append("ex:");
22693
      if (this.ex == null) {
22694
        sb.append("null");
22695
      } else {
22696
        sb.append(this.ex);
22697
      }
22698
      first = false;
22699
      sb.append(")");
22700
      return sb.toString();
22701
    }
22702
 
22703
    public void validate() throws TException {
22704
      // check for required fields
22705
    }
22706
 
22707
  }
22708
 
1114 chandransh 22709
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
22710
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
22711
 
22712
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22713
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
22714
 
22715
    private long providerId;
1245 chandransh 22716
    private Map<String,String> pickupDetails;
1114 chandransh 22717
 
22718
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22719
    public enum _Fields implements TFieldIdEnum {
22720
      PROVIDER_ID((short)1, "providerId"),
22721
      PICKUP_DETAILS((short)2, "pickupDetails");
22722
 
22723
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22724
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22725
 
22726
      static {
22727
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22728
          byId.put((int)field._thriftId, field);
22729
          byName.put(field.getFieldName(), field);
22730
        }
22731
      }
22732
 
22733
      /**
22734
       * Find the _Fields constant that matches fieldId, or null if its not found.
22735
       */
22736
      public static _Fields findByThriftId(int fieldId) {
22737
        return byId.get(fieldId);
22738
      }
22739
 
22740
      /**
22741
       * Find the _Fields constant that matches fieldId, throwing an exception
22742
       * if it is not found.
22743
       */
22744
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22745
        _Fields fields = findByThriftId(fieldId);
22746
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22747
        return fields;
22748
      }
22749
 
22750
      /**
22751
       * Find the _Fields constant that matches name, or null if its not found.
22752
       */
22753
      public static _Fields findByName(String name) {
22754
        return byName.get(name);
22755
      }
22756
 
22757
      private final short _thriftId;
22758
      private final String _fieldName;
22759
 
22760
      _Fields(short thriftId, String fieldName) {
22761
        _thriftId = thriftId;
22762
        _fieldName = fieldName;
22763
      }
22764
 
22765
      public short getThriftFieldId() {
22766
        return _thriftId;
22767
      }
22768
 
22769
      public String getFieldName() {
22770
        return _fieldName;
22771
      }
22772
    }
22773
 
22774
    // isset id assignments
22775
    private static final int __PROVIDERID_ISSET_ID = 0;
22776
    private BitSet __isset_bit_vector = new BitSet(1);
22777
 
22778
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22779
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22780
          new FieldValueMetaData(TType.I64)));
22781
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
22782
          new MapMetaData(TType.MAP, 
22783
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 22784
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 22785
    }});
22786
 
22787
    static {
22788
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
22789
    }
22790
 
22791
    public markOrdersAsPickedUp_args() {
22792
    }
22793
 
22794
    public markOrdersAsPickedUp_args(
22795
      long providerId,
1245 chandransh 22796
      Map<String,String> pickupDetails)
1114 chandransh 22797
    {
22798
      this();
22799
      this.providerId = providerId;
22800
      setProviderIdIsSet(true);
22801
      this.pickupDetails = pickupDetails;
22802
    }
22803
 
22804
    /**
22805
     * Performs a deep copy on <i>other</i>.
22806
     */
22807
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
22808
      __isset_bit_vector.clear();
22809
      __isset_bit_vector.or(other.__isset_bit_vector);
22810
      this.providerId = other.providerId;
22811
      if (other.isSetPickupDetails()) {
1245 chandransh 22812
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
22813
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 22814
 
22815
          String other_element_key = other_element.getKey();
1245 chandransh 22816
          String other_element_value = other_element.getValue();
1114 chandransh 22817
 
22818
          String __this__pickupDetails_copy_key = other_element_key;
22819
 
1245 chandransh 22820
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 22821
 
22822
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
22823
        }
22824
        this.pickupDetails = __this__pickupDetails;
22825
      }
22826
    }
22827
 
22828
    public markOrdersAsPickedUp_args deepCopy() {
22829
      return new markOrdersAsPickedUp_args(this);
22830
    }
22831
 
22832
    @Deprecated
22833
    public markOrdersAsPickedUp_args clone() {
22834
      return new markOrdersAsPickedUp_args(this);
22835
    }
22836
 
22837
    public long getProviderId() {
22838
      return this.providerId;
22839
    }
22840
 
22841
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
22842
      this.providerId = providerId;
22843
      setProviderIdIsSet(true);
22844
      return this;
22845
    }
22846
 
22847
    public void unsetProviderId() {
22848
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22849
    }
22850
 
22851
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22852
    public boolean isSetProviderId() {
22853
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22854
    }
22855
 
22856
    public void setProviderIdIsSet(boolean value) {
22857
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22858
    }
22859
 
22860
    public int getPickupDetailsSize() {
22861
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
22862
    }
22863
 
1245 chandransh 22864
    public void putToPickupDetails(String key, String val) {
1114 chandransh 22865
      if (this.pickupDetails == null) {
1245 chandransh 22866
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 22867
      }
22868
      this.pickupDetails.put(key, val);
22869
    }
22870
 
1245 chandransh 22871
    public Map<String,String> getPickupDetails() {
1114 chandransh 22872
      return this.pickupDetails;
22873
    }
22874
 
1245 chandransh 22875
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 22876
      this.pickupDetails = pickupDetails;
22877
      return this;
22878
    }
22879
 
22880
    public void unsetPickupDetails() {
22881
      this.pickupDetails = null;
22882
    }
22883
 
22884
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
22885
    public boolean isSetPickupDetails() {
22886
      return this.pickupDetails != null;
22887
    }
22888
 
22889
    public void setPickupDetailsIsSet(boolean value) {
22890
      if (!value) {
22891
        this.pickupDetails = null;
22892
      }
22893
    }
22894
 
22895
    public void setFieldValue(_Fields field, Object value) {
22896
      switch (field) {
22897
      case PROVIDER_ID:
22898
        if (value == null) {
22899
          unsetProviderId();
22900
        } else {
22901
          setProviderId((Long)value);
22902
        }
22903
        break;
22904
 
22905
      case PICKUP_DETAILS:
22906
        if (value == null) {
22907
          unsetPickupDetails();
22908
        } else {
1245 chandransh 22909
          setPickupDetails((Map<String,String>)value);
1114 chandransh 22910
        }
22911
        break;
22912
 
22913
      }
22914
    }
22915
 
22916
    public void setFieldValue(int fieldID, Object value) {
22917
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22918
    }
22919
 
22920
    public Object getFieldValue(_Fields field) {
22921
      switch (field) {
22922
      case PROVIDER_ID:
22923
        return new Long(getProviderId());
22924
 
22925
      case PICKUP_DETAILS:
22926
        return getPickupDetails();
22927
 
22928
      }
22929
      throw new IllegalStateException();
22930
    }
22931
 
22932
    public Object getFieldValue(int fieldId) {
22933
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22934
    }
22935
 
22936
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22937
    public boolean isSet(_Fields field) {
22938
      switch (field) {
22939
      case PROVIDER_ID:
22940
        return isSetProviderId();
22941
      case PICKUP_DETAILS:
22942
        return isSetPickupDetails();
22943
      }
22944
      throw new IllegalStateException();
22945
    }
22946
 
22947
    public boolean isSet(int fieldID) {
22948
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22949
    }
22950
 
22951
    @Override
22952
    public boolean equals(Object that) {
22953
      if (that == null)
22954
        return false;
22955
      if (that instanceof markOrdersAsPickedUp_args)
22956
        return this.equals((markOrdersAsPickedUp_args)that);
22957
      return false;
22958
    }
22959
 
22960
    public boolean equals(markOrdersAsPickedUp_args that) {
22961
      if (that == null)
22962
        return false;
22963
 
22964
      boolean this_present_providerId = true;
22965
      boolean that_present_providerId = true;
22966
      if (this_present_providerId || that_present_providerId) {
22967
        if (!(this_present_providerId && that_present_providerId))
22968
          return false;
22969
        if (this.providerId != that.providerId)
22970
          return false;
22971
      }
22972
 
22973
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
22974
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
22975
      if (this_present_pickupDetails || that_present_pickupDetails) {
22976
        if (!(this_present_pickupDetails && that_present_pickupDetails))
22977
          return false;
22978
        if (!this.pickupDetails.equals(that.pickupDetails))
22979
          return false;
22980
      }
22981
 
22982
      return true;
22983
    }
22984
 
22985
    @Override
22986
    public int hashCode() {
22987
      return 0;
22988
    }
22989
 
22990
    public void read(TProtocol iprot) throws TException {
22991
      TField field;
22992
      iprot.readStructBegin();
22993
      while (true)
22994
      {
22995
        field = iprot.readFieldBegin();
22996
        if (field.type == TType.STOP) { 
22997
          break;
22998
        }
22999
        _Fields fieldId = _Fields.findByThriftId(field.id);
23000
        if (fieldId == null) {
23001
          TProtocolUtil.skip(iprot, field.type);
23002
        } else {
23003
          switch (fieldId) {
23004
            case PROVIDER_ID:
23005
              if (field.type == TType.I64) {
23006
                this.providerId = iprot.readI64();
23007
                setProviderIdIsSet(true);
23008
              } else { 
23009
                TProtocolUtil.skip(iprot, field.type);
23010
              }
23011
              break;
23012
            case PICKUP_DETAILS:
23013
              if (field.type == TType.MAP) {
23014
                {
1382 varun.gupt 23015
                  TMap _map48 = iprot.readMapBegin();
23016
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
23017
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 23018
                  {
1382 varun.gupt 23019
                    String _key50;
23020
                    String _val51;
23021
                    _key50 = iprot.readString();
23022
                    _val51 = iprot.readString();
23023
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 23024
                  }
23025
                  iprot.readMapEnd();
23026
                }
23027
              } else { 
23028
                TProtocolUtil.skip(iprot, field.type);
23029
              }
23030
              break;
23031
          }
23032
          iprot.readFieldEnd();
23033
        }
23034
      }
23035
      iprot.readStructEnd();
23036
      validate();
23037
    }
23038
 
23039
    public void write(TProtocol oprot) throws TException {
23040
      validate();
23041
 
23042
      oprot.writeStructBegin(STRUCT_DESC);
23043
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23044
      oprot.writeI64(this.providerId);
23045
      oprot.writeFieldEnd();
23046
      if (this.pickupDetails != null) {
23047
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
23048
        {
1245 chandransh 23049
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 23050
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 23051
          {
1382 varun.gupt 23052
            oprot.writeString(_iter52.getKey());
23053
            oprot.writeString(_iter52.getValue());
1114 chandransh 23054
          }
23055
          oprot.writeMapEnd();
23056
        }
23057
        oprot.writeFieldEnd();
23058
      }
23059
      oprot.writeFieldStop();
23060
      oprot.writeStructEnd();
23061
    }
23062
 
23063
    @Override
23064
    public String toString() {
23065
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
23066
      boolean first = true;
23067
 
23068
      sb.append("providerId:");
23069
      sb.append(this.providerId);
23070
      first = false;
23071
      if (!first) sb.append(", ");
23072
      sb.append("pickupDetails:");
23073
      if (this.pickupDetails == null) {
23074
        sb.append("null");
23075
      } else {
23076
        sb.append(this.pickupDetails);
23077
      }
23078
      first = false;
23079
      sb.append(")");
23080
      return sb.toString();
23081
    }
23082
 
23083
    public void validate() throws TException {
23084
      // check for required fields
23085
    }
23086
 
23087
  }
23088
 
23089
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
23090
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
23091
 
23092
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
23093
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23094
 
23095
    private List<Order> success;
23096
    private TransactionServiceException ex;
23097
 
23098
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23099
    public enum _Fields implements TFieldIdEnum {
23100
      SUCCESS((short)0, "success"),
23101
      EX((short)1, "ex");
23102
 
23103
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23104
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23105
 
23106
      static {
23107
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23108
          byId.put((int)field._thriftId, field);
23109
          byName.put(field.getFieldName(), field);
23110
        }
23111
      }
23112
 
23113
      /**
23114
       * Find the _Fields constant that matches fieldId, or null if its not found.
23115
       */
23116
      public static _Fields findByThriftId(int fieldId) {
23117
        return byId.get(fieldId);
23118
      }
23119
 
23120
      /**
23121
       * Find the _Fields constant that matches fieldId, throwing an exception
23122
       * if it is not found.
23123
       */
23124
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23125
        _Fields fields = findByThriftId(fieldId);
23126
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23127
        return fields;
23128
      }
23129
 
23130
      /**
23131
       * Find the _Fields constant that matches name, or null if its not found.
23132
       */
23133
      public static _Fields findByName(String name) {
23134
        return byName.get(name);
23135
      }
23136
 
23137
      private final short _thriftId;
23138
      private final String _fieldName;
23139
 
23140
      _Fields(short thriftId, String fieldName) {
23141
        _thriftId = thriftId;
23142
        _fieldName = fieldName;
23143
      }
23144
 
23145
      public short getThriftFieldId() {
23146
        return _thriftId;
23147
      }
23148
 
23149
      public String getFieldName() {
23150
        return _fieldName;
23151
      }
23152
    }
23153
 
23154
    // isset id assignments
23155
 
23156
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23157
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
23158
          new ListMetaData(TType.LIST, 
23159
              new StructMetaData(TType.STRUCT, Order.class))));
23160
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23161
          new FieldValueMetaData(TType.STRUCT)));
23162
    }});
23163
 
23164
    static {
23165
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
23166
    }
23167
 
23168
    public markOrdersAsPickedUp_result() {
23169
    }
23170
 
23171
    public markOrdersAsPickedUp_result(
23172
      List<Order> success,
23173
      TransactionServiceException ex)
23174
    {
23175
      this();
23176
      this.success = success;
23177
      this.ex = ex;
23178
    }
23179
 
23180
    /**
23181
     * Performs a deep copy on <i>other</i>.
23182
     */
23183
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
23184
      if (other.isSetSuccess()) {
23185
        List<Order> __this__success = new ArrayList<Order>();
23186
        for (Order other_element : other.success) {
23187
          __this__success.add(new Order(other_element));
23188
        }
23189
        this.success = __this__success;
23190
      }
23191
      if (other.isSetEx()) {
23192
        this.ex = new TransactionServiceException(other.ex);
23193
      }
23194
    }
23195
 
23196
    public markOrdersAsPickedUp_result deepCopy() {
23197
      return new markOrdersAsPickedUp_result(this);
23198
    }
23199
 
23200
    @Deprecated
23201
    public markOrdersAsPickedUp_result clone() {
23202
      return new markOrdersAsPickedUp_result(this);
23203
    }
23204
 
23205
    public int getSuccessSize() {
23206
      return (this.success == null) ? 0 : this.success.size();
23207
    }
23208
 
23209
    public java.util.Iterator<Order> getSuccessIterator() {
23210
      return (this.success == null) ? null : this.success.iterator();
23211
    }
23212
 
23213
    public void addToSuccess(Order elem) {
23214
      if (this.success == null) {
23215
        this.success = new ArrayList<Order>();
23216
      }
23217
      this.success.add(elem);
23218
    }
23219
 
23220
    public List<Order> getSuccess() {
23221
      return this.success;
23222
    }
23223
 
23224
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
23225
      this.success = success;
23226
      return this;
23227
    }
23228
 
23229
    public void unsetSuccess() {
23230
      this.success = null;
23231
    }
23232
 
23233
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23234
    public boolean isSetSuccess() {
23235
      return this.success != null;
23236
    }
23237
 
23238
    public void setSuccessIsSet(boolean value) {
23239
      if (!value) {
23240
        this.success = null;
23241
      }
23242
    }
23243
 
23244
    public TransactionServiceException getEx() {
23245
      return this.ex;
23246
    }
23247
 
23248
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
23249
      this.ex = ex;
23250
      return this;
23251
    }
23252
 
23253
    public void unsetEx() {
23254
      this.ex = null;
23255
    }
23256
 
23257
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23258
    public boolean isSetEx() {
23259
      return this.ex != null;
23260
    }
23261
 
23262
    public void setExIsSet(boolean value) {
23263
      if (!value) {
23264
        this.ex = null;
23265
      }
23266
    }
23267
 
23268
    public void setFieldValue(_Fields field, Object value) {
23269
      switch (field) {
23270
      case SUCCESS:
23271
        if (value == null) {
23272
          unsetSuccess();
23273
        } else {
23274
          setSuccess((List<Order>)value);
23275
        }
23276
        break;
23277
 
23278
      case EX:
23279
        if (value == null) {
23280
          unsetEx();
23281
        } else {
23282
          setEx((TransactionServiceException)value);
23283
        }
23284
        break;
23285
 
23286
      }
23287
    }
23288
 
23289
    public void setFieldValue(int fieldID, Object value) {
23290
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23291
    }
23292
 
23293
    public Object getFieldValue(_Fields field) {
23294
      switch (field) {
23295
      case SUCCESS:
23296
        return getSuccess();
23297
 
23298
      case EX:
23299
        return getEx();
23300
 
23301
      }
23302
      throw new IllegalStateException();
23303
    }
23304
 
23305
    public Object getFieldValue(int fieldId) {
23306
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23307
    }
23308
 
23309
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23310
    public boolean isSet(_Fields field) {
23311
      switch (field) {
23312
      case SUCCESS:
23313
        return isSetSuccess();
23314
      case EX:
23315
        return isSetEx();
23316
      }
23317
      throw new IllegalStateException();
23318
    }
23319
 
23320
    public boolean isSet(int fieldID) {
23321
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23322
    }
23323
 
23324
    @Override
23325
    public boolean equals(Object that) {
23326
      if (that == null)
23327
        return false;
23328
      if (that instanceof markOrdersAsPickedUp_result)
23329
        return this.equals((markOrdersAsPickedUp_result)that);
23330
      return false;
23331
    }
23332
 
23333
    public boolean equals(markOrdersAsPickedUp_result that) {
23334
      if (that == null)
23335
        return false;
23336
 
23337
      boolean this_present_success = true && this.isSetSuccess();
23338
      boolean that_present_success = true && that.isSetSuccess();
23339
      if (this_present_success || that_present_success) {
23340
        if (!(this_present_success && that_present_success))
23341
          return false;
23342
        if (!this.success.equals(that.success))
23343
          return false;
23344
      }
23345
 
23346
      boolean this_present_ex = true && this.isSetEx();
23347
      boolean that_present_ex = true && that.isSetEx();
23348
      if (this_present_ex || that_present_ex) {
23349
        if (!(this_present_ex && that_present_ex))
23350
          return false;
23351
        if (!this.ex.equals(that.ex))
23352
          return false;
23353
      }
23354
 
23355
      return true;
23356
    }
23357
 
23358
    @Override
23359
    public int hashCode() {
23360
      return 0;
23361
    }
23362
 
23363
    public int compareTo(markOrdersAsPickedUp_result other) {
23364
      if (!getClass().equals(other.getClass())) {
23365
        return getClass().getName().compareTo(other.getClass().getName());
23366
      }
23367
 
23368
      int lastComparison = 0;
23369
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
23370
 
23371
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23372
      if (lastComparison != 0) {
23373
        return lastComparison;
23374
      }
23375
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23376
      if (lastComparison != 0) {
23377
        return lastComparison;
23378
      }
23379
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23380
      if (lastComparison != 0) {
23381
        return lastComparison;
23382
      }
23383
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23384
      if (lastComparison != 0) {
23385
        return lastComparison;
23386
      }
23387
      return 0;
23388
    }
23389
 
23390
    public void read(TProtocol iprot) throws TException {
23391
      TField field;
23392
      iprot.readStructBegin();
23393
      while (true)
23394
      {
23395
        field = iprot.readFieldBegin();
23396
        if (field.type == TType.STOP) { 
23397
          break;
23398
        }
23399
        _Fields fieldId = _Fields.findByThriftId(field.id);
23400
        if (fieldId == null) {
23401
          TProtocolUtil.skip(iprot, field.type);
23402
        } else {
23403
          switch (fieldId) {
23404
            case SUCCESS:
23405
              if (field.type == TType.LIST) {
23406
                {
1382 varun.gupt 23407
                  TList _list53 = iprot.readListBegin();
23408
                  this.success = new ArrayList<Order>(_list53.size);
23409
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 23410
                  {
1382 varun.gupt 23411
                    Order _elem55;
23412
                    _elem55 = new Order();
23413
                    _elem55.read(iprot);
23414
                    this.success.add(_elem55);
1114 chandransh 23415
                  }
23416
                  iprot.readListEnd();
23417
                }
23418
              } else { 
23419
                TProtocolUtil.skip(iprot, field.type);
23420
              }
23421
              break;
23422
            case EX:
23423
              if (field.type == TType.STRUCT) {
23424
                this.ex = new TransactionServiceException();
23425
                this.ex.read(iprot);
23426
              } else { 
23427
                TProtocolUtil.skip(iprot, field.type);
23428
              }
23429
              break;
23430
          }
23431
          iprot.readFieldEnd();
23432
        }
23433
      }
23434
      iprot.readStructEnd();
23435
      validate();
23436
    }
23437
 
23438
    public void write(TProtocol oprot) throws TException {
23439
      oprot.writeStructBegin(STRUCT_DESC);
23440
 
23441
      if (this.isSetSuccess()) {
23442
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23443
        {
23444
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 23445
          for (Order _iter56 : this.success)
1114 chandransh 23446
          {
1382 varun.gupt 23447
            _iter56.write(oprot);
1114 chandransh 23448
          }
23449
          oprot.writeListEnd();
23450
        }
23451
        oprot.writeFieldEnd();
23452
      } else if (this.isSetEx()) {
23453
        oprot.writeFieldBegin(EX_FIELD_DESC);
23454
        this.ex.write(oprot);
23455
        oprot.writeFieldEnd();
23456
      }
23457
      oprot.writeFieldStop();
23458
      oprot.writeStructEnd();
23459
    }
23460
 
23461
    @Override
23462
    public String toString() {
23463
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
23464
      boolean first = true;
23465
 
23466
      sb.append("success:");
23467
      if (this.success == null) {
23468
        sb.append("null");
23469
      } else {
23470
        sb.append(this.success);
23471
      }
23472
      first = false;
23473
      if (!first) sb.append(", ");
23474
      sb.append("ex:");
23475
      if (this.ex == null) {
23476
        sb.append("null");
23477
      } else {
23478
        sb.append(this.ex);
23479
      }
23480
      first = false;
23481
      sb.append(")");
23482
      return sb.toString();
23483
    }
23484
 
23485
    public void validate() throws TException {
23486
      // check for required fields
23487
    }
23488
 
23489
  }
23490
 
1133 chandransh 23491
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
23492
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
23493
 
23494
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23495
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
23496
 
23497
    private long providerId;
23498
    private Map<String,String> deliveredOrders;
23499
 
23500
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23501
    public enum _Fields implements TFieldIdEnum {
23502
      PROVIDER_ID((short)1, "providerId"),
23503
      DELIVERED_ORDERS((short)2, "deliveredOrders");
23504
 
23505
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23506
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23507
 
23508
      static {
23509
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23510
          byId.put((int)field._thriftId, field);
23511
          byName.put(field.getFieldName(), field);
23512
        }
23513
      }
23514
 
23515
      /**
23516
       * Find the _Fields constant that matches fieldId, or null if its not found.
23517
       */
23518
      public static _Fields findByThriftId(int fieldId) {
23519
        return byId.get(fieldId);
23520
      }
23521
 
23522
      /**
23523
       * Find the _Fields constant that matches fieldId, throwing an exception
23524
       * if it is not found.
23525
       */
23526
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23527
        _Fields fields = findByThriftId(fieldId);
23528
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23529
        return fields;
23530
      }
23531
 
23532
      /**
23533
       * Find the _Fields constant that matches name, or null if its not found.
23534
       */
23535
      public static _Fields findByName(String name) {
23536
        return byName.get(name);
23537
      }
23538
 
23539
      private final short _thriftId;
23540
      private final String _fieldName;
23541
 
23542
      _Fields(short thriftId, String fieldName) {
23543
        _thriftId = thriftId;
23544
        _fieldName = fieldName;
23545
      }
23546
 
23547
      public short getThriftFieldId() {
23548
        return _thriftId;
23549
      }
23550
 
23551
      public String getFieldName() {
23552
        return _fieldName;
23553
      }
23554
    }
23555
 
23556
    // isset id assignments
23557
    private static final int __PROVIDERID_ISSET_ID = 0;
23558
    private BitSet __isset_bit_vector = new BitSet(1);
23559
 
23560
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23561
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23562
          new FieldValueMetaData(TType.I64)));
23563
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
23564
          new MapMetaData(TType.MAP, 
23565
              new FieldValueMetaData(TType.STRING), 
23566
              new FieldValueMetaData(TType.STRING))));
23567
    }});
23568
 
23569
    static {
23570
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
23571
    }
23572
 
23573
    public markOrdersAsDelivered_args() {
23574
    }
23575
 
23576
    public markOrdersAsDelivered_args(
23577
      long providerId,
23578
      Map<String,String> deliveredOrders)
23579
    {
23580
      this();
23581
      this.providerId = providerId;
23582
      setProviderIdIsSet(true);
23583
      this.deliveredOrders = deliveredOrders;
23584
    }
23585
 
23586
    /**
23587
     * Performs a deep copy on <i>other</i>.
23588
     */
23589
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
23590
      __isset_bit_vector.clear();
23591
      __isset_bit_vector.or(other.__isset_bit_vector);
23592
      this.providerId = other.providerId;
23593
      if (other.isSetDeliveredOrders()) {
23594
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
23595
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
23596
 
23597
          String other_element_key = other_element.getKey();
23598
          String other_element_value = other_element.getValue();
23599
 
23600
          String __this__deliveredOrders_copy_key = other_element_key;
23601
 
23602
          String __this__deliveredOrders_copy_value = other_element_value;
23603
 
23604
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
23605
        }
23606
        this.deliveredOrders = __this__deliveredOrders;
23607
      }
23608
    }
23609
 
23610
    public markOrdersAsDelivered_args deepCopy() {
23611
      return new markOrdersAsDelivered_args(this);
23612
    }
23613
 
23614
    @Deprecated
23615
    public markOrdersAsDelivered_args clone() {
23616
      return new markOrdersAsDelivered_args(this);
23617
    }
23618
 
23619
    public long getProviderId() {
23620
      return this.providerId;
23621
    }
23622
 
23623
    public markOrdersAsDelivered_args setProviderId(long providerId) {
23624
      this.providerId = providerId;
23625
      setProviderIdIsSet(true);
23626
      return this;
23627
    }
23628
 
23629
    public void unsetProviderId() {
23630
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23631
    }
23632
 
23633
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23634
    public boolean isSetProviderId() {
23635
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23636
    }
23637
 
23638
    public void setProviderIdIsSet(boolean value) {
23639
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23640
    }
23641
 
23642
    public int getDeliveredOrdersSize() {
23643
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
23644
    }
23645
 
23646
    public void putToDeliveredOrders(String key, String val) {
23647
      if (this.deliveredOrders == null) {
23648
        this.deliveredOrders = new HashMap<String,String>();
23649
      }
23650
      this.deliveredOrders.put(key, val);
23651
    }
23652
 
23653
    public Map<String,String> getDeliveredOrders() {
23654
      return this.deliveredOrders;
23655
    }
23656
 
23657
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
23658
      this.deliveredOrders = deliveredOrders;
23659
      return this;
23660
    }
23661
 
23662
    public void unsetDeliveredOrders() {
23663
      this.deliveredOrders = null;
23664
    }
23665
 
23666
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
23667
    public boolean isSetDeliveredOrders() {
23668
      return this.deliveredOrders != null;
23669
    }
23670
 
23671
    public void setDeliveredOrdersIsSet(boolean value) {
23672
      if (!value) {
23673
        this.deliveredOrders = null;
23674
      }
23675
    }
23676
 
23677
    public void setFieldValue(_Fields field, Object value) {
23678
      switch (field) {
23679
      case PROVIDER_ID:
23680
        if (value == null) {
23681
          unsetProviderId();
23682
        } else {
23683
          setProviderId((Long)value);
23684
        }
23685
        break;
23686
 
23687
      case DELIVERED_ORDERS:
23688
        if (value == null) {
23689
          unsetDeliveredOrders();
23690
        } else {
23691
          setDeliveredOrders((Map<String,String>)value);
23692
        }
23693
        break;
23694
 
23695
      }
23696
    }
23697
 
23698
    public void setFieldValue(int fieldID, Object value) {
23699
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23700
    }
23701
 
23702
    public Object getFieldValue(_Fields field) {
23703
      switch (field) {
23704
      case PROVIDER_ID:
23705
        return new Long(getProviderId());
23706
 
23707
      case DELIVERED_ORDERS:
23708
        return getDeliveredOrders();
23709
 
23710
      }
23711
      throw new IllegalStateException();
23712
    }
23713
 
23714
    public Object getFieldValue(int fieldId) {
23715
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23716
    }
23717
 
23718
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23719
    public boolean isSet(_Fields field) {
23720
      switch (field) {
23721
      case PROVIDER_ID:
23722
        return isSetProviderId();
23723
      case DELIVERED_ORDERS:
23724
        return isSetDeliveredOrders();
23725
      }
23726
      throw new IllegalStateException();
23727
    }
23728
 
23729
    public boolean isSet(int fieldID) {
23730
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23731
    }
23732
 
23733
    @Override
23734
    public boolean equals(Object that) {
23735
      if (that == null)
23736
        return false;
23737
      if (that instanceof markOrdersAsDelivered_args)
23738
        return this.equals((markOrdersAsDelivered_args)that);
23739
      return false;
23740
    }
23741
 
23742
    public boolean equals(markOrdersAsDelivered_args that) {
23743
      if (that == null)
23744
        return false;
23745
 
23746
      boolean this_present_providerId = true;
23747
      boolean that_present_providerId = true;
23748
      if (this_present_providerId || that_present_providerId) {
23749
        if (!(this_present_providerId && that_present_providerId))
23750
          return false;
23751
        if (this.providerId != that.providerId)
23752
          return false;
23753
      }
23754
 
23755
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
23756
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
23757
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
23758
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
23759
          return false;
23760
        if (!this.deliveredOrders.equals(that.deliveredOrders))
23761
          return false;
23762
      }
23763
 
23764
      return true;
23765
    }
23766
 
23767
    @Override
23768
    public int hashCode() {
23769
      return 0;
23770
    }
23771
 
23772
    public void read(TProtocol iprot) throws TException {
23773
      TField field;
23774
      iprot.readStructBegin();
23775
      while (true)
23776
      {
23777
        field = iprot.readFieldBegin();
23778
        if (field.type == TType.STOP) { 
23779
          break;
23780
        }
23781
        _Fields fieldId = _Fields.findByThriftId(field.id);
23782
        if (fieldId == null) {
23783
          TProtocolUtil.skip(iprot, field.type);
23784
        } else {
23785
          switch (fieldId) {
23786
            case PROVIDER_ID:
23787
              if (field.type == TType.I64) {
23788
                this.providerId = iprot.readI64();
23789
                setProviderIdIsSet(true);
23790
              } else { 
23791
                TProtocolUtil.skip(iprot, field.type);
23792
              }
23793
              break;
23794
            case DELIVERED_ORDERS:
23795
              if (field.type == TType.MAP) {
23796
                {
1382 varun.gupt 23797
                  TMap _map57 = iprot.readMapBegin();
23798
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
23799
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 23800
                  {
1382 varun.gupt 23801
                    String _key59;
23802
                    String _val60;
23803
                    _key59 = iprot.readString();
23804
                    _val60 = iprot.readString();
23805
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 23806
                  }
23807
                  iprot.readMapEnd();
23808
                }
23809
              } else { 
23810
                TProtocolUtil.skip(iprot, field.type);
23811
              }
23812
              break;
23813
          }
23814
          iprot.readFieldEnd();
23815
        }
23816
      }
23817
      iprot.readStructEnd();
23818
      validate();
23819
    }
23820
 
23821
    public void write(TProtocol oprot) throws TException {
23822
      validate();
23823
 
23824
      oprot.writeStructBegin(STRUCT_DESC);
23825
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23826
      oprot.writeI64(this.providerId);
23827
      oprot.writeFieldEnd();
23828
      if (this.deliveredOrders != null) {
23829
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
23830
        {
23831
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 23832
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 23833
          {
1382 varun.gupt 23834
            oprot.writeString(_iter61.getKey());
23835
            oprot.writeString(_iter61.getValue());
1133 chandransh 23836
          }
23837
          oprot.writeMapEnd();
23838
        }
23839
        oprot.writeFieldEnd();
23840
      }
23841
      oprot.writeFieldStop();
23842
      oprot.writeStructEnd();
23843
    }
23844
 
23845
    @Override
23846
    public String toString() {
23847
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
23848
      boolean first = true;
23849
 
23850
      sb.append("providerId:");
23851
      sb.append(this.providerId);
23852
      first = false;
23853
      if (!first) sb.append(", ");
23854
      sb.append("deliveredOrders:");
23855
      if (this.deliveredOrders == null) {
23856
        sb.append("null");
23857
      } else {
23858
        sb.append(this.deliveredOrders);
23859
      }
23860
      first = false;
23861
      sb.append(")");
23862
      return sb.toString();
23863
    }
23864
 
23865
    public void validate() throws TException {
23866
      // check for required fields
23867
    }
23868
 
23869
  }
23870
 
23871
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
23872
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
23873
 
23874
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23875
 
23876
    private TransactionServiceException ex;
23877
 
23878
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23879
    public enum _Fields implements TFieldIdEnum {
23880
      EX((short)1, "ex");
23881
 
23882
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23883
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23884
 
23885
      static {
23886
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23887
          byId.put((int)field._thriftId, field);
23888
          byName.put(field.getFieldName(), field);
23889
        }
23890
      }
23891
 
23892
      /**
23893
       * Find the _Fields constant that matches fieldId, or null if its not found.
23894
       */
23895
      public static _Fields findByThriftId(int fieldId) {
23896
        return byId.get(fieldId);
23897
      }
23898
 
23899
      /**
23900
       * Find the _Fields constant that matches fieldId, throwing an exception
23901
       * if it is not found.
23902
       */
23903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23904
        _Fields fields = findByThriftId(fieldId);
23905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23906
        return fields;
23907
      }
23908
 
23909
      /**
23910
       * Find the _Fields constant that matches name, or null if its not found.
23911
       */
23912
      public static _Fields findByName(String name) {
23913
        return byName.get(name);
23914
      }
23915
 
23916
      private final short _thriftId;
23917
      private final String _fieldName;
23918
 
23919
      _Fields(short thriftId, String fieldName) {
23920
        _thriftId = thriftId;
23921
        _fieldName = fieldName;
23922
      }
23923
 
23924
      public short getThriftFieldId() {
23925
        return _thriftId;
23926
      }
23927
 
23928
      public String getFieldName() {
23929
        return _fieldName;
23930
      }
23931
    }
23932
 
23933
    // isset id assignments
23934
 
23935
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23936
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23937
          new FieldValueMetaData(TType.STRUCT)));
23938
    }});
23939
 
23940
    static {
23941
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
23942
    }
23943
 
23944
    public markOrdersAsDelivered_result() {
23945
    }
23946
 
23947
    public markOrdersAsDelivered_result(
23948
      TransactionServiceException ex)
23949
    {
23950
      this();
23951
      this.ex = ex;
23952
    }
23953
 
23954
    /**
23955
     * Performs a deep copy on <i>other</i>.
23956
     */
23957
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
23958
      if (other.isSetEx()) {
23959
        this.ex = new TransactionServiceException(other.ex);
23960
      }
23961
    }
23962
 
23963
    public markOrdersAsDelivered_result deepCopy() {
23964
      return new markOrdersAsDelivered_result(this);
23965
    }
23966
 
23967
    @Deprecated
23968
    public markOrdersAsDelivered_result clone() {
23969
      return new markOrdersAsDelivered_result(this);
23970
    }
23971
 
23972
    public TransactionServiceException getEx() {
23973
      return this.ex;
23974
    }
23975
 
23976
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
23977
      this.ex = ex;
23978
      return this;
23979
    }
23980
 
23981
    public void unsetEx() {
23982
      this.ex = null;
23983
    }
23984
 
23985
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23986
    public boolean isSetEx() {
23987
      return this.ex != null;
23988
    }
23989
 
23990
    public void setExIsSet(boolean value) {
23991
      if (!value) {
23992
        this.ex = null;
23993
      }
23994
    }
23995
 
23996
    public void setFieldValue(_Fields field, Object value) {
23997
      switch (field) {
23998
      case EX:
23999
        if (value == null) {
24000
          unsetEx();
24001
        } else {
24002
          setEx((TransactionServiceException)value);
24003
        }
24004
        break;
24005
 
24006
      }
24007
    }
24008
 
24009
    public void setFieldValue(int fieldID, Object value) {
24010
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24011
    }
24012
 
24013
    public Object getFieldValue(_Fields field) {
24014
      switch (field) {
24015
      case EX:
24016
        return getEx();
24017
 
24018
      }
24019
      throw new IllegalStateException();
24020
    }
24021
 
24022
    public Object getFieldValue(int fieldId) {
24023
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24024
    }
24025
 
24026
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24027
    public boolean isSet(_Fields field) {
24028
      switch (field) {
24029
      case EX:
24030
        return isSetEx();
24031
      }
24032
      throw new IllegalStateException();
24033
    }
24034
 
24035
    public boolean isSet(int fieldID) {
24036
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24037
    }
24038
 
24039
    @Override
24040
    public boolean equals(Object that) {
24041
      if (that == null)
24042
        return false;
24043
      if (that instanceof markOrdersAsDelivered_result)
24044
        return this.equals((markOrdersAsDelivered_result)that);
24045
      return false;
24046
    }
24047
 
24048
    public boolean equals(markOrdersAsDelivered_result that) {
24049
      if (that == null)
24050
        return false;
24051
 
24052
      boolean this_present_ex = true && this.isSetEx();
24053
      boolean that_present_ex = true && that.isSetEx();
24054
      if (this_present_ex || that_present_ex) {
24055
        if (!(this_present_ex && that_present_ex))
24056
          return false;
24057
        if (!this.ex.equals(that.ex))
24058
          return false;
24059
      }
24060
 
24061
      return true;
24062
    }
24063
 
24064
    @Override
24065
    public int hashCode() {
24066
      return 0;
24067
    }
24068
 
24069
    public int compareTo(markOrdersAsDelivered_result other) {
24070
      if (!getClass().equals(other.getClass())) {
24071
        return getClass().getName().compareTo(other.getClass().getName());
24072
      }
24073
 
24074
      int lastComparison = 0;
24075
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
24076
 
24077
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24078
      if (lastComparison != 0) {
24079
        return lastComparison;
24080
      }
24081
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24082
      if (lastComparison != 0) {
24083
        return lastComparison;
24084
      }
24085
      return 0;
24086
    }
24087
 
24088
    public void read(TProtocol iprot) throws TException {
24089
      TField field;
24090
      iprot.readStructBegin();
24091
      while (true)
24092
      {
24093
        field = iprot.readFieldBegin();
24094
        if (field.type == TType.STOP) { 
24095
          break;
24096
        }
24097
        _Fields fieldId = _Fields.findByThriftId(field.id);
24098
        if (fieldId == null) {
24099
          TProtocolUtil.skip(iprot, field.type);
24100
        } else {
24101
          switch (fieldId) {
24102
            case EX:
24103
              if (field.type == TType.STRUCT) {
24104
                this.ex = new TransactionServiceException();
24105
                this.ex.read(iprot);
24106
              } else { 
24107
                TProtocolUtil.skip(iprot, field.type);
24108
              }
24109
              break;
24110
          }
24111
          iprot.readFieldEnd();
24112
        }
24113
      }
24114
      iprot.readStructEnd();
24115
      validate();
24116
    }
24117
 
24118
    public void write(TProtocol oprot) throws TException {
24119
      oprot.writeStructBegin(STRUCT_DESC);
24120
 
24121
      if (this.isSetEx()) {
24122
        oprot.writeFieldBegin(EX_FIELD_DESC);
24123
        this.ex.write(oprot);
24124
        oprot.writeFieldEnd();
24125
      }
24126
      oprot.writeFieldStop();
24127
      oprot.writeStructEnd();
24128
    }
24129
 
24130
    @Override
24131
    public String toString() {
24132
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
24133
      boolean first = true;
24134
 
24135
      sb.append("ex:");
24136
      if (this.ex == null) {
24137
        sb.append("null");
24138
      } else {
24139
        sb.append(this.ex);
24140
      }
24141
      first = false;
24142
      sb.append(")");
24143
      return sb.toString();
24144
    }
24145
 
24146
    public void validate() throws TException {
24147
      // check for required fields
24148
    }
24149
 
24150
  }
24151
 
24152
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
24153
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
24154
 
24155
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24156
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
24157
 
24158
    private long providerId;
24159
    private Map<String,String> returnedOrders;
24160
 
24161
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24162
    public enum _Fields implements TFieldIdEnum {
24163
      PROVIDER_ID((short)1, "providerId"),
24164
      RETURNED_ORDERS((short)2, "returnedOrders");
24165
 
24166
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24167
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24168
 
24169
      static {
24170
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24171
          byId.put((int)field._thriftId, field);
24172
          byName.put(field.getFieldName(), field);
24173
        }
24174
      }
24175
 
24176
      /**
24177
       * Find the _Fields constant that matches fieldId, or null if its not found.
24178
       */
24179
      public static _Fields findByThriftId(int fieldId) {
24180
        return byId.get(fieldId);
24181
      }
24182
 
24183
      /**
24184
       * Find the _Fields constant that matches fieldId, throwing an exception
24185
       * if it is not found.
24186
       */
24187
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24188
        _Fields fields = findByThriftId(fieldId);
24189
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24190
        return fields;
24191
      }
24192
 
24193
      /**
24194
       * Find the _Fields constant that matches name, or null if its not found.
24195
       */
24196
      public static _Fields findByName(String name) {
24197
        return byName.get(name);
24198
      }
24199
 
24200
      private final short _thriftId;
24201
      private final String _fieldName;
24202
 
24203
      _Fields(short thriftId, String fieldName) {
24204
        _thriftId = thriftId;
24205
        _fieldName = fieldName;
24206
      }
24207
 
24208
      public short getThriftFieldId() {
24209
        return _thriftId;
24210
      }
24211
 
24212
      public String getFieldName() {
24213
        return _fieldName;
24214
      }
24215
    }
24216
 
24217
    // isset id assignments
24218
    private static final int __PROVIDERID_ISSET_ID = 0;
24219
    private BitSet __isset_bit_vector = new BitSet(1);
24220
 
24221
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24222
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24223
          new FieldValueMetaData(TType.I64)));
24224
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
24225
          new MapMetaData(TType.MAP, 
24226
              new FieldValueMetaData(TType.STRING), 
24227
              new FieldValueMetaData(TType.STRING))));
24228
    }});
24229
 
24230
    static {
24231
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
24232
    }
24233
 
24234
    public markOrdersAsFailed_args() {
24235
    }
24236
 
24237
    public markOrdersAsFailed_args(
24238
      long providerId,
24239
      Map<String,String> returnedOrders)
24240
    {
24241
      this();
24242
      this.providerId = providerId;
24243
      setProviderIdIsSet(true);
24244
      this.returnedOrders = returnedOrders;
24245
    }
24246
 
24247
    /**
24248
     * Performs a deep copy on <i>other</i>.
24249
     */
24250
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
24251
      __isset_bit_vector.clear();
24252
      __isset_bit_vector.or(other.__isset_bit_vector);
24253
      this.providerId = other.providerId;
24254
      if (other.isSetReturnedOrders()) {
24255
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
24256
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
24257
 
24258
          String other_element_key = other_element.getKey();
24259
          String other_element_value = other_element.getValue();
24260
 
24261
          String __this__returnedOrders_copy_key = other_element_key;
24262
 
24263
          String __this__returnedOrders_copy_value = other_element_value;
24264
 
24265
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
24266
        }
24267
        this.returnedOrders = __this__returnedOrders;
24268
      }
24269
    }
24270
 
24271
    public markOrdersAsFailed_args deepCopy() {
24272
      return new markOrdersAsFailed_args(this);
24273
    }
24274
 
24275
    @Deprecated
24276
    public markOrdersAsFailed_args clone() {
24277
      return new markOrdersAsFailed_args(this);
24278
    }
24279
 
24280
    public long getProviderId() {
24281
      return this.providerId;
24282
    }
24283
 
24284
    public markOrdersAsFailed_args setProviderId(long providerId) {
24285
      this.providerId = providerId;
24286
      setProviderIdIsSet(true);
24287
      return this;
24288
    }
24289
 
24290
    public void unsetProviderId() {
24291
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24292
    }
24293
 
24294
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24295
    public boolean isSetProviderId() {
24296
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24297
    }
24298
 
24299
    public void setProviderIdIsSet(boolean value) {
24300
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24301
    }
24302
 
24303
    public int getReturnedOrdersSize() {
24304
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
24305
    }
24306
 
24307
    public void putToReturnedOrders(String key, String val) {
24308
      if (this.returnedOrders == null) {
24309
        this.returnedOrders = new HashMap<String,String>();
24310
      }
24311
      this.returnedOrders.put(key, val);
24312
    }
24313
 
24314
    public Map<String,String> getReturnedOrders() {
24315
      return this.returnedOrders;
24316
    }
24317
 
24318
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
24319
      this.returnedOrders = returnedOrders;
24320
      return this;
24321
    }
24322
 
24323
    public void unsetReturnedOrders() {
24324
      this.returnedOrders = null;
24325
    }
24326
 
24327
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
24328
    public boolean isSetReturnedOrders() {
24329
      return this.returnedOrders != null;
24330
    }
24331
 
24332
    public void setReturnedOrdersIsSet(boolean value) {
24333
      if (!value) {
24334
        this.returnedOrders = null;
24335
      }
24336
    }
24337
 
24338
    public void setFieldValue(_Fields field, Object value) {
24339
      switch (field) {
24340
      case PROVIDER_ID:
24341
        if (value == null) {
24342
          unsetProviderId();
24343
        } else {
24344
          setProviderId((Long)value);
24345
        }
24346
        break;
24347
 
24348
      case RETURNED_ORDERS:
24349
        if (value == null) {
24350
          unsetReturnedOrders();
24351
        } else {
24352
          setReturnedOrders((Map<String,String>)value);
24353
        }
24354
        break;
24355
 
24356
      }
24357
    }
24358
 
24359
    public void setFieldValue(int fieldID, Object value) {
24360
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24361
    }
24362
 
24363
    public Object getFieldValue(_Fields field) {
24364
      switch (field) {
24365
      case PROVIDER_ID:
24366
        return new Long(getProviderId());
24367
 
24368
      case RETURNED_ORDERS:
24369
        return getReturnedOrders();
24370
 
24371
      }
24372
      throw new IllegalStateException();
24373
    }
24374
 
24375
    public Object getFieldValue(int fieldId) {
24376
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24377
    }
24378
 
24379
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24380
    public boolean isSet(_Fields field) {
24381
      switch (field) {
24382
      case PROVIDER_ID:
24383
        return isSetProviderId();
24384
      case RETURNED_ORDERS:
24385
        return isSetReturnedOrders();
24386
      }
24387
      throw new IllegalStateException();
24388
    }
24389
 
24390
    public boolean isSet(int fieldID) {
24391
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24392
    }
24393
 
24394
    @Override
24395
    public boolean equals(Object that) {
24396
      if (that == null)
24397
        return false;
24398
      if (that instanceof markOrdersAsFailed_args)
24399
        return this.equals((markOrdersAsFailed_args)that);
24400
      return false;
24401
    }
24402
 
24403
    public boolean equals(markOrdersAsFailed_args that) {
24404
      if (that == null)
24405
        return false;
24406
 
24407
      boolean this_present_providerId = true;
24408
      boolean that_present_providerId = true;
24409
      if (this_present_providerId || that_present_providerId) {
24410
        if (!(this_present_providerId && that_present_providerId))
24411
          return false;
24412
        if (this.providerId != that.providerId)
24413
          return false;
24414
      }
24415
 
24416
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
24417
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
24418
      if (this_present_returnedOrders || that_present_returnedOrders) {
24419
        if (!(this_present_returnedOrders && that_present_returnedOrders))
24420
          return false;
24421
        if (!this.returnedOrders.equals(that.returnedOrders))
24422
          return false;
24423
      }
24424
 
24425
      return true;
24426
    }
24427
 
24428
    @Override
24429
    public int hashCode() {
24430
      return 0;
24431
    }
24432
 
24433
    public void read(TProtocol iprot) throws TException {
24434
      TField field;
24435
      iprot.readStructBegin();
24436
      while (true)
24437
      {
24438
        field = iprot.readFieldBegin();
24439
        if (field.type == TType.STOP) { 
24440
          break;
24441
        }
24442
        _Fields fieldId = _Fields.findByThriftId(field.id);
24443
        if (fieldId == null) {
24444
          TProtocolUtil.skip(iprot, field.type);
24445
        } else {
24446
          switch (fieldId) {
24447
            case PROVIDER_ID:
24448
              if (field.type == TType.I64) {
24449
                this.providerId = iprot.readI64();
24450
                setProviderIdIsSet(true);
24451
              } else { 
24452
                TProtocolUtil.skip(iprot, field.type);
24453
              }
24454
              break;
24455
            case RETURNED_ORDERS:
24456
              if (field.type == TType.MAP) {
24457
                {
1382 varun.gupt 24458
                  TMap _map62 = iprot.readMapBegin();
24459
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
24460
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 24461
                  {
1382 varun.gupt 24462
                    String _key64;
24463
                    String _val65;
24464
                    _key64 = iprot.readString();
24465
                    _val65 = iprot.readString();
24466
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 24467
                  }
24468
                  iprot.readMapEnd();
24469
                }
24470
              } else { 
24471
                TProtocolUtil.skip(iprot, field.type);
24472
              }
24473
              break;
24474
          }
24475
          iprot.readFieldEnd();
24476
        }
24477
      }
24478
      iprot.readStructEnd();
24479
      validate();
24480
    }
24481
 
24482
    public void write(TProtocol oprot) throws TException {
24483
      validate();
24484
 
24485
      oprot.writeStructBegin(STRUCT_DESC);
24486
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24487
      oprot.writeI64(this.providerId);
24488
      oprot.writeFieldEnd();
24489
      if (this.returnedOrders != null) {
24490
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
24491
        {
24492
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 24493
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 24494
          {
1382 varun.gupt 24495
            oprot.writeString(_iter66.getKey());
24496
            oprot.writeString(_iter66.getValue());
1133 chandransh 24497
          }
24498
          oprot.writeMapEnd();
24499
        }
24500
        oprot.writeFieldEnd();
24501
      }
24502
      oprot.writeFieldStop();
24503
      oprot.writeStructEnd();
24504
    }
24505
 
24506
    @Override
24507
    public String toString() {
24508
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
24509
      boolean first = true;
24510
 
24511
      sb.append("providerId:");
24512
      sb.append(this.providerId);
24513
      first = false;
24514
      if (!first) sb.append(", ");
24515
      sb.append("returnedOrders:");
24516
      if (this.returnedOrders == null) {
24517
        sb.append("null");
24518
      } else {
24519
        sb.append(this.returnedOrders);
24520
      }
24521
      first = false;
24522
      sb.append(")");
24523
      return sb.toString();
24524
    }
24525
 
24526
    public void validate() throws TException {
24527
      // check for required fields
24528
    }
24529
 
24530
  }
24531
 
24532
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
24533
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
24534
 
24535
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
24536
 
24537
    private TransactionServiceException ex;
24538
 
24539
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24540
    public enum _Fields implements TFieldIdEnum {
24541
      EX((short)1, "ex");
24542
 
24543
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24544
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24545
 
24546
      static {
24547
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24548
          byId.put((int)field._thriftId, field);
24549
          byName.put(field.getFieldName(), field);
24550
        }
24551
      }
24552
 
24553
      /**
24554
       * Find the _Fields constant that matches fieldId, or null if its not found.
24555
       */
24556
      public static _Fields findByThriftId(int fieldId) {
24557
        return byId.get(fieldId);
24558
      }
24559
 
24560
      /**
24561
       * Find the _Fields constant that matches fieldId, throwing an exception
24562
       * if it is not found.
24563
       */
24564
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24565
        _Fields fields = findByThriftId(fieldId);
24566
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24567
        return fields;
24568
      }
24569
 
24570
      /**
24571
       * Find the _Fields constant that matches name, or null if its not found.
24572
       */
24573
      public static _Fields findByName(String name) {
24574
        return byName.get(name);
24575
      }
24576
 
24577
      private final short _thriftId;
24578
      private final String _fieldName;
24579
 
24580
      _Fields(short thriftId, String fieldName) {
24581
        _thriftId = thriftId;
24582
        _fieldName = fieldName;
24583
      }
24584
 
24585
      public short getThriftFieldId() {
24586
        return _thriftId;
24587
      }
24588
 
24589
      public String getFieldName() {
24590
        return _fieldName;
24591
      }
24592
    }
24593
 
24594
    // isset id assignments
24595
 
24596
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24597
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
24598
          new FieldValueMetaData(TType.STRUCT)));
24599
    }});
24600
 
24601
    static {
24602
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
24603
    }
24604
 
24605
    public markOrdersAsFailed_result() {
24606
    }
24607
 
24608
    public markOrdersAsFailed_result(
24609
      TransactionServiceException ex)
24610
    {
24611
      this();
24612
      this.ex = ex;
24613
    }
24614
 
24615
    /**
24616
     * Performs a deep copy on <i>other</i>.
24617
     */
24618
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
24619
      if (other.isSetEx()) {
24620
        this.ex = new TransactionServiceException(other.ex);
24621
      }
24622
    }
24623
 
24624
    public markOrdersAsFailed_result deepCopy() {
24625
      return new markOrdersAsFailed_result(this);
24626
    }
24627
 
24628
    @Deprecated
24629
    public markOrdersAsFailed_result clone() {
24630
      return new markOrdersAsFailed_result(this);
24631
    }
24632
 
24633
    public TransactionServiceException getEx() {
24634
      return this.ex;
24635
    }
24636
 
24637
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
24638
      this.ex = ex;
24639
      return this;
24640
    }
24641
 
24642
    public void unsetEx() {
24643
      this.ex = null;
24644
    }
24645
 
24646
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
24647
    public boolean isSetEx() {
24648
      return this.ex != null;
24649
    }
24650
 
24651
    public void setExIsSet(boolean value) {
24652
      if (!value) {
24653
        this.ex = null;
24654
      }
24655
    }
24656
 
24657
    public void setFieldValue(_Fields field, Object value) {
24658
      switch (field) {
24659
      case EX:
24660
        if (value == null) {
24661
          unsetEx();
24662
        } else {
24663
          setEx((TransactionServiceException)value);
24664
        }
24665
        break;
24666
 
24667
      }
24668
    }
24669
 
24670
    public void setFieldValue(int fieldID, Object value) {
24671
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24672
    }
24673
 
24674
    public Object getFieldValue(_Fields field) {
24675
      switch (field) {
24676
      case EX:
24677
        return getEx();
24678
 
24679
      }
24680
      throw new IllegalStateException();
24681
    }
24682
 
24683
    public Object getFieldValue(int fieldId) {
24684
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24685
    }
24686
 
24687
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24688
    public boolean isSet(_Fields field) {
24689
      switch (field) {
24690
      case EX:
24691
        return isSetEx();
24692
      }
24693
      throw new IllegalStateException();
24694
    }
24695
 
24696
    public boolean isSet(int fieldID) {
24697
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24698
    }
24699
 
24700
    @Override
24701
    public boolean equals(Object that) {
24702
      if (that == null)
24703
        return false;
24704
      if (that instanceof markOrdersAsFailed_result)
24705
        return this.equals((markOrdersAsFailed_result)that);
24706
      return false;
24707
    }
24708
 
24709
    public boolean equals(markOrdersAsFailed_result that) {
24710
      if (that == null)
24711
        return false;
24712
 
24713
      boolean this_present_ex = true && this.isSetEx();
24714
      boolean that_present_ex = true && that.isSetEx();
24715
      if (this_present_ex || that_present_ex) {
24716
        if (!(this_present_ex && that_present_ex))
24717
          return false;
24718
        if (!this.ex.equals(that.ex))
24719
          return false;
24720
      }
24721
 
24722
      return true;
24723
    }
24724
 
24725
    @Override
24726
    public int hashCode() {
24727
      return 0;
24728
    }
24729
 
24730
    public int compareTo(markOrdersAsFailed_result other) {
24731
      if (!getClass().equals(other.getClass())) {
24732
        return getClass().getName().compareTo(other.getClass().getName());
24733
      }
24734
 
24735
      int lastComparison = 0;
24736
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
24737
 
24738
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24739
      if (lastComparison != 0) {
24740
        return lastComparison;
24741
      }
24742
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24743
      if (lastComparison != 0) {
24744
        return lastComparison;
24745
      }
24746
      return 0;
24747
    }
24748
 
24749
    public void read(TProtocol iprot) throws TException {
24750
      TField field;
24751
      iprot.readStructBegin();
24752
      while (true)
24753
      {
24754
        field = iprot.readFieldBegin();
24755
        if (field.type == TType.STOP) { 
24756
          break;
24757
        }
24758
        _Fields fieldId = _Fields.findByThriftId(field.id);
24759
        if (fieldId == null) {
24760
          TProtocolUtil.skip(iprot, field.type);
24761
        } else {
24762
          switch (fieldId) {
24763
            case EX:
24764
              if (field.type == TType.STRUCT) {
24765
                this.ex = new TransactionServiceException();
24766
                this.ex.read(iprot);
24767
              } else { 
24768
                TProtocolUtil.skip(iprot, field.type);
24769
              }
24770
              break;
24771
          }
24772
          iprot.readFieldEnd();
24773
        }
24774
      }
24775
      iprot.readStructEnd();
24776
      validate();
24777
    }
24778
 
24779
    public void write(TProtocol oprot) throws TException {
24780
      oprot.writeStructBegin(STRUCT_DESC);
24781
 
24782
      if (this.isSetEx()) {
24783
        oprot.writeFieldBegin(EX_FIELD_DESC);
24784
        this.ex.write(oprot);
24785
        oprot.writeFieldEnd();
24786
      }
24787
      oprot.writeFieldStop();
24788
      oprot.writeStructEnd();
24789
    }
24790
 
24791
    @Override
24792
    public String toString() {
24793
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
24794
      boolean first = true;
24795
 
24796
      sb.append("ex:");
24797
      if (this.ex == null) {
24798
        sb.append("null");
24799
      } else {
24800
        sb.append(this.ex);
24801
      }
24802
      first = false;
24803
      sb.append(")");
24804
      return sb.toString();
24805
    }
24806
 
24807
    public void validate() throws TException {
24808
      // check for required fields
24809
    }
24810
 
24811
  }
24812
 
1245 chandransh 24813
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
24814
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
24815
 
24816
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24817
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
24818
 
24819
    private long providerId;
24820
    private Map<String,String> undeliveredOrders;
24821
 
24822
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24823
    public enum _Fields implements TFieldIdEnum {
24824
      PROVIDER_ID((short)1, "providerId"),
24825
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
24826
 
24827
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24828
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24829
 
24830
      static {
24831
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24832
          byId.put((int)field._thriftId, field);
24833
          byName.put(field.getFieldName(), field);
24834
        }
24835
      }
24836
 
24837
      /**
24838
       * Find the _Fields constant that matches fieldId, or null if its not found.
24839
       */
24840
      public static _Fields findByThriftId(int fieldId) {
24841
        return byId.get(fieldId);
24842
      }
24843
 
24844
      /**
24845
       * Find the _Fields constant that matches fieldId, throwing an exception
24846
       * if it is not found.
24847
       */
24848
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24849
        _Fields fields = findByThriftId(fieldId);
24850
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24851
        return fields;
24852
      }
24853
 
24854
      /**
24855
       * Find the _Fields constant that matches name, or null if its not found.
24856
       */
24857
      public static _Fields findByName(String name) {
24858
        return byName.get(name);
24859
      }
24860
 
24861
      private final short _thriftId;
24862
      private final String _fieldName;
24863
 
24864
      _Fields(short thriftId, String fieldName) {
24865
        _thriftId = thriftId;
24866
        _fieldName = fieldName;
24867
      }
24868
 
24869
      public short getThriftFieldId() {
24870
        return _thriftId;
24871
      }
24872
 
24873
      public String getFieldName() {
24874
        return _fieldName;
24875
      }
24876
    }
24877
 
24878
    // isset id assignments
24879
    private static final int __PROVIDERID_ISSET_ID = 0;
24880
    private BitSet __isset_bit_vector = new BitSet(1);
24881
 
24882
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24883
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24884
          new FieldValueMetaData(TType.I64)));
24885
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
24886
          new MapMetaData(TType.MAP, 
24887
              new FieldValueMetaData(TType.STRING), 
24888
              new FieldValueMetaData(TType.STRING))));
24889
    }});
24890
 
24891
    static {
24892
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
24893
    }
24894
 
24895
    public updateNonDeliveryReason_args() {
24896
    }
24897
 
24898
    public updateNonDeliveryReason_args(
24899
      long providerId,
24900
      Map<String,String> undeliveredOrders)
24901
    {
24902
      this();
24903
      this.providerId = providerId;
24904
      setProviderIdIsSet(true);
24905
      this.undeliveredOrders = undeliveredOrders;
24906
    }
24907
 
24908
    /**
24909
     * Performs a deep copy on <i>other</i>.
24910
     */
24911
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
24912
      __isset_bit_vector.clear();
24913
      __isset_bit_vector.or(other.__isset_bit_vector);
24914
      this.providerId = other.providerId;
24915
      if (other.isSetUndeliveredOrders()) {
24916
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
24917
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
24918
 
24919
          String other_element_key = other_element.getKey();
24920
          String other_element_value = other_element.getValue();
24921
 
24922
          String __this__undeliveredOrders_copy_key = other_element_key;
24923
 
24924
          String __this__undeliveredOrders_copy_value = other_element_value;
24925
 
24926
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
24927
        }
24928
        this.undeliveredOrders = __this__undeliveredOrders;
24929
      }
24930
    }
24931
 
24932
    public updateNonDeliveryReason_args deepCopy() {
24933
      return new updateNonDeliveryReason_args(this);
24934
    }
24935
 
24936
    @Deprecated
24937
    public updateNonDeliveryReason_args clone() {
24938
      return new updateNonDeliveryReason_args(this);
24939
    }
24940
 
24941
    public long getProviderId() {
24942
      return this.providerId;
24943
    }
24944
 
24945
    public updateNonDeliveryReason_args setProviderId(long providerId) {
24946
      this.providerId = providerId;
24947
      setProviderIdIsSet(true);
24948
      return this;
24949
    }
24950
 
24951
    public void unsetProviderId() {
24952
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24953
    }
24954
 
24955
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24956
    public boolean isSetProviderId() {
24957
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24958
    }
24959
 
24960
    public void setProviderIdIsSet(boolean value) {
24961
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24962
    }
24963
 
24964
    public int getUndeliveredOrdersSize() {
24965
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
24966
    }
24967
 
24968
    public void putToUndeliveredOrders(String key, String val) {
24969
      if (this.undeliveredOrders == null) {
24970
        this.undeliveredOrders = new HashMap<String,String>();
24971
      }
24972
      this.undeliveredOrders.put(key, val);
24973
    }
24974
 
24975
    public Map<String,String> getUndeliveredOrders() {
24976
      return this.undeliveredOrders;
24977
    }
24978
 
24979
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
24980
      this.undeliveredOrders = undeliveredOrders;
24981
      return this;
24982
    }
24983
 
24984
    public void unsetUndeliveredOrders() {
24985
      this.undeliveredOrders = null;
24986
    }
24987
 
24988
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
24989
    public boolean isSetUndeliveredOrders() {
24990
      return this.undeliveredOrders != null;
24991
    }
24992
 
24993
    public void setUndeliveredOrdersIsSet(boolean value) {
24994
      if (!value) {
24995
        this.undeliveredOrders = null;
24996
      }
24997
    }
24998
 
24999
    public void setFieldValue(_Fields field, Object value) {
25000
      switch (field) {
25001
      case PROVIDER_ID:
25002
        if (value == null) {
25003
          unsetProviderId();
25004
        } else {
25005
          setProviderId((Long)value);
25006
        }
25007
        break;
25008
 
25009
      case UNDELIVERED_ORDERS:
25010
        if (value == null) {
25011
          unsetUndeliveredOrders();
25012
        } else {
25013
          setUndeliveredOrders((Map<String,String>)value);
25014
        }
25015
        break;
25016
 
25017
      }
25018
    }
25019
 
25020
    public void setFieldValue(int fieldID, Object value) {
25021
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25022
    }
25023
 
25024
    public Object getFieldValue(_Fields field) {
25025
      switch (field) {
25026
      case PROVIDER_ID:
25027
        return new Long(getProviderId());
25028
 
25029
      case UNDELIVERED_ORDERS:
25030
        return getUndeliveredOrders();
25031
 
25032
      }
25033
      throw new IllegalStateException();
25034
    }
25035
 
25036
    public Object getFieldValue(int fieldId) {
25037
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25038
    }
25039
 
25040
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25041
    public boolean isSet(_Fields field) {
25042
      switch (field) {
25043
      case PROVIDER_ID:
25044
        return isSetProviderId();
25045
      case UNDELIVERED_ORDERS:
25046
        return isSetUndeliveredOrders();
25047
      }
25048
      throw new IllegalStateException();
25049
    }
25050
 
25051
    public boolean isSet(int fieldID) {
25052
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25053
    }
25054
 
25055
    @Override
25056
    public boolean equals(Object that) {
25057
      if (that == null)
25058
        return false;
25059
      if (that instanceof updateNonDeliveryReason_args)
25060
        return this.equals((updateNonDeliveryReason_args)that);
25061
      return false;
25062
    }
25063
 
25064
    public boolean equals(updateNonDeliveryReason_args that) {
25065
      if (that == null)
25066
        return false;
25067
 
25068
      boolean this_present_providerId = true;
25069
      boolean that_present_providerId = true;
25070
      if (this_present_providerId || that_present_providerId) {
25071
        if (!(this_present_providerId && that_present_providerId))
25072
          return false;
25073
        if (this.providerId != that.providerId)
25074
          return false;
25075
      }
25076
 
25077
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
25078
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
25079
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
25080
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
25081
          return false;
25082
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
25083
          return false;
25084
      }
25085
 
25086
      return true;
25087
    }
25088
 
25089
    @Override
25090
    public int hashCode() {
25091
      return 0;
25092
    }
25093
 
25094
    public void read(TProtocol iprot) throws TException {
25095
      TField field;
25096
      iprot.readStructBegin();
25097
      while (true)
25098
      {
25099
        field = iprot.readFieldBegin();
25100
        if (field.type == TType.STOP) { 
25101
          break;
25102
        }
25103
        _Fields fieldId = _Fields.findByThriftId(field.id);
25104
        if (fieldId == null) {
25105
          TProtocolUtil.skip(iprot, field.type);
25106
        } else {
25107
          switch (fieldId) {
25108
            case PROVIDER_ID:
25109
              if (field.type == TType.I64) {
25110
                this.providerId = iprot.readI64();
25111
                setProviderIdIsSet(true);
25112
              } else { 
25113
                TProtocolUtil.skip(iprot, field.type);
25114
              }
25115
              break;
25116
            case UNDELIVERED_ORDERS:
25117
              if (field.type == TType.MAP) {
25118
                {
1382 varun.gupt 25119
                  TMap _map67 = iprot.readMapBegin();
25120
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
25121
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 25122
                  {
1382 varun.gupt 25123
                    String _key69;
25124
                    String _val70;
25125
                    _key69 = iprot.readString();
25126
                    _val70 = iprot.readString();
25127
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 25128
                  }
25129
                  iprot.readMapEnd();
25130
                }
25131
              } else { 
25132
                TProtocolUtil.skip(iprot, field.type);
25133
              }
25134
              break;
25135
          }
25136
          iprot.readFieldEnd();
25137
        }
25138
      }
25139
      iprot.readStructEnd();
25140
      validate();
25141
    }
25142
 
25143
    public void write(TProtocol oprot) throws TException {
25144
      validate();
25145
 
25146
      oprot.writeStructBegin(STRUCT_DESC);
25147
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
25148
      oprot.writeI64(this.providerId);
25149
      oprot.writeFieldEnd();
25150
      if (this.undeliveredOrders != null) {
25151
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
25152
        {
25153
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 25154
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 25155
          {
1382 varun.gupt 25156
            oprot.writeString(_iter71.getKey());
25157
            oprot.writeString(_iter71.getValue());
1245 chandransh 25158
          }
25159
          oprot.writeMapEnd();
25160
        }
25161
        oprot.writeFieldEnd();
25162
      }
25163
      oprot.writeFieldStop();
25164
      oprot.writeStructEnd();
25165
    }
25166
 
25167
    @Override
25168
    public String toString() {
25169
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
25170
      boolean first = true;
25171
 
25172
      sb.append("providerId:");
25173
      sb.append(this.providerId);
25174
      first = false;
25175
      if (!first) sb.append(", ");
25176
      sb.append("undeliveredOrders:");
25177
      if (this.undeliveredOrders == null) {
25178
        sb.append("null");
25179
      } else {
25180
        sb.append(this.undeliveredOrders);
25181
      }
25182
      first = false;
25183
      sb.append(")");
25184
      return sb.toString();
25185
    }
25186
 
25187
    public void validate() throws TException {
25188
      // check for required fields
25189
    }
25190
 
25191
  }
25192
 
25193
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
25194
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
25195
 
25196
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
25197
 
25198
    private TransactionServiceException ex;
25199
 
25200
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25201
    public enum _Fields implements TFieldIdEnum {
25202
      EX((short)1, "ex");
25203
 
25204
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25205
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25206
 
25207
      static {
25208
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25209
          byId.put((int)field._thriftId, field);
25210
          byName.put(field.getFieldName(), field);
25211
        }
25212
      }
25213
 
25214
      /**
25215
       * Find the _Fields constant that matches fieldId, or null if its not found.
25216
       */
25217
      public static _Fields findByThriftId(int fieldId) {
25218
        return byId.get(fieldId);
25219
      }
25220
 
25221
      /**
25222
       * Find the _Fields constant that matches fieldId, throwing an exception
25223
       * if it is not found.
25224
       */
25225
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25226
        _Fields fields = findByThriftId(fieldId);
25227
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25228
        return fields;
25229
      }
25230
 
25231
      /**
25232
       * Find the _Fields constant that matches name, or null if its not found.
25233
       */
25234
      public static _Fields findByName(String name) {
25235
        return byName.get(name);
25236
      }
25237
 
25238
      private final short _thriftId;
25239
      private final String _fieldName;
25240
 
25241
      _Fields(short thriftId, String fieldName) {
25242
        _thriftId = thriftId;
25243
        _fieldName = fieldName;
25244
      }
25245
 
25246
      public short getThriftFieldId() {
25247
        return _thriftId;
25248
      }
25249
 
25250
      public String getFieldName() {
25251
        return _fieldName;
25252
      }
25253
    }
25254
 
25255
    // isset id assignments
25256
 
25257
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25258
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
25259
          new FieldValueMetaData(TType.STRUCT)));
25260
    }});
25261
 
25262
    static {
25263
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
25264
    }
25265
 
25266
    public updateNonDeliveryReason_result() {
25267
    }
25268
 
25269
    public updateNonDeliveryReason_result(
25270
      TransactionServiceException ex)
25271
    {
25272
      this();
25273
      this.ex = ex;
25274
    }
25275
 
25276
    /**
25277
     * Performs a deep copy on <i>other</i>.
25278
     */
25279
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
25280
      if (other.isSetEx()) {
25281
        this.ex = new TransactionServiceException(other.ex);
25282
      }
25283
    }
25284
 
25285
    public updateNonDeliveryReason_result deepCopy() {
25286
      return new updateNonDeliveryReason_result(this);
25287
    }
25288
 
25289
    @Deprecated
25290
    public updateNonDeliveryReason_result clone() {
25291
      return new updateNonDeliveryReason_result(this);
25292
    }
25293
 
25294
    public TransactionServiceException getEx() {
25295
      return this.ex;
25296
    }
25297
 
25298
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
25299
      this.ex = ex;
25300
      return this;
25301
    }
25302
 
25303
    public void unsetEx() {
25304
      this.ex = null;
25305
    }
25306
 
25307
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
25308
    public boolean isSetEx() {
25309
      return this.ex != null;
25310
    }
25311
 
25312
    public void setExIsSet(boolean value) {
25313
      if (!value) {
25314
        this.ex = null;
25315
      }
25316
    }
25317
 
25318
    public void setFieldValue(_Fields field, Object value) {
25319
      switch (field) {
25320
      case EX:
25321
        if (value == null) {
25322
          unsetEx();
25323
        } else {
25324
          setEx((TransactionServiceException)value);
25325
        }
25326
        break;
25327
 
25328
      }
25329
    }
25330
 
25331
    public void setFieldValue(int fieldID, Object value) {
25332
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25333
    }
25334
 
25335
    public Object getFieldValue(_Fields field) {
25336
      switch (field) {
25337
      case EX:
25338
        return getEx();
25339
 
25340
      }
25341
      throw new IllegalStateException();
25342
    }
25343
 
25344
    public Object getFieldValue(int fieldId) {
25345
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25346
    }
25347
 
25348
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25349
    public boolean isSet(_Fields field) {
25350
      switch (field) {
25351
      case EX:
25352
        return isSetEx();
25353
      }
25354
      throw new IllegalStateException();
25355
    }
25356
 
25357
    public boolean isSet(int fieldID) {
25358
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25359
    }
25360
 
25361
    @Override
25362
    public boolean equals(Object that) {
25363
      if (that == null)
25364
        return false;
25365
      if (that instanceof updateNonDeliveryReason_result)
25366
        return this.equals((updateNonDeliveryReason_result)that);
25367
      return false;
25368
    }
25369
 
25370
    public boolean equals(updateNonDeliveryReason_result that) {
25371
      if (that == null)
25372
        return false;
25373
 
25374
      boolean this_present_ex = true && this.isSetEx();
25375
      boolean that_present_ex = true && that.isSetEx();
25376
      if (this_present_ex || that_present_ex) {
25377
        if (!(this_present_ex && that_present_ex))
25378
          return false;
25379
        if (!this.ex.equals(that.ex))
25380
          return false;
25381
      }
25382
 
25383
      return true;
25384
    }
25385
 
25386
    @Override
25387
    public int hashCode() {
25388
      return 0;
25389
    }
25390
 
25391
    public int compareTo(updateNonDeliveryReason_result other) {
25392
      if (!getClass().equals(other.getClass())) {
25393
        return getClass().getName().compareTo(other.getClass().getName());
25394
      }
25395
 
25396
      int lastComparison = 0;
25397
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
25398
 
25399
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
25400
      if (lastComparison != 0) {
25401
        return lastComparison;
25402
      }
25403
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
25404
      if (lastComparison != 0) {
25405
        return lastComparison;
25406
      }
25407
      return 0;
25408
    }
25409
 
25410
    public void read(TProtocol iprot) throws TException {
25411
      TField field;
25412
      iprot.readStructBegin();
25413
      while (true)
25414
      {
25415
        field = iprot.readFieldBegin();
25416
        if (field.type == TType.STOP) { 
25417
          break;
25418
        }
25419
        _Fields fieldId = _Fields.findByThriftId(field.id);
25420
        if (fieldId == null) {
25421
          TProtocolUtil.skip(iprot, field.type);
25422
        } else {
25423
          switch (fieldId) {
25424
            case EX:
25425
              if (field.type == TType.STRUCT) {
25426
                this.ex = new TransactionServiceException();
25427
                this.ex.read(iprot);
25428
              } else { 
25429
                TProtocolUtil.skip(iprot, field.type);
25430
              }
25431
              break;
25432
          }
25433
          iprot.readFieldEnd();
25434
        }
25435
      }
25436
      iprot.readStructEnd();
25437
      validate();
25438
    }
25439
 
25440
    public void write(TProtocol oprot) throws TException {
25441
      oprot.writeStructBegin(STRUCT_DESC);
25442
 
25443
      if (this.isSetEx()) {
25444
        oprot.writeFieldBegin(EX_FIELD_DESC);
25445
        this.ex.write(oprot);
25446
        oprot.writeFieldEnd();
25447
      }
25448
      oprot.writeFieldStop();
25449
      oprot.writeStructEnd();
25450
    }
25451
 
25452
    @Override
25453
    public String toString() {
25454
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
25455
      boolean first = true;
25456
 
25457
      sb.append("ex:");
25458
      if (this.ex == null) {
25459
        sb.append("null");
25460
      } else {
25461
        sb.append(this.ex);
25462
      }
25463
      first = false;
25464
      sb.append(")");
25465
      return sb.toString();
25466
    }
25467
 
25468
    public void validate() throws TException {
25469
      // check for required fields
25470
    }
25471
 
25472
  }
25473
 
1406 ankur.sing 25474
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
25475
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
25476
 
25477
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
25478
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
25479
 
25480
    private long providerId;
25481
    private long warehouseId;
25482
 
25483
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25484
    public enum _Fields implements TFieldIdEnum {
25485
      PROVIDER_ID((short)1, "providerId"),
25486
      WAREHOUSE_ID((short)2, "warehouseId");
25487
 
25488
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25489
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25490
 
25491
      static {
25492
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25493
          byId.put((int)field._thriftId, field);
25494
          byName.put(field.getFieldName(), field);
25495
        }
25496
      }
25497
 
25498
      /**
25499
       * Find the _Fields constant that matches fieldId, or null if its not found.
25500
       */
25501
      public static _Fields findByThriftId(int fieldId) {
25502
        return byId.get(fieldId);
25503
      }
25504
 
25505
      /**
25506
       * Find the _Fields constant that matches fieldId, throwing an exception
25507
       * if it is not found.
25508
       */
25509
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25510
        _Fields fields = findByThriftId(fieldId);
25511
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25512
        return fields;
25513
      }
25514
 
25515
      /**
25516
       * Find the _Fields constant that matches name, or null if its not found.
25517
       */
25518
      public static _Fields findByName(String name) {
25519
        return byName.get(name);
25520
      }
25521
 
25522
      private final short _thriftId;
25523
      private final String _fieldName;
25524
 
25525
      _Fields(short thriftId, String fieldName) {
25526
        _thriftId = thriftId;
25527
        _fieldName = fieldName;
25528
      }
25529
 
25530
      public short getThriftFieldId() {
25531
        return _thriftId;
25532
      }
25533
 
25534
      public String getFieldName() {
25535
        return _fieldName;
25536
      }
25537
    }
25538
 
25539
    // isset id assignments
25540
    private static final int __PROVIDERID_ISSET_ID = 0;
25541
    private static final int __WAREHOUSEID_ISSET_ID = 1;
25542
    private BitSet __isset_bit_vector = new BitSet(2);
25543
 
25544
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25545
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
25546
          new FieldValueMetaData(TType.I64)));
25547
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
25548
          new FieldValueMetaData(TType.I64)));
25549
    }});
25550
 
25551
    static {
25552
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
25553
    }
25554
 
25555
    public getUndeliveredOrders_args() {
25556
    }
25557
 
25558
    public getUndeliveredOrders_args(
25559
      long providerId,
25560
      long warehouseId)
25561
    {
25562
      this();
25563
      this.providerId = providerId;
25564
      setProviderIdIsSet(true);
25565
      this.warehouseId = warehouseId;
25566
      setWarehouseIdIsSet(true);
25567
    }
25568
 
25569
    /**
25570
     * Performs a deep copy on <i>other</i>.
25571
     */
25572
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
25573
      __isset_bit_vector.clear();
25574
      __isset_bit_vector.or(other.__isset_bit_vector);
25575
      this.providerId = other.providerId;
25576
      this.warehouseId = other.warehouseId;
25577
    }
25578
 
25579
    public getUndeliveredOrders_args deepCopy() {
25580
      return new getUndeliveredOrders_args(this);
25581
    }
25582
 
25583
    @Deprecated
25584
    public getUndeliveredOrders_args clone() {
25585
      return new getUndeliveredOrders_args(this);
25586
    }
25587
 
25588
    public long getProviderId() {
25589
      return this.providerId;
25590
    }
25591
 
25592
    public getUndeliveredOrders_args setProviderId(long providerId) {
25593
      this.providerId = providerId;
25594
      setProviderIdIsSet(true);
25595
      return this;
25596
    }
25597
 
25598
    public void unsetProviderId() {
25599
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
25600
    }
25601
 
25602
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
25603
    public boolean isSetProviderId() {
25604
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
25605
    }
25606
 
25607
    public void setProviderIdIsSet(boolean value) {
25608
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
25609
    }
25610
 
25611
    public long getWarehouseId() {
25612
      return this.warehouseId;
25613
    }
25614
 
25615
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
25616
      this.warehouseId = warehouseId;
25617
      setWarehouseIdIsSet(true);
25618
      return this;
25619
    }
25620
 
25621
    public void unsetWarehouseId() {
25622
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
25623
    }
25624
 
25625
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
25626
    public boolean isSetWarehouseId() {
25627
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
25628
    }
25629
 
25630
    public void setWarehouseIdIsSet(boolean value) {
25631
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
25632
    }
25633
 
25634
    public void setFieldValue(_Fields field, Object value) {
25635
      switch (field) {
25636
      case PROVIDER_ID:
25637
        if (value == null) {
25638
          unsetProviderId();
25639
        } else {
25640
          setProviderId((Long)value);
25641
        }
25642
        break;
25643
 
25644
      case WAREHOUSE_ID:
25645
        if (value == null) {
25646
          unsetWarehouseId();
25647
        } else {
25648
          setWarehouseId((Long)value);
25649
        }
25650
        break;
25651
 
25652
      }
25653
    }
25654
 
25655
    public void setFieldValue(int fieldID, Object value) {
25656
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25657
    }
25658
 
25659
    public Object getFieldValue(_Fields field) {
25660
      switch (field) {
25661
      case PROVIDER_ID:
25662
        return new Long(getProviderId());
25663
 
25664
      case WAREHOUSE_ID:
25665
        return new Long(getWarehouseId());
25666
 
25667
      }
25668
      throw new IllegalStateException();
25669
    }
25670
 
25671
    public Object getFieldValue(int fieldId) {
25672
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25673
    }
25674
 
25675
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25676
    public boolean isSet(_Fields field) {
25677
      switch (field) {
25678
      case PROVIDER_ID:
25679
        return isSetProviderId();
25680
      case WAREHOUSE_ID:
25681
        return isSetWarehouseId();
25682
      }
25683
      throw new IllegalStateException();
25684
    }
25685
 
25686
    public boolean isSet(int fieldID) {
25687
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25688
    }
25689
 
25690
    @Override
25691
    public boolean equals(Object that) {
25692
      if (that == null)
25693
        return false;
25694
      if (that instanceof getUndeliveredOrders_args)
25695
        return this.equals((getUndeliveredOrders_args)that);
25696
      return false;
25697
    }
25698
 
25699
    public boolean equals(getUndeliveredOrders_args that) {
25700
      if (that == null)
25701
        return false;
25702
 
25703
      boolean this_present_providerId = true;
25704
      boolean that_present_providerId = true;
25705
      if (this_present_providerId || that_present_providerId) {
25706
        if (!(this_present_providerId && that_present_providerId))
25707
          return false;
25708
        if (this.providerId != that.providerId)
25709
          return false;
25710
      }
25711
 
25712
      boolean this_present_warehouseId = true;
25713
      boolean that_present_warehouseId = true;
25714
      if (this_present_warehouseId || that_present_warehouseId) {
25715
        if (!(this_present_warehouseId && that_present_warehouseId))
25716
          return false;
25717
        if (this.warehouseId != that.warehouseId)
25718
          return false;
25719
      }
25720
 
25721
      return true;
25722
    }
25723
 
25724
    @Override
25725
    public int hashCode() {
25726
      return 0;
25727
    }
25728
 
25729
    public int compareTo(getUndeliveredOrders_args other) {
25730
      if (!getClass().equals(other.getClass())) {
25731
        return getClass().getName().compareTo(other.getClass().getName());
25732
      }
25733
 
25734
      int lastComparison = 0;
25735
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
25736
 
25737
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
25738
      if (lastComparison != 0) {
25739
        return lastComparison;
25740
      }
25741
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
25742
      if (lastComparison != 0) {
25743
        return lastComparison;
25744
      }
25745
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
25746
      if (lastComparison != 0) {
25747
        return lastComparison;
25748
      }
25749
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
25750
      if (lastComparison != 0) {
25751
        return lastComparison;
25752
      }
25753
      return 0;
25754
    }
25755
 
25756
    public void read(TProtocol iprot) throws TException {
25757
      TField field;
25758
      iprot.readStructBegin();
25759
      while (true)
25760
      {
25761
        field = iprot.readFieldBegin();
25762
        if (field.type == TType.STOP) { 
25763
          break;
25764
        }
25765
        _Fields fieldId = _Fields.findByThriftId(field.id);
25766
        if (fieldId == null) {
25767
          TProtocolUtil.skip(iprot, field.type);
25768
        } else {
25769
          switch (fieldId) {
25770
            case PROVIDER_ID:
25771
              if (field.type == TType.I64) {
25772
                this.providerId = iprot.readI64();
25773
                setProviderIdIsSet(true);
25774
              } else { 
25775
                TProtocolUtil.skip(iprot, field.type);
25776
              }
25777
              break;
25778
            case WAREHOUSE_ID:
25779
              if (field.type == TType.I64) {
25780
                this.warehouseId = iprot.readI64();
25781
                setWarehouseIdIsSet(true);
25782
              } else { 
25783
                TProtocolUtil.skip(iprot, field.type);
25784
              }
25785
              break;
25786
          }
25787
          iprot.readFieldEnd();
25788
        }
25789
      }
25790
      iprot.readStructEnd();
25791
      validate();
25792
    }
25793
 
25794
    public void write(TProtocol oprot) throws TException {
25795
      validate();
25796
 
25797
      oprot.writeStructBegin(STRUCT_DESC);
25798
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
25799
      oprot.writeI64(this.providerId);
25800
      oprot.writeFieldEnd();
25801
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
25802
      oprot.writeI64(this.warehouseId);
25803
      oprot.writeFieldEnd();
25804
      oprot.writeFieldStop();
25805
      oprot.writeStructEnd();
25806
    }
25807
 
25808
    @Override
25809
    public String toString() {
25810
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
25811
      boolean first = true;
25812
 
25813
      sb.append("providerId:");
25814
      sb.append(this.providerId);
25815
      first = false;
25816
      if (!first) sb.append(", ");
25817
      sb.append("warehouseId:");
25818
      sb.append(this.warehouseId);
25819
      first = false;
25820
      sb.append(")");
25821
      return sb.toString();
25822
    }
25823
 
25824
    public void validate() throws TException {
25825
      // check for required fields
25826
    }
25827
 
25828
  }
25829
 
25830
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
25831
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
25832
 
25833
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25834
 
25835
    private List<Order> success;
25836
 
25837
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25838
    public enum _Fields implements TFieldIdEnum {
25839
      SUCCESS((short)0, "success");
25840
 
25841
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25842
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25843
 
25844
      static {
25845
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25846
          byId.put((int)field._thriftId, field);
25847
          byName.put(field.getFieldName(), field);
25848
        }
25849
      }
25850
 
25851
      /**
25852
       * Find the _Fields constant that matches fieldId, or null if its not found.
25853
       */
25854
      public static _Fields findByThriftId(int fieldId) {
25855
        return byId.get(fieldId);
25856
      }
25857
 
25858
      /**
25859
       * Find the _Fields constant that matches fieldId, throwing an exception
25860
       * if it is not found.
25861
       */
25862
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25863
        _Fields fields = findByThriftId(fieldId);
25864
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25865
        return fields;
25866
      }
25867
 
25868
      /**
25869
       * Find the _Fields constant that matches name, or null if its not found.
25870
       */
25871
      public static _Fields findByName(String name) {
25872
        return byName.get(name);
25873
      }
25874
 
25875
      private final short _thriftId;
25876
      private final String _fieldName;
25877
 
25878
      _Fields(short thriftId, String fieldName) {
25879
        _thriftId = thriftId;
25880
        _fieldName = fieldName;
25881
      }
25882
 
25883
      public short getThriftFieldId() {
25884
        return _thriftId;
25885
      }
25886
 
25887
      public String getFieldName() {
25888
        return _fieldName;
25889
      }
25890
    }
25891
 
25892
    // isset id assignments
25893
 
25894
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25895
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25896
          new ListMetaData(TType.LIST, 
25897
              new StructMetaData(TType.STRUCT, Order.class))));
25898
    }});
25899
 
25900
    static {
25901
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
25902
    }
25903
 
25904
    public getUndeliveredOrders_result() {
25905
    }
25906
 
25907
    public getUndeliveredOrders_result(
25908
      List<Order> success)
25909
    {
25910
      this();
25911
      this.success = success;
25912
    }
25913
 
25914
    /**
25915
     * Performs a deep copy on <i>other</i>.
25916
     */
25917
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
25918
      if (other.isSetSuccess()) {
25919
        List<Order> __this__success = new ArrayList<Order>();
25920
        for (Order other_element : other.success) {
25921
          __this__success.add(new Order(other_element));
25922
        }
25923
        this.success = __this__success;
25924
      }
25925
    }
25926
 
25927
    public getUndeliveredOrders_result deepCopy() {
25928
      return new getUndeliveredOrders_result(this);
25929
    }
25930
 
25931
    @Deprecated
25932
    public getUndeliveredOrders_result clone() {
25933
      return new getUndeliveredOrders_result(this);
25934
    }
25935
 
25936
    public int getSuccessSize() {
25937
      return (this.success == null) ? 0 : this.success.size();
25938
    }
25939
 
25940
    public java.util.Iterator<Order> getSuccessIterator() {
25941
      return (this.success == null) ? null : this.success.iterator();
25942
    }
25943
 
25944
    public void addToSuccess(Order elem) {
25945
      if (this.success == null) {
25946
        this.success = new ArrayList<Order>();
25947
      }
25948
      this.success.add(elem);
25949
    }
25950
 
25951
    public List<Order> getSuccess() {
25952
      return this.success;
25953
    }
25954
 
25955
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
25956
      this.success = success;
25957
      return this;
25958
    }
25959
 
25960
    public void unsetSuccess() {
25961
      this.success = null;
25962
    }
25963
 
25964
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25965
    public boolean isSetSuccess() {
25966
      return this.success != null;
25967
    }
25968
 
25969
    public void setSuccessIsSet(boolean value) {
25970
      if (!value) {
25971
        this.success = null;
25972
      }
25973
    }
25974
 
25975
    public void setFieldValue(_Fields field, Object value) {
25976
      switch (field) {
25977
      case SUCCESS:
25978
        if (value == null) {
25979
          unsetSuccess();
25980
        } else {
25981
          setSuccess((List<Order>)value);
25982
        }
25983
        break;
25984
 
25985
      }
25986
    }
25987
 
25988
    public void setFieldValue(int fieldID, Object value) {
25989
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25990
    }
25991
 
25992
    public Object getFieldValue(_Fields field) {
25993
      switch (field) {
25994
      case SUCCESS:
25995
        return getSuccess();
25996
 
25997
      }
25998
      throw new IllegalStateException();
25999
    }
26000
 
26001
    public Object getFieldValue(int fieldId) {
26002
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26003
    }
26004
 
26005
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26006
    public boolean isSet(_Fields field) {
26007
      switch (field) {
26008
      case SUCCESS:
26009
        return isSetSuccess();
26010
      }
26011
      throw new IllegalStateException();
26012
    }
26013
 
26014
    public boolean isSet(int fieldID) {
26015
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26016
    }
26017
 
26018
    @Override
26019
    public boolean equals(Object that) {
26020
      if (that == null)
26021
        return false;
26022
      if (that instanceof getUndeliveredOrders_result)
26023
        return this.equals((getUndeliveredOrders_result)that);
26024
      return false;
26025
    }
26026
 
26027
    public boolean equals(getUndeliveredOrders_result that) {
26028
      if (that == null)
26029
        return false;
26030
 
26031
      boolean this_present_success = true && this.isSetSuccess();
26032
      boolean that_present_success = true && that.isSetSuccess();
26033
      if (this_present_success || that_present_success) {
26034
        if (!(this_present_success && that_present_success))
26035
          return false;
26036
        if (!this.success.equals(that.success))
26037
          return false;
26038
      }
26039
 
26040
      return true;
26041
    }
26042
 
26043
    @Override
26044
    public int hashCode() {
26045
      return 0;
26046
    }
26047
 
26048
    public int compareTo(getUndeliveredOrders_result other) {
26049
      if (!getClass().equals(other.getClass())) {
26050
        return getClass().getName().compareTo(other.getClass().getName());
26051
      }
26052
 
26053
      int lastComparison = 0;
26054
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
26055
 
26056
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26057
      if (lastComparison != 0) {
26058
        return lastComparison;
26059
      }
26060
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26061
      if (lastComparison != 0) {
26062
        return lastComparison;
26063
      }
26064
      return 0;
26065
    }
26066
 
26067
    public void read(TProtocol iprot) throws TException {
26068
      TField field;
26069
      iprot.readStructBegin();
26070
      while (true)
26071
      {
26072
        field = iprot.readFieldBegin();
26073
        if (field.type == TType.STOP) { 
26074
          break;
26075
        }
26076
        _Fields fieldId = _Fields.findByThriftId(field.id);
26077
        if (fieldId == null) {
26078
          TProtocolUtil.skip(iprot, field.type);
26079
        } else {
26080
          switch (fieldId) {
26081
            case SUCCESS:
26082
              if (field.type == TType.LIST) {
26083
                {
26084
                  TList _list72 = iprot.readListBegin();
26085
                  this.success = new ArrayList<Order>(_list72.size);
26086
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
26087
                  {
26088
                    Order _elem74;
26089
                    _elem74 = new Order();
26090
                    _elem74.read(iprot);
26091
                    this.success.add(_elem74);
26092
                  }
26093
                  iprot.readListEnd();
26094
                }
26095
              } else { 
26096
                TProtocolUtil.skip(iprot, field.type);
26097
              }
26098
              break;
26099
          }
26100
          iprot.readFieldEnd();
26101
        }
26102
      }
26103
      iprot.readStructEnd();
26104
      validate();
26105
    }
26106
 
26107
    public void write(TProtocol oprot) throws TException {
26108
      oprot.writeStructBegin(STRUCT_DESC);
26109
 
26110
      if (this.isSetSuccess()) {
26111
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26112
        {
26113
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
26114
          for (Order _iter75 : this.success)
26115
          {
26116
            _iter75.write(oprot);
26117
          }
26118
          oprot.writeListEnd();
26119
        }
26120
        oprot.writeFieldEnd();
26121
      }
26122
      oprot.writeFieldStop();
26123
      oprot.writeStructEnd();
26124
    }
26125
 
26126
    @Override
26127
    public String toString() {
26128
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
26129
      boolean first = true;
26130
 
26131
      sb.append("success:");
26132
      if (this.success == null) {
26133
        sb.append("null");
26134
      } else {
26135
        sb.append(this.success);
26136
      }
26137
      first = false;
26138
      sb.append(")");
26139
      return sb.toString();
26140
    }
26141
 
26142
    public void validate() throws TException {
26143
      // check for required fields
26144
    }
26145
 
26146
  }
26147
 
305 ashish 26148
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
26149
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
26150
 
483 rajveer 26151
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 26152
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
26153
 
483 rajveer 26154
    private long orderId;
305 ashish 26155
    private boolean valid;
26156
 
26157
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26158
    public enum _Fields implements TFieldIdEnum {
483 rajveer 26159
      ORDER_ID((short)1, "orderId"),
305 ashish 26160
      VALID((short)2, "valid");
26161
 
26162
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26163
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26164
 
26165
      static {
26166
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26167
          byId.put((int)field._thriftId, field);
26168
          byName.put(field.getFieldName(), field);
26169
        }
26170
      }
26171
 
26172
      /**
26173
       * Find the _Fields constant that matches fieldId, or null if its not found.
26174
       */
26175
      public static _Fields findByThriftId(int fieldId) {
26176
        return byId.get(fieldId);
26177
      }
26178
 
26179
      /**
26180
       * Find the _Fields constant that matches fieldId, throwing an exception
26181
       * if it is not found.
26182
       */
26183
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26184
        _Fields fields = findByThriftId(fieldId);
26185
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26186
        return fields;
26187
      }
26188
 
26189
      /**
26190
       * Find the _Fields constant that matches name, or null if its not found.
26191
       */
26192
      public static _Fields findByName(String name) {
26193
        return byName.get(name);
26194
      }
26195
 
26196
      private final short _thriftId;
26197
      private final String _fieldName;
26198
 
26199
      _Fields(short thriftId, String fieldName) {
26200
        _thriftId = thriftId;
26201
        _fieldName = fieldName;
26202
      }
26203
 
26204
      public short getThriftFieldId() {
26205
        return _thriftId;
26206
      }
26207
 
26208
      public String getFieldName() {
26209
        return _fieldName;
26210
      }
26211
    }
26212
 
26213
    // isset id assignments
483 rajveer 26214
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 26215
    private static final int __VALID_ISSET_ID = 1;
26216
    private BitSet __isset_bit_vector = new BitSet(2);
26217
 
26218
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 26219
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 26220
          new FieldValueMetaData(TType.I64)));
26221
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
26222
          new FieldValueMetaData(TType.BOOL)));
26223
    }});
26224
 
26225
    static {
26226
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
26227
    }
26228
 
26229
    public getAlerts_args() {
26230
    }
26231
 
26232
    public getAlerts_args(
483 rajveer 26233
      long orderId,
305 ashish 26234
      boolean valid)
26235
    {
26236
      this();
483 rajveer 26237
      this.orderId = orderId;
26238
      setOrderIdIsSet(true);
305 ashish 26239
      this.valid = valid;
26240
      setValidIsSet(true);
26241
    }
26242
 
26243
    /**
26244
     * Performs a deep copy on <i>other</i>.
26245
     */
26246
    public getAlerts_args(getAlerts_args other) {
26247
      __isset_bit_vector.clear();
26248
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 26249
      this.orderId = other.orderId;
305 ashish 26250
      this.valid = other.valid;
26251
    }
26252
 
26253
    public getAlerts_args deepCopy() {
26254
      return new getAlerts_args(this);
26255
    }
26256
 
26257
    @Deprecated
26258
    public getAlerts_args clone() {
26259
      return new getAlerts_args(this);
26260
    }
26261
 
483 rajveer 26262
    public long getOrderId() {
26263
      return this.orderId;
305 ashish 26264
    }
26265
 
483 rajveer 26266
    public getAlerts_args setOrderId(long orderId) {
26267
      this.orderId = orderId;
26268
      setOrderIdIsSet(true);
305 ashish 26269
      return this;
26270
    }
26271
 
483 rajveer 26272
    public void unsetOrderId() {
26273
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 26274
    }
26275
 
483 rajveer 26276
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
26277
    public boolean isSetOrderId() {
26278
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 26279
    }
26280
 
483 rajveer 26281
    public void setOrderIdIsSet(boolean value) {
26282
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 26283
    }
26284
 
26285
    public boolean isValid() {
26286
      return this.valid;
26287
    }
26288
 
26289
    public getAlerts_args setValid(boolean valid) {
26290
      this.valid = valid;
26291
      setValidIsSet(true);
26292
      return this;
26293
    }
26294
 
26295
    public void unsetValid() {
26296
      __isset_bit_vector.clear(__VALID_ISSET_ID);
26297
    }
26298
 
26299
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
26300
    public boolean isSetValid() {
26301
      return __isset_bit_vector.get(__VALID_ISSET_ID);
26302
    }
26303
 
26304
    public void setValidIsSet(boolean value) {
26305
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
26306
    }
26307
 
26308
    public void setFieldValue(_Fields field, Object value) {
26309
      switch (field) {
483 rajveer 26310
      case ORDER_ID:
305 ashish 26311
        if (value == null) {
483 rajveer 26312
          unsetOrderId();
305 ashish 26313
        } else {
483 rajveer 26314
          setOrderId((Long)value);
305 ashish 26315
        }
26316
        break;
26317
 
26318
      case VALID:
26319
        if (value == null) {
26320
          unsetValid();
26321
        } else {
26322
          setValid((Boolean)value);
26323
        }
26324
        break;
26325
 
26326
      }
26327
    }
26328
 
26329
    public void setFieldValue(int fieldID, Object value) {
26330
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26331
    }
26332
 
26333
    public Object getFieldValue(_Fields field) {
26334
      switch (field) {
483 rajveer 26335
      case ORDER_ID:
26336
        return new Long(getOrderId());
305 ashish 26337
 
26338
      case VALID:
26339
        return new Boolean(isValid());
26340
 
26341
      }
26342
      throw new IllegalStateException();
26343
    }
26344
 
26345
    public Object getFieldValue(int fieldId) {
26346
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26347
    }
26348
 
26349
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26350
    public boolean isSet(_Fields field) {
26351
      switch (field) {
483 rajveer 26352
      case ORDER_ID:
26353
        return isSetOrderId();
305 ashish 26354
      case VALID:
26355
        return isSetValid();
26356
      }
26357
      throw new IllegalStateException();
26358
    }
26359
 
26360
    public boolean isSet(int fieldID) {
26361
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26362
    }
26363
 
26364
    @Override
26365
    public boolean equals(Object that) {
26366
      if (that == null)
26367
        return false;
26368
      if (that instanceof getAlerts_args)
26369
        return this.equals((getAlerts_args)that);
26370
      return false;
26371
    }
26372
 
26373
    public boolean equals(getAlerts_args that) {
26374
      if (that == null)
26375
        return false;
26376
 
483 rajveer 26377
      boolean this_present_orderId = true;
26378
      boolean that_present_orderId = true;
26379
      if (this_present_orderId || that_present_orderId) {
26380
        if (!(this_present_orderId && that_present_orderId))
305 ashish 26381
          return false;
483 rajveer 26382
        if (this.orderId != that.orderId)
305 ashish 26383
          return false;
26384
      }
26385
 
26386
      boolean this_present_valid = true;
26387
      boolean that_present_valid = true;
26388
      if (this_present_valid || that_present_valid) {
26389
        if (!(this_present_valid && that_present_valid))
26390
          return false;
26391
        if (this.valid != that.valid)
26392
          return false;
26393
      }
26394
 
26395
      return true;
26396
    }
26397
 
26398
    @Override
26399
    public int hashCode() {
26400
      return 0;
26401
    }
26402
 
26403
    public int compareTo(getAlerts_args other) {
26404
      if (!getClass().equals(other.getClass())) {
26405
        return getClass().getName().compareTo(other.getClass().getName());
26406
      }
26407
 
26408
      int lastComparison = 0;
26409
      getAlerts_args typedOther = (getAlerts_args)other;
26410
 
483 rajveer 26411
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 26412
      if (lastComparison != 0) {
26413
        return lastComparison;
26414
      }
483 rajveer 26415
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 26416
      if (lastComparison != 0) {
26417
        return lastComparison;
26418
      }
26419
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
26420
      if (lastComparison != 0) {
26421
        return lastComparison;
26422
      }
26423
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
26424
      if (lastComparison != 0) {
26425
        return lastComparison;
26426
      }
26427
      return 0;
26428
    }
26429
 
26430
    public void read(TProtocol iprot) throws TException {
26431
      TField field;
26432
      iprot.readStructBegin();
26433
      while (true)
26434
      {
26435
        field = iprot.readFieldBegin();
26436
        if (field.type == TType.STOP) { 
26437
          break;
26438
        }
26439
        _Fields fieldId = _Fields.findByThriftId(field.id);
26440
        if (fieldId == null) {
26441
          TProtocolUtil.skip(iprot, field.type);
26442
        } else {
26443
          switch (fieldId) {
483 rajveer 26444
            case ORDER_ID:
305 ashish 26445
              if (field.type == TType.I64) {
483 rajveer 26446
                this.orderId = iprot.readI64();
26447
                setOrderIdIsSet(true);
305 ashish 26448
              } else { 
26449
                TProtocolUtil.skip(iprot, field.type);
26450
              }
26451
              break;
26452
            case VALID:
26453
              if (field.type == TType.BOOL) {
26454
                this.valid = iprot.readBool();
26455
                setValidIsSet(true);
26456
              } else { 
26457
                TProtocolUtil.skip(iprot, field.type);
26458
              }
26459
              break;
26460
          }
26461
          iprot.readFieldEnd();
26462
        }
26463
      }
26464
      iprot.readStructEnd();
26465
      validate();
26466
    }
26467
 
26468
    public void write(TProtocol oprot) throws TException {
26469
      validate();
26470
 
26471
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 26472
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
26473
      oprot.writeI64(this.orderId);
305 ashish 26474
      oprot.writeFieldEnd();
26475
      oprot.writeFieldBegin(VALID_FIELD_DESC);
26476
      oprot.writeBool(this.valid);
26477
      oprot.writeFieldEnd();
26478
      oprot.writeFieldStop();
26479
      oprot.writeStructEnd();
26480
    }
26481
 
26482
    @Override
26483
    public String toString() {
26484
      StringBuilder sb = new StringBuilder("getAlerts_args(");
26485
      boolean first = true;
26486
 
483 rajveer 26487
      sb.append("orderId:");
26488
      sb.append(this.orderId);
305 ashish 26489
      first = false;
26490
      if (!first) sb.append(", ");
26491
      sb.append("valid:");
26492
      sb.append(this.valid);
26493
      first = false;
26494
      sb.append(")");
26495
      return sb.toString();
26496
    }
26497
 
26498
    public void validate() throws TException {
26499
      // check for required fields
26500
    }
26501
 
26502
  }
26503
 
26504
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
26505
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
26506
 
26507
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
26508
 
26509
    private List<Alert> success;
26510
 
26511
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26512
    public enum _Fields implements TFieldIdEnum {
26513
      SUCCESS((short)0, "success");
26514
 
26515
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26516
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26517
 
26518
      static {
26519
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26520
          byId.put((int)field._thriftId, field);
26521
          byName.put(field.getFieldName(), field);
26522
        }
26523
      }
26524
 
26525
      /**
26526
       * Find the _Fields constant that matches fieldId, or null if its not found.
26527
       */
26528
      public static _Fields findByThriftId(int fieldId) {
26529
        return byId.get(fieldId);
26530
      }
26531
 
26532
      /**
26533
       * Find the _Fields constant that matches fieldId, throwing an exception
26534
       * if it is not found.
26535
       */
26536
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26537
        _Fields fields = findByThriftId(fieldId);
26538
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26539
        return fields;
26540
      }
26541
 
26542
      /**
26543
       * Find the _Fields constant that matches name, or null if its not found.
26544
       */
26545
      public static _Fields findByName(String name) {
26546
        return byName.get(name);
26547
      }
26548
 
26549
      private final short _thriftId;
26550
      private final String _fieldName;
26551
 
26552
      _Fields(short thriftId, String fieldName) {
26553
        _thriftId = thriftId;
26554
        _fieldName = fieldName;
26555
      }
26556
 
26557
      public short getThriftFieldId() {
26558
        return _thriftId;
26559
      }
26560
 
26561
      public String getFieldName() {
26562
        return _fieldName;
26563
      }
26564
    }
26565
 
26566
    // isset id assignments
26567
 
26568
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26569
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26570
          new ListMetaData(TType.LIST, 
26571
              new StructMetaData(TType.STRUCT, Alert.class))));
26572
    }});
26573
 
26574
    static {
26575
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
26576
    }
26577
 
26578
    public getAlerts_result() {
26579
    }
26580
 
26581
    public getAlerts_result(
26582
      List<Alert> success)
26583
    {
26584
      this();
26585
      this.success = success;
26586
    }
26587
 
26588
    /**
26589
     * Performs a deep copy on <i>other</i>.
26590
     */
26591
    public getAlerts_result(getAlerts_result other) {
26592
      if (other.isSetSuccess()) {
26593
        List<Alert> __this__success = new ArrayList<Alert>();
26594
        for (Alert other_element : other.success) {
26595
          __this__success.add(new Alert(other_element));
26596
        }
26597
        this.success = __this__success;
26598
      }
26599
    }
26600
 
26601
    public getAlerts_result deepCopy() {
26602
      return new getAlerts_result(this);
26603
    }
26604
 
26605
    @Deprecated
26606
    public getAlerts_result clone() {
26607
      return new getAlerts_result(this);
26608
    }
26609
 
26610
    public int getSuccessSize() {
26611
      return (this.success == null) ? 0 : this.success.size();
26612
    }
26613
 
26614
    public java.util.Iterator<Alert> getSuccessIterator() {
26615
      return (this.success == null) ? null : this.success.iterator();
26616
    }
26617
 
26618
    public void addToSuccess(Alert elem) {
26619
      if (this.success == null) {
26620
        this.success = new ArrayList<Alert>();
26621
      }
26622
      this.success.add(elem);
26623
    }
26624
 
26625
    public List<Alert> getSuccess() {
26626
      return this.success;
26627
    }
26628
 
26629
    public getAlerts_result setSuccess(List<Alert> success) {
26630
      this.success = success;
26631
      return this;
26632
    }
26633
 
26634
    public void unsetSuccess() {
26635
      this.success = null;
26636
    }
26637
 
26638
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26639
    public boolean isSetSuccess() {
26640
      return this.success != null;
26641
    }
26642
 
26643
    public void setSuccessIsSet(boolean value) {
26644
      if (!value) {
26645
        this.success = null;
26646
      }
26647
    }
26648
 
26649
    public void setFieldValue(_Fields field, Object value) {
26650
      switch (field) {
26651
      case SUCCESS:
26652
        if (value == null) {
26653
          unsetSuccess();
26654
        } else {
26655
          setSuccess((List<Alert>)value);
26656
        }
26657
        break;
26658
 
26659
      }
26660
    }
26661
 
26662
    public void setFieldValue(int fieldID, Object value) {
26663
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26664
    }
26665
 
26666
    public Object getFieldValue(_Fields field) {
26667
      switch (field) {
26668
      case SUCCESS:
26669
        return getSuccess();
26670
 
26671
      }
26672
      throw new IllegalStateException();
26673
    }
26674
 
26675
    public Object getFieldValue(int fieldId) {
26676
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26677
    }
26678
 
26679
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26680
    public boolean isSet(_Fields field) {
26681
      switch (field) {
26682
      case SUCCESS:
26683
        return isSetSuccess();
26684
      }
26685
      throw new IllegalStateException();
26686
    }
26687
 
26688
    public boolean isSet(int fieldID) {
26689
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26690
    }
26691
 
26692
    @Override
26693
    public boolean equals(Object that) {
26694
      if (that == null)
26695
        return false;
26696
      if (that instanceof getAlerts_result)
26697
        return this.equals((getAlerts_result)that);
26698
      return false;
26699
    }
26700
 
26701
    public boolean equals(getAlerts_result that) {
26702
      if (that == null)
26703
        return false;
26704
 
26705
      boolean this_present_success = true && this.isSetSuccess();
26706
      boolean that_present_success = true && that.isSetSuccess();
26707
      if (this_present_success || that_present_success) {
26708
        if (!(this_present_success && that_present_success))
26709
          return false;
26710
        if (!this.success.equals(that.success))
26711
          return false;
26712
      }
26713
 
26714
      return true;
26715
    }
26716
 
26717
    @Override
26718
    public int hashCode() {
26719
      return 0;
26720
    }
26721
 
26722
    public int compareTo(getAlerts_result other) {
26723
      if (!getClass().equals(other.getClass())) {
26724
        return getClass().getName().compareTo(other.getClass().getName());
26725
      }
26726
 
26727
      int lastComparison = 0;
26728
      getAlerts_result typedOther = (getAlerts_result)other;
26729
 
26730
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26731
      if (lastComparison != 0) {
26732
        return lastComparison;
26733
      }
26734
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26735
      if (lastComparison != 0) {
26736
        return lastComparison;
26737
      }
26738
      return 0;
26739
    }
26740
 
26741
    public void read(TProtocol iprot) throws TException {
26742
      TField field;
26743
      iprot.readStructBegin();
26744
      while (true)
26745
      {
26746
        field = iprot.readFieldBegin();
26747
        if (field.type == TType.STOP) { 
26748
          break;
26749
        }
26750
        _Fields fieldId = _Fields.findByThriftId(field.id);
26751
        if (fieldId == null) {
26752
          TProtocolUtil.skip(iprot, field.type);
26753
        } else {
26754
          switch (fieldId) {
26755
            case SUCCESS:
26756
              if (field.type == TType.LIST) {
26757
                {
1406 ankur.sing 26758
                  TList _list76 = iprot.readListBegin();
26759
                  this.success = new ArrayList<Alert>(_list76.size);
26760
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 26761
                  {
1406 ankur.sing 26762
                    Alert _elem78;
26763
                    _elem78 = new Alert();
26764
                    _elem78.read(iprot);
26765
                    this.success.add(_elem78);
305 ashish 26766
                  }
26767
                  iprot.readListEnd();
26768
                }
26769
              } else { 
26770
                TProtocolUtil.skip(iprot, field.type);
26771
              }
26772
              break;
26773
          }
26774
          iprot.readFieldEnd();
26775
        }
26776
      }
26777
      iprot.readStructEnd();
26778
      validate();
26779
    }
26780
 
26781
    public void write(TProtocol oprot) throws TException {
26782
      oprot.writeStructBegin(STRUCT_DESC);
26783
 
26784
      if (this.isSetSuccess()) {
26785
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26786
        {
26787
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 26788
          for (Alert _iter79 : this.success)
305 ashish 26789
          {
1406 ankur.sing 26790
            _iter79.write(oprot);
305 ashish 26791
          }
26792
          oprot.writeListEnd();
26793
        }
26794
        oprot.writeFieldEnd();
26795
      }
26796
      oprot.writeFieldStop();
26797
      oprot.writeStructEnd();
26798
    }
26799
 
26800
    @Override
26801
    public String toString() {
26802
      StringBuilder sb = new StringBuilder("getAlerts_result(");
26803
      boolean first = true;
26804
 
26805
      sb.append("success:");
26806
      if (this.success == null) {
26807
        sb.append("null");
26808
      } else {
26809
        sb.append(this.success);
26810
      }
26811
      first = false;
26812
      sb.append(")");
26813
      return sb.toString();
26814
    }
26815
 
26816
    public void validate() throws TException {
26817
      // check for required fields
26818
    }
26819
 
26820
  }
26821
 
26822
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
26823
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
26824
 
483 rajveer 26825
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 26826
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
26827
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
26828
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
26829
 
483 rajveer 26830
    private long orderId;
305 ashish 26831
    private boolean unset;
26832
    private long type;
26833
    private String comment;
26834
 
26835
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26836
    public enum _Fields implements TFieldIdEnum {
483 rajveer 26837
      ORDER_ID((short)1, "orderId"),
305 ashish 26838
      UNSET((short)2, "unset"),
26839
      TYPE((short)3, "type"),
26840
      COMMENT((short)4, "comment");
26841
 
26842
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26844
 
26845
      static {
26846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26847
          byId.put((int)field._thriftId, field);
26848
          byName.put(field.getFieldName(), field);
26849
        }
26850
      }
26851
 
26852
      /**
26853
       * Find the _Fields constant that matches fieldId, or null if its not found.
26854
       */
26855
      public static _Fields findByThriftId(int fieldId) {
26856
        return byId.get(fieldId);
26857
      }
26858
 
26859
      /**
26860
       * Find the _Fields constant that matches fieldId, throwing an exception
26861
       * if it is not found.
26862
       */
26863
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26864
        _Fields fields = findByThriftId(fieldId);
26865
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26866
        return fields;
26867
      }
26868
 
26869
      /**
26870
       * Find the _Fields constant that matches name, or null if its not found.
26871
       */
26872
      public static _Fields findByName(String name) {
26873
        return byName.get(name);
26874
      }
26875
 
26876
      private final short _thriftId;
26877
      private final String _fieldName;
26878
 
26879
      _Fields(short thriftId, String fieldName) {
26880
        _thriftId = thriftId;
26881
        _fieldName = fieldName;
26882
      }
26883
 
26884
      public short getThriftFieldId() {
26885
        return _thriftId;
26886
      }
26887
 
26888
      public String getFieldName() {
26889
        return _fieldName;
26890
      }
26891
    }
26892
 
26893
    // isset id assignments
483 rajveer 26894
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 26895
    private static final int __UNSET_ISSET_ID = 1;
26896
    private static final int __TYPE_ISSET_ID = 2;
26897
    private BitSet __isset_bit_vector = new BitSet(3);
26898
 
26899
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 26900
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 26901
          new FieldValueMetaData(TType.I64)));
26902
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
26903
          new FieldValueMetaData(TType.BOOL)));
26904
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
26905
          new FieldValueMetaData(TType.I64)));
26906
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
26907
          new FieldValueMetaData(TType.STRING)));
26908
    }});
26909
 
26910
    static {
26911
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
26912
    }
26913
 
26914
    public setAlert_args() {
26915
    }
26916
 
26917
    public setAlert_args(
483 rajveer 26918
      long orderId,
305 ashish 26919
      boolean unset,
26920
      long type,
26921
      String comment)
26922
    {
26923
      this();
483 rajveer 26924
      this.orderId = orderId;
26925
      setOrderIdIsSet(true);
305 ashish 26926
      this.unset = unset;
26927
      setUnsetIsSet(true);
26928
      this.type = type;
26929
      setTypeIsSet(true);
26930
      this.comment = comment;
26931
    }
26932
 
26933
    /**
26934
     * Performs a deep copy on <i>other</i>.
26935
     */
26936
    public setAlert_args(setAlert_args other) {
26937
      __isset_bit_vector.clear();
26938
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 26939
      this.orderId = other.orderId;
305 ashish 26940
      this.unset = other.unset;
26941
      this.type = other.type;
26942
      if (other.isSetComment()) {
26943
        this.comment = other.comment;
26944
      }
26945
    }
26946
 
26947
    public setAlert_args deepCopy() {
26948
      return new setAlert_args(this);
26949
    }
26950
 
26951
    @Deprecated
26952
    public setAlert_args clone() {
26953
      return new setAlert_args(this);
26954
    }
26955
 
483 rajveer 26956
    public long getOrderId() {
26957
      return this.orderId;
305 ashish 26958
    }
26959
 
483 rajveer 26960
    public setAlert_args setOrderId(long orderId) {
26961
      this.orderId = orderId;
26962
      setOrderIdIsSet(true);
305 ashish 26963
      return this;
26964
    }
26965
 
483 rajveer 26966
    public void unsetOrderId() {
26967
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 26968
    }
26969
 
483 rajveer 26970
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
26971
    public boolean isSetOrderId() {
26972
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 26973
    }
26974
 
483 rajveer 26975
    public void setOrderIdIsSet(boolean value) {
26976
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 26977
    }
26978
 
26979
    public boolean isUnset() {
26980
      return this.unset;
26981
    }
26982
 
26983
    public setAlert_args setUnset(boolean unset) {
26984
      this.unset = unset;
26985
      setUnsetIsSet(true);
26986
      return this;
26987
    }
26988
 
26989
    public void unsetUnset() {
26990
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
26991
    }
26992
 
26993
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
26994
    public boolean isSetUnset() {
26995
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
26996
    }
26997
 
26998
    public void setUnsetIsSet(boolean value) {
26999
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
27000
    }
27001
 
27002
    public long getType() {
27003
      return this.type;
27004
    }
27005
 
27006
    public setAlert_args setType(long type) {
27007
      this.type = type;
27008
      setTypeIsSet(true);
27009
      return this;
27010
    }
27011
 
27012
    public void unsetType() {
27013
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
27014
    }
27015
 
27016
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
27017
    public boolean isSetType() {
27018
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
27019
    }
27020
 
27021
    public void setTypeIsSet(boolean value) {
27022
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
27023
    }
27024
 
27025
    public String getComment() {
27026
      return this.comment;
27027
    }
27028
 
27029
    public setAlert_args setComment(String comment) {
27030
      this.comment = comment;
27031
      return this;
27032
    }
27033
 
27034
    public void unsetComment() {
27035
      this.comment = null;
27036
    }
27037
 
27038
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
27039
    public boolean isSetComment() {
27040
      return this.comment != null;
27041
    }
27042
 
27043
    public void setCommentIsSet(boolean value) {
27044
      if (!value) {
27045
        this.comment = null;
27046
      }
27047
    }
27048
 
27049
    public void setFieldValue(_Fields field, Object value) {
27050
      switch (field) {
483 rajveer 27051
      case ORDER_ID:
305 ashish 27052
        if (value == null) {
483 rajveer 27053
          unsetOrderId();
305 ashish 27054
        } else {
483 rajveer 27055
          setOrderId((Long)value);
305 ashish 27056
        }
27057
        break;
27058
 
27059
      case UNSET:
27060
        if (value == null) {
27061
          unsetUnset();
27062
        } else {
27063
          setUnset((Boolean)value);
27064
        }
27065
        break;
27066
 
27067
      case TYPE:
27068
        if (value == null) {
27069
          unsetType();
27070
        } else {
27071
          setType((Long)value);
27072
        }
27073
        break;
27074
 
27075
      case COMMENT:
27076
        if (value == null) {
27077
          unsetComment();
27078
        } else {
27079
          setComment((String)value);
27080
        }
27081
        break;
27082
 
27083
      }
27084
    }
27085
 
27086
    public void setFieldValue(int fieldID, Object value) {
27087
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27088
    }
27089
 
27090
    public Object getFieldValue(_Fields field) {
27091
      switch (field) {
483 rajveer 27092
      case ORDER_ID:
27093
        return new Long(getOrderId());
305 ashish 27094
 
27095
      case UNSET:
27096
        return new Boolean(isUnset());
27097
 
27098
      case TYPE:
27099
        return new Long(getType());
27100
 
27101
      case COMMENT:
27102
        return getComment();
27103
 
27104
      }
27105
      throw new IllegalStateException();
27106
    }
27107
 
27108
    public Object getFieldValue(int fieldId) {
27109
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27110
    }
27111
 
27112
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27113
    public boolean isSet(_Fields field) {
27114
      switch (field) {
483 rajveer 27115
      case ORDER_ID:
27116
        return isSetOrderId();
305 ashish 27117
      case UNSET:
27118
        return isSetUnset();
27119
      case TYPE:
27120
        return isSetType();
27121
      case COMMENT:
27122
        return isSetComment();
27123
      }
27124
      throw new IllegalStateException();
27125
    }
27126
 
27127
    public boolean isSet(int fieldID) {
27128
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27129
    }
27130
 
27131
    @Override
27132
    public boolean equals(Object that) {
27133
      if (that == null)
27134
        return false;
27135
      if (that instanceof setAlert_args)
27136
        return this.equals((setAlert_args)that);
27137
      return false;
27138
    }
27139
 
27140
    public boolean equals(setAlert_args that) {
27141
      if (that == null)
27142
        return false;
27143
 
483 rajveer 27144
      boolean this_present_orderId = true;
27145
      boolean that_present_orderId = true;
27146
      if (this_present_orderId || that_present_orderId) {
27147
        if (!(this_present_orderId && that_present_orderId))
305 ashish 27148
          return false;
483 rajveer 27149
        if (this.orderId != that.orderId)
305 ashish 27150
          return false;
27151
      }
27152
 
27153
      boolean this_present_unset = true;
27154
      boolean that_present_unset = true;
27155
      if (this_present_unset || that_present_unset) {
27156
        if (!(this_present_unset && that_present_unset))
27157
          return false;
27158
        if (this.unset != that.unset)
27159
          return false;
27160
      }
27161
 
27162
      boolean this_present_type = true;
27163
      boolean that_present_type = true;
27164
      if (this_present_type || that_present_type) {
27165
        if (!(this_present_type && that_present_type))
27166
          return false;
27167
        if (this.type != that.type)
27168
          return false;
27169
      }
27170
 
27171
      boolean this_present_comment = true && this.isSetComment();
27172
      boolean that_present_comment = true && that.isSetComment();
27173
      if (this_present_comment || that_present_comment) {
27174
        if (!(this_present_comment && that_present_comment))
27175
          return false;
27176
        if (!this.comment.equals(that.comment))
27177
          return false;
27178
      }
27179
 
27180
      return true;
27181
    }
27182
 
27183
    @Override
27184
    public int hashCode() {
27185
      return 0;
27186
    }
27187
 
27188
    public int compareTo(setAlert_args other) {
27189
      if (!getClass().equals(other.getClass())) {
27190
        return getClass().getName().compareTo(other.getClass().getName());
27191
      }
27192
 
27193
      int lastComparison = 0;
27194
      setAlert_args typedOther = (setAlert_args)other;
27195
 
483 rajveer 27196
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 27197
      if (lastComparison != 0) {
27198
        return lastComparison;
27199
      }
483 rajveer 27200
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 27201
      if (lastComparison != 0) {
27202
        return lastComparison;
27203
      }
27204
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
27205
      if (lastComparison != 0) {
27206
        return lastComparison;
27207
      }
27208
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
27209
      if (lastComparison != 0) {
27210
        return lastComparison;
27211
      }
27212
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
27213
      if (lastComparison != 0) {
27214
        return lastComparison;
27215
      }
27216
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
27217
      if (lastComparison != 0) {
27218
        return lastComparison;
27219
      }
27220
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
27221
      if (lastComparison != 0) {
27222
        return lastComparison;
27223
      }
27224
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
27225
      if (lastComparison != 0) {
27226
        return lastComparison;
27227
      }
27228
      return 0;
27229
    }
27230
 
27231
    public void read(TProtocol iprot) throws TException {
27232
      TField field;
27233
      iprot.readStructBegin();
27234
      while (true)
27235
      {
27236
        field = iprot.readFieldBegin();
27237
        if (field.type == TType.STOP) { 
27238
          break;
27239
        }
27240
        _Fields fieldId = _Fields.findByThriftId(field.id);
27241
        if (fieldId == null) {
27242
          TProtocolUtil.skip(iprot, field.type);
27243
        } else {
27244
          switch (fieldId) {
483 rajveer 27245
            case ORDER_ID:
305 ashish 27246
              if (field.type == TType.I64) {
483 rajveer 27247
                this.orderId = iprot.readI64();
27248
                setOrderIdIsSet(true);
305 ashish 27249
              } else { 
27250
                TProtocolUtil.skip(iprot, field.type);
27251
              }
27252
              break;
27253
            case UNSET:
27254
              if (field.type == TType.BOOL) {
27255
                this.unset = iprot.readBool();
27256
                setUnsetIsSet(true);
27257
              } else { 
27258
                TProtocolUtil.skip(iprot, field.type);
27259
              }
27260
              break;
27261
            case TYPE:
27262
              if (field.type == TType.I64) {
27263
                this.type = iprot.readI64();
27264
                setTypeIsSet(true);
27265
              } else { 
27266
                TProtocolUtil.skip(iprot, field.type);
27267
              }
27268
              break;
27269
            case COMMENT:
27270
              if (field.type == TType.STRING) {
27271
                this.comment = iprot.readString();
27272
              } else { 
27273
                TProtocolUtil.skip(iprot, field.type);
27274
              }
27275
              break;
27276
          }
27277
          iprot.readFieldEnd();
27278
        }
27279
      }
27280
      iprot.readStructEnd();
27281
      validate();
27282
    }
27283
 
27284
    public void write(TProtocol oprot) throws TException {
27285
      validate();
27286
 
27287
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 27288
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
27289
      oprot.writeI64(this.orderId);
305 ashish 27290
      oprot.writeFieldEnd();
27291
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
27292
      oprot.writeBool(this.unset);
27293
      oprot.writeFieldEnd();
27294
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
27295
      oprot.writeI64(this.type);
27296
      oprot.writeFieldEnd();
27297
      if (this.comment != null) {
27298
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
27299
        oprot.writeString(this.comment);
27300
        oprot.writeFieldEnd();
27301
      }
27302
      oprot.writeFieldStop();
27303
      oprot.writeStructEnd();
27304
    }
27305
 
27306
    @Override
27307
    public String toString() {
27308
      StringBuilder sb = new StringBuilder("setAlert_args(");
27309
      boolean first = true;
27310
 
483 rajveer 27311
      sb.append("orderId:");
27312
      sb.append(this.orderId);
305 ashish 27313
      first = false;
27314
      if (!first) sb.append(", ");
27315
      sb.append("unset:");
27316
      sb.append(this.unset);
27317
      first = false;
27318
      if (!first) sb.append(", ");
27319
      sb.append("type:");
27320
      sb.append(this.type);
27321
      first = false;
27322
      if (!first) sb.append(", ");
27323
      sb.append("comment:");
27324
      if (this.comment == null) {
27325
        sb.append("null");
27326
      } else {
27327
        sb.append(this.comment);
27328
      }
27329
      first = false;
27330
      sb.append(")");
27331
      return sb.toString();
27332
    }
27333
 
27334
    public void validate() throws TException {
27335
      // check for required fields
27336
    }
27337
 
27338
  }
27339
 
27340
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
27341
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
27342
 
27343
 
27344
 
27345
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27346
    public enum _Fields implements TFieldIdEnum {
27347
;
27348
 
27349
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27350
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27351
 
27352
      static {
27353
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27354
          byId.put((int)field._thriftId, field);
27355
          byName.put(field.getFieldName(), field);
27356
        }
27357
      }
27358
 
27359
      /**
27360
       * Find the _Fields constant that matches fieldId, or null if its not found.
27361
       */
27362
      public static _Fields findByThriftId(int fieldId) {
27363
        return byId.get(fieldId);
27364
      }
27365
 
27366
      /**
27367
       * Find the _Fields constant that matches fieldId, throwing an exception
27368
       * if it is not found.
27369
       */
27370
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27371
        _Fields fields = findByThriftId(fieldId);
27372
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27373
        return fields;
27374
      }
27375
 
27376
      /**
27377
       * Find the _Fields constant that matches name, or null if its not found.
27378
       */
27379
      public static _Fields findByName(String name) {
27380
        return byName.get(name);
27381
      }
27382
 
27383
      private final short _thriftId;
27384
      private final String _fieldName;
27385
 
27386
      _Fields(short thriftId, String fieldName) {
27387
        _thriftId = thriftId;
27388
        _fieldName = fieldName;
27389
      }
27390
 
27391
      public short getThriftFieldId() {
27392
        return _thriftId;
27393
      }
27394
 
27395
      public String getFieldName() {
27396
        return _fieldName;
27397
      }
27398
    }
27399
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27400
    }});
27401
 
27402
    static {
27403
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
27404
    }
27405
 
27406
    public setAlert_result() {
27407
    }
27408
 
27409
    /**
27410
     * Performs a deep copy on <i>other</i>.
27411
     */
27412
    public setAlert_result(setAlert_result other) {
27413
    }
27414
 
27415
    public setAlert_result deepCopy() {
27416
      return new setAlert_result(this);
27417
    }
27418
 
27419
    @Deprecated
27420
    public setAlert_result clone() {
27421
      return new setAlert_result(this);
27422
    }
27423
 
27424
    public void setFieldValue(_Fields field, Object value) {
27425
      switch (field) {
27426
      }
27427
    }
27428
 
27429
    public void setFieldValue(int fieldID, Object value) {
27430
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27431
    }
27432
 
27433
    public Object getFieldValue(_Fields field) {
27434
      switch (field) {
27435
      }
27436
      throw new IllegalStateException();
27437
    }
27438
 
27439
    public Object getFieldValue(int fieldId) {
27440
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27441
    }
27442
 
27443
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27444
    public boolean isSet(_Fields field) {
27445
      switch (field) {
27446
      }
27447
      throw new IllegalStateException();
27448
    }
27449
 
27450
    public boolean isSet(int fieldID) {
27451
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27452
    }
27453
 
27454
    @Override
27455
    public boolean equals(Object that) {
27456
      if (that == null)
27457
        return false;
27458
      if (that instanceof setAlert_result)
27459
        return this.equals((setAlert_result)that);
27460
      return false;
27461
    }
27462
 
27463
    public boolean equals(setAlert_result that) {
27464
      if (that == null)
27465
        return false;
27466
 
27467
      return true;
27468
    }
27469
 
27470
    @Override
27471
    public int hashCode() {
27472
      return 0;
27473
    }
27474
 
27475
    public int compareTo(setAlert_result other) {
27476
      if (!getClass().equals(other.getClass())) {
27477
        return getClass().getName().compareTo(other.getClass().getName());
27478
      }
27479
 
27480
      int lastComparison = 0;
27481
      setAlert_result typedOther = (setAlert_result)other;
27482
 
27483
      return 0;
27484
    }
27485
 
27486
    public void read(TProtocol iprot) throws TException {
27487
      TField field;
27488
      iprot.readStructBegin();
27489
      while (true)
27490
      {
27491
        field = iprot.readFieldBegin();
27492
        if (field.type == TType.STOP) { 
27493
          break;
27494
        }
27495
        _Fields fieldId = _Fields.findByThriftId(field.id);
27496
        if (fieldId == null) {
27497
          TProtocolUtil.skip(iprot, field.type);
27498
        } else {
27499
          switch (fieldId) {
27500
          }
27501
          iprot.readFieldEnd();
27502
        }
27503
      }
27504
      iprot.readStructEnd();
27505
      validate();
27506
    }
27507
 
27508
    public void write(TProtocol oprot) throws TException {
27509
      oprot.writeStructBegin(STRUCT_DESC);
27510
 
27511
      oprot.writeFieldStop();
27512
      oprot.writeStructEnd();
27513
    }
27514
 
27515
    @Override
27516
    public String toString() {
27517
      StringBuilder sb = new StringBuilder("setAlert_result(");
27518
      boolean first = true;
27519
 
27520
      sb.append(")");
27521
      return sb.toString();
27522
    }
27523
 
27524
    public void validate() throws TException {
27525
      // check for required fields
27526
    }
27527
 
27528
  }
27529
 
1598 ankur.sing 27530
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
27531
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
27532
 
27533
 
27534
 
27535
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27536
    public enum _Fields implements TFieldIdEnum {
27537
;
27538
 
27539
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27540
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27541
 
27542
      static {
27543
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27544
          byId.put((int)field._thriftId, field);
27545
          byName.put(field.getFieldName(), field);
27546
        }
27547
      }
27548
 
27549
      /**
27550
       * Find the _Fields constant that matches fieldId, or null if its not found.
27551
       */
27552
      public static _Fields findByThriftId(int fieldId) {
27553
        return byId.get(fieldId);
27554
      }
27555
 
27556
      /**
27557
       * Find the _Fields constant that matches fieldId, throwing an exception
27558
       * if it is not found.
27559
       */
27560
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27561
        _Fields fields = findByThriftId(fieldId);
27562
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27563
        return fields;
27564
      }
27565
 
27566
      /**
27567
       * Find the _Fields constant that matches name, or null if its not found.
27568
       */
27569
      public static _Fields findByName(String name) {
27570
        return byName.get(name);
27571
      }
27572
 
27573
      private final short _thriftId;
27574
      private final String _fieldName;
27575
 
27576
      _Fields(short thriftId, String fieldName) {
27577
        _thriftId = thriftId;
27578
        _fieldName = fieldName;
27579
      }
27580
 
27581
      public short getThriftFieldId() {
27582
        return _thriftId;
27583
      }
27584
 
27585
      public String getFieldName() {
27586
        return _fieldName;
27587
      }
27588
    }
27589
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27590
    }});
27591
 
27592
    static {
27593
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
27594
    }
27595
 
27596
    public getValidOrderCount_args() {
27597
    }
27598
 
27599
    /**
27600
     * Performs a deep copy on <i>other</i>.
27601
     */
27602
    public getValidOrderCount_args(getValidOrderCount_args other) {
27603
    }
27604
 
27605
    public getValidOrderCount_args deepCopy() {
27606
      return new getValidOrderCount_args(this);
27607
    }
27608
 
27609
    @Deprecated
27610
    public getValidOrderCount_args clone() {
27611
      return new getValidOrderCount_args(this);
27612
    }
27613
 
27614
    public void setFieldValue(_Fields field, Object value) {
27615
      switch (field) {
27616
      }
27617
    }
27618
 
27619
    public void setFieldValue(int fieldID, Object value) {
27620
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27621
    }
27622
 
27623
    public Object getFieldValue(_Fields field) {
27624
      switch (field) {
27625
      }
27626
      throw new IllegalStateException();
27627
    }
27628
 
27629
    public Object getFieldValue(int fieldId) {
27630
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27631
    }
27632
 
27633
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27634
    public boolean isSet(_Fields field) {
27635
      switch (field) {
27636
      }
27637
      throw new IllegalStateException();
27638
    }
27639
 
27640
    public boolean isSet(int fieldID) {
27641
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27642
    }
27643
 
27644
    @Override
27645
    public boolean equals(Object that) {
27646
      if (that == null)
27647
        return false;
27648
      if (that instanceof getValidOrderCount_args)
27649
        return this.equals((getValidOrderCount_args)that);
27650
      return false;
27651
    }
27652
 
27653
    public boolean equals(getValidOrderCount_args that) {
27654
      if (that == null)
27655
        return false;
27656
 
27657
      return true;
27658
    }
27659
 
27660
    @Override
27661
    public int hashCode() {
27662
      return 0;
27663
    }
27664
 
27665
    public int compareTo(getValidOrderCount_args other) {
27666
      if (!getClass().equals(other.getClass())) {
27667
        return getClass().getName().compareTo(other.getClass().getName());
27668
      }
27669
 
27670
      int lastComparison = 0;
27671
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
27672
 
27673
      return 0;
27674
    }
27675
 
27676
    public void read(TProtocol iprot) throws TException {
27677
      TField field;
27678
      iprot.readStructBegin();
27679
      while (true)
27680
      {
27681
        field = iprot.readFieldBegin();
27682
        if (field.type == TType.STOP) { 
27683
          break;
27684
        }
27685
        _Fields fieldId = _Fields.findByThriftId(field.id);
27686
        if (fieldId == null) {
27687
          TProtocolUtil.skip(iprot, field.type);
27688
        } else {
27689
          switch (fieldId) {
27690
          }
27691
          iprot.readFieldEnd();
27692
        }
27693
      }
27694
      iprot.readStructEnd();
27695
      validate();
27696
    }
27697
 
27698
    public void write(TProtocol oprot) throws TException {
27699
      validate();
27700
 
27701
      oprot.writeStructBegin(STRUCT_DESC);
27702
      oprot.writeFieldStop();
27703
      oprot.writeStructEnd();
27704
    }
27705
 
27706
    @Override
27707
    public String toString() {
27708
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
27709
      boolean first = true;
27710
 
27711
      sb.append(")");
27712
      return sb.toString();
27713
    }
27714
 
27715
    public void validate() throws TException {
27716
      // check for required fields
27717
    }
27718
 
27719
  }
27720
 
27721
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
27722
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
27723
 
27724
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
27725
 
27726
    private long success;
27727
 
27728
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27729
    public enum _Fields implements TFieldIdEnum {
27730
      SUCCESS((short)0, "success");
27731
 
27732
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27733
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27734
 
27735
      static {
27736
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27737
          byId.put((int)field._thriftId, field);
27738
          byName.put(field.getFieldName(), field);
27739
        }
27740
      }
27741
 
27742
      /**
27743
       * Find the _Fields constant that matches fieldId, or null if its not found.
27744
       */
27745
      public static _Fields findByThriftId(int fieldId) {
27746
        return byId.get(fieldId);
27747
      }
27748
 
27749
      /**
27750
       * Find the _Fields constant that matches fieldId, throwing an exception
27751
       * if it is not found.
27752
       */
27753
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27754
        _Fields fields = findByThriftId(fieldId);
27755
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27756
        return fields;
27757
      }
27758
 
27759
      /**
27760
       * Find the _Fields constant that matches name, or null if its not found.
27761
       */
27762
      public static _Fields findByName(String name) {
27763
        return byName.get(name);
27764
      }
27765
 
27766
      private final short _thriftId;
27767
      private final String _fieldName;
27768
 
27769
      _Fields(short thriftId, String fieldName) {
27770
        _thriftId = thriftId;
27771
        _fieldName = fieldName;
27772
      }
27773
 
27774
      public short getThriftFieldId() {
27775
        return _thriftId;
27776
      }
27777
 
27778
      public String getFieldName() {
27779
        return _fieldName;
27780
      }
27781
    }
27782
 
27783
    // isset id assignments
27784
    private static final int __SUCCESS_ISSET_ID = 0;
27785
    private BitSet __isset_bit_vector = new BitSet(1);
27786
 
27787
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27788
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27789
          new FieldValueMetaData(TType.I64)));
27790
    }});
27791
 
27792
    static {
27793
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
27794
    }
27795
 
27796
    public getValidOrderCount_result() {
27797
    }
27798
 
27799
    public getValidOrderCount_result(
27800
      long success)
27801
    {
27802
      this();
27803
      this.success = success;
27804
      setSuccessIsSet(true);
27805
    }
27806
 
27807
    /**
27808
     * Performs a deep copy on <i>other</i>.
27809
     */
27810
    public getValidOrderCount_result(getValidOrderCount_result other) {
27811
      __isset_bit_vector.clear();
27812
      __isset_bit_vector.or(other.__isset_bit_vector);
27813
      this.success = other.success;
27814
    }
27815
 
27816
    public getValidOrderCount_result deepCopy() {
27817
      return new getValidOrderCount_result(this);
27818
    }
27819
 
27820
    @Deprecated
27821
    public getValidOrderCount_result clone() {
27822
      return new getValidOrderCount_result(this);
27823
    }
27824
 
27825
    public long getSuccess() {
27826
      return this.success;
27827
    }
27828
 
27829
    public getValidOrderCount_result setSuccess(long success) {
27830
      this.success = success;
27831
      setSuccessIsSet(true);
27832
      return this;
27833
    }
27834
 
27835
    public void unsetSuccess() {
27836
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27837
    }
27838
 
27839
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27840
    public boolean isSetSuccess() {
27841
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27842
    }
27843
 
27844
    public void setSuccessIsSet(boolean value) {
27845
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27846
    }
27847
 
27848
    public void setFieldValue(_Fields field, Object value) {
27849
      switch (field) {
27850
      case SUCCESS:
27851
        if (value == null) {
27852
          unsetSuccess();
27853
        } else {
27854
          setSuccess((Long)value);
27855
        }
27856
        break;
27857
 
27858
      }
27859
    }
27860
 
27861
    public void setFieldValue(int fieldID, Object value) {
27862
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27863
    }
27864
 
27865
    public Object getFieldValue(_Fields field) {
27866
      switch (field) {
27867
      case SUCCESS:
27868
        return new Long(getSuccess());
27869
 
27870
      }
27871
      throw new IllegalStateException();
27872
    }
27873
 
27874
    public Object getFieldValue(int fieldId) {
27875
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27876
    }
27877
 
27878
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27879
    public boolean isSet(_Fields field) {
27880
      switch (field) {
27881
      case SUCCESS:
27882
        return isSetSuccess();
27883
      }
27884
      throw new IllegalStateException();
27885
    }
27886
 
27887
    public boolean isSet(int fieldID) {
27888
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27889
    }
27890
 
27891
    @Override
27892
    public boolean equals(Object that) {
27893
      if (that == null)
27894
        return false;
27895
      if (that instanceof getValidOrderCount_result)
27896
        return this.equals((getValidOrderCount_result)that);
27897
      return false;
27898
    }
27899
 
27900
    public boolean equals(getValidOrderCount_result that) {
27901
      if (that == null)
27902
        return false;
27903
 
27904
      boolean this_present_success = true;
27905
      boolean that_present_success = true;
27906
      if (this_present_success || that_present_success) {
27907
        if (!(this_present_success && that_present_success))
27908
          return false;
27909
        if (this.success != that.success)
27910
          return false;
27911
      }
27912
 
27913
      return true;
27914
    }
27915
 
27916
    @Override
27917
    public int hashCode() {
27918
      return 0;
27919
    }
27920
 
27921
    public int compareTo(getValidOrderCount_result other) {
27922
      if (!getClass().equals(other.getClass())) {
27923
        return getClass().getName().compareTo(other.getClass().getName());
27924
      }
27925
 
27926
      int lastComparison = 0;
27927
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
27928
 
27929
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27930
      if (lastComparison != 0) {
27931
        return lastComparison;
27932
      }
27933
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27934
      if (lastComparison != 0) {
27935
        return lastComparison;
27936
      }
27937
      return 0;
27938
    }
27939
 
27940
    public void read(TProtocol iprot) throws TException {
27941
      TField field;
27942
      iprot.readStructBegin();
27943
      while (true)
27944
      {
27945
        field = iprot.readFieldBegin();
27946
        if (field.type == TType.STOP) { 
27947
          break;
27948
        }
27949
        _Fields fieldId = _Fields.findByThriftId(field.id);
27950
        if (fieldId == null) {
27951
          TProtocolUtil.skip(iprot, field.type);
27952
        } else {
27953
          switch (fieldId) {
27954
            case SUCCESS:
27955
              if (field.type == TType.I64) {
27956
                this.success = iprot.readI64();
27957
                setSuccessIsSet(true);
27958
              } else { 
27959
                TProtocolUtil.skip(iprot, field.type);
27960
              }
27961
              break;
27962
          }
27963
          iprot.readFieldEnd();
27964
        }
27965
      }
27966
      iprot.readStructEnd();
27967
      validate();
27968
    }
27969
 
27970
    public void write(TProtocol oprot) throws TException {
27971
      oprot.writeStructBegin(STRUCT_DESC);
27972
 
27973
      if (this.isSetSuccess()) {
27974
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27975
        oprot.writeI64(this.success);
27976
        oprot.writeFieldEnd();
27977
      }
27978
      oprot.writeFieldStop();
27979
      oprot.writeStructEnd();
27980
    }
27981
 
27982
    @Override
27983
    public String toString() {
27984
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
27985
      boolean first = true;
27986
 
27987
      sb.append("success:");
27988
      sb.append(this.success);
27989
      first = false;
27990
      sb.append(")");
27991
      return sb.toString();
27992
    }
27993
 
27994
    public void validate() throws TException {
27995
      // check for required fields
27996
    }
27997
 
27998
  }
27999
 
1629 ankur.sing 28000
  public static class getNoOfCustomersWithSuccessfulTransaction_args implements TBase<getNoOfCustomersWithSuccessfulTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_args>   {
28001
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_args");
28002
 
28003
 
28004
 
28005
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28006
    public enum _Fields implements TFieldIdEnum {
28007
;
28008
 
28009
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28010
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28011
 
28012
      static {
28013
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28014
          byId.put((int)field._thriftId, field);
28015
          byName.put(field.getFieldName(), field);
28016
        }
28017
      }
28018
 
28019
      /**
28020
       * Find the _Fields constant that matches fieldId, or null if its not found.
28021
       */
28022
      public static _Fields findByThriftId(int fieldId) {
28023
        return byId.get(fieldId);
28024
      }
28025
 
28026
      /**
28027
       * Find the _Fields constant that matches fieldId, throwing an exception
28028
       * if it is not found.
28029
       */
28030
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28031
        _Fields fields = findByThriftId(fieldId);
28032
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28033
        return fields;
28034
      }
28035
 
28036
      /**
28037
       * Find the _Fields constant that matches name, or null if its not found.
28038
       */
28039
      public static _Fields findByName(String name) {
28040
        return byName.get(name);
28041
      }
28042
 
28043
      private final short _thriftId;
28044
      private final String _fieldName;
28045
 
28046
      _Fields(short thriftId, String fieldName) {
28047
        _thriftId = thriftId;
28048
        _fieldName = fieldName;
28049
      }
28050
 
28051
      public short getThriftFieldId() {
28052
        return _thriftId;
28053
      }
28054
 
28055
      public String getFieldName() {
28056
        return _fieldName;
28057
      }
28058
    }
28059
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28060
    }});
28061
 
28062
    static {
28063
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_args.class, metaDataMap);
28064
    }
28065
 
28066
    public getNoOfCustomersWithSuccessfulTransaction_args() {
28067
    }
28068
 
28069
    /**
28070
     * Performs a deep copy on <i>other</i>.
28071
     */
28072
    public getNoOfCustomersWithSuccessfulTransaction_args(getNoOfCustomersWithSuccessfulTransaction_args other) {
28073
    }
28074
 
28075
    public getNoOfCustomersWithSuccessfulTransaction_args deepCopy() {
28076
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
28077
    }
28078
 
28079
    @Deprecated
28080
    public getNoOfCustomersWithSuccessfulTransaction_args clone() {
28081
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
28082
    }
28083
 
28084
    public void setFieldValue(_Fields field, Object value) {
28085
      switch (field) {
28086
      }
28087
    }
28088
 
28089
    public void setFieldValue(int fieldID, Object value) {
28090
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28091
    }
28092
 
28093
    public Object getFieldValue(_Fields field) {
28094
      switch (field) {
28095
      }
28096
      throw new IllegalStateException();
28097
    }
28098
 
28099
    public Object getFieldValue(int fieldId) {
28100
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28101
    }
28102
 
28103
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28104
    public boolean isSet(_Fields field) {
28105
      switch (field) {
28106
      }
28107
      throw new IllegalStateException();
28108
    }
28109
 
28110
    public boolean isSet(int fieldID) {
28111
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28112
    }
28113
 
28114
    @Override
28115
    public boolean equals(Object that) {
28116
      if (that == null)
28117
        return false;
28118
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_args)
28119
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_args)that);
28120
      return false;
28121
    }
28122
 
28123
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_args that) {
28124
      if (that == null)
28125
        return false;
28126
 
28127
      return true;
28128
    }
28129
 
28130
    @Override
28131
    public int hashCode() {
28132
      return 0;
28133
    }
28134
 
28135
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_args other) {
28136
      if (!getClass().equals(other.getClass())) {
28137
        return getClass().getName().compareTo(other.getClass().getName());
28138
      }
28139
 
28140
      int lastComparison = 0;
28141
      getNoOfCustomersWithSuccessfulTransaction_args typedOther = (getNoOfCustomersWithSuccessfulTransaction_args)other;
28142
 
28143
      return 0;
28144
    }
28145
 
28146
    public void read(TProtocol iprot) throws TException {
28147
      TField field;
28148
      iprot.readStructBegin();
28149
      while (true)
28150
      {
28151
        field = iprot.readFieldBegin();
28152
        if (field.type == TType.STOP) { 
28153
          break;
28154
        }
28155
        _Fields fieldId = _Fields.findByThriftId(field.id);
28156
        if (fieldId == null) {
28157
          TProtocolUtil.skip(iprot, field.type);
28158
        } else {
28159
          switch (fieldId) {
28160
          }
28161
          iprot.readFieldEnd();
28162
        }
28163
      }
28164
      iprot.readStructEnd();
28165
      validate();
28166
    }
28167
 
28168
    public void write(TProtocol oprot) throws TException {
28169
      validate();
28170
 
28171
      oprot.writeStructBegin(STRUCT_DESC);
28172
      oprot.writeFieldStop();
28173
      oprot.writeStructEnd();
28174
    }
28175
 
28176
    @Override
28177
    public String toString() {
28178
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_args(");
28179
      boolean first = true;
28180
 
28181
      sb.append(")");
28182
      return sb.toString();
28183
    }
28184
 
28185
    public void validate() throws TException {
28186
      // check for required fields
28187
    }
28188
 
28189
  }
28190
 
28191
  public static class getNoOfCustomersWithSuccessfulTransaction_result implements TBase<getNoOfCustomersWithSuccessfulTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_result>   {
28192
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_result");
28193
 
28194
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
28195
 
28196
    private long success;
28197
 
28198
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28199
    public enum _Fields implements TFieldIdEnum {
28200
      SUCCESS((short)0, "success");
28201
 
28202
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28203
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28204
 
28205
      static {
28206
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28207
          byId.put((int)field._thriftId, field);
28208
          byName.put(field.getFieldName(), field);
28209
        }
28210
      }
28211
 
28212
      /**
28213
       * Find the _Fields constant that matches fieldId, or null if its not found.
28214
       */
28215
      public static _Fields findByThriftId(int fieldId) {
28216
        return byId.get(fieldId);
28217
      }
28218
 
28219
      /**
28220
       * Find the _Fields constant that matches fieldId, throwing an exception
28221
       * if it is not found.
28222
       */
28223
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28224
        _Fields fields = findByThriftId(fieldId);
28225
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28226
        return fields;
28227
      }
28228
 
28229
      /**
28230
       * Find the _Fields constant that matches name, or null if its not found.
28231
       */
28232
      public static _Fields findByName(String name) {
28233
        return byName.get(name);
28234
      }
28235
 
28236
      private final short _thriftId;
28237
      private final String _fieldName;
28238
 
28239
      _Fields(short thriftId, String fieldName) {
28240
        _thriftId = thriftId;
28241
        _fieldName = fieldName;
28242
      }
28243
 
28244
      public short getThriftFieldId() {
28245
        return _thriftId;
28246
      }
28247
 
28248
      public String getFieldName() {
28249
        return _fieldName;
28250
      }
28251
    }
28252
 
28253
    // isset id assignments
28254
    private static final int __SUCCESS_ISSET_ID = 0;
28255
    private BitSet __isset_bit_vector = new BitSet(1);
28256
 
28257
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28258
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28259
          new FieldValueMetaData(TType.I64)));
28260
    }});
28261
 
28262
    static {
28263
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_result.class, metaDataMap);
28264
    }
28265
 
28266
    public getNoOfCustomersWithSuccessfulTransaction_result() {
28267
    }
28268
 
28269
    public getNoOfCustomersWithSuccessfulTransaction_result(
28270
      long success)
28271
    {
28272
      this();
28273
      this.success = success;
28274
      setSuccessIsSet(true);
28275
    }
28276
 
28277
    /**
28278
     * Performs a deep copy on <i>other</i>.
28279
     */
28280
    public getNoOfCustomersWithSuccessfulTransaction_result(getNoOfCustomersWithSuccessfulTransaction_result other) {
28281
      __isset_bit_vector.clear();
28282
      __isset_bit_vector.or(other.__isset_bit_vector);
28283
      this.success = other.success;
28284
    }
28285
 
28286
    public getNoOfCustomersWithSuccessfulTransaction_result deepCopy() {
28287
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
28288
    }
28289
 
28290
    @Deprecated
28291
    public getNoOfCustomersWithSuccessfulTransaction_result clone() {
28292
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
28293
    }
28294
 
28295
    public long getSuccess() {
28296
      return this.success;
28297
    }
28298
 
28299
    public getNoOfCustomersWithSuccessfulTransaction_result setSuccess(long success) {
28300
      this.success = success;
28301
      setSuccessIsSet(true);
28302
      return this;
28303
    }
28304
 
28305
    public void unsetSuccess() {
28306
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
28307
    }
28308
 
28309
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28310
    public boolean isSetSuccess() {
28311
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
28312
    }
28313
 
28314
    public void setSuccessIsSet(boolean value) {
28315
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
28316
    }
28317
 
28318
    public void setFieldValue(_Fields field, Object value) {
28319
      switch (field) {
28320
      case SUCCESS:
28321
        if (value == null) {
28322
          unsetSuccess();
28323
        } else {
28324
          setSuccess((Long)value);
28325
        }
28326
        break;
28327
 
28328
      }
28329
    }
28330
 
28331
    public void setFieldValue(int fieldID, Object value) {
28332
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28333
    }
28334
 
28335
    public Object getFieldValue(_Fields field) {
28336
      switch (field) {
28337
      case SUCCESS:
28338
        return new Long(getSuccess());
28339
 
28340
      }
28341
      throw new IllegalStateException();
28342
    }
28343
 
28344
    public Object getFieldValue(int fieldId) {
28345
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28346
    }
28347
 
28348
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28349
    public boolean isSet(_Fields field) {
28350
      switch (field) {
28351
      case SUCCESS:
28352
        return isSetSuccess();
28353
      }
28354
      throw new IllegalStateException();
28355
    }
28356
 
28357
    public boolean isSet(int fieldID) {
28358
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28359
    }
28360
 
28361
    @Override
28362
    public boolean equals(Object that) {
28363
      if (that == null)
28364
        return false;
28365
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_result)
28366
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_result)that);
28367
      return false;
28368
    }
28369
 
28370
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_result that) {
28371
      if (that == null)
28372
        return false;
28373
 
28374
      boolean this_present_success = true;
28375
      boolean that_present_success = true;
28376
      if (this_present_success || that_present_success) {
28377
        if (!(this_present_success && that_present_success))
28378
          return false;
28379
        if (this.success != that.success)
28380
          return false;
28381
      }
28382
 
28383
      return true;
28384
    }
28385
 
28386
    @Override
28387
    public int hashCode() {
28388
      return 0;
28389
    }
28390
 
28391
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_result other) {
28392
      if (!getClass().equals(other.getClass())) {
28393
        return getClass().getName().compareTo(other.getClass().getName());
28394
      }
28395
 
28396
      int lastComparison = 0;
28397
      getNoOfCustomersWithSuccessfulTransaction_result typedOther = (getNoOfCustomersWithSuccessfulTransaction_result)other;
28398
 
28399
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28400
      if (lastComparison != 0) {
28401
        return lastComparison;
28402
      }
28403
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28404
      if (lastComparison != 0) {
28405
        return lastComparison;
28406
      }
28407
      return 0;
28408
    }
28409
 
28410
    public void read(TProtocol iprot) throws TException {
28411
      TField field;
28412
      iprot.readStructBegin();
28413
      while (true)
28414
      {
28415
        field = iprot.readFieldBegin();
28416
        if (field.type == TType.STOP) { 
28417
          break;
28418
        }
28419
        _Fields fieldId = _Fields.findByThriftId(field.id);
28420
        if (fieldId == null) {
28421
          TProtocolUtil.skip(iprot, field.type);
28422
        } else {
28423
          switch (fieldId) {
28424
            case SUCCESS:
28425
              if (field.type == TType.I64) {
28426
                this.success = iprot.readI64();
28427
                setSuccessIsSet(true);
28428
              } else { 
28429
                TProtocolUtil.skip(iprot, field.type);
28430
              }
28431
              break;
28432
          }
28433
          iprot.readFieldEnd();
28434
        }
28435
      }
28436
      iprot.readStructEnd();
28437
      validate();
28438
    }
28439
 
28440
    public void write(TProtocol oprot) throws TException {
28441
      oprot.writeStructBegin(STRUCT_DESC);
28442
 
28443
      if (this.isSetSuccess()) {
28444
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28445
        oprot.writeI64(this.success);
28446
        oprot.writeFieldEnd();
28447
      }
28448
      oprot.writeFieldStop();
28449
      oprot.writeStructEnd();
28450
    }
28451
 
28452
    @Override
28453
    public String toString() {
28454
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_result(");
28455
      boolean first = true;
28456
 
28457
      sb.append("success:");
28458
      sb.append(this.success);
28459
      first = false;
28460
      sb.append(")");
28461
      return sb.toString();
28462
    }
28463
 
28464
    public void validate() throws TException {
28465
      // check for required fields
28466
    }
28467
 
28468
  }
28469
 
1731 ankur.sing 28470
  public static class getValidOrdersAmountRange_args implements TBase<getValidOrdersAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_args>   {
28471
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_args");
1629 ankur.sing 28472
 
28473
 
28474
 
28475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28476
    public enum _Fields implements TFieldIdEnum {
28477
;
28478
 
28479
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28480
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28481
 
28482
      static {
28483
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28484
          byId.put((int)field._thriftId, field);
28485
          byName.put(field.getFieldName(), field);
28486
        }
28487
      }
28488
 
28489
      /**
28490
       * Find the _Fields constant that matches fieldId, or null if its not found.
28491
       */
28492
      public static _Fields findByThriftId(int fieldId) {
28493
        return byId.get(fieldId);
28494
      }
28495
 
28496
      /**
28497
       * Find the _Fields constant that matches fieldId, throwing an exception
28498
       * if it is not found.
28499
       */
28500
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28501
        _Fields fields = findByThriftId(fieldId);
28502
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28503
        return fields;
28504
      }
28505
 
28506
      /**
28507
       * Find the _Fields constant that matches name, or null if its not found.
28508
       */
28509
      public static _Fields findByName(String name) {
28510
        return byName.get(name);
28511
      }
28512
 
28513
      private final short _thriftId;
28514
      private final String _fieldName;
28515
 
28516
      _Fields(short thriftId, String fieldName) {
28517
        _thriftId = thriftId;
28518
        _fieldName = fieldName;
28519
      }
28520
 
28521
      public short getThriftFieldId() {
28522
        return _thriftId;
28523
      }
28524
 
28525
      public String getFieldName() {
28526
        return _fieldName;
28527
      }
28528
    }
28529
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28530
    }});
28531
 
28532
    static {
1731 ankur.sing 28533
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_args.class, metaDataMap);
1629 ankur.sing 28534
    }
28535
 
1731 ankur.sing 28536
    public getValidOrdersAmountRange_args() {
1629 ankur.sing 28537
    }
28538
 
28539
    /**
28540
     * Performs a deep copy on <i>other</i>.
28541
     */
1731 ankur.sing 28542
    public getValidOrdersAmountRange_args(getValidOrdersAmountRange_args other) {
1629 ankur.sing 28543
    }
28544
 
1731 ankur.sing 28545
    public getValidOrdersAmountRange_args deepCopy() {
28546
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 28547
    }
28548
 
28549
    @Deprecated
1731 ankur.sing 28550
    public getValidOrdersAmountRange_args clone() {
28551
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 28552
    }
28553
 
28554
    public void setFieldValue(_Fields field, Object value) {
28555
      switch (field) {
28556
      }
28557
    }
28558
 
28559
    public void setFieldValue(int fieldID, Object value) {
28560
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28561
    }
28562
 
28563
    public Object getFieldValue(_Fields field) {
28564
      switch (field) {
28565
      }
28566
      throw new IllegalStateException();
28567
    }
28568
 
28569
    public Object getFieldValue(int fieldId) {
28570
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28571
    }
28572
 
28573
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28574
    public boolean isSet(_Fields field) {
28575
      switch (field) {
28576
      }
28577
      throw new IllegalStateException();
28578
    }
28579
 
28580
    public boolean isSet(int fieldID) {
28581
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28582
    }
28583
 
28584
    @Override
28585
    public boolean equals(Object that) {
28586
      if (that == null)
28587
        return false;
1731 ankur.sing 28588
      if (that instanceof getValidOrdersAmountRange_args)
28589
        return this.equals((getValidOrdersAmountRange_args)that);
1629 ankur.sing 28590
      return false;
28591
    }
28592
 
1731 ankur.sing 28593
    public boolean equals(getValidOrdersAmountRange_args that) {
1629 ankur.sing 28594
      if (that == null)
28595
        return false;
28596
 
28597
      return true;
28598
    }
28599
 
28600
    @Override
28601
    public int hashCode() {
28602
      return 0;
28603
    }
28604
 
1731 ankur.sing 28605
    public int compareTo(getValidOrdersAmountRange_args other) {
1629 ankur.sing 28606
      if (!getClass().equals(other.getClass())) {
28607
        return getClass().getName().compareTo(other.getClass().getName());
28608
      }
28609
 
28610
      int lastComparison = 0;
1731 ankur.sing 28611
      getValidOrdersAmountRange_args typedOther = (getValidOrdersAmountRange_args)other;
1629 ankur.sing 28612
 
28613
      return 0;
28614
    }
28615
 
28616
    public void read(TProtocol iprot) throws TException {
28617
      TField field;
28618
      iprot.readStructBegin();
28619
      while (true)
28620
      {
28621
        field = iprot.readFieldBegin();
28622
        if (field.type == TType.STOP) { 
28623
          break;
28624
        }
28625
        _Fields fieldId = _Fields.findByThriftId(field.id);
28626
        if (fieldId == null) {
28627
          TProtocolUtil.skip(iprot, field.type);
28628
        } else {
28629
          switch (fieldId) {
28630
          }
28631
          iprot.readFieldEnd();
28632
        }
28633
      }
28634
      iprot.readStructEnd();
28635
      validate();
28636
    }
28637
 
28638
    public void write(TProtocol oprot) throws TException {
28639
      validate();
28640
 
28641
      oprot.writeStructBegin(STRUCT_DESC);
28642
      oprot.writeFieldStop();
28643
      oprot.writeStructEnd();
28644
    }
28645
 
28646
    @Override
28647
    public String toString() {
1731 ankur.sing 28648
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_args(");
1629 ankur.sing 28649
      boolean first = true;
28650
 
28651
      sb.append(")");
28652
      return sb.toString();
28653
    }
28654
 
28655
    public void validate() throws TException {
28656
      // check for required fields
28657
    }
28658
 
28659
  }
28660
 
1731 ankur.sing 28661
  public static class getValidOrdersAmountRange_result implements TBase<getValidOrdersAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_result>   {
28662
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_result");
1629 ankur.sing 28663
 
1731 ankur.sing 28664
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 28665
 
1731 ankur.sing 28666
    private List<Double> success;
1629 ankur.sing 28667
 
28668
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28669
    public enum _Fields implements TFieldIdEnum {
28670
      SUCCESS((short)0, "success");
28671
 
28672
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28673
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28674
 
28675
      static {
28676
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28677
          byId.put((int)field._thriftId, field);
28678
          byName.put(field.getFieldName(), field);
28679
        }
28680
      }
28681
 
28682
      /**
28683
       * Find the _Fields constant that matches fieldId, or null if its not found.
28684
       */
28685
      public static _Fields findByThriftId(int fieldId) {
28686
        return byId.get(fieldId);
28687
      }
28688
 
28689
      /**
28690
       * Find the _Fields constant that matches fieldId, throwing an exception
28691
       * if it is not found.
28692
       */
28693
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28694
        _Fields fields = findByThriftId(fieldId);
28695
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28696
        return fields;
28697
      }
28698
 
28699
      /**
28700
       * Find the _Fields constant that matches name, or null if its not found.
28701
       */
28702
      public static _Fields findByName(String name) {
28703
        return byName.get(name);
28704
      }
28705
 
28706
      private final short _thriftId;
28707
      private final String _fieldName;
28708
 
28709
      _Fields(short thriftId, String fieldName) {
28710
        _thriftId = thriftId;
28711
        _fieldName = fieldName;
28712
      }
28713
 
28714
      public short getThriftFieldId() {
28715
        return _thriftId;
28716
      }
28717
 
28718
      public String getFieldName() {
28719
        return _fieldName;
28720
      }
28721
    }
28722
 
28723
    // isset id assignments
28724
 
28725
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28726
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 28727
          new ListMetaData(TType.LIST, 
28728
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 28729
    }});
28730
 
28731
    static {
1731 ankur.sing 28732
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_result.class, metaDataMap);
1629 ankur.sing 28733
    }
28734
 
1731 ankur.sing 28735
    public getValidOrdersAmountRange_result() {
1629 ankur.sing 28736
    }
28737
 
1731 ankur.sing 28738
    public getValidOrdersAmountRange_result(
28739
      List<Double> success)
1629 ankur.sing 28740
    {
28741
      this();
28742
      this.success = success;
28743
    }
28744
 
28745
    /**
28746
     * Performs a deep copy on <i>other</i>.
28747
     */
1731 ankur.sing 28748
    public getValidOrdersAmountRange_result(getValidOrdersAmountRange_result other) {
28749
      if (other.isSetSuccess()) {
28750
        List<Double> __this__success = new ArrayList<Double>();
28751
        for (Double other_element : other.success) {
28752
          __this__success.add(other_element);
1629 ankur.sing 28753
        }
1731 ankur.sing 28754
        this.success = __this__success;
1629 ankur.sing 28755
      }
28756
    }
28757
 
1731 ankur.sing 28758
    public getValidOrdersAmountRange_result deepCopy() {
28759
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 28760
    }
28761
 
28762
    @Deprecated
1731 ankur.sing 28763
    public getValidOrdersAmountRange_result clone() {
28764
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 28765
    }
28766
 
1731 ankur.sing 28767
    public int getSuccessSize() {
28768
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 28769
    }
28770
 
1731 ankur.sing 28771
    public java.util.Iterator<Double> getSuccessIterator() {
28772
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 28773
    }
28774
 
1731 ankur.sing 28775
    public void addToSuccess(double elem) {
28776
      if (this.success == null) {
28777
        this.success = new ArrayList<Double>();
1629 ankur.sing 28778
      }
1731 ankur.sing 28779
      this.success.add(elem);
1629 ankur.sing 28780
    }
28781
 
1731 ankur.sing 28782
    public List<Double> getSuccess() {
1629 ankur.sing 28783
      return this.success;
28784
    }
28785
 
1731 ankur.sing 28786
    public getValidOrdersAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 28787
      this.success = success;
28788
      return this;
28789
    }
28790
 
28791
    public void unsetSuccess() {
1731 ankur.sing 28792
      this.success = null;
1629 ankur.sing 28793
    }
28794
 
28795
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28796
    public boolean isSetSuccess() {
1731 ankur.sing 28797
      return this.success != null;
1629 ankur.sing 28798
    }
28799
 
28800
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 28801
      if (!value) {
28802
        this.success = null;
28803
      }
1629 ankur.sing 28804
    }
28805
 
28806
    public void setFieldValue(_Fields field, Object value) {
28807
      switch (field) {
28808
      case SUCCESS:
28809
        if (value == null) {
28810
          unsetSuccess();
28811
        } else {
1731 ankur.sing 28812
          setSuccess((List<Double>)value);
1629 ankur.sing 28813
        }
28814
        break;
28815
 
28816
      }
28817
    }
28818
 
28819
    public void setFieldValue(int fieldID, Object value) {
28820
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28821
    }
28822
 
28823
    public Object getFieldValue(_Fields field) {
28824
      switch (field) {
28825
      case SUCCESS:
1731 ankur.sing 28826
        return getSuccess();
1629 ankur.sing 28827
 
28828
      }
28829
      throw new IllegalStateException();
28830
    }
28831
 
28832
    public Object getFieldValue(int fieldId) {
28833
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28834
    }
28835
 
28836
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28837
    public boolean isSet(_Fields field) {
28838
      switch (field) {
28839
      case SUCCESS:
28840
        return isSetSuccess();
28841
      }
28842
      throw new IllegalStateException();
28843
    }
28844
 
28845
    public boolean isSet(int fieldID) {
28846
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28847
    }
28848
 
28849
    @Override
28850
    public boolean equals(Object that) {
28851
      if (that == null)
28852
        return false;
1731 ankur.sing 28853
      if (that instanceof getValidOrdersAmountRange_result)
28854
        return this.equals((getValidOrdersAmountRange_result)that);
1629 ankur.sing 28855
      return false;
28856
    }
28857
 
1731 ankur.sing 28858
    public boolean equals(getValidOrdersAmountRange_result that) {
1629 ankur.sing 28859
      if (that == null)
28860
        return false;
28861
 
1731 ankur.sing 28862
      boolean this_present_success = true && this.isSetSuccess();
28863
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 28864
      if (this_present_success || that_present_success) {
28865
        if (!(this_present_success && that_present_success))
28866
          return false;
1731 ankur.sing 28867
        if (!this.success.equals(that.success))
1629 ankur.sing 28868
          return false;
28869
      }
28870
 
28871
      return true;
28872
    }
28873
 
28874
    @Override
28875
    public int hashCode() {
28876
      return 0;
28877
    }
28878
 
1731 ankur.sing 28879
    public int compareTo(getValidOrdersAmountRange_result other) {
1629 ankur.sing 28880
      if (!getClass().equals(other.getClass())) {
28881
        return getClass().getName().compareTo(other.getClass().getName());
28882
      }
28883
 
28884
      int lastComparison = 0;
1731 ankur.sing 28885
      getValidOrdersAmountRange_result typedOther = (getValidOrdersAmountRange_result)other;
1629 ankur.sing 28886
 
28887
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28888
      if (lastComparison != 0) {
28889
        return lastComparison;
28890
      }
28891
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28892
      if (lastComparison != 0) {
28893
        return lastComparison;
28894
      }
28895
      return 0;
28896
    }
28897
 
28898
    public void read(TProtocol iprot) throws TException {
28899
      TField field;
28900
      iprot.readStructBegin();
28901
      while (true)
28902
      {
28903
        field = iprot.readFieldBegin();
28904
        if (field.type == TType.STOP) { 
28905
          break;
28906
        }
28907
        _Fields fieldId = _Fields.findByThriftId(field.id);
28908
        if (fieldId == null) {
28909
          TProtocolUtil.skip(iprot, field.type);
28910
        } else {
28911
          switch (fieldId) {
28912
            case SUCCESS:
1731 ankur.sing 28913
              if (field.type == TType.LIST) {
28914
                {
28915
                  TList _list80 = iprot.readListBegin();
28916
                  this.success = new ArrayList<Double>(_list80.size);
28917
                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
28918
                  {
28919
                    double _elem82;
28920
                    _elem82 = iprot.readDouble();
28921
                    this.success.add(_elem82);
28922
                  }
28923
                  iprot.readListEnd();
28924
                }
1629 ankur.sing 28925
              } else { 
28926
                TProtocolUtil.skip(iprot, field.type);
28927
              }
28928
              break;
28929
          }
28930
          iprot.readFieldEnd();
28931
        }
28932
      }
28933
      iprot.readStructEnd();
28934
      validate();
28935
    }
28936
 
28937
    public void write(TProtocol oprot) throws TException {
28938
      oprot.writeStructBegin(STRUCT_DESC);
28939
 
28940
      if (this.isSetSuccess()) {
28941
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 28942
        {
28943
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
28944
          for (double _iter83 : this.success)
28945
          {
28946
            oprot.writeDouble(_iter83);
28947
          }
28948
          oprot.writeListEnd();
28949
        }
1629 ankur.sing 28950
        oprot.writeFieldEnd();
28951
      }
28952
      oprot.writeFieldStop();
28953
      oprot.writeStructEnd();
28954
    }
28955
 
28956
    @Override
28957
    public String toString() {
1731 ankur.sing 28958
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_result(");
1629 ankur.sing 28959
      boolean first = true;
28960
 
28961
      sb.append("success:");
1731 ankur.sing 28962
      if (this.success == null) {
28963
        sb.append("null");
28964
      } else {
28965
        sb.append(this.success);
28966
      }
1629 ankur.sing 28967
      first = false;
28968
      sb.append(")");
28969
      return sb.toString();
28970
    }
28971
 
28972
    public void validate() throws TException {
28973
      // check for required fields
28974
    }
28975
 
28976
  }
28977
 
1886 ankur.sing 28978
  public static class getValidOrders_args implements TBase<getValidOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_args>   {
28979
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_args");
28980
 
28981
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)1);
28982
 
28983
    private long limit;
28984
 
28985
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28986
    public enum _Fields implements TFieldIdEnum {
28987
      LIMIT((short)1, "limit");
28988
 
28989
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28990
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28991
 
28992
      static {
28993
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28994
          byId.put((int)field._thriftId, field);
28995
          byName.put(field.getFieldName(), field);
28996
        }
28997
      }
28998
 
28999
      /**
29000
       * Find the _Fields constant that matches fieldId, or null if its not found.
29001
       */
29002
      public static _Fields findByThriftId(int fieldId) {
29003
        return byId.get(fieldId);
29004
      }
29005
 
29006
      /**
29007
       * Find the _Fields constant that matches fieldId, throwing an exception
29008
       * if it is not found.
29009
       */
29010
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29011
        _Fields fields = findByThriftId(fieldId);
29012
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29013
        return fields;
29014
      }
29015
 
29016
      /**
29017
       * Find the _Fields constant that matches name, or null if its not found.
29018
       */
29019
      public static _Fields findByName(String name) {
29020
        return byName.get(name);
29021
      }
29022
 
29023
      private final short _thriftId;
29024
      private final String _fieldName;
29025
 
29026
      _Fields(short thriftId, String fieldName) {
29027
        _thriftId = thriftId;
29028
        _fieldName = fieldName;
29029
      }
29030
 
29031
      public short getThriftFieldId() {
29032
        return _thriftId;
29033
      }
29034
 
29035
      public String getFieldName() {
29036
        return _fieldName;
29037
      }
29038
    }
29039
 
29040
    // isset id assignments
29041
    private static final int __LIMIT_ISSET_ID = 0;
29042
    private BitSet __isset_bit_vector = new BitSet(1);
29043
 
29044
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29045
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
29046
          new FieldValueMetaData(TType.I64)));
29047
    }});
29048
 
29049
    static {
29050
      FieldMetaData.addStructMetaDataMap(getValidOrders_args.class, metaDataMap);
29051
    }
29052
 
29053
    public getValidOrders_args() {
29054
    }
29055
 
29056
    public getValidOrders_args(
29057
      long limit)
29058
    {
29059
      this();
29060
      this.limit = limit;
29061
      setLimitIsSet(true);
29062
    }
29063
 
29064
    /**
29065
     * Performs a deep copy on <i>other</i>.
29066
     */
29067
    public getValidOrders_args(getValidOrders_args other) {
29068
      __isset_bit_vector.clear();
29069
      __isset_bit_vector.or(other.__isset_bit_vector);
29070
      this.limit = other.limit;
29071
    }
29072
 
29073
    public getValidOrders_args deepCopy() {
29074
      return new getValidOrders_args(this);
29075
    }
29076
 
29077
    @Deprecated
29078
    public getValidOrders_args clone() {
29079
      return new getValidOrders_args(this);
29080
    }
29081
 
29082
    public long getLimit() {
29083
      return this.limit;
29084
    }
29085
 
29086
    public getValidOrders_args setLimit(long limit) {
29087
      this.limit = limit;
29088
      setLimitIsSet(true);
29089
      return this;
29090
    }
29091
 
29092
    public void unsetLimit() {
29093
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
29094
    }
29095
 
29096
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
29097
    public boolean isSetLimit() {
29098
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
29099
    }
29100
 
29101
    public void setLimitIsSet(boolean value) {
29102
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
29103
    }
29104
 
29105
    public void setFieldValue(_Fields field, Object value) {
29106
      switch (field) {
29107
      case LIMIT:
29108
        if (value == null) {
29109
          unsetLimit();
29110
        } else {
29111
          setLimit((Long)value);
29112
        }
29113
        break;
29114
 
29115
      }
29116
    }
29117
 
29118
    public void setFieldValue(int fieldID, Object value) {
29119
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29120
    }
29121
 
29122
    public Object getFieldValue(_Fields field) {
29123
      switch (field) {
29124
      case LIMIT:
29125
        return new Long(getLimit());
29126
 
29127
      }
29128
      throw new IllegalStateException();
29129
    }
29130
 
29131
    public Object getFieldValue(int fieldId) {
29132
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29133
    }
29134
 
29135
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29136
    public boolean isSet(_Fields field) {
29137
      switch (field) {
29138
      case LIMIT:
29139
        return isSetLimit();
29140
      }
29141
      throw new IllegalStateException();
29142
    }
29143
 
29144
    public boolean isSet(int fieldID) {
29145
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29146
    }
29147
 
29148
    @Override
29149
    public boolean equals(Object that) {
29150
      if (that == null)
29151
        return false;
29152
      if (that instanceof getValidOrders_args)
29153
        return this.equals((getValidOrders_args)that);
29154
      return false;
29155
    }
29156
 
29157
    public boolean equals(getValidOrders_args that) {
29158
      if (that == null)
29159
        return false;
29160
 
29161
      boolean this_present_limit = true;
29162
      boolean that_present_limit = true;
29163
      if (this_present_limit || that_present_limit) {
29164
        if (!(this_present_limit && that_present_limit))
29165
          return false;
29166
        if (this.limit != that.limit)
29167
          return false;
29168
      }
29169
 
29170
      return true;
29171
    }
29172
 
29173
    @Override
29174
    public int hashCode() {
29175
      return 0;
29176
    }
29177
 
29178
    public int compareTo(getValidOrders_args other) {
29179
      if (!getClass().equals(other.getClass())) {
29180
        return getClass().getName().compareTo(other.getClass().getName());
29181
      }
29182
 
29183
      int lastComparison = 0;
29184
      getValidOrders_args typedOther = (getValidOrders_args)other;
29185
 
29186
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
29187
      if (lastComparison != 0) {
29188
        return lastComparison;
29189
      }
29190
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
29191
      if (lastComparison != 0) {
29192
        return lastComparison;
29193
      }
29194
      return 0;
29195
    }
29196
 
29197
    public void read(TProtocol iprot) throws TException {
29198
      TField field;
29199
      iprot.readStructBegin();
29200
      while (true)
29201
      {
29202
        field = iprot.readFieldBegin();
29203
        if (field.type == TType.STOP) { 
29204
          break;
29205
        }
29206
        _Fields fieldId = _Fields.findByThriftId(field.id);
29207
        if (fieldId == null) {
29208
          TProtocolUtil.skip(iprot, field.type);
29209
        } else {
29210
          switch (fieldId) {
29211
            case LIMIT:
29212
              if (field.type == TType.I64) {
29213
                this.limit = iprot.readI64();
29214
                setLimitIsSet(true);
29215
              } else { 
29216
                TProtocolUtil.skip(iprot, field.type);
29217
              }
29218
              break;
29219
          }
29220
          iprot.readFieldEnd();
29221
        }
29222
      }
29223
      iprot.readStructEnd();
29224
      validate();
29225
    }
29226
 
29227
    public void write(TProtocol oprot) throws TException {
29228
      validate();
29229
 
29230
      oprot.writeStructBegin(STRUCT_DESC);
29231
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
29232
      oprot.writeI64(this.limit);
29233
      oprot.writeFieldEnd();
29234
      oprot.writeFieldStop();
29235
      oprot.writeStructEnd();
29236
    }
29237
 
29238
    @Override
29239
    public String toString() {
29240
      StringBuilder sb = new StringBuilder("getValidOrders_args(");
29241
      boolean first = true;
29242
 
29243
      sb.append("limit:");
29244
      sb.append(this.limit);
29245
      first = false;
29246
      sb.append(")");
29247
      return sb.toString();
29248
    }
29249
 
29250
    public void validate() throws TException {
29251
      // check for required fields
29252
    }
29253
 
29254
  }
29255
 
29256
  public static class getValidOrders_result implements TBase<getValidOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_result>   {
29257
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_result");
29258
 
29259
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
29260
 
29261
    private List<Order> success;
29262
 
29263
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29264
    public enum _Fields implements TFieldIdEnum {
29265
      SUCCESS((short)0, "success");
29266
 
29267
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29268
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29269
 
29270
      static {
29271
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29272
          byId.put((int)field._thriftId, field);
29273
          byName.put(field.getFieldName(), field);
29274
        }
29275
      }
29276
 
29277
      /**
29278
       * Find the _Fields constant that matches fieldId, or null if its not found.
29279
       */
29280
      public static _Fields findByThriftId(int fieldId) {
29281
        return byId.get(fieldId);
29282
      }
29283
 
29284
      /**
29285
       * Find the _Fields constant that matches fieldId, throwing an exception
29286
       * if it is not found.
29287
       */
29288
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29289
        _Fields fields = findByThriftId(fieldId);
29290
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29291
        return fields;
29292
      }
29293
 
29294
      /**
29295
       * Find the _Fields constant that matches name, or null if its not found.
29296
       */
29297
      public static _Fields findByName(String name) {
29298
        return byName.get(name);
29299
      }
29300
 
29301
      private final short _thriftId;
29302
      private final String _fieldName;
29303
 
29304
      _Fields(short thriftId, String fieldName) {
29305
        _thriftId = thriftId;
29306
        _fieldName = fieldName;
29307
      }
29308
 
29309
      public short getThriftFieldId() {
29310
        return _thriftId;
29311
      }
29312
 
29313
      public String getFieldName() {
29314
        return _fieldName;
29315
      }
29316
    }
29317
 
29318
    // isset id assignments
29319
 
29320
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29321
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29322
          new ListMetaData(TType.LIST, 
29323
              new StructMetaData(TType.STRUCT, Order.class))));
29324
    }});
29325
 
29326
    static {
29327
      FieldMetaData.addStructMetaDataMap(getValidOrders_result.class, metaDataMap);
29328
    }
29329
 
29330
    public getValidOrders_result() {
29331
    }
29332
 
29333
    public getValidOrders_result(
29334
      List<Order> success)
29335
    {
29336
      this();
29337
      this.success = success;
29338
    }
29339
 
29340
    /**
29341
     * Performs a deep copy on <i>other</i>.
29342
     */
29343
    public getValidOrders_result(getValidOrders_result other) {
29344
      if (other.isSetSuccess()) {
29345
        List<Order> __this__success = new ArrayList<Order>();
29346
        for (Order other_element : other.success) {
29347
          __this__success.add(new Order(other_element));
29348
        }
29349
        this.success = __this__success;
29350
      }
29351
    }
29352
 
29353
    public getValidOrders_result deepCopy() {
29354
      return new getValidOrders_result(this);
29355
    }
29356
 
29357
    @Deprecated
29358
    public getValidOrders_result clone() {
29359
      return new getValidOrders_result(this);
29360
    }
29361
 
29362
    public int getSuccessSize() {
29363
      return (this.success == null) ? 0 : this.success.size();
29364
    }
29365
 
29366
    public java.util.Iterator<Order> getSuccessIterator() {
29367
      return (this.success == null) ? null : this.success.iterator();
29368
    }
29369
 
29370
    public void addToSuccess(Order elem) {
29371
      if (this.success == null) {
29372
        this.success = new ArrayList<Order>();
29373
      }
29374
      this.success.add(elem);
29375
    }
29376
 
29377
    public List<Order> getSuccess() {
29378
      return this.success;
29379
    }
29380
 
29381
    public getValidOrders_result setSuccess(List<Order> success) {
29382
      this.success = success;
29383
      return this;
29384
    }
29385
 
29386
    public void unsetSuccess() {
29387
      this.success = null;
29388
    }
29389
 
29390
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29391
    public boolean isSetSuccess() {
29392
      return this.success != null;
29393
    }
29394
 
29395
    public void setSuccessIsSet(boolean value) {
29396
      if (!value) {
29397
        this.success = null;
29398
      }
29399
    }
29400
 
29401
    public void setFieldValue(_Fields field, Object value) {
29402
      switch (field) {
29403
      case SUCCESS:
29404
        if (value == null) {
29405
          unsetSuccess();
29406
        } else {
29407
          setSuccess((List<Order>)value);
29408
        }
29409
        break;
29410
 
29411
      }
29412
    }
29413
 
29414
    public void setFieldValue(int fieldID, Object value) {
29415
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29416
    }
29417
 
29418
    public Object getFieldValue(_Fields field) {
29419
      switch (field) {
29420
      case SUCCESS:
29421
        return getSuccess();
29422
 
29423
      }
29424
      throw new IllegalStateException();
29425
    }
29426
 
29427
    public Object getFieldValue(int fieldId) {
29428
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29429
    }
29430
 
29431
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29432
    public boolean isSet(_Fields field) {
29433
      switch (field) {
29434
      case SUCCESS:
29435
        return isSetSuccess();
29436
      }
29437
      throw new IllegalStateException();
29438
    }
29439
 
29440
    public boolean isSet(int fieldID) {
29441
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29442
    }
29443
 
29444
    @Override
29445
    public boolean equals(Object that) {
29446
      if (that == null)
29447
        return false;
29448
      if (that instanceof getValidOrders_result)
29449
        return this.equals((getValidOrders_result)that);
29450
      return false;
29451
    }
29452
 
29453
    public boolean equals(getValidOrders_result that) {
29454
      if (that == null)
29455
        return false;
29456
 
29457
      boolean this_present_success = true && this.isSetSuccess();
29458
      boolean that_present_success = true && that.isSetSuccess();
29459
      if (this_present_success || that_present_success) {
29460
        if (!(this_present_success && that_present_success))
29461
          return false;
29462
        if (!this.success.equals(that.success))
29463
          return false;
29464
      }
29465
 
29466
      return true;
29467
    }
29468
 
29469
    @Override
29470
    public int hashCode() {
29471
      return 0;
29472
    }
29473
 
29474
    public int compareTo(getValidOrders_result other) {
29475
      if (!getClass().equals(other.getClass())) {
29476
        return getClass().getName().compareTo(other.getClass().getName());
29477
      }
29478
 
29479
      int lastComparison = 0;
29480
      getValidOrders_result typedOther = (getValidOrders_result)other;
29481
 
29482
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29483
      if (lastComparison != 0) {
29484
        return lastComparison;
29485
      }
29486
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29487
      if (lastComparison != 0) {
29488
        return lastComparison;
29489
      }
29490
      return 0;
29491
    }
29492
 
29493
    public void read(TProtocol iprot) throws TException {
29494
      TField field;
29495
      iprot.readStructBegin();
29496
      while (true)
29497
      {
29498
        field = iprot.readFieldBegin();
29499
        if (field.type == TType.STOP) { 
29500
          break;
29501
        }
29502
        _Fields fieldId = _Fields.findByThriftId(field.id);
29503
        if (fieldId == null) {
29504
          TProtocolUtil.skip(iprot, field.type);
29505
        } else {
29506
          switch (fieldId) {
29507
            case SUCCESS:
29508
              if (field.type == TType.LIST) {
29509
                {
29510
                  TList _list84 = iprot.readListBegin();
29511
                  this.success = new ArrayList<Order>(_list84.size);
29512
                  for (int _i85 = 0; _i85 < _list84.size; ++_i85)
29513
                  {
29514
                    Order _elem86;
29515
                    _elem86 = new Order();
29516
                    _elem86.read(iprot);
29517
                    this.success.add(_elem86);
29518
                  }
29519
                  iprot.readListEnd();
29520
                }
29521
              } else { 
29522
                TProtocolUtil.skip(iprot, field.type);
29523
              }
29524
              break;
29525
          }
29526
          iprot.readFieldEnd();
29527
        }
29528
      }
29529
      iprot.readStructEnd();
29530
      validate();
29531
    }
29532
 
29533
    public void write(TProtocol oprot) throws TException {
29534
      oprot.writeStructBegin(STRUCT_DESC);
29535
 
29536
      if (this.isSetSuccess()) {
29537
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29538
        {
29539
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
29540
          for (Order _iter87 : this.success)
29541
          {
29542
            _iter87.write(oprot);
29543
          }
29544
          oprot.writeListEnd();
29545
        }
29546
        oprot.writeFieldEnd();
29547
      }
29548
      oprot.writeFieldStop();
29549
      oprot.writeStructEnd();
29550
    }
29551
 
29552
    @Override
29553
    public String toString() {
29554
      StringBuilder sb = new StringBuilder("getValidOrders_result(");
29555
      boolean first = true;
29556
 
29557
      sb.append("success:");
29558
      if (this.success == null) {
29559
        sb.append("null");
29560
      } else {
29561
        sb.append(this.success);
29562
      }
29563
      first = false;
29564
      sb.append(")");
29565
      return sb.toString();
29566
    }
29567
 
29568
    public void validate() throws TException {
29569
      // check for required fields
29570
    }
29571
 
29572
  }
29573
 
2538 chandransh 29574
  public static class toggleDOAFlag_args implements TBase<toggleDOAFlag_args._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_args>   {
29575
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_args");
29576
 
29577
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
29578
 
29579
    private long orderId;
29580
 
29581
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29582
    public enum _Fields implements TFieldIdEnum {
29583
      ORDER_ID((short)1, "orderId");
29584
 
29585
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29586
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29587
 
29588
      static {
29589
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29590
          byId.put((int)field._thriftId, field);
29591
          byName.put(field.getFieldName(), field);
29592
        }
29593
      }
29594
 
29595
      /**
29596
       * Find the _Fields constant that matches fieldId, or null if its not found.
29597
       */
29598
      public static _Fields findByThriftId(int fieldId) {
29599
        return byId.get(fieldId);
29600
      }
29601
 
29602
      /**
29603
       * Find the _Fields constant that matches fieldId, throwing an exception
29604
       * if it is not found.
29605
       */
29606
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29607
        _Fields fields = findByThriftId(fieldId);
29608
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29609
        return fields;
29610
      }
29611
 
29612
      /**
29613
       * Find the _Fields constant that matches name, or null if its not found.
29614
       */
29615
      public static _Fields findByName(String name) {
29616
        return byName.get(name);
29617
      }
29618
 
29619
      private final short _thriftId;
29620
      private final String _fieldName;
29621
 
29622
      _Fields(short thriftId, String fieldName) {
29623
        _thriftId = thriftId;
29624
        _fieldName = fieldName;
29625
      }
29626
 
29627
      public short getThriftFieldId() {
29628
        return _thriftId;
29629
      }
29630
 
29631
      public String getFieldName() {
29632
        return _fieldName;
29633
      }
29634
    }
29635
 
29636
    // isset id assignments
29637
    private static final int __ORDERID_ISSET_ID = 0;
29638
    private BitSet __isset_bit_vector = new BitSet(1);
29639
 
29640
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29641
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
29642
          new FieldValueMetaData(TType.I64)));
29643
    }});
29644
 
29645
    static {
29646
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_args.class, metaDataMap);
29647
    }
29648
 
29649
    public toggleDOAFlag_args() {
29650
    }
29651
 
29652
    public toggleDOAFlag_args(
29653
      long orderId)
29654
    {
29655
      this();
29656
      this.orderId = orderId;
29657
      setOrderIdIsSet(true);
29658
    }
29659
 
29660
    /**
29661
     * Performs a deep copy on <i>other</i>.
29662
     */
29663
    public toggleDOAFlag_args(toggleDOAFlag_args other) {
29664
      __isset_bit_vector.clear();
29665
      __isset_bit_vector.or(other.__isset_bit_vector);
29666
      this.orderId = other.orderId;
29667
    }
29668
 
29669
    public toggleDOAFlag_args deepCopy() {
29670
      return new toggleDOAFlag_args(this);
29671
    }
29672
 
29673
    @Deprecated
29674
    public toggleDOAFlag_args clone() {
29675
      return new toggleDOAFlag_args(this);
29676
    }
29677
 
29678
    public long getOrderId() {
29679
      return this.orderId;
29680
    }
29681
 
29682
    public toggleDOAFlag_args setOrderId(long orderId) {
29683
      this.orderId = orderId;
29684
      setOrderIdIsSet(true);
29685
      return this;
29686
    }
29687
 
29688
    public void unsetOrderId() {
29689
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
29690
    }
29691
 
29692
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
29693
    public boolean isSetOrderId() {
29694
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
29695
    }
29696
 
29697
    public void setOrderIdIsSet(boolean value) {
29698
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
29699
    }
29700
 
29701
    public void setFieldValue(_Fields field, Object value) {
29702
      switch (field) {
29703
      case ORDER_ID:
29704
        if (value == null) {
29705
          unsetOrderId();
29706
        } else {
29707
          setOrderId((Long)value);
29708
        }
29709
        break;
29710
 
29711
      }
29712
    }
29713
 
29714
    public void setFieldValue(int fieldID, Object value) {
29715
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29716
    }
29717
 
29718
    public Object getFieldValue(_Fields field) {
29719
      switch (field) {
29720
      case ORDER_ID:
29721
        return new Long(getOrderId());
29722
 
29723
      }
29724
      throw new IllegalStateException();
29725
    }
29726
 
29727
    public Object getFieldValue(int fieldId) {
29728
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29729
    }
29730
 
29731
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29732
    public boolean isSet(_Fields field) {
29733
      switch (field) {
29734
      case ORDER_ID:
29735
        return isSetOrderId();
29736
      }
29737
      throw new IllegalStateException();
29738
    }
29739
 
29740
    public boolean isSet(int fieldID) {
29741
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29742
    }
29743
 
29744
    @Override
29745
    public boolean equals(Object that) {
29746
      if (that == null)
29747
        return false;
29748
      if (that instanceof toggleDOAFlag_args)
29749
        return this.equals((toggleDOAFlag_args)that);
29750
      return false;
29751
    }
29752
 
29753
    public boolean equals(toggleDOAFlag_args that) {
29754
      if (that == null)
29755
        return false;
29756
 
29757
      boolean this_present_orderId = true;
29758
      boolean that_present_orderId = true;
29759
      if (this_present_orderId || that_present_orderId) {
29760
        if (!(this_present_orderId && that_present_orderId))
29761
          return false;
29762
        if (this.orderId != that.orderId)
29763
          return false;
29764
      }
29765
 
29766
      return true;
29767
    }
29768
 
29769
    @Override
29770
    public int hashCode() {
29771
      return 0;
29772
    }
29773
 
29774
    public int compareTo(toggleDOAFlag_args other) {
29775
      if (!getClass().equals(other.getClass())) {
29776
        return getClass().getName().compareTo(other.getClass().getName());
29777
      }
29778
 
29779
      int lastComparison = 0;
29780
      toggleDOAFlag_args typedOther = (toggleDOAFlag_args)other;
29781
 
29782
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
29783
      if (lastComparison != 0) {
29784
        return lastComparison;
29785
      }
29786
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
29787
      if (lastComparison != 0) {
29788
        return lastComparison;
29789
      }
29790
      return 0;
29791
    }
29792
 
29793
    public void read(TProtocol iprot) throws TException {
29794
      TField field;
29795
      iprot.readStructBegin();
29796
      while (true)
29797
      {
29798
        field = iprot.readFieldBegin();
29799
        if (field.type == TType.STOP) { 
29800
          break;
29801
        }
29802
        _Fields fieldId = _Fields.findByThriftId(field.id);
29803
        if (fieldId == null) {
29804
          TProtocolUtil.skip(iprot, field.type);
29805
        } else {
29806
          switch (fieldId) {
29807
            case ORDER_ID:
29808
              if (field.type == TType.I64) {
29809
                this.orderId = iprot.readI64();
29810
                setOrderIdIsSet(true);
29811
              } else { 
29812
                TProtocolUtil.skip(iprot, field.type);
29813
              }
29814
              break;
29815
          }
29816
          iprot.readFieldEnd();
29817
        }
29818
      }
29819
      iprot.readStructEnd();
29820
      validate();
29821
    }
29822
 
29823
    public void write(TProtocol oprot) throws TException {
29824
      validate();
29825
 
29826
      oprot.writeStructBegin(STRUCT_DESC);
29827
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
29828
      oprot.writeI64(this.orderId);
29829
      oprot.writeFieldEnd();
29830
      oprot.writeFieldStop();
29831
      oprot.writeStructEnd();
29832
    }
29833
 
29834
    @Override
29835
    public String toString() {
29836
      StringBuilder sb = new StringBuilder("toggleDOAFlag_args(");
29837
      boolean first = true;
29838
 
29839
      sb.append("orderId:");
29840
      sb.append(this.orderId);
29841
      first = false;
29842
      sb.append(")");
29843
      return sb.toString();
29844
    }
29845
 
29846
    public void validate() throws TException {
29847
      // check for required fields
29848
    }
29849
 
29850
  }
29851
 
29852
  public static class toggleDOAFlag_result implements TBase<toggleDOAFlag_result._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_result>   {
29853
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_result");
29854
 
29855
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
29856
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
29857
 
29858
    private boolean success;
29859
    private TransactionServiceException ex;
29860
 
29861
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29862
    public enum _Fields implements TFieldIdEnum {
29863
      SUCCESS((short)0, "success"),
29864
      EX((short)1, "ex");
29865
 
29866
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29867
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29868
 
29869
      static {
29870
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29871
          byId.put((int)field._thriftId, field);
29872
          byName.put(field.getFieldName(), field);
29873
        }
29874
      }
29875
 
29876
      /**
29877
       * Find the _Fields constant that matches fieldId, or null if its not found.
29878
       */
29879
      public static _Fields findByThriftId(int fieldId) {
29880
        return byId.get(fieldId);
29881
      }
29882
 
29883
      /**
29884
       * Find the _Fields constant that matches fieldId, throwing an exception
29885
       * if it is not found.
29886
       */
29887
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29888
        _Fields fields = findByThriftId(fieldId);
29889
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29890
        return fields;
29891
      }
29892
 
29893
      /**
29894
       * Find the _Fields constant that matches name, or null if its not found.
29895
       */
29896
      public static _Fields findByName(String name) {
29897
        return byName.get(name);
29898
      }
29899
 
29900
      private final short _thriftId;
29901
      private final String _fieldName;
29902
 
29903
      _Fields(short thriftId, String fieldName) {
29904
        _thriftId = thriftId;
29905
        _fieldName = fieldName;
29906
      }
29907
 
29908
      public short getThriftFieldId() {
29909
        return _thriftId;
29910
      }
29911
 
29912
      public String getFieldName() {
29913
        return _fieldName;
29914
      }
29915
    }
29916
 
29917
    // isset id assignments
29918
    private static final int __SUCCESS_ISSET_ID = 0;
29919
    private BitSet __isset_bit_vector = new BitSet(1);
29920
 
29921
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29922
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29923
          new FieldValueMetaData(TType.BOOL)));
29924
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
29925
          new FieldValueMetaData(TType.STRUCT)));
29926
    }});
29927
 
29928
    static {
29929
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_result.class, metaDataMap);
29930
    }
29931
 
29932
    public toggleDOAFlag_result() {
29933
    }
29934
 
29935
    public toggleDOAFlag_result(
29936
      boolean success,
29937
      TransactionServiceException ex)
29938
    {
29939
      this();
29940
      this.success = success;
29941
      setSuccessIsSet(true);
29942
      this.ex = ex;
29943
    }
29944
 
29945
    /**
29946
     * Performs a deep copy on <i>other</i>.
29947
     */
29948
    public toggleDOAFlag_result(toggleDOAFlag_result other) {
29949
      __isset_bit_vector.clear();
29950
      __isset_bit_vector.or(other.__isset_bit_vector);
29951
      this.success = other.success;
29952
      if (other.isSetEx()) {
29953
        this.ex = new TransactionServiceException(other.ex);
29954
      }
29955
    }
29956
 
29957
    public toggleDOAFlag_result deepCopy() {
29958
      return new toggleDOAFlag_result(this);
29959
    }
29960
 
29961
    @Deprecated
29962
    public toggleDOAFlag_result clone() {
29963
      return new toggleDOAFlag_result(this);
29964
    }
29965
 
29966
    public boolean isSuccess() {
29967
      return this.success;
29968
    }
29969
 
29970
    public toggleDOAFlag_result setSuccess(boolean success) {
29971
      this.success = success;
29972
      setSuccessIsSet(true);
29973
      return this;
29974
    }
29975
 
29976
    public void unsetSuccess() {
29977
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29978
    }
29979
 
29980
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29981
    public boolean isSetSuccess() {
29982
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29983
    }
29984
 
29985
    public void setSuccessIsSet(boolean value) {
29986
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29987
    }
29988
 
29989
    public TransactionServiceException getEx() {
29990
      return this.ex;
29991
    }
29992
 
29993
    public toggleDOAFlag_result setEx(TransactionServiceException ex) {
29994
      this.ex = ex;
29995
      return this;
29996
    }
29997
 
29998
    public void unsetEx() {
29999
      this.ex = null;
30000
    }
30001
 
30002
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
30003
    public boolean isSetEx() {
30004
      return this.ex != null;
30005
    }
30006
 
30007
    public void setExIsSet(boolean value) {
30008
      if (!value) {
30009
        this.ex = null;
30010
      }
30011
    }
30012
 
30013
    public void setFieldValue(_Fields field, Object value) {
30014
      switch (field) {
30015
      case SUCCESS:
30016
        if (value == null) {
30017
          unsetSuccess();
30018
        } else {
30019
          setSuccess((Boolean)value);
30020
        }
30021
        break;
30022
 
30023
      case EX:
30024
        if (value == null) {
30025
          unsetEx();
30026
        } else {
30027
          setEx((TransactionServiceException)value);
30028
        }
30029
        break;
30030
 
30031
      }
30032
    }
30033
 
30034
    public void setFieldValue(int fieldID, Object value) {
30035
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30036
    }
30037
 
30038
    public Object getFieldValue(_Fields field) {
30039
      switch (field) {
30040
      case SUCCESS:
30041
        return new Boolean(isSuccess());
30042
 
30043
      case EX:
30044
        return getEx();
30045
 
30046
      }
30047
      throw new IllegalStateException();
30048
    }
30049
 
30050
    public Object getFieldValue(int fieldId) {
30051
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30052
    }
30053
 
30054
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30055
    public boolean isSet(_Fields field) {
30056
      switch (field) {
30057
      case SUCCESS:
30058
        return isSetSuccess();
30059
      case EX:
30060
        return isSetEx();
30061
      }
30062
      throw new IllegalStateException();
30063
    }
30064
 
30065
    public boolean isSet(int fieldID) {
30066
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30067
    }
30068
 
30069
    @Override
30070
    public boolean equals(Object that) {
30071
      if (that == null)
30072
        return false;
30073
      if (that instanceof toggleDOAFlag_result)
30074
        return this.equals((toggleDOAFlag_result)that);
30075
      return false;
30076
    }
30077
 
30078
    public boolean equals(toggleDOAFlag_result that) {
30079
      if (that == null)
30080
        return false;
30081
 
30082
      boolean this_present_success = true;
30083
      boolean that_present_success = true;
30084
      if (this_present_success || that_present_success) {
30085
        if (!(this_present_success && that_present_success))
30086
          return false;
30087
        if (this.success != that.success)
30088
          return false;
30089
      }
30090
 
30091
      boolean this_present_ex = true && this.isSetEx();
30092
      boolean that_present_ex = true && that.isSetEx();
30093
      if (this_present_ex || that_present_ex) {
30094
        if (!(this_present_ex && that_present_ex))
30095
          return false;
30096
        if (!this.ex.equals(that.ex))
30097
          return false;
30098
      }
30099
 
30100
      return true;
30101
    }
30102
 
30103
    @Override
30104
    public int hashCode() {
30105
      return 0;
30106
    }
30107
 
30108
    public int compareTo(toggleDOAFlag_result other) {
30109
      if (!getClass().equals(other.getClass())) {
30110
        return getClass().getName().compareTo(other.getClass().getName());
30111
      }
30112
 
30113
      int lastComparison = 0;
30114
      toggleDOAFlag_result typedOther = (toggleDOAFlag_result)other;
30115
 
30116
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30117
      if (lastComparison != 0) {
30118
        return lastComparison;
30119
      }
30120
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30121
      if (lastComparison != 0) {
30122
        return lastComparison;
30123
      }
30124
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
30125
      if (lastComparison != 0) {
30126
        return lastComparison;
30127
      }
30128
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
30129
      if (lastComparison != 0) {
30130
        return lastComparison;
30131
      }
30132
      return 0;
30133
    }
30134
 
30135
    public void read(TProtocol iprot) throws TException {
30136
      TField field;
30137
      iprot.readStructBegin();
30138
      while (true)
30139
      {
30140
        field = iprot.readFieldBegin();
30141
        if (field.type == TType.STOP) { 
30142
          break;
30143
        }
30144
        _Fields fieldId = _Fields.findByThriftId(field.id);
30145
        if (fieldId == null) {
30146
          TProtocolUtil.skip(iprot, field.type);
30147
        } else {
30148
          switch (fieldId) {
30149
            case SUCCESS:
30150
              if (field.type == TType.BOOL) {
30151
                this.success = iprot.readBool();
30152
                setSuccessIsSet(true);
30153
              } else { 
30154
                TProtocolUtil.skip(iprot, field.type);
30155
              }
30156
              break;
30157
            case EX:
30158
              if (field.type == TType.STRUCT) {
30159
                this.ex = new TransactionServiceException();
30160
                this.ex.read(iprot);
30161
              } else { 
30162
                TProtocolUtil.skip(iprot, field.type);
30163
              }
30164
              break;
30165
          }
30166
          iprot.readFieldEnd();
30167
        }
30168
      }
30169
      iprot.readStructEnd();
30170
      validate();
30171
    }
30172
 
30173
    public void write(TProtocol oprot) throws TException {
30174
      oprot.writeStructBegin(STRUCT_DESC);
30175
 
30176
      if (this.isSetSuccess()) {
30177
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30178
        oprot.writeBool(this.success);
30179
        oprot.writeFieldEnd();
30180
      } else if (this.isSetEx()) {
30181
        oprot.writeFieldBegin(EX_FIELD_DESC);
30182
        this.ex.write(oprot);
30183
        oprot.writeFieldEnd();
30184
      }
30185
      oprot.writeFieldStop();
30186
      oprot.writeStructEnd();
30187
    }
30188
 
30189
    @Override
30190
    public String toString() {
30191
      StringBuilder sb = new StringBuilder("toggleDOAFlag_result(");
30192
      boolean first = true;
30193
 
30194
      sb.append("success:");
30195
      sb.append(this.success);
30196
      first = false;
30197
      if (!first) sb.append(", ");
30198
      sb.append("ex:");
30199
      if (this.ex == null) {
30200
        sb.append("null");
30201
      } else {
30202
        sb.append(this.ex);
30203
      }
30204
      first = false;
30205
      sb.append(")");
30206
      return sb.toString();
30207
    }
30208
 
30209
    public void validate() throws TException {
30210
      // check for required fields
30211
    }
30212
 
30213
  }
30214
 
30215
  public static class requestPickupNumber_args implements TBase<requestPickupNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_args>   {
30216
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_args");
30217
 
30218
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
30219
 
30220
    private long orderId;
30221
 
30222
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30223
    public enum _Fields implements TFieldIdEnum {
30224
      ORDER_ID((short)1, "orderId");
30225
 
30226
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30227
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30228
 
30229
      static {
30230
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30231
          byId.put((int)field._thriftId, field);
30232
          byName.put(field.getFieldName(), field);
30233
        }
30234
      }
30235
 
30236
      /**
30237
       * Find the _Fields constant that matches fieldId, or null if its not found.
30238
       */
30239
      public static _Fields findByThriftId(int fieldId) {
30240
        return byId.get(fieldId);
30241
      }
30242
 
30243
      /**
30244
       * Find the _Fields constant that matches fieldId, throwing an exception
30245
       * if it is not found.
30246
       */
30247
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30248
        _Fields fields = findByThriftId(fieldId);
30249
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30250
        return fields;
30251
      }
30252
 
30253
      /**
30254
       * Find the _Fields constant that matches name, or null if its not found.
30255
       */
30256
      public static _Fields findByName(String name) {
30257
        return byName.get(name);
30258
      }
30259
 
30260
      private final short _thriftId;
30261
      private final String _fieldName;
30262
 
30263
      _Fields(short thriftId, String fieldName) {
30264
        _thriftId = thriftId;
30265
        _fieldName = fieldName;
30266
      }
30267
 
30268
      public short getThriftFieldId() {
30269
        return _thriftId;
30270
      }
30271
 
30272
      public String getFieldName() {
30273
        return _fieldName;
30274
      }
30275
    }
30276
 
30277
    // isset id assignments
30278
    private static final int __ORDERID_ISSET_ID = 0;
30279
    private BitSet __isset_bit_vector = new BitSet(1);
30280
 
30281
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30282
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
30283
          new FieldValueMetaData(TType.I64)));
30284
    }});
30285
 
30286
    static {
30287
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_args.class, metaDataMap);
30288
    }
30289
 
30290
    public requestPickupNumber_args() {
30291
    }
30292
 
30293
    public requestPickupNumber_args(
30294
      long orderId)
30295
    {
30296
      this();
30297
      this.orderId = orderId;
30298
      setOrderIdIsSet(true);
30299
    }
30300
 
30301
    /**
30302
     * Performs a deep copy on <i>other</i>.
30303
     */
30304
    public requestPickupNumber_args(requestPickupNumber_args other) {
30305
      __isset_bit_vector.clear();
30306
      __isset_bit_vector.or(other.__isset_bit_vector);
30307
      this.orderId = other.orderId;
30308
    }
30309
 
30310
    public requestPickupNumber_args deepCopy() {
30311
      return new requestPickupNumber_args(this);
30312
    }
30313
 
30314
    @Deprecated
30315
    public requestPickupNumber_args clone() {
30316
      return new requestPickupNumber_args(this);
30317
    }
30318
 
30319
    public long getOrderId() {
30320
      return this.orderId;
30321
    }
30322
 
30323
    public requestPickupNumber_args setOrderId(long orderId) {
30324
      this.orderId = orderId;
30325
      setOrderIdIsSet(true);
30326
      return this;
30327
    }
30328
 
30329
    public void unsetOrderId() {
30330
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
30331
    }
30332
 
30333
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
30334
    public boolean isSetOrderId() {
30335
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
30336
    }
30337
 
30338
    public void setOrderIdIsSet(boolean value) {
30339
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
30340
    }
30341
 
30342
    public void setFieldValue(_Fields field, Object value) {
30343
      switch (field) {
30344
      case ORDER_ID:
30345
        if (value == null) {
30346
          unsetOrderId();
30347
        } else {
30348
          setOrderId((Long)value);
30349
        }
30350
        break;
30351
 
30352
      }
30353
    }
30354
 
30355
    public void setFieldValue(int fieldID, Object value) {
30356
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30357
    }
30358
 
30359
    public Object getFieldValue(_Fields field) {
30360
      switch (field) {
30361
      case ORDER_ID:
30362
        return new Long(getOrderId());
30363
 
30364
      }
30365
      throw new IllegalStateException();
30366
    }
30367
 
30368
    public Object getFieldValue(int fieldId) {
30369
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30370
    }
30371
 
30372
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30373
    public boolean isSet(_Fields field) {
30374
      switch (field) {
30375
      case ORDER_ID:
30376
        return isSetOrderId();
30377
      }
30378
      throw new IllegalStateException();
30379
    }
30380
 
30381
    public boolean isSet(int fieldID) {
30382
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30383
    }
30384
 
30385
    @Override
30386
    public boolean equals(Object that) {
30387
      if (that == null)
30388
        return false;
30389
      if (that instanceof requestPickupNumber_args)
30390
        return this.equals((requestPickupNumber_args)that);
30391
      return false;
30392
    }
30393
 
30394
    public boolean equals(requestPickupNumber_args that) {
30395
      if (that == null)
30396
        return false;
30397
 
30398
      boolean this_present_orderId = true;
30399
      boolean that_present_orderId = true;
30400
      if (this_present_orderId || that_present_orderId) {
30401
        if (!(this_present_orderId && that_present_orderId))
30402
          return false;
30403
        if (this.orderId != that.orderId)
30404
          return false;
30405
      }
30406
 
30407
      return true;
30408
    }
30409
 
30410
    @Override
30411
    public int hashCode() {
30412
      return 0;
30413
    }
30414
 
30415
    public int compareTo(requestPickupNumber_args other) {
30416
      if (!getClass().equals(other.getClass())) {
30417
        return getClass().getName().compareTo(other.getClass().getName());
30418
      }
30419
 
30420
      int lastComparison = 0;
30421
      requestPickupNumber_args typedOther = (requestPickupNumber_args)other;
30422
 
30423
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
30424
      if (lastComparison != 0) {
30425
        return lastComparison;
30426
      }
30427
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
30428
      if (lastComparison != 0) {
30429
        return lastComparison;
30430
      }
30431
      return 0;
30432
    }
30433
 
30434
    public void read(TProtocol iprot) throws TException {
30435
      TField field;
30436
      iprot.readStructBegin();
30437
      while (true)
30438
      {
30439
        field = iprot.readFieldBegin();
30440
        if (field.type == TType.STOP) { 
30441
          break;
30442
        }
30443
        _Fields fieldId = _Fields.findByThriftId(field.id);
30444
        if (fieldId == null) {
30445
          TProtocolUtil.skip(iprot, field.type);
30446
        } else {
30447
          switch (fieldId) {
30448
            case ORDER_ID:
30449
              if (field.type == TType.I64) {
30450
                this.orderId = iprot.readI64();
30451
                setOrderIdIsSet(true);
30452
              } else { 
30453
                TProtocolUtil.skip(iprot, field.type);
30454
              }
30455
              break;
30456
          }
30457
          iprot.readFieldEnd();
30458
        }
30459
      }
30460
      iprot.readStructEnd();
30461
      validate();
30462
    }
30463
 
30464
    public void write(TProtocol oprot) throws TException {
30465
      validate();
30466
 
30467
      oprot.writeStructBegin(STRUCT_DESC);
30468
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
30469
      oprot.writeI64(this.orderId);
30470
      oprot.writeFieldEnd();
30471
      oprot.writeFieldStop();
30472
      oprot.writeStructEnd();
30473
    }
30474
 
30475
    @Override
30476
    public String toString() {
30477
      StringBuilder sb = new StringBuilder("requestPickupNumber_args(");
30478
      boolean first = true;
30479
 
30480
      sb.append("orderId:");
30481
      sb.append(this.orderId);
30482
      first = false;
30483
      sb.append(")");
30484
      return sb.toString();
30485
    }
30486
 
30487
    public void validate() throws TException {
30488
      // check for required fields
30489
    }
30490
 
30491
  }
30492
 
30493
  public static class requestPickupNumber_result implements TBase<requestPickupNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_result>   {
30494
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_result");
30495
 
30496
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
30497
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
30498
 
30499
    private boolean success;
30500
    private TransactionServiceException ex;
30501
 
30502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30503
    public enum _Fields implements TFieldIdEnum {
30504
      SUCCESS((short)0, "success"),
30505
      EX((short)1, "ex");
30506
 
30507
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30508
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30509
 
30510
      static {
30511
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30512
          byId.put((int)field._thriftId, field);
30513
          byName.put(field.getFieldName(), field);
30514
        }
30515
      }
30516
 
30517
      /**
30518
       * Find the _Fields constant that matches fieldId, or null if its not found.
30519
       */
30520
      public static _Fields findByThriftId(int fieldId) {
30521
        return byId.get(fieldId);
30522
      }
30523
 
30524
      /**
30525
       * Find the _Fields constant that matches fieldId, throwing an exception
30526
       * if it is not found.
30527
       */
30528
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30529
        _Fields fields = findByThriftId(fieldId);
30530
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30531
        return fields;
30532
      }
30533
 
30534
      /**
30535
       * Find the _Fields constant that matches name, or null if its not found.
30536
       */
30537
      public static _Fields findByName(String name) {
30538
        return byName.get(name);
30539
      }
30540
 
30541
      private final short _thriftId;
30542
      private final String _fieldName;
30543
 
30544
      _Fields(short thriftId, String fieldName) {
30545
        _thriftId = thriftId;
30546
        _fieldName = fieldName;
30547
      }
30548
 
30549
      public short getThriftFieldId() {
30550
        return _thriftId;
30551
      }
30552
 
30553
      public String getFieldName() {
30554
        return _fieldName;
30555
      }
30556
    }
30557
 
30558
    // isset id assignments
30559
    private static final int __SUCCESS_ISSET_ID = 0;
30560
    private BitSet __isset_bit_vector = new BitSet(1);
30561
 
30562
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30563
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30564
          new FieldValueMetaData(TType.BOOL)));
30565
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
30566
          new FieldValueMetaData(TType.STRUCT)));
30567
    }});
30568
 
30569
    static {
30570
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_result.class, metaDataMap);
30571
    }
30572
 
30573
    public requestPickupNumber_result() {
30574
    }
30575
 
30576
    public requestPickupNumber_result(
30577
      boolean success,
30578
      TransactionServiceException ex)
30579
    {
30580
      this();
30581
      this.success = success;
30582
      setSuccessIsSet(true);
30583
      this.ex = ex;
30584
    }
30585
 
30586
    /**
30587
     * Performs a deep copy on <i>other</i>.
30588
     */
30589
    public requestPickupNumber_result(requestPickupNumber_result other) {
30590
      __isset_bit_vector.clear();
30591
      __isset_bit_vector.or(other.__isset_bit_vector);
30592
      this.success = other.success;
30593
      if (other.isSetEx()) {
30594
        this.ex = new TransactionServiceException(other.ex);
30595
      }
30596
    }
30597
 
30598
    public requestPickupNumber_result deepCopy() {
30599
      return new requestPickupNumber_result(this);
30600
    }
30601
 
30602
    @Deprecated
30603
    public requestPickupNumber_result clone() {
30604
      return new requestPickupNumber_result(this);
30605
    }
30606
 
30607
    public boolean isSuccess() {
30608
      return this.success;
30609
    }
30610
 
30611
    public requestPickupNumber_result setSuccess(boolean success) {
30612
      this.success = success;
30613
      setSuccessIsSet(true);
30614
      return this;
30615
    }
30616
 
30617
    public void unsetSuccess() {
30618
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
30619
    }
30620
 
30621
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30622
    public boolean isSetSuccess() {
30623
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
30624
    }
30625
 
30626
    public void setSuccessIsSet(boolean value) {
30627
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
30628
    }
30629
 
30630
    public TransactionServiceException getEx() {
30631
      return this.ex;
30632
    }
30633
 
30634
    public requestPickupNumber_result setEx(TransactionServiceException ex) {
30635
      this.ex = ex;
30636
      return this;
30637
    }
30638
 
30639
    public void unsetEx() {
30640
      this.ex = null;
30641
    }
30642
 
30643
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
30644
    public boolean isSetEx() {
30645
      return this.ex != null;
30646
    }
30647
 
30648
    public void setExIsSet(boolean value) {
30649
      if (!value) {
30650
        this.ex = null;
30651
      }
30652
    }
30653
 
30654
    public void setFieldValue(_Fields field, Object value) {
30655
      switch (field) {
30656
      case SUCCESS:
30657
        if (value == null) {
30658
          unsetSuccess();
30659
        } else {
30660
          setSuccess((Boolean)value);
30661
        }
30662
        break;
30663
 
30664
      case EX:
30665
        if (value == null) {
30666
          unsetEx();
30667
        } else {
30668
          setEx((TransactionServiceException)value);
30669
        }
30670
        break;
30671
 
30672
      }
30673
    }
30674
 
30675
    public void setFieldValue(int fieldID, Object value) {
30676
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30677
    }
30678
 
30679
    public Object getFieldValue(_Fields field) {
30680
      switch (field) {
30681
      case SUCCESS:
30682
        return new Boolean(isSuccess());
30683
 
30684
      case EX:
30685
        return getEx();
30686
 
30687
      }
30688
      throw new IllegalStateException();
30689
    }
30690
 
30691
    public Object getFieldValue(int fieldId) {
30692
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30693
    }
30694
 
30695
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30696
    public boolean isSet(_Fields field) {
30697
      switch (field) {
30698
      case SUCCESS:
30699
        return isSetSuccess();
30700
      case EX:
30701
        return isSetEx();
30702
      }
30703
      throw new IllegalStateException();
30704
    }
30705
 
30706
    public boolean isSet(int fieldID) {
30707
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30708
    }
30709
 
30710
    @Override
30711
    public boolean equals(Object that) {
30712
      if (that == null)
30713
        return false;
30714
      if (that instanceof requestPickupNumber_result)
30715
        return this.equals((requestPickupNumber_result)that);
30716
      return false;
30717
    }
30718
 
30719
    public boolean equals(requestPickupNumber_result that) {
30720
      if (that == null)
30721
        return false;
30722
 
30723
      boolean this_present_success = true;
30724
      boolean that_present_success = true;
30725
      if (this_present_success || that_present_success) {
30726
        if (!(this_present_success && that_present_success))
30727
          return false;
30728
        if (this.success != that.success)
30729
          return false;
30730
      }
30731
 
30732
      boolean this_present_ex = true && this.isSetEx();
30733
      boolean that_present_ex = true && that.isSetEx();
30734
      if (this_present_ex || that_present_ex) {
30735
        if (!(this_present_ex && that_present_ex))
30736
          return false;
30737
        if (!this.ex.equals(that.ex))
30738
          return false;
30739
      }
30740
 
30741
      return true;
30742
    }
30743
 
30744
    @Override
30745
    public int hashCode() {
30746
      return 0;
30747
    }
30748
 
30749
    public int compareTo(requestPickupNumber_result other) {
30750
      if (!getClass().equals(other.getClass())) {
30751
        return getClass().getName().compareTo(other.getClass().getName());
30752
      }
30753
 
30754
      int lastComparison = 0;
30755
      requestPickupNumber_result typedOther = (requestPickupNumber_result)other;
30756
 
30757
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30758
      if (lastComparison != 0) {
30759
        return lastComparison;
30760
      }
30761
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30762
      if (lastComparison != 0) {
30763
        return lastComparison;
30764
      }
30765
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
30766
      if (lastComparison != 0) {
30767
        return lastComparison;
30768
      }
30769
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
30770
      if (lastComparison != 0) {
30771
        return lastComparison;
30772
      }
30773
      return 0;
30774
    }
30775
 
30776
    public void read(TProtocol iprot) throws TException {
30777
      TField field;
30778
      iprot.readStructBegin();
30779
      while (true)
30780
      {
30781
        field = iprot.readFieldBegin();
30782
        if (field.type == TType.STOP) { 
30783
          break;
30784
        }
30785
        _Fields fieldId = _Fields.findByThriftId(field.id);
30786
        if (fieldId == null) {
30787
          TProtocolUtil.skip(iprot, field.type);
30788
        } else {
30789
          switch (fieldId) {
30790
            case SUCCESS:
30791
              if (field.type == TType.BOOL) {
30792
                this.success = iprot.readBool();
30793
                setSuccessIsSet(true);
30794
              } else { 
30795
                TProtocolUtil.skip(iprot, field.type);
30796
              }
30797
              break;
30798
            case EX:
30799
              if (field.type == TType.STRUCT) {
30800
                this.ex = new TransactionServiceException();
30801
                this.ex.read(iprot);
30802
              } else { 
30803
                TProtocolUtil.skip(iprot, field.type);
30804
              }
30805
              break;
30806
          }
30807
          iprot.readFieldEnd();
30808
        }
30809
      }
30810
      iprot.readStructEnd();
30811
      validate();
30812
    }
30813
 
30814
    public void write(TProtocol oprot) throws TException {
30815
      oprot.writeStructBegin(STRUCT_DESC);
30816
 
30817
      if (this.isSetSuccess()) {
30818
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30819
        oprot.writeBool(this.success);
30820
        oprot.writeFieldEnd();
30821
      } else if (this.isSetEx()) {
30822
        oprot.writeFieldBegin(EX_FIELD_DESC);
30823
        this.ex.write(oprot);
30824
        oprot.writeFieldEnd();
30825
      }
30826
      oprot.writeFieldStop();
30827
      oprot.writeStructEnd();
30828
    }
30829
 
30830
    @Override
30831
    public String toString() {
30832
      StringBuilder sb = new StringBuilder("requestPickupNumber_result(");
30833
      boolean first = true;
30834
 
30835
      sb.append("success:");
30836
      sb.append(this.success);
30837
      first = false;
30838
      if (!first) sb.append(", ");
30839
      sb.append("ex:");
30840
      if (this.ex == null) {
30841
        sb.append("null");
30842
      } else {
30843
        sb.append(this.ex);
30844
      }
30845
      first = false;
30846
      sb.append(")");
30847
      return sb.toString();
30848
    }
30849
 
30850
    public void validate() throws TException {
30851
      // check for required fields
30852
    }
30853
 
30854
  }
30855
 
30856
  public static class authorizePickup_args implements TBase<authorizePickup_args._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_args>   {
30857
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_args");
30858
 
30859
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
30860
    private static final TField PICKUP_NUMBER_FIELD_DESC = new TField("pickupNumber", TType.STRING, (short)2);
30861
 
30862
    private long orderId;
30863
    private String pickupNumber;
30864
 
30865
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30866
    public enum _Fields implements TFieldIdEnum {
30867
      ORDER_ID((short)1, "orderId"),
30868
      PICKUP_NUMBER((short)2, "pickupNumber");
30869
 
30870
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30871
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30872
 
30873
      static {
30874
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30875
          byId.put((int)field._thriftId, field);
30876
          byName.put(field.getFieldName(), field);
30877
        }
30878
      }
30879
 
30880
      /**
30881
       * Find the _Fields constant that matches fieldId, or null if its not found.
30882
       */
30883
      public static _Fields findByThriftId(int fieldId) {
30884
        return byId.get(fieldId);
30885
      }
30886
 
30887
      /**
30888
       * Find the _Fields constant that matches fieldId, throwing an exception
30889
       * if it is not found.
30890
       */
30891
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30892
        _Fields fields = findByThriftId(fieldId);
30893
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30894
        return fields;
30895
      }
30896
 
30897
      /**
30898
       * Find the _Fields constant that matches name, or null if its not found.
30899
       */
30900
      public static _Fields findByName(String name) {
30901
        return byName.get(name);
30902
      }
30903
 
30904
      private final short _thriftId;
30905
      private final String _fieldName;
30906
 
30907
      _Fields(short thriftId, String fieldName) {
30908
        _thriftId = thriftId;
30909
        _fieldName = fieldName;
30910
      }
30911
 
30912
      public short getThriftFieldId() {
30913
        return _thriftId;
30914
      }
30915
 
30916
      public String getFieldName() {
30917
        return _fieldName;
30918
      }
30919
    }
30920
 
30921
    // isset id assignments
30922
    private static final int __ORDERID_ISSET_ID = 0;
30923
    private BitSet __isset_bit_vector = new BitSet(1);
30924
 
30925
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30926
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
30927
          new FieldValueMetaData(TType.I64)));
30928
      put(_Fields.PICKUP_NUMBER, new FieldMetaData("pickupNumber", TFieldRequirementType.DEFAULT, 
30929
          new FieldValueMetaData(TType.STRING)));
30930
    }});
30931
 
30932
    static {
30933
      FieldMetaData.addStructMetaDataMap(authorizePickup_args.class, metaDataMap);
30934
    }
30935
 
30936
    public authorizePickup_args() {
30937
    }
30938
 
30939
    public authorizePickup_args(
30940
      long orderId,
30941
      String pickupNumber)
30942
    {
30943
      this();
30944
      this.orderId = orderId;
30945
      setOrderIdIsSet(true);
30946
      this.pickupNumber = pickupNumber;
30947
    }
30948
 
30949
    /**
30950
     * Performs a deep copy on <i>other</i>.
30951
     */
30952
    public authorizePickup_args(authorizePickup_args other) {
30953
      __isset_bit_vector.clear();
30954
      __isset_bit_vector.or(other.__isset_bit_vector);
30955
      this.orderId = other.orderId;
30956
      if (other.isSetPickupNumber()) {
30957
        this.pickupNumber = other.pickupNumber;
30958
      }
30959
    }
30960
 
30961
    public authorizePickup_args deepCopy() {
30962
      return new authorizePickup_args(this);
30963
    }
30964
 
30965
    @Deprecated
30966
    public authorizePickup_args clone() {
30967
      return new authorizePickup_args(this);
30968
    }
30969
 
30970
    public long getOrderId() {
30971
      return this.orderId;
30972
    }
30973
 
30974
    public authorizePickup_args setOrderId(long orderId) {
30975
      this.orderId = orderId;
30976
      setOrderIdIsSet(true);
30977
      return this;
30978
    }
30979
 
30980
    public void unsetOrderId() {
30981
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
30982
    }
30983
 
30984
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
30985
    public boolean isSetOrderId() {
30986
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
30987
    }
30988
 
30989
    public void setOrderIdIsSet(boolean value) {
30990
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
30991
    }
30992
 
30993
    public String getPickupNumber() {
30994
      return this.pickupNumber;
30995
    }
30996
 
30997
    public authorizePickup_args setPickupNumber(String pickupNumber) {
30998
      this.pickupNumber = pickupNumber;
30999
      return this;
31000
    }
31001
 
31002
    public void unsetPickupNumber() {
31003
      this.pickupNumber = null;
31004
    }
31005
 
31006
    /** Returns true if field pickupNumber is set (has been asigned a value) and false otherwise */
31007
    public boolean isSetPickupNumber() {
31008
      return this.pickupNumber != null;
31009
    }
31010
 
31011
    public void setPickupNumberIsSet(boolean value) {
31012
      if (!value) {
31013
        this.pickupNumber = null;
31014
      }
31015
    }
31016
 
31017
    public void setFieldValue(_Fields field, Object value) {
31018
      switch (field) {
31019
      case ORDER_ID:
31020
        if (value == null) {
31021
          unsetOrderId();
31022
        } else {
31023
          setOrderId((Long)value);
31024
        }
31025
        break;
31026
 
31027
      case PICKUP_NUMBER:
31028
        if (value == null) {
31029
          unsetPickupNumber();
31030
        } else {
31031
          setPickupNumber((String)value);
31032
        }
31033
        break;
31034
 
31035
      }
31036
    }
31037
 
31038
    public void setFieldValue(int fieldID, Object value) {
31039
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31040
    }
31041
 
31042
    public Object getFieldValue(_Fields field) {
31043
      switch (field) {
31044
      case ORDER_ID:
31045
        return new Long(getOrderId());
31046
 
31047
      case PICKUP_NUMBER:
31048
        return getPickupNumber();
31049
 
31050
      }
31051
      throw new IllegalStateException();
31052
    }
31053
 
31054
    public Object getFieldValue(int fieldId) {
31055
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31056
    }
31057
 
31058
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31059
    public boolean isSet(_Fields field) {
31060
      switch (field) {
31061
      case ORDER_ID:
31062
        return isSetOrderId();
31063
      case PICKUP_NUMBER:
31064
        return isSetPickupNumber();
31065
      }
31066
      throw new IllegalStateException();
31067
    }
31068
 
31069
    public boolean isSet(int fieldID) {
31070
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31071
    }
31072
 
31073
    @Override
31074
    public boolean equals(Object that) {
31075
      if (that == null)
31076
        return false;
31077
      if (that instanceof authorizePickup_args)
31078
        return this.equals((authorizePickup_args)that);
31079
      return false;
31080
    }
31081
 
31082
    public boolean equals(authorizePickup_args that) {
31083
      if (that == null)
31084
        return false;
31085
 
31086
      boolean this_present_orderId = true;
31087
      boolean that_present_orderId = true;
31088
      if (this_present_orderId || that_present_orderId) {
31089
        if (!(this_present_orderId && that_present_orderId))
31090
          return false;
31091
        if (this.orderId != that.orderId)
31092
          return false;
31093
      }
31094
 
31095
      boolean this_present_pickupNumber = true && this.isSetPickupNumber();
31096
      boolean that_present_pickupNumber = true && that.isSetPickupNumber();
31097
      if (this_present_pickupNumber || that_present_pickupNumber) {
31098
        if (!(this_present_pickupNumber && that_present_pickupNumber))
31099
          return false;
31100
        if (!this.pickupNumber.equals(that.pickupNumber))
31101
          return false;
31102
      }
31103
 
31104
      return true;
31105
    }
31106
 
31107
    @Override
31108
    public int hashCode() {
31109
      return 0;
31110
    }
31111
 
31112
    public int compareTo(authorizePickup_args other) {
31113
      if (!getClass().equals(other.getClass())) {
31114
        return getClass().getName().compareTo(other.getClass().getName());
31115
      }
31116
 
31117
      int lastComparison = 0;
31118
      authorizePickup_args typedOther = (authorizePickup_args)other;
31119
 
31120
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
31121
      if (lastComparison != 0) {
31122
        return lastComparison;
31123
      }
31124
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
31125
      if (lastComparison != 0) {
31126
        return lastComparison;
31127
      }
31128
      lastComparison = Boolean.valueOf(isSetPickupNumber()).compareTo(isSetPickupNumber());
31129
      if (lastComparison != 0) {
31130
        return lastComparison;
31131
      }
31132
      lastComparison = TBaseHelper.compareTo(pickupNumber, typedOther.pickupNumber);
31133
      if (lastComparison != 0) {
31134
        return lastComparison;
31135
      }
31136
      return 0;
31137
    }
31138
 
31139
    public void read(TProtocol iprot) throws TException {
31140
      TField field;
31141
      iprot.readStructBegin();
31142
      while (true)
31143
      {
31144
        field = iprot.readFieldBegin();
31145
        if (field.type == TType.STOP) { 
31146
          break;
31147
        }
31148
        _Fields fieldId = _Fields.findByThriftId(field.id);
31149
        if (fieldId == null) {
31150
          TProtocolUtil.skip(iprot, field.type);
31151
        } else {
31152
          switch (fieldId) {
31153
            case ORDER_ID:
31154
              if (field.type == TType.I64) {
31155
                this.orderId = iprot.readI64();
31156
                setOrderIdIsSet(true);
31157
              } else { 
31158
                TProtocolUtil.skip(iprot, field.type);
31159
              }
31160
              break;
31161
            case PICKUP_NUMBER:
31162
              if (field.type == TType.STRING) {
31163
                this.pickupNumber = iprot.readString();
31164
              } else { 
31165
                TProtocolUtil.skip(iprot, field.type);
31166
              }
31167
              break;
31168
          }
31169
          iprot.readFieldEnd();
31170
        }
31171
      }
31172
      iprot.readStructEnd();
31173
      validate();
31174
    }
31175
 
31176
    public void write(TProtocol oprot) throws TException {
31177
      validate();
31178
 
31179
      oprot.writeStructBegin(STRUCT_DESC);
31180
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
31181
      oprot.writeI64(this.orderId);
31182
      oprot.writeFieldEnd();
31183
      if (this.pickupNumber != null) {
31184
        oprot.writeFieldBegin(PICKUP_NUMBER_FIELD_DESC);
31185
        oprot.writeString(this.pickupNumber);
31186
        oprot.writeFieldEnd();
31187
      }
31188
      oprot.writeFieldStop();
31189
      oprot.writeStructEnd();
31190
    }
31191
 
31192
    @Override
31193
    public String toString() {
31194
      StringBuilder sb = new StringBuilder("authorizePickup_args(");
31195
      boolean first = true;
31196
 
31197
      sb.append("orderId:");
31198
      sb.append(this.orderId);
31199
      first = false;
31200
      if (!first) sb.append(", ");
31201
      sb.append("pickupNumber:");
31202
      if (this.pickupNumber == null) {
31203
        sb.append("null");
31204
      } else {
31205
        sb.append(this.pickupNumber);
31206
      }
31207
      first = false;
31208
      sb.append(")");
31209
      return sb.toString();
31210
    }
31211
 
31212
    public void validate() throws TException {
31213
      // check for required fields
31214
    }
31215
 
31216
  }
31217
 
31218
  public static class authorizePickup_result implements TBase<authorizePickup_result._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_result>   {
31219
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_result");
31220
 
31221
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
31222
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
31223
 
31224
    private boolean success;
31225
    private TransactionServiceException ex;
31226
 
31227
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31228
    public enum _Fields implements TFieldIdEnum {
31229
      SUCCESS((short)0, "success"),
31230
      EX((short)1, "ex");
31231
 
31232
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31233
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31234
 
31235
      static {
31236
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31237
          byId.put((int)field._thriftId, field);
31238
          byName.put(field.getFieldName(), field);
31239
        }
31240
      }
31241
 
31242
      /**
31243
       * Find the _Fields constant that matches fieldId, or null if its not found.
31244
       */
31245
      public static _Fields findByThriftId(int fieldId) {
31246
        return byId.get(fieldId);
31247
      }
31248
 
31249
      /**
31250
       * Find the _Fields constant that matches fieldId, throwing an exception
31251
       * if it is not found.
31252
       */
31253
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31254
        _Fields fields = findByThriftId(fieldId);
31255
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31256
        return fields;
31257
      }
31258
 
31259
      /**
31260
       * Find the _Fields constant that matches name, or null if its not found.
31261
       */
31262
      public static _Fields findByName(String name) {
31263
        return byName.get(name);
31264
      }
31265
 
31266
      private final short _thriftId;
31267
      private final String _fieldName;
31268
 
31269
      _Fields(short thriftId, String fieldName) {
31270
        _thriftId = thriftId;
31271
        _fieldName = fieldName;
31272
      }
31273
 
31274
      public short getThriftFieldId() {
31275
        return _thriftId;
31276
      }
31277
 
31278
      public String getFieldName() {
31279
        return _fieldName;
31280
      }
31281
    }
31282
 
31283
    // isset id assignments
31284
    private static final int __SUCCESS_ISSET_ID = 0;
31285
    private BitSet __isset_bit_vector = new BitSet(1);
31286
 
31287
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31288
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31289
          new FieldValueMetaData(TType.BOOL)));
31290
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
31291
          new FieldValueMetaData(TType.STRUCT)));
31292
    }});
31293
 
31294
    static {
31295
      FieldMetaData.addStructMetaDataMap(authorizePickup_result.class, metaDataMap);
31296
    }
31297
 
31298
    public authorizePickup_result() {
31299
    }
31300
 
31301
    public authorizePickup_result(
31302
      boolean success,
31303
      TransactionServiceException ex)
31304
    {
31305
      this();
31306
      this.success = success;
31307
      setSuccessIsSet(true);
31308
      this.ex = ex;
31309
    }
31310
 
31311
    /**
31312
     * Performs a deep copy on <i>other</i>.
31313
     */
31314
    public authorizePickup_result(authorizePickup_result other) {
31315
      __isset_bit_vector.clear();
31316
      __isset_bit_vector.or(other.__isset_bit_vector);
31317
      this.success = other.success;
31318
      if (other.isSetEx()) {
31319
        this.ex = new TransactionServiceException(other.ex);
31320
      }
31321
    }
31322
 
31323
    public authorizePickup_result deepCopy() {
31324
      return new authorizePickup_result(this);
31325
    }
31326
 
31327
    @Deprecated
31328
    public authorizePickup_result clone() {
31329
      return new authorizePickup_result(this);
31330
    }
31331
 
31332
    public boolean isSuccess() {
31333
      return this.success;
31334
    }
31335
 
31336
    public authorizePickup_result setSuccess(boolean success) {
31337
      this.success = success;
31338
      setSuccessIsSet(true);
31339
      return this;
31340
    }
31341
 
31342
    public void unsetSuccess() {
31343
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
31344
    }
31345
 
31346
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31347
    public boolean isSetSuccess() {
31348
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
31349
    }
31350
 
31351
    public void setSuccessIsSet(boolean value) {
31352
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
31353
    }
31354
 
31355
    public TransactionServiceException getEx() {
31356
      return this.ex;
31357
    }
31358
 
31359
    public authorizePickup_result setEx(TransactionServiceException ex) {
31360
      this.ex = ex;
31361
      return this;
31362
    }
31363
 
31364
    public void unsetEx() {
31365
      this.ex = null;
31366
    }
31367
 
31368
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
31369
    public boolean isSetEx() {
31370
      return this.ex != null;
31371
    }
31372
 
31373
    public void setExIsSet(boolean value) {
31374
      if (!value) {
31375
        this.ex = null;
31376
      }
31377
    }
31378
 
31379
    public void setFieldValue(_Fields field, Object value) {
31380
      switch (field) {
31381
      case SUCCESS:
31382
        if (value == null) {
31383
          unsetSuccess();
31384
        } else {
31385
          setSuccess((Boolean)value);
31386
        }
31387
        break;
31388
 
31389
      case EX:
31390
        if (value == null) {
31391
          unsetEx();
31392
        } else {
31393
          setEx((TransactionServiceException)value);
31394
        }
31395
        break;
31396
 
31397
      }
31398
    }
31399
 
31400
    public void setFieldValue(int fieldID, Object value) {
31401
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31402
    }
31403
 
31404
    public Object getFieldValue(_Fields field) {
31405
      switch (field) {
31406
      case SUCCESS:
31407
        return new Boolean(isSuccess());
31408
 
31409
      case EX:
31410
        return getEx();
31411
 
31412
      }
31413
      throw new IllegalStateException();
31414
    }
31415
 
31416
    public Object getFieldValue(int fieldId) {
31417
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31418
    }
31419
 
31420
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31421
    public boolean isSet(_Fields field) {
31422
      switch (field) {
31423
      case SUCCESS:
31424
        return isSetSuccess();
31425
      case EX:
31426
        return isSetEx();
31427
      }
31428
      throw new IllegalStateException();
31429
    }
31430
 
31431
    public boolean isSet(int fieldID) {
31432
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31433
    }
31434
 
31435
    @Override
31436
    public boolean equals(Object that) {
31437
      if (that == null)
31438
        return false;
31439
      if (that instanceof authorizePickup_result)
31440
        return this.equals((authorizePickup_result)that);
31441
      return false;
31442
    }
31443
 
31444
    public boolean equals(authorizePickup_result that) {
31445
      if (that == null)
31446
        return false;
31447
 
31448
      boolean this_present_success = true;
31449
      boolean that_present_success = true;
31450
      if (this_present_success || that_present_success) {
31451
        if (!(this_present_success && that_present_success))
31452
          return false;
31453
        if (this.success != that.success)
31454
          return false;
31455
      }
31456
 
31457
      boolean this_present_ex = true && this.isSetEx();
31458
      boolean that_present_ex = true && that.isSetEx();
31459
      if (this_present_ex || that_present_ex) {
31460
        if (!(this_present_ex && that_present_ex))
31461
          return false;
31462
        if (!this.ex.equals(that.ex))
31463
          return false;
31464
      }
31465
 
31466
      return true;
31467
    }
31468
 
31469
    @Override
31470
    public int hashCode() {
31471
      return 0;
31472
    }
31473
 
31474
    public int compareTo(authorizePickup_result other) {
31475
      if (!getClass().equals(other.getClass())) {
31476
        return getClass().getName().compareTo(other.getClass().getName());
31477
      }
31478
 
31479
      int lastComparison = 0;
31480
      authorizePickup_result typedOther = (authorizePickup_result)other;
31481
 
31482
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31483
      if (lastComparison != 0) {
31484
        return lastComparison;
31485
      }
31486
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31487
      if (lastComparison != 0) {
31488
        return lastComparison;
31489
      }
31490
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
31491
      if (lastComparison != 0) {
31492
        return lastComparison;
31493
      }
31494
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
31495
      if (lastComparison != 0) {
31496
        return lastComparison;
31497
      }
31498
      return 0;
31499
    }
31500
 
31501
    public void read(TProtocol iprot) throws TException {
31502
      TField field;
31503
      iprot.readStructBegin();
31504
      while (true)
31505
      {
31506
        field = iprot.readFieldBegin();
31507
        if (field.type == TType.STOP) { 
31508
          break;
31509
        }
31510
        _Fields fieldId = _Fields.findByThriftId(field.id);
31511
        if (fieldId == null) {
31512
          TProtocolUtil.skip(iprot, field.type);
31513
        } else {
31514
          switch (fieldId) {
31515
            case SUCCESS:
31516
              if (field.type == TType.BOOL) {
31517
                this.success = iprot.readBool();
31518
                setSuccessIsSet(true);
31519
              } else { 
31520
                TProtocolUtil.skip(iprot, field.type);
31521
              }
31522
              break;
31523
            case EX:
31524
              if (field.type == TType.STRUCT) {
31525
                this.ex = new TransactionServiceException();
31526
                this.ex.read(iprot);
31527
              } else { 
31528
                TProtocolUtil.skip(iprot, field.type);
31529
              }
31530
              break;
31531
          }
31532
          iprot.readFieldEnd();
31533
        }
31534
      }
31535
      iprot.readStructEnd();
31536
      validate();
31537
    }
31538
 
31539
    public void write(TProtocol oprot) throws TException {
31540
      oprot.writeStructBegin(STRUCT_DESC);
31541
 
31542
      if (this.isSetSuccess()) {
31543
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31544
        oprot.writeBool(this.success);
31545
        oprot.writeFieldEnd();
31546
      } else if (this.isSetEx()) {
31547
        oprot.writeFieldBegin(EX_FIELD_DESC);
31548
        this.ex.write(oprot);
31549
        oprot.writeFieldEnd();
31550
      }
31551
      oprot.writeFieldStop();
31552
      oprot.writeStructEnd();
31553
    }
31554
 
31555
    @Override
31556
    public String toString() {
31557
      StringBuilder sb = new StringBuilder("authorizePickup_result(");
31558
      boolean first = true;
31559
 
31560
      sb.append("success:");
31561
      sb.append(this.success);
31562
      first = false;
31563
      if (!first) sb.append(", ");
31564
      sb.append("ex:");
31565
      if (this.ex == null) {
31566
        sb.append("null");
31567
      } else {
31568
        sb.append(this.ex);
31569
      }
31570
      first = false;
31571
      sb.append(")");
31572
      return sb.toString();
31573
    }
31574
 
31575
    public void validate() throws TException {
31576
      // check for required fields
31577
    }
31578
 
31579
  }
31580
 
2765 chandransh 31581
  public static class markDoasAsPickedUp_args implements TBase<markDoasAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
31582
    private static final TStruct STRUCT_DESC = new TStruct("markDoasAsPickedUp_args");
31583
 
31584
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
31585
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
31586
 
31587
    private long providerId;
31588
    private Map<String,String> pickupDetails;
31589
 
31590
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31591
    public enum _Fields implements TFieldIdEnum {
31592
      PROVIDER_ID((short)1, "providerId"),
31593
      PICKUP_DETAILS((short)2, "pickupDetails");
31594
 
31595
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31596
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31597
 
31598
      static {
31599
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31600
          byId.put((int)field._thriftId, field);
31601
          byName.put(field.getFieldName(), field);
31602
        }
31603
      }
31604
 
31605
      /**
31606
       * Find the _Fields constant that matches fieldId, or null if its not found.
31607
       */
31608
      public static _Fields findByThriftId(int fieldId) {
31609
        return byId.get(fieldId);
31610
      }
31611
 
31612
      /**
31613
       * Find the _Fields constant that matches fieldId, throwing an exception
31614
       * if it is not found.
31615
       */
31616
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31617
        _Fields fields = findByThriftId(fieldId);
31618
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31619
        return fields;
31620
      }
31621
 
31622
      /**
31623
       * Find the _Fields constant that matches name, or null if its not found.
31624
       */
31625
      public static _Fields findByName(String name) {
31626
        return byName.get(name);
31627
      }
31628
 
31629
      private final short _thriftId;
31630
      private final String _fieldName;
31631
 
31632
      _Fields(short thriftId, String fieldName) {
31633
        _thriftId = thriftId;
31634
        _fieldName = fieldName;
31635
      }
31636
 
31637
      public short getThriftFieldId() {
31638
        return _thriftId;
31639
      }
31640
 
31641
      public String getFieldName() {
31642
        return _fieldName;
31643
      }
31644
    }
31645
 
31646
    // isset id assignments
31647
    private static final int __PROVIDERID_ISSET_ID = 0;
31648
    private BitSet __isset_bit_vector = new BitSet(1);
31649
 
31650
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31651
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
31652
          new FieldValueMetaData(TType.I64)));
31653
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
31654
          new MapMetaData(TType.MAP, 
31655
              new FieldValueMetaData(TType.STRING), 
31656
              new FieldValueMetaData(TType.STRING))));
31657
    }});
31658
 
31659
    static {
31660
      FieldMetaData.addStructMetaDataMap(markDoasAsPickedUp_args.class, metaDataMap);
31661
    }
31662
 
31663
    public markDoasAsPickedUp_args() {
31664
    }
31665
 
31666
    public markDoasAsPickedUp_args(
31667
      long providerId,
31668
      Map<String,String> pickupDetails)
31669
    {
31670
      this();
31671
      this.providerId = providerId;
31672
      setProviderIdIsSet(true);
31673
      this.pickupDetails = pickupDetails;
31674
    }
31675
 
31676
    /**
31677
     * Performs a deep copy on <i>other</i>.
31678
     */
31679
    public markDoasAsPickedUp_args(markDoasAsPickedUp_args other) {
31680
      __isset_bit_vector.clear();
31681
      __isset_bit_vector.or(other.__isset_bit_vector);
31682
      this.providerId = other.providerId;
31683
      if (other.isSetPickupDetails()) {
31684
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
31685
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
31686
 
31687
          String other_element_key = other_element.getKey();
31688
          String other_element_value = other_element.getValue();
31689
 
31690
          String __this__pickupDetails_copy_key = other_element_key;
31691
 
31692
          String __this__pickupDetails_copy_value = other_element_value;
31693
 
31694
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
31695
        }
31696
        this.pickupDetails = __this__pickupDetails;
31697
      }
31698
    }
31699
 
31700
    public markDoasAsPickedUp_args deepCopy() {
31701
      return new markDoasAsPickedUp_args(this);
31702
    }
31703
 
31704
    @Deprecated
31705
    public markDoasAsPickedUp_args clone() {
31706
      return new markDoasAsPickedUp_args(this);
31707
    }
31708
 
31709
    public long getProviderId() {
31710
      return this.providerId;
31711
    }
31712
 
31713
    public markDoasAsPickedUp_args setProviderId(long providerId) {
31714
      this.providerId = providerId;
31715
      setProviderIdIsSet(true);
31716
      return this;
31717
    }
31718
 
31719
    public void unsetProviderId() {
31720
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
31721
    }
31722
 
31723
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
31724
    public boolean isSetProviderId() {
31725
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
31726
    }
31727
 
31728
    public void setProviderIdIsSet(boolean value) {
31729
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
31730
    }
31731
 
31732
    public int getPickupDetailsSize() {
31733
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
31734
    }
31735
 
31736
    public void putToPickupDetails(String key, String val) {
31737
      if (this.pickupDetails == null) {
31738
        this.pickupDetails = new HashMap<String,String>();
31739
      }
31740
      this.pickupDetails.put(key, val);
31741
    }
31742
 
31743
    public Map<String,String> getPickupDetails() {
31744
      return this.pickupDetails;
31745
    }
31746
 
31747
    public markDoasAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
31748
      this.pickupDetails = pickupDetails;
31749
      return this;
31750
    }
31751
 
31752
    public void unsetPickupDetails() {
31753
      this.pickupDetails = null;
31754
    }
31755
 
31756
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
31757
    public boolean isSetPickupDetails() {
31758
      return this.pickupDetails != null;
31759
    }
31760
 
31761
    public void setPickupDetailsIsSet(boolean value) {
31762
      if (!value) {
31763
        this.pickupDetails = null;
31764
      }
31765
    }
31766
 
31767
    public void setFieldValue(_Fields field, Object value) {
31768
      switch (field) {
31769
      case PROVIDER_ID:
31770
        if (value == null) {
31771
          unsetProviderId();
31772
        } else {
31773
          setProviderId((Long)value);
31774
        }
31775
        break;
31776
 
31777
      case PICKUP_DETAILS:
31778
        if (value == null) {
31779
          unsetPickupDetails();
31780
        } else {
31781
          setPickupDetails((Map<String,String>)value);
31782
        }
31783
        break;
31784
 
31785
      }
31786
    }
31787
 
31788
    public void setFieldValue(int fieldID, Object value) {
31789
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31790
    }
31791
 
31792
    public Object getFieldValue(_Fields field) {
31793
      switch (field) {
31794
      case PROVIDER_ID:
31795
        return new Long(getProviderId());
31796
 
31797
      case PICKUP_DETAILS:
31798
        return getPickupDetails();
31799
 
31800
      }
31801
      throw new IllegalStateException();
31802
    }
31803
 
31804
    public Object getFieldValue(int fieldId) {
31805
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31806
    }
31807
 
31808
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31809
    public boolean isSet(_Fields field) {
31810
      switch (field) {
31811
      case PROVIDER_ID:
31812
        return isSetProviderId();
31813
      case PICKUP_DETAILS:
31814
        return isSetPickupDetails();
31815
      }
31816
      throw new IllegalStateException();
31817
    }
31818
 
31819
    public boolean isSet(int fieldID) {
31820
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31821
    }
31822
 
31823
    @Override
31824
    public boolean equals(Object that) {
31825
      if (that == null)
31826
        return false;
31827
      if (that instanceof markDoasAsPickedUp_args)
31828
        return this.equals((markDoasAsPickedUp_args)that);
31829
      return false;
31830
    }
31831
 
31832
    public boolean equals(markDoasAsPickedUp_args that) {
31833
      if (that == null)
31834
        return false;
31835
 
31836
      boolean this_present_providerId = true;
31837
      boolean that_present_providerId = true;
31838
      if (this_present_providerId || that_present_providerId) {
31839
        if (!(this_present_providerId && that_present_providerId))
31840
          return false;
31841
        if (this.providerId != that.providerId)
31842
          return false;
31843
      }
31844
 
31845
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
31846
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
31847
      if (this_present_pickupDetails || that_present_pickupDetails) {
31848
        if (!(this_present_pickupDetails && that_present_pickupDetails))
31849
          return false;
31850
        if (!this.pickupDetails.equals(that.pickupDetails))
31851
          return false;
31852
      }
31853
 
31854
      return true;
31855
    }
31856
 
31857
    @Override
31858
    public int hashCode() {
31859
      return 0;
31860
    }
31861
 
31862
    public void read(TProtocol iprot) throws TException {
31863
      TField field;
31864
      iprot.readStructBegin();
31865
      while (true)
31866
      {
31867
        field = iprot.readFieldBegin();
31868
        if (field.type == TType.STOP) { 
31869
          break;
31870
        }
31871
        _Fields fieldId = _Fields.findByThriftId(field.id);
31872
        if (fieldId == null) {
31873
          TProtocolUtil.skip(iprot, field.type);
31874
        } else {
31875
          switch (fieldId) {
31876
            case PROVIDER_ID:
31877
              if (field.type == TType.I64) {
31878
                this.providerId = iprot.readI64();
31879
                setProviderIdIsSet(true);
31880
              } else { 
31881
                TProtocolUtil.skip(iprot, field.type);
31882
              }
31883
              break;
31884
            case PICKUP_DETAILS:
31885
              if (field.type == TType.MAP) {
31886
                {
31887
                  TMap _map88 = iprot.readMapBegin();
31888
                  this.pickupDetails = new HashMap<String,String>(2*_map88.size);
31889
                  for (int _i89 = 0; _i89 < _map88.size; ++_i89)
31890
                  {
31891
                    String _key90;
31892
                    String _val91;
31893
                    _key90 = iprot.readString();
31894
                    _val91 = iprot.readString();
31895
                    this.pickupDetails.put(_key90, _val91);
31896
                  }
31897
                  iprot.readMapEnd();
31898
                }
31899
              } else { 
31900
                TProtocolUtil.skip(iprot, field.type);
31901
              }
31902
              break;
31903
          }
31904
          iprot.readFieldEnd();
31905
        }
31906
      }
31907
      iprot.readStructEnd();
31908
      validate();
31909
    }
31910
 
31911
    public void write(TProtocol oprot) throws TException {
31912
      validate();
31913
 
31914
      oprot.writeStructBegin(STRUCT_DESC);
31915
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
31916
      oprot.writeI64(this.providerId);
31917
      oprot.writeFieldEnd();
31918
      if (this.pickupDetails != null) {
31919
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
31920
        {
31921
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
31922
          for (Map.Entry<String, String> _iter92 : this.pickupDetails.entrySet())
31923
          {
31924
            oprot.writeString(_iter92.getKey());
31925
            oprot.writeString(_iter92.getValue());
31926
          }
31927
          oprot.writeMapEnd();
31928
        }
31929
        oprot.writeFieldEnd();
31930
      }
31931
      oprot.writeFieldStop();
31932
      oprot.writeStructEnd();
31933
    }
31934
 
31935
    @Override
31936
    public String toString() {
31937
      StringBuilder sb = new StringBuilder("markDoasAsPickedUp_args(");
31938
      boolean first = true;
31939
 
31940
      sb.append("providerId:");
31941
      sb.append(this.providerId);
31942
      first = false;
31943
      if (!first) sb.append(", ");
31944
      sb.append("pickupDetails:");
31945
      if (this.pickupDetails == null) {
31946
        sb.append("null");
31947
      } else {
31948
        sb.append(this.pickupDetails);
31949
      }
31950
      first = false;
31951
      sb.append(")");
31952
      return sb.toString();
31953
    }
31954
 
31955
    public void validate() throws TException {
31956
      // check for required fields
31957
    }
31958
 
31959
  }
31960
 
31961
  public static class markDoasAsPickedUp_result implements TBase<markDoasAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markDoasAsPickedUp_result>   {
31962
    private static final TStruct STRUCT_DESC = new TStruct("markDoasAsPickedUp_result");
31963
 
31964
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
31965
 
31966
    private List<Order> success;
31967
 
31968
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31969
    public enum _Fields implements TFieldIdEnum {
31970
      SUCCESS((short)0, "success");
31971
 
31972
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31973
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31974
 
31975
      static {
31976
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31977
          byId.put((int)field._thriftId, field);
31978
          byName.put(field.getFieldName(), field);
31979
        }
31980
      }
31981
 
31982
      /**
31983
       * Find the _Fields constant that matches fieldId, or null if its not found.
31984
       */
31985
      public static _Fields findByThriftId(int fieldId) {
31986
        return byId.get(fieldId);
31987
      }
31988
 
31989
      /**
31990
       * Find the _Fields constant that matches fieldId, throwing an exception
31991
       * if it is not found.
31992
       */
31993
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31994
        _Fields fields = findByThriftId(fieldId);
31995
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31996
        return fields;
31997
      }
31998
 
31999
      /**
32000
       * Find the _Fields constant that matches name, or null if its not found.
32001
       */
32002
      public static _Fields findByName(String name) {
32003
        return byName.get(name);
32004
      }
32005
 
32006
      private final short _thriftId;
32007
      private final String _fieldName;
32008
 
32009
      _Fields(short thriftId, String fieldName) {
32010
        _thriftId = thriftId;
32011
        _fieldName = fieldName;
32012
      }
32013
 
32014
      public short getThriftFieldId() {
32015
        return _thriftId;
32016
      }
32017
 
32018
      public String getFieldName() {
32019
        return _fieldName;
32020
      }
32021
    }
32022
 
32023
    // isset id assignments
32024
 
32025
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32026
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
32027
          new ListMetaData(TType.LIST, 
32028
              new StructMetaData(TType.STRUCT, Order.class))));
32029
    }});
32030
 
32031
    static {
32032
      FieldMetaData.addStructMetaDataMap(markDoasAsPickedUp_result.class, metaDataMap);
32033
    }
32034
 
32035
    public markDoasAsPickedUp_result() {
32036
    }
32037
 
32038
    public markDoasAsPickedUp_result(
32039
      List<Order> success)
32040
    {
32041
      this();
32042
      this.success = success;
32043
    }
32044
 
32045
    /**
32046
     * Performs a deep copy on <i>other</i>.
32047
     */
32048
    public markDoasAsPickedUp_result(markDoasAsPickedUp_result other) {
32049
      if (other.isSetSuccess()) {
32050
        List<Order> __this__success = new ArrayList<Order>();
32051
        for (Order other_element : other.success) {
32052
          __this__success.add(new Order(other_element));
32053
        }
32054
        this.success = __this__success;
32055
      }
32056
    }
32057
 
32058
    public markDoasAsPickedUp_result deepCopy() {
32059
      return new markDoasAsPickedUp_result(this);
32060
    }
32061
 
32062
    @Deprecated
32063
    public markDoasAsPickedUp_result clone() {
32064
      return new markDoasAsPickedUp_result(this);
32065
    }
32066
 
32067
    public int getSuccessSize() {
32068
      return (this.success == null) ? 0 : this.success.size();
32069
    }
32070
 
32071
    public java.util.Iterator<Order> getSuccessIterator() {
32072
      return (this.success == null) ? null : this.success.iterator();
32073
    }
32074
 
32075
    public void addToSuccess(Order elem) {
32076
      if (this.success == null) {
32077
        this.success = new ArrayList<Order>();
32078
      }
32079
      this.success.add(elem);
32080
    }
32081
 
32082
    public List<Order> getSuccess() {
32083
      return this.success;
32084
    }
32085
 
32086
    public markDoasAsPickedUp_result setSuccess(List<Order> success) {
32087
      this.success = success;
32088
      return this;
32089
    }
32090
 
32091
    public void unsetSuccess() {
32092
      this.success = null;
32093
    }
32094
 
32095
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32096
    public boolean isSetSuccess() {
32097
      return this.success != null;
32098
    }
32099
 
32100
    public void setSuccessIsSet(boolean value) {
32101
      if (!value) {
32102
        this.success = null;
32103
      }
32104
    }
32105
 
32106
    public void setFieldValue(_Fields field, Object value) {
32107
      switch (field) {
32108
      case SUCCESS:
32109
        if (value == null) {
32110
          unsetSuccess();
32111
        } else {
32112
          setSuccess((List<Order>)value);
32113
        }
32114
        break;
32115
 
32116
      }
32117
    }
32118
 
32119
    public void setFieldValue(int fieldID, Object value) {
32120
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32121
    }
32122
 
32123
    public Object getFieldValue(_Fields field) {
32124
      switch (field) {
32125
      case SUCCESS:
32126
        return getSuccess();
32127
 
32128
      }
32129
      throw new IllegalStateException();
32130
    }
32131
 
32132
    public Object getFieldValue(int fieldId) {
32133
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32134
    }
32135
 
32136
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32137
    public boolean isSet(_Fields field) {
32138
      switch (field) {
32139
      case SUCCESS:
32140
        return isSetSuccess();
32141
      }
32142
      throw new IllegalStateException();
32143
    }
32144
 
32145
    public boolean isSet(int fieldID) {
32146
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32147
    }
32148
 
32149
    @Override
32150
    public boolean equals(Object that) {
32151
      if (that == null)
32152
        return false;
32153
      if (that instanceof markDoasAsPickedUp_result)
32154
        return this.equals((markDoasAsPickedUp_result)that);
32155
      return false;
32156
    }
32157
 
32158
    public boolean equals(markDoasAsPickedUp_result that) {
32159
      if (that == null)
32160
        return false;
32161
 
32162
      boolean this_present_success = true && this.isSetSuccess();
32163
      boolean that_present_success = true && that.isSetSuccess();
32164
      if (this_present_success || that_present_success) {
32165
        if (!(this_present_success && that_present_success))
32166
          return false;
32167
        if (!this.success.equals(that.success))
32168
          return false;
32169
      }
32170
 
32171
      return true;
32172
    }
32173
 
32174
    @Override
32175
    public int hashCode() {
32176
      return 0;
32177
    }
32178
 
32179
    public int compareTo(markDoasAsPickedUp_result other) {
32180
      if (!getClass().equals(other.getClass())) {
32181
        return getClass().getName().compareTo(other.getClass().getName());
32182
      }
32183
 
32184
      int lastComparison = 0;
32185
      markDoasAsPickedUp_result typedOther = (markDoasAsPickedUp_result)other;
32186
 
32187
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32188
      if (lastComparison != 0) {
32189
        return lastComparison;
32190
      }
32191
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32192
      if (lastComparison != 0) {
32193
        return lastComparison;
32194
      }
32195
      return 0;
32196
    }
32197
 
32198
    public void read(TProtocol iprot) throws TException {
32199
      TField field;
32200
      iprot.readStructBegin();
32201
      while (true)
32202
      {
32203
        field = iprot.readFieldBegin();
32204
        if (field.type == TType.STOP) { 
32205
          break;
32206
        }
32207
        _Fields fieldId = _Fields.findByThriftId(field.id);
32208
        if (fieldId == null) {
32209
          TProtocolUtil.skip(iprot, field.type);
32210
        } else {
32211
          switch (fieldId) {
32212
            case SUCCESS:
32213
              if (field.type == TType.LIST) {
32214
                {
32215
                  TList _list93 = iprot.readListBegin();
32216
                  this.success = new ArrayList<Order>(_list93.size);
32217
                  for (int _i94 = 0; _i94 < _list93.size; ++_i94)
32218
                  {
32219
                    Order _elem95;
32220
                    _elem95 = new Order();
32221
                    _elem95.read(iprot);
32222
                    this.success.add(_elem95);
32223
                  }
32224
                  iprot.readListEnd();
32225
                }
32226
              } else { 
32227
                TProtocolUtil.skip(iprot, field.type);
32228
              }
32229
              break;
32230
          }
32231
          iprot.readFieldEnd();
32232
        }
32233
      }
32234
      iprot.readStructEnd();
32235
      validate();
32236
    }
32237
 
32238
    public void write(TProtocol oprot) throws TException {
32239
      oprot.writeStructBegin(STRUCT_DESC);
32240
 
32241
      if (this.isSetSuccess()) {
32242
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32243
        {
32244
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
32245
          for (Order _iter96 : this.success)
32246
          {
32247
            _iter96.write(oprot);
32248
          }
32249
          oprot.writeListEnd();
32250
        }
32251
        oprot.writeFieldEnd();
32252
      }
32253
      oprot.writeFieldStop();
32254
      oprot.writeStructEnd();
32255
    }
32256
 
32257
    @Override
32258
    public String toString() {
32259
      StringBuilder sb = new StringBuilder("markDoasAsPickedUp_result(");
32260
      boolean first = true;
32261
 
32262
      sb.append("success:");
32263
      if (this.success == null) {
32264
        sb.append("null");
32265
      } else {
32266
        sb.append(this.success);
32267
      }
32268
      first = false;
32269
      sb.append(")");
32270
      return sb.toString();
32271
    }
32272
 
32273
    public void validate() throws TException {
32274
      // check for required fields
32275
    }
32276
 
32277
  }
32278
 
2615 chandransh 32279
  public static class receiveReturn_args implements TBase<receiveReturn_args._Fields>, java.io.Serializable, Cloneable, Comparable<receiveReturn_args>   {
32280
    private static final TStruct STRUCT_DESC = new TStruct("receiveReturn_args");
2590 chandransh 32281
 
32282
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
32283
 
32284
    private long orderId;
32285
 
32286
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32287
    public enum _Fields implements TFieldIdEnum {
32288
      ORDER_ID((short)1, "orderId");
32289
 
32290
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32291
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32292
 
32293
      static {
32294
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32295
          byId.put((int)field._thriftId, field);
32296
          byName.put(field.getFieldName(), field);
32297
        }
32298
      }
32299
 
32300
      /**
32301
       * Find the _Fields constant that matches fieldId, or null if its not found.
32302
       */
32303
      public static _Fields findByThriftId(int fieldId) {
32304
        return byId.get(fieldId);
32305
      }
32306
 
32307
      /**
32308
       * Find the _Fields constant that matches fieldId, throwing an exception
32309
       * if it is not found.
32310
       */
32311
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32312
        _Fields fields = findByThriftId(fieldId);
32313
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32314
        return fields;
32315
      }
32316
 
32317
      /**
32318
       * Find the _Fields constant that matches name, or null if its not found.
32319
       */
32320
      public static _Fields findByName(String name) {
32321
        return byName.get(name);
32322
      }
32323
 
32324
      private final short _thriftId;
32325
      private final String _fieldName;
32326
 
32327
      _Fields(short thriftId, String fieldName) {
32328
        _thriftId = thriftId;
32329
        _fieldName = fieldName;
32330
      }
32331
 
32332
      public short getThriftFieldId() {
32333
        return _thriftId;
32334
      }
32335
 
32336
      public String getFieldName() {
32337
        return _fieldName;
32338
      }
32339
    }
32340
 
32341
    // isset id assignments
32342
    private static final int __ORDERID_ISSET_ID = 0;
32343
    private BitSet __isset_bit_vector = new BitSet(1);
32344
 
32345
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32346
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
32347
          new FieldValueMetaData(TType.I64)));
32348
    }});
32349
 
32350
    static {
2615 chandransh 32351
      FieldMetaData.addStructMetaDataMap(receiveReturn_args.class, metaDataMap);
2590 chandransh 32352
    }
32353
 
2615 chandransh 32354
    public receiveReturn_args() {
2590 chandransh 32355
    }
32356
 
2615 chandransh 32357
    public receiveReturn_args(
2590 chandransh 32358
      long orderId)
32359
    {
32360
      this();
32361
      this.orderId = orderId;
32362
      setOrderIdIsSet(true);
32363
    }
32364
 
32365
    /**
32366
     * Performs a deep copy on <i>other</i>.
32367
     */
2615 chandransh 32368
    public receiveReturn_args(receiveReturn_args other) {
2590 chandransh 32369
      __isset_bit_vector.clear();
32370
      __isset_bit_vector.or(other.__isset_bit_vector);
32371
      this.orderId = other.orderId;
32372
    }
32373
 
2615 chandransh 32374
    public receiveReturn_args deepCopy() {
32375
      return new receiveReturn_args(this);
2590 chandransh 32376
    }
32377
 
32378
    @Deprecated
2615 chandransh 32379
    public receiveReturn_args clone() {
32380
      return new receiveReturn_args(this);
2590 chandransh 32381
    }
32382
 
32383
    public long getOrderId() {
32384
      return this.orderId;
32385
    }
32386
 
2615 chandransh 32387
    public receiveReturn_args setOrderId(long orderId) {
2590 chandransh 32388
      this.orderId = orderId;
32389
      setOrderIdIsSet(true);
32390
      return this;
32391
    }
32392
 
32393
    public void unsetOrderId() {
32394
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
32395
    }
32396
 
32397
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
32398
    public boolean isSetOrderId() {
32399
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
32400
    }
32401
 
32402
    public void setOrderIdIsSet(boolean value) {
32403
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
32404
    }
32405
 
32406
    public void setFieldValue(_Fields field, Object value) {
32407
      switch (field) {
32408
      case ORDER_ID:
32409
        if (value == null) {
32410
          unsetOrderId();
32411
        } else {
32412
          setOrderId((Long)value);
32413
        }
32414
        break;
32415
 
32416
      }
32417
    }
32418
 
32419
    public void setFieldValue(int fieldID, Object value) {
32420
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32421
    }
32422
 
32423
    public Object getFieldValue(_Fields field) {
32424
      switch (field) {
32425
      case ORDER_ID:
32426
        return new Long(getOrderId());
32427
 
32428
      }
32429
      throw new IllegalStateException();
32430
    }
32431
 
32432
    public Object getFieldValue(int fieldId) {
32433
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32434
    }
32435
 
32436
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32437
    public boolean isSet(_Fields field) {
32438
      switch (field) {
32439
      case ORDER_ID:
32440
        return isSetOrderId();
32441
      }
32442
      throw new IllegalStateException();
32443
    }
32444
 
32445
    public boolean isSet(int fieldID) {
32446
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32447
    }
32448
 
32449
    @Override
32450
    public boolean equals(Object that) {
32451
      if (that == null)
32452
        return false;
2615 chandransh 32453
      if (that instanceof receiveReturn_args)
32454
        return this.equals((receiveReturn_args)that);
2590 chandransh 32455
      return false;
32456
    }
32457
 
2615 chandransh 32458
    public boolean equals(receiveReturn_args that) {
2590 chandransh 32459
      if (that == null)
32460
        return false;
32461
 
32462
      boolean this_present_orderId = true;
32463
      boolean that_present_orderId = true;
32464
      if (this_present_orderId || that_present_orderId) {
32465
        if (!(this_present_orderId && that_present_orderId))
32466
          return false;
32467
        if (this.orderId != that.orderId)
32468
          return false;
32469
      }
32470
 
32471
      return true;
32472
    }
32473
 
32474
    @Override
32475
    public int hashCode() {
32476
      return 0;
32477
    }
32478
 
2615 chandransh 32479
    public int compareTo(receiveReturn_args other) {
2590 chandransh 32480
      if (!getClass().equals(other.getClass())) {
32481
        return getClass().getName().compareTo(other.getClass().getName());
32482
      }
32483
 
32484
      int lastComparison = 0;
2615 chandransh 32485
      receiveReturn_args typedOther = (receiveReturn_args)other;
2590 chandransh 32486
 
32487
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
32488
      if (lastComparison != 0) {
32489
        return lastComparison;
32490
      }
32491
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
32492
      if (lastComparison != 0) {
32493
        return lastComparison;
32494
      }
32495
      return 0;
32496
    }
32497
 
32498
    public void read(TProtocol iprot) throws TException {
32499
      TField field;
32500
      iprot.readStructBegin();
32501
      while (true)
32502
      {
32503
        field = iprot.readFieldBegin();
32504
        if (field.type == TType.STOP) { 
32505
          break;
32506
        }
32507
        _Fields fieldId = _Fields.findByThriftId(field.id);
32508
        if (fieldId == null) {
32509
          TProtocolUtil.skip(iprot, field.type);
32510
        } else {
32511
          switch (fieldId) {
32512
            case ORDER_ID:
32513
              if (field.type == TType.I64) {
32514
                this.orderId = iprot.readI64();
32515
                setOrderIdIsSet(true);
32516
              } else { 
32517
                TProtocolUtil.skip(iprot, field.type);
32518
              }
32519
              break;
32520
          }
32521
          iprot.readFieldEnd();
32522
        }
32523
      }
32524
      iprot.readStructEnd();
32525
      validate();
32526
    }
32527
 
32528
    public void write(TProtocol oprot) throws TException {
32529
      validate();
32530
 
32531
      oprot.writeStructBegin(STRUCT_DESC);
32532
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
32533
      oprot.writeI64(this.orderId);
32534
      oprot.writeFieldEnd();
32535
      oprot.writeFieldStop();
32536
      oprot.writeStructEnd();
32537
    }
32538
 
32539
    @Override
32540
    public String toString() {
2615 chandransh 32541
      StringBuilder sb = new StringBuilder("receiveReturn_args(");
2590 chandransh 32542
      boolean first = true;
32543
 
32544
      sb.append("orderId:");
32545
      sb.append(this.orderId);
32546
      first = false;
32547
      sb.append(")");
32548
      return sb.toString();
32549
    }
32550
 
32551
    public void validate() throws TException {
32552
      // check for required fields
32553
    }
32554
 
32555
  }
32556
 
2615 chandransh 32557
  public static class receiveReturn_result implements TBase<receiveReturn_result._Fields>, java.io.Serializable, Cloneable, Comparable<receiveReturn_result>   {
32558
    private static final TStruct STRUCT_DESC = new TStruct("receiveReturn_result");
2590 chandransh 32559
 
32560
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
32561
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
32562
 
32563
    private boolean success;
32564
    private TransactionServiceException ex;
32565
 
32566
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32567
    public enum _Fields implements TFieldIdEnum {
32568
      SUCCESS((short)0, "success"),
32569
      EX((short)1, "ex");
32570
 
32571
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32572
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32573
 
32574
      static {
32575
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32576
          byId.put((int)field._thriftId, field);
32577
          byName.put(field.getFieldName(), field);
32578
        }
32579
      }
32580
 
32581
      /**
32582
       * Find the _Fields constant that matches fieldId, or null if its not found.
32583
       */
32584
      public static _Fields findByThriftId(int fieldId) {
32585
        return byId.get(fieldId);
32586
      }
32587
 
32588
      /**
32589
       * Find the _Fields constant that matches fieldId, throwing an exception
32590
       * if it is not found.
32591
       */
32592
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32593
        _Fields fields = findByThriftId(fieldId);
32594
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32595
        return fields;
32596
      }
32597
 
32598
      /**
32599
       * Find the _Fields constant that matches name, or null if its not found.
32600
       */
32601
      public static _Fields findByName(String name) {
32602
        return byName.get(name);
32603
      }
32604
 
32605
      private final short _thriftId;
32606
      private final String _fieldName;
32607
 
32608
      _Fields(short thriftId, String fieldName) {
32609
        _thriftId = thriftId;
32610
        _fieldName = fieldName;
32611
      }
32612
 
32613
      public short getThriftFieldId() {
32614
        return _thriftId;
32615
      }
32616
 
32617
      public String getFieldName() {
32618
        return _fieldName;
32619
      }
32620
    }
32621
 
32622
    // isset id assignments
32623
    private static final int __SUCCESS_ISSET_ID = 0;
32624
    private BitSet __isset_bit_vector = new BitSet(1);
32625
 
32626
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32627
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
32628
          new FieldValueMetaData(TType.BOOL)));
32629
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
32630
          new FieldValueMetaData(TType.STRUCT)));
32631
    }});
32632
 
32633
    static {
2615 chandransh 32634
      FieldMetaData.addStructMetaDataMap(receiveReturn_result.class, metaDataMap);
2590 chandransh 32635
    }
32636
 
2615 chandransh 32637
    public receiveReturn_result() {
2590 chandransh 32638
    }
32639
 
2615 chandransh 32640
    public receiveReturn_result(
2590 chandransh 32641
      boolean success,
32642
      TransactionServiceException ex)
32643
    {
32644
      this();
32645
      this.success = success;
32646
      setSuccessIsSet(true);
32647
      this.ex = ex;
32648
    }
32649
 
32650
    /**
32651
     * Performs a deep copy on <i>other</i>.
32652
     */
2615 chandransh 32653
    public receiveReturn_result(receiveReturn_result other) {
2590 chandransh 32654
      __isset_bit_vector.clear();
32655
      __isset_bit_vector.or(other.__isset_bit_vector);
32656
      this.success = other.success;
32657
      if (other.isSetEx()) {
32658
        this.ex = new TransactionServiceException(other.ex);
32659
      }
32660
    }
32661
 
2615 chandransh 32662
    public receiveReturn_result deepCopy() {
32663
      return new receiveReturn_result(this);
2590 chandransh 32664
    }
32665
 
32666
    @Deprecated
2615 chandransh 32667
    public receiveReturn_result clone() {
32668
      return new receiveReturn_result(this);
2590 chandransh 32669
    }
32670
 
32671
    public boolean isSuccess() {
32672
      return this.success;
32673
    }
32674
 
2615 chandransh 32675
    public receiveReturn_result setSuccess(boolean success) {
2590 chandransh 32676
      this.success = success;
32677
      setSuccessIsSet(true);
32678
      return this;
32679
    }
32680
 
32681
    public void unsetSuccess() {
32682
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
32683
    }
32684
 
32685
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32686
    public boolean isSetSuccess() {
32687
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
32688
    }
32689
 
32690
    public void setSuccessIsSet(boolean value) {
32691
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
32692
    }
32693
 
32694
    public TransactionServiceException getEx() {
32695
      return this.ex;
32696
    }
32697
 
2615 chandransh 32698
    public receiveReturn_result setEx(TransactionServiceException ex) {
2590 chandransh 32699
      this.ex = ex;
32700
      return this;
32701
    }
32702
 
32703
    public void unsetEx() {
32704
      this.ex = null;
32705
    }
32706
 
32707
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
32708
    public boolean isSetEx() {
32709
      return this.ex != null;
32710
    }
32711
 
32712
    public void setExIsSet(boolean value) {
32713
      if (!value) {
32714
        this.ex = null;
32715
      }
32716
    }
32717
 
32718
    public void setFieldValue(_Fields field, Object value) {
32719
      switch (field) {
32720
      case SUCCESS:
32721
        if (value == null) {
32722
          unsetSuccess();
32723
        } else {
32724
          setSuccess((Boolean)value);
32725
        }
32726
        break;
32727
 
32728
      case EX:
32729
        if (value == null) {
32730
          unsetEx();
32731
        } else {
32732
          setEx((TransactionServiceException)value);
32733
        }
32734
        break;
32735
 
32736
      }
32737
    }
32738
 
32739
    public void setFieldValue(int fieldID, Object value) {
32740
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32741
    }
32742
 
32743
    public Object getFieldValue(_Fields field) {
32744
      switch (field) {
32745
      case SUCCESS:
32746
        return new Boolean(isSuccess());
32747
 
32748
      case EX:
32749
        return getEx();
32750
 
32751
      }
32752
      throw new IllegalStateException();
32753
    }
32754
 
32755
    public Object getFieldValue(int fieldId) {
32756
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32757
    }
32758
 
32759
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32760
    public boolean isSet(_Fields field) {
32761
      switch (field) {
32762
      case SUCCESS:
32763
        return isSetSuccess();
32764
      case EX:
32765
        return isSetEx();
32766
      }
32767
      throw new IllegalStateException();
32768
    }
32769
 
32770
    public boolean isSet(int fieldID) {
32771
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32772
    }
32773
 
32774
    @Override
32775
    public boolean equals(Object that) {
32776
      if (that == null)
32777
        return false;
2615 chandransh 32778
      if (that instanceof receiveReturn_result)
32779
        return this.equals((receiveReturn_result)that);
2590 chandransh 32780
      return false;
32781
    }
32782
 
2615 chandransh 32783
    public boolean equals(receiveReturn_result that) {
2590 chandransh 32784
      if (that == null)
32785
        return false;
32786
 
32787
      boolean this_present_success = true;
32788
      boolean that_present_success = true;
32789
      if (this_present_success || that_present_success) {
32790
        if (!(this_present_success && that_present_success))
32791
          return false;
32792
        if (this.success != that.success)
32793
          return false;
32794
      }
32795
 
32796
      boolean this_present_ex = true && this.isSetEx();
32797
      boolean that_present_ex = true && that.isSetEx();
32798
      if (this_present_ex || that_present_ex) {
32799
        if (!(this_present_ex && that_present_ex))
32800
          return false;
32801
        if (!this.ex.equals(that.ex))
32802
          return false;
32803
      }
32804
 
32805
      return true;
32806
    }
32807
 
32808
    @Override
32809
    public int hashCode() {
32810
      return 0;
32811
    }
32812
 
2615 chandransh 32813
    public int compareTo(receiveReturn_result other) {
2590 chandransh 32814
      if (!getClass().equals(other.getClass())) {
32815
        return getClass().getName().compareTo(other.getClass().getName());
32816
      }
32817
 
32818
      int lastComparison = 0;
2615 chandransh 32819
      receiveReturn_result typedOther = (receiveReturn_result)other;
2590 chandransh 32820
 
32821
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32822
      if (lastComparison != 0) {
32823
        return lastComparison;
32824
      }
32825
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32826
      if (lastComparison != 0) {
32827
        return lastComparison;
32828
      }
32829
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
32830
      if (lastComparison != 0) {
32831
        return lastComparison;
32832
      }
32833
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
32834
      if (lastComparison != 0) {
32835
        return lastComparison;
32836
      }
32837
      return 0;
32838
    }
32839
 
32840
    public void read(TProtocol iprot) throws TException {
32841
      TField field;
32842
      iprot.readStructBegin();
32843
      while (true)
32844
      {
32845
        field = iprot.readFieldBegin();
32846
        if (field.type == TType.STOP) { 
32847
          break;
32848
        }
32849
        _Fields fieldId = _Fields.findByThriftId(field.id);
32850
        if (fieldId == null) {
32851
          TProtocolUtil.skip(iprot, field.type);
32852
        } else {
32853
          switch (fieldId) {
32854
            case SUCCESS:
32855
              if (field.type == TType.BOOL) {
32856
                this.success = iprot.readBool();
32857
                setSuccessIsSet(true);
32858
              } else { 
32859
                TProtocolUtil.skip(iprot, field.type);
32860
              }
32861
              break;
32862
            case EX:
32863
              if (field.type == TType.STRUCT) {
32864
                this.ex = new TransactionServiceException();
32865
                this.ex.read(iprot);
32866
              } else { 
32867
                TProtocolUtil.skip(iprot, field.type);
32868
              }
32869
              break;
32870
          }
32871
          iprot.readFieldEnd();
32872
        }
32873
      }
32874
      iprot.readStructEnd();
32875
      validate();
32876
    }
32877
 
32878
    public void write(TProtocol oprot) throws TException {
32879
      oprot.writeStructBegin(STRUCT_DESC);
32880
 
32881
      if (this.isSetSuccess()) {
32882
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32883
        oprot.writeBool(this.success);
32884
        oprot.writeFieldEnd();
32885
      } else if (this.isSetEx()) {
32886
        oprot.writeFieldBegin(EX_FIELD_DESC);
32887
        this.ex.write(oprot);
32888
        oprot.writeFieldEnd();
32889
      }
32890
      oprot.writeFieldStop();
32891
      oprot.writeStructEnd();
32892
    }
32893
 
32894
    @Override
32895
    public String toString() {
2615 chandransh 32896
      StringBuilder sb = new StringBuilder("receiveReturn_result(");
2590 chandransh 32897
      boolean first = true;
32898
 
32899
      sb.append("success:");
32900
      sb.append(this.success);
32901
      first = false;
32902
      if (!first) sb.append(", ");
32903
      sb.append("ex:");
32904
      if (this.ex == null) {
32905
        sb.append("null");
32906
      } else {
32907
        sb.append(this.ex);
32908
      }
32909
      first = false;
32910
      sb.append(")");
32911
      return sb.toString();
32912
    }
32913
 
32914
    public void validate() throws TException {
32915
      // check for required fields
32916
    }
32917
 
32918
  }
32919
 
32920
  public static class validateDoa_args implements TBase<validateDoa_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_args>   {
32921
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_args");
32922
 
32923
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
32924
    private static final TField IS_VALID_FIELD_DESC = new TField("isValid", TType.BOOL, (short)2);
32925
 
32926
    private long orderId;
32927
    private boolean isValid;
32928
 
32929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32930
    public enum _Fields implements TFieldIdEnum {
32931
      ORDER_ID((short)1, "orderId"),
32932
      IS_VALID((short)2, "isValid");
32933
 
32934
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32935
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32936
 
32937
      static {
32938
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32939
          byId.put((int)field._thriftId, field);
32940
          byName.put(field.getFieldName(), field);
32941
        }
32942
      }
32943
 
32944
      /**
32945
       * Find the _Fields constant that matches fieldId, or null if its not found.
32946
       */
32947
      public static _Fields findByThriftId(int fieldId) {
32948
        return byId.get(fieldId);
32949
      }
32950
 
32951
      /**
32952
       * Find the _Fields constant that matches fieldId, throwing an exception
32953
       * if it is not found.
32954
       */
32955
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32956
        _Fields fields = findByThriftId(fieldId);
32957
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32958
        return fields;
32959
      }
32960
 
32961
      /**
32962
       * Find the _Fields constant that matches name, or null if its not found.
32963
       */
32964
      public static _Fields findByName(String name) {
32965
        return byName.get(name);
32966
      }
32967
 
32968
      private final short _thriftId;
32969
      private final String _fieldName;
32970
 
32971
      _Fields(short thriftId, String fieldName) {
32972
        _thriftId = thriftId;
32973
        _fieldName = fieldName;
32974
      }
32975
 
32976
      public short getThriftFieldId() {
32977
        return _thriftId;
32978
      }
32979
 
32980
      public String getFieldName() {
32981
        return _fieldName;
32982
      }
32983
    }
32984
 
32985
    // isset id assignments
32986
    private static final int __ORDERID_ISSET_ID = 0;
32987
    private static final int __ISVALID_ISSET_ID = 1;
32988
    private BitSet __isset_bit_vector = new BitSet(2);
32989
 
32990
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32991
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
32992
          new FieldValueMetaData(TType.I64)));
32993
      put(_Fields.IS_VALID, new FieldMetaData("isValid", TFieldRequirementType.DEFAULT, 
32994
          new FieldValueMetaData(TType.BOOL)));
32995
    }});
32996
 
32997
    static {
32998
      FieldMetaData.addStructMetaDataMap(validateDoa_args.class, metaDataMap);
32999
    }
33000
 
33001
    public validateDoa_args() {
33002
    }
33003
 
33004
    public validateDoa_args(
33005
      long orderId,
33006
      boolean isValid)
33007
    {
33008
      this();
33009
      this.orderId = orderId;
33010
      setOrderIdIsSet(true);
33011
      this.isValid = isValid;
33012
      setIsValidIsSet(true);
33013
    }
33014
 
33015
    /**
33016
     * Performs a deep copy on <i>other</i>.
33017
     */
33018
    public validateDoa_args(validateDoa_args other) {
33019
      __isset_bit_vector.clear();
33020
      __isset_bit_vector.or(other.__isset_bit_vector);
33021
      this.orderId = other.orderId;
33022
      this.isValid = other.isValid;
33023
    }
33024
 
33025
    public validateDoa_args deepCopy() {
33026
      return new validateDoa_args(this);
33027
    }
33028
 
33029
    @Deprecated
33030
    public validateDoa_args clone() {
33031
      return new validateDoa_args(this);
33032
    }
33033
 
33034
    public long getOrderId() {
33035
      return this.orderId;
33036
    }
33037
 
33038
    public validateDoa_args setOrderId(long orderId) {
33039
      this.orderId = orderId;
33040
      setOrderIdIsSet(true);
33041
      return this;
33042
    }
33043
 
33044
    public void unsetOrderId() {
33045
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
33046
    }
33047
 
33048
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
33049
    public boolean isSetOrderId() {
33050
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
33051
    }
33052
 
33053
    public void setOrderIdIsSet(boolean value) {
33054
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
33055
    }
33056
 
33057
    public boolean isIsValid() {
33058
      return this.isValid;
33059
    }
33060
 
33061
    public validateDoa_args setIsValid(boolean isValid) {
33062
      this.isValid = isValid;
33063
      setIsValidIsSet(true);
33064
      return this;
33065
    }
33066
 
33067
    public void unsetIsValid() {
33068
      __isset_bit_vector.clear(__ISVALID_ISSET_ID);
33069
    }
33070
 
33071
    /** Returns true if field isValid is set (has been asigned a value) and false otherwise */
33072
    public boolean isSetIsValid() {
33073
      return __isset_bit_vector.get(__ISVALID_ISSET_ID);
33074
    }
33075
 
33076
    public void setIsValidIsSet(boolean value) {
33077
      __isset_bit_vector.set(__ISVALID_ISSET_ID, value);
33078
    }
33079
 
33080
    public void setFieldValue(_Fields field, Object value) {
33081
      switch (field) {
33082
      case ORDER_ID:
33083
        if (value == null) {
33084
          unsetOrderId();
33085
        } else {
33086
          setOrderId((Long)value);
33087
        }
33088
        break;
33089
 
33090
      case IS_VALID:
33091
        if (value == null) {
33092
          unsetIsValid();
33093
        } else {
33094
          setIsValid((Boolean)value);
33095
        }
33096
        break;
33097
 
33098
      }
33099
    }
33100
 
33101
    public void setFieldValue(int fieldID, Object value) {
33102
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33103
    }
33104
 
33105
    public Object getFieldValue(_Fields field) {
33106
      switch (field) {
33107
      case ORDER_ID:
33108
        return new Long(getOrderId());
33109
 
33110
      case IS_VALID:
33111
        return new Boolean(isIsValid());
33112
 
33113
      }
33114
      throw new IllegalStateException();
33115
    }
33116
 
33117
    public Object getFieldValue(int fieldId) {
33118
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33119
    }
33120
 
33121
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33122
    public boolean isSet(_Fields field) {
33123
      switch (field) {
33124
      case ORDER_ID:
33125
        return isSetOrderId();
33126
      case IS_VALID:
33127
        return isSetIsValid();
33128
      }
33129
      throw new IllegalStateException();
33130
    }
33131
 
33132
    public boolean isSet(int fieldID) {
33133
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33134
    }
33135
 
33136
    @Override
33137
    public boolean equals(Object that) {
33138
      if (that == null)
33139
        return false;
33140
      if (that instanceof validateDoa_args)
33141
        return this.equals((validateDoa_args)that);
33142
      return false;
33143
    }
33144
 
33145
    public boolean equals(validateDoa_args that) {
33146
      if (that == null)
33147
        return false;
33148
 
33149
      boolean this_present_orderId = true;
33150
      boolean that_present_orderId = true;
33151
      if (this_present_orderId || that_present_orderId) {
33152
        if (!(this_present_orderId && that_present_orderId))
33153
          return false;
33154
        if (this.orderId != that.orderId)
33155
          return false;
33156
      }
33157
 
33158
      boolean this_present_isValid = true;
33159
      boolean that_present_isValid = true;
33160
      if (this_present_isValid || that_present_isValid) {
33161
        if (!(this_present_isValid && that_present_isValid))
33162
          return false;
33163
        if (this.isValid != that.isValid)
33164
          return false;
33165
      }
33166
 
33167
      return true;
33168
    }
33169
 
33170
    @Override
33171
    public int hashCode() {
33172
      return 0;
33173
    }
33174
 
33175
    public int compareTo(validateDoa_args other) {
33176
      if (!getClass().equals(other.getClass())) {
33177
        return getClass().getName().compareTo(other.getClass().getName());
33178
      }
33179
 
33180
      int lastComparison = 0;
33181
      validateDoa_args typedOther = (validateDoa_args)other;
33182
 
33183
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
33184
      if (lastComparison != 0) {
33185
        return lastComparison;
33186
      }
33187
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
33188
      if (lastComparison != 0) {
33189
        return lastComparison;
33190
      }
33191
      lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(isSetIsValid());
33192
      if (lastComparison != 0) {
33193
        return lastComparison;
33194
      }
33195
      lastComparison = TBaseHelper.compareTo(isValid, typedOther.isValid);
33196
      if (lastComparison != 0) {
33197
        return lastComparison;
33198
      }
33199
      return 0;
33200
    }
33201
 
33202
    public void read(TProtocol iprot) throws TException {
33203
      TField field;
33204
      iprot.readStructBegin();
33205
      while (true)
33206
      {
33207
        field = iprot.readFieldBegin();
33208
        if (field.type == TType.STOP) { 
33209
          break;
33210
        }
33211
        _Fields fieldId = _Fields.findByThriftId(field.id);
33212
        if (fieldId == null) {
33213
          TProtocolUtil.skip(iprot, field.type);
33214
        } else {
33215
          switch (fieldId) {
33216
            case ORDER_ID:
33217
              if (field.type == TType.I64) {
33218
                this.orderId = iprot.readI64();
33219
                setOrderIdIsSet(true);
33220
              } else { 
33221
                TProtocolUtil.skip(iprot, field.type);
33222
              }
33223
              break;
33224
            case IS_VALID:
33225
              if (field.type == TType.BOOL) {
33226
                this.isValid = iprot.readBool();
33227
                setIsValidIsSet(true);
33228
              } else { 
33229
                TProtocolUtil.skip(iprot, field.type);
33230
              }
33231
              break;
33232
          }
33233
          iprot.readFieldEnd();
33234
        }
33235
      }
33236
      iprot.readStructEnd();
33237
      validate();
33238
    }
33239
 
33240
    public void write(TProtocol oprot) throws TException {
33241
      validate();
33242
 
33243
      oprot.writeStructBegin(STRUCT_DESC);
33244
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
33245
      oprot.writeI64(this.orderId);
33246
      oprot.writeFieldEnd();
33247
      oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
33248
      oprot.writeBool(this.isValid);
33249
      oprot.writeFieldEnd();
33250
      oprot.writeFieldStop();
33251
      oprot.writeStructEnd();
33252
    }
33253
 
33254
    @Override
33255
    public String toString() {
33256
      StringBuilder sb = new StringBuilder("validateDoa_args(");
33257
      boolean first = true;
33258
 
33259
      sb.append("orderId:");
33260
      sb.append(this.orderId);
33261
      first = false;
33262
      if (!first) sb.append(", ");
33263
      sb.append("isValid:");
33264
      sb.append(this.isValid);
33265
      first = false;
33266
      sb.append(")");
33267
      return sb.toString();
33268
    }
33269
 
33270
    public void validate() throws TException {
33271
      // check for required fields
33272
    }
33273
 
33274
  }
33275
 
33276
  public static class validateDoa_result implements TBase<validateDoa_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_result>   {
33277
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_result");
33278
 
33279
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
33280
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
33281
 
33282
    private boolean success;
33283
    private TransactionServiceException ex;
33284
 
33285
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33286
    public enum _Fields implements TFieldIdEnum {
33287
      SUCCESS((short)0, "success"),
33288
      EX((short)1, "ex");
33289
 
33290
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33291
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33292
 
33293
      static {
33294
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33295
          byId.put((int)field._thriftId, field);
33296
          byName.put(field.getFieldName(), field);
33297
        }
33298
      }
33299
 
33300
      /**
33301
       * Find the _Fields constant that matches fieldId, or null if its not found.
33302
       */
33303
      public static _Fields findByThriftId(int fieldId) {
33304
        return byId.get(fieldId);
33305
      }
33306
 
33307
      /**
33308
       * Find the _Fields constant that matches fieldId, throwing an exception
33309
       * if it is not found.
33310
       */
33311
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33312
        _Fields fields = findByThriftId(fieldId);
33313
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33314
        return fields;
33315
      }
33316
 
33317
      /**
33318
       * Find the _Fields constant that matches name, or null if its not found.
33319
       */
33320
      public static _Fields findByName(String name) {
33321
        return byName.get(name);
33322
      }
33323
 
33324
      private final short _thriftId;
33325
      private final String _fieldName;
33326
 
33327
      _Fields(short thriftId, String fieldName) {
33328
        _thriftId = thriftId;
33329
        _fieldName = fieldName;
33330
      }
33331
 
33332
      public short getThriftFieldId() {
33333
        return _thriftId;
33334
      }
33335
 
33336
      public String getFieldName() {
33337
        return _fieldName;
33338
      }
33339
    }
33340
 
33341
    // isset id assignments
33342
    private static final int __SUCCESS_ISSET_ID = 0;
33343
    private BitSet __isset_bit_vector = new BitSet(1);
33344
 
33345
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33346
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
33347
          new FieldValueMetaData(TType.BOOL)));
33348
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
33349
          new FieldValueMetaData(TType.STRUCT)));
33350
    }});
33351
 
33352
    static {
33353
      FieldMetaData.addStructMetaDataMap(validateDoa_result.class, metaDataMap);
33354
    }
33355
 
33356
    public validateDoa_result() {
33357
    }
33358
 
33359
    public validateDoa_result(
33360
      boolean success,
33361
      TransactionServiceException ex)
33362
    {
33363
      this();
33364
      this.success = success;
33365
      setSuccessIsSet(true);
33366
      this.ex = ex;
33367
    }
33368
 
33369
    /**
33370
     * Performs a deep copy on <i>other</i>.
33371
     */
33372
    public validateDoa_result(validateDoa_result other) {
33373
      __isset_bit_vector.clear();
33374
      __isset_bit_vector.or(other.__isset_bit_vector);
33375
      this.success = other.success;
33376
      if (other.isSetEx()) {
33377
        this.ex = new TransactionServiceException(other.ex);
33378
      }
33379
    }
33380
 
33381
    public validateDoa_result deepCopy() {
33382
      return new validateDoa_result(this);
33383
    }
33384
 
33385
    @Deprecated
33386
    public validateDoa_result clone() {
33387
      return new validateDoa_result(this);
33388
    }
33389
 
33390
    public boolean isSuccess() {
33391
      return this.success;
33392
    }
33393
 
33394
    public validateDoa_result setSuccess(boolean success) {
33395
      this.success = success;
33396
      setSuccessIsSet(true);
33397
      return this;
33398
    }
33399
 
33400
    public void unsetSuccess() {
33401
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
33402
    }
33403
 
33404
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
33405
    public boolean isSetSuccess() {
33406
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
33407
    }
33408
 
33409
    public void setSuccessIsSet(boolean value) {
33410
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
33411
    }
33412
 
33413
    public TransactionServiceException getEx() {
33414
      return this.ex;
33415
    }
33416
 
33417
    public validateDoa_result setEx(TransactionServiceException ex) {
33418
      this.ex = ex;
33419
      return this;
33420
    }
33421
 
33422
    public void unsetEx() {
33423
      this.ex = null;
33424
    }
33425
 
33426
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
33427
    public boolean isSetEx() {
33428
      return this.ex != null;
33429
    }
33430
 
33431
    public void setExIsSet(boolean value) {
33432
      if (!value) {
33433
        this.ex = null;
33434
      }
33435
    }
33436
 
33437
    public void setFieldValue(_Fields field, Object value) {
33438
      switch (field) {
33439
      case SUCCESS:
33440
        if (value == null) {
33441
          unsetSuccess();
33442
        } else {
33443
          setSuccess((Boolean)value);
33444
        }
33445
        break;
33446
 
33447
      case EX:
33448
        if (value == null) {
33449
          unsetEx();
33450
        } else {
33451
          setEx((TransactionServiceException)value);
33452
        }
33453
        break;
33454
 
33455
      }
33456
    }
33457
 
33458
    public void setFieldValue(int fieldID, Object value) {
33459
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33460
    }
33461
 
33462
    public Object getFieldValue(_Fields field) {
33463
      switch (field) {
33464
      case SUCCESS:
33465
        return new Boolean(isSuccess());
33466
 
33467
      case EX:
33468
        return getEx();
33469
 
33470
      }
33471
      throw new IllegalStateException();
33472
    }
33473
 
33474
    public Object getFieldValue(int fieldId) {
33475
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33476
    }
33477
 
33478
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33479
    public boolean isSet(_Fields field) {
33480
      switch (field) {
33481
      case SUCCESS:
33482
        return isSetSuccess();
33483
      case EX:
33484
        return isSetEx();
33485
      }
33486
      throw new IllegalStateException();
33487
    }
33488
 
33489
    public boolean isSet(int fieldID) {
33490
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33491
    }
33492
 
33493
    @Override
33494
    public boolean equals(Object that) {
33495
      if (that == null)
33496
        return false;
33497
      if (that instanceof validateDoa_result)
33498
        return this.equals((validateDoa_result)that);
33499
      return false;
33500
    }
33501
 
33502
    public boolean equals(validateDoa_result that) {
33503
      if (that == null)
33504
        return false;
33505
 
33506
      boolean this_present_success = true;
33507
      boolean that_present_success = true;
33508
      if (this_present_success || that_present_success) {
33509
        if (!(this_present_success && that_present_success))
33510
          return false;
33511
        if (this.success != that.success)
33512
          return false;
33513
      }
33514
 
33515
      boolean this_present_ex = true && this.isSetEx();
33516
      boolean that_present_ex = true && that.isSetEx();
33517
      if (this_present_ex || that_present_ex) {
33518
        if (!(this_present_ex && that_present_ex))
33519
          return false;
33520
        if (!this.ex.equals(that.ex))
33521
          return false;
33522
      }
33523
 
33524
      return true;
33525
    }
33526
 
33527
    @Override
33528
    public int hashCode() {
33529
      return 0;
33530
    }
33531
 
33532
    public int compareTo(validateDoa_result other) {
33533
      if (!getClass().equals(other.getClass())) {
33534
        return getClass().getName().compareTo(other.getClass().getName());
33535
      }
33536
 
33537
      int lastComparison = 0;
33538
      validateDoa_result typedOther = (validateDoa_result)other;
33539
 
33540
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
33541
      if (lastComparison != 0) {
33542
        return lastComparison;
33543
      }
33544
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
33545
      if (lastComparison != 0) {
33546
        return lastComparison;
33547
      }
33548
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
33549
      if (lastComparison != 0) {
33550
        return lastComparison;
33551
      }
33552
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
33553
      if (lastComparison != 0) {
33554
        return lastComparison;
33555
      }
33556
      return 0;
33557
    }
33558
 
33559
    public void read(TProtocol iprot) throws TException {
33560
      TField field;
33561
      iprot.readStructBegin();
33562
      while (true)
33563
      {
33564
        field = iprot.readFieldBegin();
33565
        if (field.type == TType.STOP) { 
33566
          break;
33567
        }
33568
        _Fields fieldId = _Fields.findByThriftId(field.id);
33569
        if (fieldId == null) {
33570
          TProtocolUtil.skip(iprot, field.type);
33571
        } else {
33572
          switch (fieldId) {
33573
            case SUCCESS:
33574
              if (field.type == TType.BOOL) {
33575
                this.success = iprot.readBool();
33576
                setSuccessIsSet(true);
33577
              } else { 
33578
                TProtocolUtil.skip(iprot, field.type);
33579
              }
33580
              break;
33581
            case EX:
33582
              if (field.type == TType.STRUCT) {
33583
                this.ex = new TransactionServiceException();
33584
                this.ex.read(iprot);
33585
              } else { 
33586
                TProtocolUtil.skip(iprot, field.type);
33587
              }
33588
              break;
33589
          }
33590
          iprot.readFieldEnd();
33591
        }
33592
      }
33593
      iprot.readStructEnd();
33594
      validate();
33595
    }
33596
 
33597
    public void write(TProtocol oprot) throws TException {
33598
      oprot.writeStructBegin(STRUCT_DESC);
33599
 
33600
      if (this.isSetSuccess()) {
33601
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
33602
        oprot.writeBool(this.success);
33603
        oprot.writeFieldEnd();
33604
      } else if (this.isSetEx()) {
33605
        oprot.writeFieldBegin(EX_FIELD_DESC);
33606
        this.ex.write(oprot);
33607
        oprot.writeFieldEnd();
33608
      }
33609
      oprot.writeFieldStop();
33610
      oprot.writeStructEnd();
33611
    }
33612
 
33613
    @Override
33614
    public String toString() {
33615
      StringBuilder sb = new StringBuilder("validateDoa_result(");
33616
      boolean first = true;
33617
 
33618
      sb.append("success:");
33619
      sb.append(this.success);
33620
      first = false;
33621
      if (!first) sb.append(", ");
33622
      sb.append("ex:");
33623
      if (this.ex == null) {
33624
        sb.append("null");
33625
      } else {
33626
        sb.append(this.ex);
33627
      }
33628
      first = false;
33629
      sb.append(")");
33630
      return sb.toString();
33631
    }
33632
 
33633
    public void validate() throws TException {
33634
      // check for required fields
33635
    }
33636
 
33637
  }
33638
 
2615 chandransh 33639
  public static class reshipOrder_args implements TBase<reshipOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<reshipOrder_args>   {
33640
    private static final TStruct STRUCT_DESC = new TStruct("reshipOrder_args");
33641
 
33642
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
33643
 
33644
    private long orderId;
33645
 
33646
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33647
    public enum _Fields implements TFieldIdEnum {
33648
      ORDER_ID((short)1, "orderId");
33649
 
33650
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33651
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33652
 
33653
      static {
33654
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33655
          byId.put((int)field._thriftId, field);
33656
          byName.put(field.getFieldName(), field);
33657
        }
33658
      }
33659
 
33660
      /**
33661
       * Find the _Fields constant that matches fieldId, or null if its not found.
33662
       */
33663
      public static _Fields findByThriftId(int fieldId) {
33664
        return byId.get(fieldId);
33665
      }
33666
 
33667
      /**
33668
       * Find the _Fields constant that matches fieldId, throwing an exception
33669
       * if it is not found.
33670
       */
33671
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33672
        _Fields fields = findByThriftId(fieldId);
33673
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33674
        return fields;
33675
      }
33676
 
33677
      /**
33678
       * Find the _Fields constant that matches name, or null if its not found.
33679
       */
33680
      public static _Fields findByName(String name) {
33681
        return byName.get(name);
33682
      }
33683
 
33684
      private final short _thriftId;
33685
      private final String _fieldName;
33686
 
33687
      _Fields(short thriftId, String fieldName) {
33688
        _thriftId = thriftId;
33689
        _fieldName = fieldName;
33690
      }
33691
 
33692
      public short getThriftFieldId() {
33693
        return _thriftId;
33694
      }
33695
 
33696
      public String getFieldName() {
33697
        return _fieldName;
33698
      }
33699
    }
33700
 
33701
    // isset id assignments
33702
    private static final int __ORDERID_ISSET_ID = 0;
33703
    private BitSet __isset_bit_vector = new BitSet(1);
33704
 
33705
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33706
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
33707
          new FieldValueMetaData(TType.I64)));
33708
    }});
33709
 
33710
    static {
33711
      FieldMetaData.addStructMetaDataMap(reshipOrder_args.class, metaDataMap);
33712
    }
33713
 
33714
    public reshipOrder_args() {
33715
    }
33716
 
33717
    public reshipOrder_args(
33718
      long orderId)
33719
    {
33720
      this();
33721
      this.orderId = orderId;
33722
      setOrderIdIsSet(true);
33723
    }
33724
 
33725
    /**
33726
     * Performs a deep copy on <i>other</i>.
33727
     */
33728
    public reshipOrder_args(reshipOrder_args other) {
33729
      __isset_bit_vector.clear();
33730
      __isset_bit_vector.or(other.__isset_bit_vector);
33731
      this.orderId = other.orderId;
33732
    }
33733
 
33734
    public reshipOrder_args deepCopy() {
33735
      return new reshipOrder_args(this);
33736
    }
33737
 
33738
    @Deprecated
33739
    public reshipOrder_args clone() {
33740
      return new reshipOrder_args(this);
33741
    }
33742
 
33743
    public long getOrderId() {
33744
      return this.orderId;
33745
    }
33746
 
33747
    public reshipOrder_args setOrderId(long orderId) {
33748
      this.orderId = orderId;
33749
      setOrderIdIsSet(true);
33750
      return this;
33751
    }
33752
 
33753
    public void unsetOrderId() {
33754
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
33755
    }
33756
 
33757
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
33758
    public boolean isSetOrderId() {
33759
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
33760
    }
33761
 
33762
    public void setOrderIdIsSet(boolean value) {
33763
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
33764
    }
33765
 
33766
    public void setFieldValue(_Fields field, Object value) {
33767
      switch (field) {
33768
      case ORDER_ID:
33769
        if (value == null) {
33770
          unsetOrderId();
33771
        } else {
33772
          setOrderId((Long)value);
33773
        }
33774
        break;
33775
 
33776
      }
33777
    }
33778
 
33779
    public void setFieldValue(int fieldID, Object value) {
33780
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33781
    }
33782
 
33783
    public Object getFieldValue(_Fields field) {
33784
      switch (field) {
33785
      case ORDER_ID:
33786
        return new Long(getOrderId());
33787
 
33788
      }
33789
      throw new IllegalStateException();
33790
    }
33791
 
33792
    public Object getFieldValue(int fieldId) {
33793
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33794
    }
33795
 
33796
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33797
    public boolean isSet(_Fields field) {
33798
      switch (field) {
33799
      case ORDER_ID:
33800
        return isSetOrderId();
33801
      }
33802
      throw new IllegalStateException();
33803
    }
33804
 
33805
    public boolean isSet(int fieldID) {
33806
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33807
    }
33808
 
33809
    @Override
33810
    public boolean equals(Object that) {
33811
      if (that == null)
33812
        return false;
33813
      if (that instanceof reshipOrder_args)
33814
        return this.equals((reshipOrder_args)that);
33815
      return false;
33816
    }
33817
 
33818
    public boolean equals(reshipOrder_args that) {
33819
      if (that == null)
33820
        return false;
33821
 
33822
      boolean this_present_orderId = true;
33823
      boolean that_present_orderId = true;
33824
      if (this_present_orderId || that_present_orderId) {
33825
        if (!(this_present_orderId && that_present_orderId))
33826
          return false;
33827
        if (this.orderId != that.orderId)
33828
          return false;
33829
      }
33830
 
33831
      return true;
33832
    }
33833
 
33834
    @Override
33835
    public int hashCode() {
33836
      return 0;
33837
    }
33838
 
33839
    public int compareTo(reshipOrder_args other) {
33840
      if (!getClass().equals(other.getClass())) {
33841
        return getClass().getName().compareTo(other.getClass().getName());
33842
      }
33843
 
33844
      int lastComparison = 0;
33845
      reshipOrder_args typedOther = (reshipOrder_args)other;
33846
 
33847
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
33848
      if (lastComparison != 0) {
33849
        return lastComparison;
33850
      }
33851
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
33852
      if (lastComparison != 0) {
33853
        return lastComparison;
33854
      }
33855
      return 0;
33856
    }
33857
 
33858
    public void read(TProtocol iprot) throws TException {
33859
      TField field;
33860
      iprot.readStructBegin();
33861
      while (true)
33862
      {
33863
        field = iprot.readFieldBegin();
33864
        if (field.type == TType.STOP) { 
33865
          break;
33866
        }
33867
        _Fields fieldId = _Fields.findByThriftId(field.id);
33868
        if (fieldId == null) {
33869
          TProtocolUtil.skip(iprot, field.type);
33870
        } else {
33871
          switch (fieldId) {
33872
            case ORDER_ID:
33873
              if (field.type == TType.I64) {
33874
                this.orderId = iprot.readI64();
33875
                setOrderIdIsSet(true);
33876
              } else { 
33877
                TProtocolUtil.skip(iprot, field.type);
33878
              }
33879
              break;
33880
          }
33881
          iprot.readFieldEnd();
33882
        }
33883
      }
33884
      iprot.readStructEnd();
33885
      validate();
33886
    }
33887
 
33888
    public void write(TProtocol oprot) throws TException {
33889
      validate();
33890
 
33891
      oprot.writeStructBegin(STRUCT_DESC);
33892
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
33893
      oprot.writeI64(this.orderId);
33894
      oprot.writeFieldEnd();
33895
      oprot.writeFieldStop();
33896
      oprot.writeStructEnd();
33897
    }
33898
 
33899
    @Override
33900
    public String toString() {
33901
      StringBuilder sb = new StringBuilder("reshipOrder_args(");
33902
      boolean first = true;
33903
 
33904
      sb.append("orderId:");
33905
      sb.append(this.orderId);
33906
      first = false;
33907
      sb.append(")");
33908
      return sb.toString();
33909
    }
33910
 
33911
    public void validate() throws TException {
33912
      // check for required fields
33913
    }
33914
 
33915
  }
33916
 
33917
  public static class reshipOrder_result implements TBase<reshipOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<reshipOrder_result>   {
33918
    private static final TStruct STRUCT_DESC = new TStruct("reshipOrder_result");
33919
 
33920
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
33921
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
33922
 
33923
    private long success;
33924
    private TransactionServiceException ex;
33925
 
33926
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33927
    public enum _Fields implements TFieldIdEnum {
33928
      SUCCESS((short)0, "success"),
33929
      EX((short)1, "ex");
33930
 
33931
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33932
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33933
 
33934
      static {
33935
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33936
          byId.put((int)field._thriftId, field);
33937
          byName.put(field.getFieldName(), field);
33938
        }
33939
      }
33940
 
33941
      /**
33942
       * Find the _Fields constant that matches fieldId, or null if its not found.
33943
       */
33944
      public static _Fields findByThriftId(int fieldId) {
33945
        return byId.get(fieldId);
33946
      }
33947
 
33948
      /**
33949
       * Find the _Fields constant that matches fieldId, throwing an exception
33950
       * if it is not found.
33951
       */
33952
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33953
        _Fields fields = findByThriftId(fieldId);
33954
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33955
        return fields;
33956
      }
33957
 
33958
      /**
33959
       * Find the _Fields constant that matches name, or null if its not found.
33960
       */
33961
      public static _Fields findByName(String name) {
33962
        return byName.get(name);
33963
      }
33964
 
33965
      private final short _thriftId;
33966
      private final String _fieldName;
33967
 
33968
      _Fields(short thriftId, String fieldName) {
33969
        _thriftId = thriftId;
33970
        _fieldName = fieldName;
33971
      }
33972
 
33973
      public short getThriftFieldId() {
33974
        return _thriftId;
33975
      }
33976
 
33977
      public String getFieldName() {
33978
        return _fieldName;
33979
      }
33980
    }
33981
 
33982
    // isset id assignments
33983
    private static final int __SUCCESS_ISSET_ID = 0;
33984
    private BitSet __isset_bit_vector = new BitSet(1);
33985
 
33986
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33987
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
33988
          new FieldValueMetaData(TType.I64)));
33989
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
33990
          new FieldValueMetaData(TType.STRUCT)));
33991
    }});
33992
 
33993
    static {
33994
      FieldMetaData.addStructMetaDataMap(reshipOrder_result.class, metaDataMap);
33995
    }
33996
 
33997
    public reshipOrder_result() {
33998
    }
33999
 
34000
    public reshipOrder_result(
34001
      long success,
34002
      TransactionServiceException ex)
34003
    {
34004
      this();
34005
      this.success = success;
34006
      setSuccessIsSet(true);
34007
      this.ex = ex;
34008
    }
34009
 
34010
    /**
34011
     * Performs a deep copy on <i>other</i>.
34012
     */
34013
    public reshipOrder_result(reshipOrder_result other) {
34014
      __isset_bit_vector.clear();
34015
      __isset_bit_vector.or(other.__isset_bit_vector);
34016
      this.success = other.success;
34017
      if (other.isSetEx()) {
34018
        this.ex = new TransactionServiceException(other.ex);
34019
      }
34020
    }
34021
 
34022
    public reshipOrder_result deepCopy() {
34023
      return new reshipOrder_result(this);
34024
    }
34025
 
34026
    @Deprecated
34027
    public reshipOrder_result clone() {
34028
      return new reshipOrder_result(this);
34029
    }
34030
 
34031
    public long getSuccess() {
34032
      return this.success;
34033
    }
34034
 
34035
    public reshipOrder_result setSuccess(long success) {
34036
      this.success = success;
34037
      setSuccessIsSet(true);
34038
      return this;
34039
    }
34040
 
34041
    public void unsetSuccess() {
34042
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
34043
    }
34044
 
34045
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
34046
    public boolean isSetSuccess() {
34047
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
34048
    }
34049
 
34050
    public void setSuccessIsSet(boolean value) {
34051
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
34052
    }
34053
 
34054
    public TransactionServiceException getEx() {
34055
      return this.ex;
34056
    }
34057
 
34058
    public reshipOrder_result setEx(TransactionServiceException ex) {
34059
      this.ex = ex;
34060
      return this;
34061
    }
34062
 
34063
    public void unsetEx() {
34064
      this.ex = null;
34065
    }
34066
 
34067
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
34068
    public boolean isSetEx() {
34069
      return this.ex != null;
34070
    }
34071
 
34072
    public void setExIsSet(boolean value) {
34073
      if (!value) {
34074
        this.ex = null;
34075
      }
34076
    }
34077
 
34078
    public void setFieldValue(_Fields field, Object value) {
34079
      switch (field) {
34080
      case SUCCESS:
34081
        if (value == null) {
34082
          unsetSuccess();
34083
        } else {
34084
          setSuccess((Long)value);
34085
        }
34086
        break;
34087
 
34088
      case EX:
34089
        if (value == null) {
34090
          unsetEx();
34091
        } else {
34092
          setEx((TransactionServiceException)value);
34093
        }
34094
        break;
34095
 
34096
      }
34097
    }
34098
 
34099
    public void setFieldValue(int fieldID, Object value) {
34100
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34101
    }
34102
 
34103
    public Object getFieldValue(_Fields field) {
34104
      switch (field) {
34105
      case SUCCESS:
34106
        return new Long(getSuccess());
34107
 
34108
      case EX:
34109
        return getEx();
34110
 
34111
      }
34112
      throw new IllegalStateException();
34113
    }
34114
 
34115
    public Object getFieldValue(int fieldId) {
34116
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34117
    }
34118
 
34119
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34120
    public boolean isSet(_Fields field) {
34121
      switch (field) {
34122
      case SUCCESS:
34123
        return isSetSuccess();
34124
      case EX:
34125
        return isSetEx();
34126
      }
34127
      throw new IllegalStateException();
34128
    }
34129
 
34130
    public boolean isSet(int fieldID) {
34131
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34132
    }
34133
 
34134
    @Override
34135
    public boolean equals(Object that) {
34136
      if (that == null)
34137
        return false;
34138
      if (that instanceof reshipOrder_result)
34139
        return this.equals((reshipOrder_result)that);
34140
      return false;
34141
    }
34142
 
34143
    public boolean equals(reshipOrder_result that) {
34144
      if (that == null)
34145
        return false;
34146
 
34147
      boolean this_present_success = true;
34148
      boolean that_present_success = true;
34149
      if (this_present_success || that_present_success) {
34150
        if (!(this_present_success && that_present_success))
34151
          return false;
34152
        if (this.success != that.success)
34153
          return false;
34154
      }
34155
 
34156
      boolean this_present_ex = true && this.isSetEx();
34157
      boolean that_present_ex = true && that.isSetEx();
34158
      if (this_present_ex || that_present_ex) {
34159
        if (!(this_present_ex && that_present_ex))
34160
          return false;
34161
        if (!this.ex.equals(that.ex))
34162
          return false;
34163
      }
34164
 
34165
      return true;
34166
    }
34167
 
34168
    @Override
34169
    public int hashCode() {
34170
      return 0;
34171
    }
34172
 
34173
    public int compareTo(reshipOrder_result other) {
34174
      if (!getClass().equals(other.getClass())) {
34175
        return getClass().getName().compareTo(other.getClass().getName());
34176
      }
34177
 
34178
      int lastComparison = 0;
34179
      reshipOrder_result typedOther = (reshipOrder_result)other;
34180
 
34181
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
34182
      if (lastComparison != 0) {
34183
        return lastComparison;
34184
      }
34185
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
34186
      if (lastComparison != 0) {
34187
        return lastComparison;
34188
      }
34189
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
34190
      if (lastComparison != 0) {
34191
        return lastComparison;
34192
      }
34193
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
34194
      if (lastComparison != 0) {
34195
        return lastComparison;
34196
      }
34197
      return 0;
34198
    }
34199
 
34200
    public void read(TProtocol iprot) throws TException {
34201
      TField field;
34202
      iprot.readStructBegin();
34203
      while (true)
34204
      {
34205
        field = iprot.readFieldBegin();
34206
        if (field.type == TType.STOP) { 
34207
          break;
34208
        }
34209
        _Fields fieldId = _Fields.findByThriftId(field.id);
34210
        if (fieldId == null) {
34211
          TProtocolUtil.skip(iprot, field.type);
34212
        } else {
34213
          switch (fieldId) {
34214
            case SUCCESS:
34215
              if (field.type == TType.I64) {
34216
                this.success = iprot.readI64();
34217
                setSuccessIsSet(true);
34218
              } else { 
34219
                TProtocolUtil.skip(iprot, field.type);
34220
              }
34221
              break;
34222
            case EX:
34223
              if (field.type == TType.STRUCT) {
34224
                this.ex = new TransactionServiceException();
34225
                this.ex.read(iprot);
34226
              } else { 
34227
                TProtocolUtil.skip(iprot, field.type);
34228
              }
34229
              break;
34230
          }
34231
          iprot.readFieldEnd();
34232
        }
34233
      }
34234
      iprot.readStructEnd();
34235
      validate();
34236
    }
34237
 
34238
    public void write(TProtocol oprot) throws TException {
34239
      oprot.writeStructBegin(STRUCT_DESC);
34240
 
34241
      if (this.isSetSuccess()) {
34242
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
34243
        oprot.writeI64(this.success);
34244
        oprot.writeFieldEnd();
34245
      } else if (this.isSetEx()) {
34246
        oprot.writeFieldBegin(EX_FIELD_DESC);
34247
        this.ex.write(oprot);
34248
        oprot.writeFieldEnd();
34249
      }
34250
      oprot.writeFieldStop();
34251
      oprot.writeStructEnd();
34252
    }
34253
 
34254
    @Override
34255
    public String toString() {
34256
      StringBuilder sb = new StringBuilder("reshipOrder_result(");
34257
      boolean first = true;
34258
 
34259
      sb.append("success:");
34260
      sb.append(this.success);
34261
      first = false;
34262
      if (!first) sb.append(", ");
34263
      sb.append("ex:");
34264
      if (this.ex == null) {
34265
        sb.append("null");
34266
      } else {
34267
        sb.append(this.ex);
34268
      }
34269
      first = false;
34270
      sb.append(")");
34271
      return sb.toString();
34272
    }
34273
 
34274
    public void validate() throws TException {
34275
      // check for required fields
34276
    }
34277
 
34278
  }
34279
 
34280
  public static class refundOrder_args implements TBase<refundOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<refundOrder_args>   {
34281
    private static final TStruct STRUCT_DESC = new TStruct("refundOrder_args");
34282
 
34283
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
34284
 
34285
    private long orderId;
34286
 
34287
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34288
    public enum _Fields implements TFieldIdEnum {
34289
      ORDER_ID((short)1, "orderId");
34290
 
34291
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34292
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34293
 
34294
      static {
34295
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34296
          byId.put((int)field._thriftId, field);
34297
          byName.put(field.getFieldName(), field);
34298
        }
34299
      }
34300
 
34301
      /**
34302
       * Find the _Fields constant that matches fieldId, or null if its not found.
34303
       */
34304
      public static _Fields findByThriftId(int fieldId) {
34305
        return byId.get(fieldId);
34306
      }
34307
 
34308
      /**
34309
       * Find the _Fields constant that matches fieldId, throwing an exception
34310
       * if it is not found.
34311
       */
34312
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34313
        _Fields fields = findByThriftId(fieldId);
34314
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34315
        return fields;
34316
      }
34317
 
34318
      /**
34319
       * Find the _Fields constant that matches name, or null if its not found.
34320
       */
34321
      public static _Fields findByName(String name) {
34322
        return byName.get(name);
34323
      }
34324
 
34325
      private final short _thriftId;
34326
      private final String _fieldName;
34327
 
34328
      _Fields(short thriftId, String fieldName) {
34329
        _thriftId = thriftId;
34330
        _fieldName = fieldName;
34331
      }
34332
 
34333
      public short getThriftFieldId() {
34334
        return _thriftId;
34335
      }
34336
 
34337
      public String getFieldName() {
34338
        return _fieldName;
34339
      }
34340
    }
34341
 
34342
    // isset id assignments
34343
    private static final int __ORDERID_ISSET_ID = 0;
34344
    private BitSet __isset_bit_vector = new BitSet(1);
34345
 
34346
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34347
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
34348
          new FieldValueMetaData(TType.I64)));
34349
    }});
34350
 
34351
    static {
34352
      FieldMetaData.addStructMetaDataMap(refundOrder_args.class, metaDataMap);
34353
    }
34354
 
34355
    public refundOrder_args() {
34356
    }
34357
 
34358
    public refundOrder_args(
34359
      long orderId)
34360
    {
34361
      this();
34362
      this.orderId = orderId;
34363
      setOrderIdIsSet(true);
34364
    }
34365
 
34366
    /**
34367
     * Performs a deep copy on <i>other</i>.
34368
     */
34369
    public refundOrder_args(refundOrder_args other) {
34370
      __isset_bit_vector.clear();
34371
      __isset_bit_vector.or(other.__isset_bit_vector);
34372
      this.orderId = other.orderId;
34373
    }
34374
 
34375
    public refundOrder_args deepCopy() {
34376
      return new refundOrder_args(this);
34377
    }
34378
 
34379
    @Deprecated
34380
    public refundOrder_args clone() {
34381
      return new refundOrder_args(this);
34382
    }
34383
 
34384
    public long getOrderId() {
34385
      return this.orderId;
34386
    }
34387
 
34388
    public refundOrder_args setOrderId(long orderId) {
34389
      this.orderId = orderId;
34390
      setOrderIdIsSet(true);
34391
      return this;
34392
    }
34393
 
34394
    public void unsetOrderId() {
34395
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
34396
    }
34397
 
34398
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
34399
    public boolean isSetOrderId() {
34400
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
34401
    }
34402
 
34403
    public void setOrderIdIsSet(boolean value) {
34404
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
34405
    }
34406
 
34407
    public void setFieldValue(_Fields field, Object value) {
34408
      switch (field) {
34409
      case ORDER_ID:
34410
        if (value == null) {
34411
          unsetOrderId();
34412
        } else {
34413
          setOrderId((Long)value);
34414
        }
34415
        break;
34416
 
34417
      }
34418
    }
34419
 
34420
    public void setFieldValue(int fieldID, Object value) {
34421
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34422
    }
34423
 
34424
    public Object getFieldValue(_Fields field) {
34425
      switch (field) {
34426
      case ORDER_ID:
34427
        return new Long(getOrderId());
34428
 
34429
      }
34430
      throw new IllegalStateException();
34431
    }
34432
 
34433
    public Object getFieldValue(int fieldId) {
34434
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34435
    }
34436
 
34437
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34438
    public boolean isSet(_Fields field) {
34439
      switch (field) {
34440
      case ORDER_ID:
34441
        return isSetOrderId();
34442
      }
34443
      throw new IllegalStateException();
34444
    }
34445
 
34446
    public boolean isSet(int fieldID) {
34447
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34448
    }
34449
 
34450
    @Override
34451
    public boolean equals(Object that) {
34452
      if (that == null)
34453
        return false;
34454
      if (that instanceof refundOrder_args)
34455
        return this.equals((refundOrder_args)that);
34456
      return false;
34457
    }
34458
 
34459
    public boolean equals(refundOrder_args that) {
34460
      if (that == null)
34461
        return false;
34462
 
34463
      boolean this_present_orderId = true;
34464
      boolean that_present_orderId = true;
34465
      if (this_present_orderId || that_present_orderId) {
34466
        if (!(this_present_orderId && that_present_orderId))
34467
          return false;
34468
        if (this.orderId != that.orderId)
34469
          return false;
34470
      }
34471
 
34472
      return true;
34473
    }
34474
 
34475
    @Override
34476
    public int hashCode() {
34477
      return 0;
34478
    }
34479
 
34480
    public int compareTo(refundOrder_args other) {
34481
      if (!getClass().equals(other.getClass())) {
34482
        return getClass().getName().compareTo(other.getClass().getName());
34483
      }
34484
 
34485
      int lastComparison = 0;
34486
      refundOrder_args typedOther = (refundOrder_args)other;
34487
 
34488
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
34489
      if (lastComparison != 0) {
34490
        return lastComparison;
34491
      }
34492
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
34493
      if (lastComparison != 0) {
34494
        return lastComparison;
34495
      }
34496
      return 0;
34497
    }
34498
 
34499
    public void read(TProtocol iprot) throws TException {
34500
      TField field;
34501
      iprot.readStructBegin();
34502
      while (true)
34503
      {
34504
        field = iprot.readFieldBegin();
34505
        if (field.type == TType.STOP) { 
34506
          break;
34507
        }
34508
        _Fields fieldId = _Fields.findByThriftId(field.id);
34509
        if (fieldId == null) {
34510
          TProtocolUtil.skip(iprot, field.type);
34511
        } else {
34512
          switch (fieldId) {
34513
            case ORDER_ID:
34514
              if (field.type == TType.I64) {
34515
                this.orderId = iprot.readI64();
34516
                setOrderIdIsSet(true);
34517
              } else { 
34518
                TProtocolUtil.skip(iprot, field.type);
34519
              }
34520
              break;
34521
          }
34522
          iprot.readFieldEnd();
34523
        }
34524
      }
34525
      iprot.readStructEnd();
34526
      validate();
34527
    }
34528
 
34529
    public void write(TProtocol oprot) throws TException {
34530
      validate();
34531
 
34532
      oprot.writeStructBegin(STRUCT_DESC);
34533
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
34534
      oprot.writeI64(this.orderId);
34535
      oprot.writeFieldEnd();
34536
      oprot.writeFieldStop();
34537
      oprot.writeStructEnd();
34538
    }
34539
 
34540
    @Override
34541
    public String toString() {
34542
      StringBuilder sb = new StringBuilder("refundOrder_args(");
34543
      boolean first = true;
34544
 
34545
      sb.append("orderId:");
34546
      sb.append(this.orderId);
34547
      first = false;
34548
      sb.append(")");
34549
      return sb.toString();
34550
    }
34551
 
34552
    public void validate() throws TException {
34553
      // check for required fields
34554
    }
34555
 
34556
  }
34557
 
34558
  public static class refundOrder_result implements TBase<refundOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<refundOrder_result>   {
34559
    private static final TStruct STRUCT_DESC = new TStruct("refundOrder_result");
34560
 
34561
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
34562
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
34563
 
34564
    private boolean success;
34565
    private TransactionServiceException ex;
34566
 
34567
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34568
    public enum _Fields implements TFieldIdEnum {
34569
      SUCCESS((short)0, "success"),
34570
      EX((short)1, "ex");
34571
 
34572
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34573
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34574
 
34575
      static {
34576
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34577
          byId.put((int)field._thriftId, field);
34578
          byName.put(field.getFieldName(), field);
34579
        }
34580
      }
34581
 
34582
      /**
34583
       * Find the _Fields constant that matches fieldId, or null if its not found.
34584
       */
34585
      public static _Fields findByThriftId(int fieldId) {
34586
        return byId.get(fieldId);
34587
      }
34588
 
34589
      /**
34590
       * Find the _Fields constant that matches fieldId, throwing an exception
34591
       * if it is not found.
34592
       */
34593
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34594
        _Fields fields = findByThriftId(fieldId);
34595
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34596
        return fields;
34597
      }
34598
 
34599
      /**
34600
       * Find the _Fields constant that matches name, or null if its not found.
34601
       */
34602
      public static _Fields findByName(String name) {
34603
        return byName.get(name);
34604
      }
34605
 
34606
      private final short _thriftId;
34607
      private final String _fieldName;
34608
 
34609
      _Fields(short thriftId, String fieldName) {
34610
        _thriftId = thriftId;
34611
        _fieldName = fieldName;
34612
      }
34613
 
34614
      public short getThriftFieldId() {
34615
        return _thriftId;
34616
      }
34617
 
34618
      public String getFieldName() {
34619
        return _fieldName;
34620
      }
34621
    }
34622
 
34623
    // isset id assignments
34624
    private static final int __SUCCESS_ISSET_ID = 0;
34625
    private BitSet __isset_bit_vector = new BitSet(1);
34626
 
34627
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34628
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
34629
          new FieldValueMetaData(TType.BOOL)));
34630
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
34631
          new FieldValueMetaData(TType.STRUCT)));
34632
    }});
34633
 
34634
    static {
34635
      FieldMetaData.addStructMetaDataMap(refundOrder_result.class, metaDataMap);
34636
    }
34637
 
34638
    public refundOrder_result() {
34639
    }
34640
 
34641
    public refundOrder_result(
34642
      boolean success,
34643
      TransactionServiceException ex)
34644
    {
34645
      this();
34646
      this.success = success;
34647
      setSuccessIsSet(true);
34648
      this.ex = ex;
34649
    }
34650
 
34651
    /**
34652
     * Performs a deep copy on <i>other</i>.
34653
     */
34654
    public refundOrder_result(refundOrder_result other) {
34655
      __isset_bit_vector.clear();
34656
      __isset_bit_vector.or(other.__isset_bit_vector);
34657
      this.success = other.success;
34658
      if (other.isSetEx()) {
34659
        this.ex = new TransactionServiceException(other.ex);
34660
      }
34661
    }
34662
 
34663
    public refundOrder_result deepCopy() {
34664
      return new refundOrder_result(this);
34665
    }
34666
 
34667
    @Deprecated
34668
    public refundOrder_result clone() {
34669
      return new refundOrder_result(this);
34670
    }
34671
 
34672
    public boolean isSuccess() {
34673
      return this.success;
34674
    }
34675
 
34676
    public refundOrder_result setSuccess(boolean success) {
34677
      this.success = success;
34678
      setSuccessIsSet(true);
34679
      return this;
34680
    }
34681
 
34682
    public void unsetSuccess() {
34683
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
34684
    }
34685
 
34686
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
34687
    public boolean isSetSuccess() {
34688
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
34689
    }
34690
 
34691
    public void setSuccessIsSet(boolean value) {
34692
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
34693
    }
34694
 
34695
    public TransactionServiceException getEx() {
34696
      return this.ex;
34697
    }
34698
 
34699
    public refundOrder_result setEx(TransactionServiceException ex) {
34700
      this.ex = ex;
34701
      return this;
34702
    }
34703
 
34704
    public void unsetEx() {
34705
      this.ex = null;
34706
    }
34707
 
34708
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
34709
    public boolean isSetEx() {
34710
      return this.ex != null;
34711
    }
34712
 
34713
    public void setExIsSet(boolean value) {
34714
      if (!value) {
34715
        this.ex = null;
34716
      }
34717
    }
34718
 
34719
    public void setFieldValue(_Fields field, Object value) {
34720
      switch (field) {
34721
      case SUCCESS:
34722
        if (value == null) {
34723
          unsetSuccess();
34724
        } else {
34725
          setSuccess((Boolean)value);
34726
        }
34727
        break;
34728
 
34729
      case EX:
34730
        if (value == null) {
34731
          unsetEx();
34732
        } else {
34733
          setEx((TransactionServiceException)value);
34734
        }
34735
        break;
34736
 
34737
      }
34738
    }
34739
 
34740
    public void setFieldValue(int fieldID, Object value) {
34741
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34742
    }
34743
 
34744
    public Object getFieldValue(_Fields field) {
34745
      switch (field) {
34746
      case SUCCESS:
34747
        return new Boolean(isSuccess());
34748
 
34749
      case EX:
34750
        return getEx();
34751
 
34752
      }
34753
      throw new IllegalStateException();
34754
    }
34755
 
34756
    public Object getFieldValue(int fieldId) {
34757
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34758
    }
34759
 
34760
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34761
    public boolean isSet(_Fields field) {
34762
      switch (field) {
34763
      case SUCCESS:
34764
        return isSetSuccess();
34765
      case EX:
34766
        return isSetEx();
34767
      }
34768
      throw new IllegalStateException();
34769
    }
34770
 
34771
    public boolean isSet(int fieldID) {
34772
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34773
    }
34774
 
34775
    @Override
34776
    public boolean equals(Object that) {
34777
      if (that == null)
34778
        return false;
34779
      if (that instanceof refundOrder_result)
34780
        return this.equals((refundOrder_result)that);
34781
      return false;
34782
    }
34783
 
34784
    public boolean equals(refundOrder_result that) {
34785
      if (that == null)
34786
        return false;
34787
 
34788
      boolean this_present_success = true;
34789
      boolean that_present_success = true;
34790
      if (this_present_success || that_present_success) {
34791
        if (!(this_present_success && that_present_success))
34792
          return false;
34793
        if (this.success != that.success)
34794
          return false;
34795
      }
34796
 
34797
      boolean this_present_ex = true && this.isSetEx();
34798
      boolean that_present_ex = true && that.isSetEx();
34799
      if (this_present_ex || that_present_ex) {
34800
        if (!(this_present_ex && that_present_ex))
34801
          return false;
34802
        if (!this.ex.equals(that.ex))
34803
          return false;
34804
      }
34805
 
34806
      return true;
34807
    }
34808
 
34809
    @Override
34810
    public int hashCode() {
34811
      return 0;
34812
    }
34813
 
34814
    public int compareTo(refundOrder_result other) {
34815
      if (!getClass().equals(other.getClass())) {
34816
        return getClass().getName().compareTo(other.getClass().getName());
34817
      }
34818
 
34819
      int lastComparison = 0;
34820
      refundOrder_result typedOther = (refundOrder_result)other;
34821
 
34822
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
34823
      if (lastComparison != 0) {
34824
        return lastComparison;
34825
      }
34826
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
34827
      if (lastComparison != 0) {
34828
        return lastComparison;
34829
      }
34830
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
34831
      if (lastComparison != 0) {
34832
        return lastComparison;
34833
      }
34834
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
34835
      if (lastComparison != 0) {
34836
        return lastComparison;
34837
      }
34838
      return 0;
34839
    }
34840
 
34841
    public void read(TProtocol iprot) throws TException {
34842
      TField field;
34843
      iprot.readStructBegin();
34844
      while (true)
34845
      {
34846
        field = iprot.readFieldBegin();
34847
        if (field.type == TType.STOP) { 
34848
          break;
34849
        }
34850
        _Fields fieldId = _Fields.findByThriftId(field.id);
34851
        if (fieldId == null) {
34852
          TProtocolUtil.skip(iprot, field.type);
34853
        } else {
34854
          switch (fieldId) {
34855
            case SUCCESS:
34856
              if (field.type == TType.BOOL) {
34857
                this.success = iprot.readBool();
34858
                setSuccessIsSet(true);
34859
              } else { 
34860
                TProtocolUtil.skip(iprot, field.type);
34861
              }
34862
              break;
34863
            case EX:
34864
              if (field.type == TType.STRUCT) {
34865
                this.ex = new TransactionServiceException();
34866
                this.ex.read(iprot);
34867
              } else { 
34868
                TProtocolUtil.skip(iprot, field.type);
34869
              }
34870
              break;
34871
          }
34872
          iprot.readFieldEnd();
34873
        }
34874
      }
34875
      iprot.readStructEnd();
34876
      validate();
34877
    }
34878
 
34879
    public void write(TProtocol oprot) throws TException {
34880
      oprot.writeStructBegin(STRUCT_DESC);
34881
 
34882
      if (this.isSetSuccess()) {
34883
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
34884
        oprot.writeBool(this.success);
34885
        oprot.writeFieldEnd();
34886
      } else if (this.isSetEx()) {
34887
        oprot.writeFieldBegin(EX_FIELD_DESC);
34888
        this.ex.write(oprot);
34889
        oprot.writeFieldEnd();
34890
      }
34891
      oprot.writeFieldStop();
34892
      oprot.writeStructEnd();
34893
    }
34894
 
34895
    @Override
34896
    public String toString() {
34897
      StringBuilder sb = new StringBuilder("refundOrder_result(");
34898
      boolean first = true;
34899
 
34900
      sb.append("success:");
34901
      sb.append(this.success);
34902
      first = false;
34903
      if (!first) sb.append(", ");
34904
      sb.append("ex:");
34905
      if (this.ex == null) {
34906
        sb.append("null");
34907
      } else {
34908
        sb.append(this.ex);
34909
      }
34910
      first = false;
34911
      sb.append(")");
34912
      return sb.toString();
34913
    }
34914
 
34915
    public void validate() throws TException {
34916
      // check for required fields
34917
    }
34918
 
34919
  }
34920
 
2690 chandransh 34921
  public static class getReturnOrders_args implements TBase<getReturnOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrders_args>   {
34922
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrders_args");
34923
 
34924
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
34925
    private static final TField FROM_DATE_FIELD_DESC = new TField("fromDate", TType.I64, (short)2);
34926
    private static final TField TO_DATE_FIELD_DESC = new TField("toDate", TType.I64, (short)3);
34927
 
34928
    private long warehouseId;
34929
    private long fromDate;
34930
    private long toDate;
34931
 
34932
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34933
    public enum _Fields implements TFieldIdEnum {
34934
      WAREHOUSE_ID((short)1, "warehouseId"),
34935
      FROM_DATE((short)2, "fromDate"),
34936
      TO_DATE((short)3, "toDate");
34937
 
34938
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34940
 
34941
      static {
34942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34943
          byId.put((int)field._thriftId, field);
34944
          byName.put(field.getFieldName(), field);
34945
        }
34946
      }
34947
 
34948
      /**
34949
       * Find the _Fields constant that matches fieldId, or null if its not found.
34950
       */
34951
      public static _Fields findByThriftId(int fieldId) {
34952
        return byId.get(fieldId);
34953
      }
34954
 
34955
      /**
34956
       * Find the _Fields constant that matches fieldId, throwing an exception
34957
       * if it is not found.
34958
       */
34959
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34960
        _Fields fields = findByThriftId(fieldId);
34961
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34962
        return fields;
34963
      }
34964
 
34965
      /**
34966
       * Find the _Fields constant that matches name, or null if its not found.
34967
       */
34968
      public static _Fields findByName(String name) {
34969
        return byName.get(name);
34970
      }
34971
 
34972
      private final short _thriftId;
34973
      private final String _fieldName;
34974
 
34975
      _Fields(short thriftId, String fieldName) {
34976
        _thriftId = thriftId;
34977
        _fieldName = fieldName;
34978
      }
34979
 
34980
      public short getThriftFieldId() {
34981
        return _thriftId;
34982
      }
34983
 
34984
      public String getFieldName() {
34985
        return _fieldName;
34986
      }
34987
    }
34988
 
34989
    // isset id assignments
34990
    private static final int __WAREHOUSEID_ISSET_ID = 0;
34991
    private static final int __FROMDATE_ISSET_ID = 1;
34992
    private static final int __TODATE_ISSET_ID = 2;
34993
    private BitSet __isset_bit_vector = new BitSet(3);
34994
 
34995
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34996
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
34997
          new FieldValueMetaData(TType.I64)));
34998
      put(_Fields.FROM_DATE, new FieldMetaData("fromDate", TFieldRequirementType.DEFAULT, 
34999
          new FieldValueMetaData(TType.I64)));
35000
      put(_Fields.TO_DATE, new FieldMetaData("toDate", TFieldRequirementType.DEFAULT, 
35001
          new FieldValueMetaData(TType.I64)));
35002
    }});
35003
 
35004
    static {
35005
      FieldMetaData.addStructMetaDataMap(getReturnOrders_args.class, metaDataMap);
35006
    }
35007
 
35008
    public getReturnOrders_args() {
35009
    }
35010
 
35011
    public getReturnOrders_args(
35012
      long warehouseId,
35013
      long fromDate,
35014
      long toDate)
35015
    {
35016
      this();
35017
      this.warehouseId = warehouseId;
35018
      setWarehouseIdIsSet(true);
35019
      this.fromDate = fromDate;
35020
      setFromDateIsSet(true);
35021
      this.toDate = toDate;
35022
      setToDateIsSet(true);
35023
    }
35024
 
35025
    /**
35026
     * Performs a deep copy on <i>other</i>.
35027
     */
35028
    public getReturnOrders_args(getReturnOrders_args other) {
35029
      __isset_bit_vector.clear();
35030
      __isset_bit_vector.or(other.__isset_bit_vector);
35031
      this.warehouseId = other.warehouseId;
35032
      this.fromDate = other.fromDate;
35033
      this.toDate = other.toDate;
35034
    }
35035
 
35036
    public getReturnOrders_args deepCopy() {
35037
      return new getReturnOrders_args(this);
35038
    }
35039
 
35040
    @Deprecated
35041
    public getReturnOrders_args clone() {
35042
      return new getReturnOrders_args(this);
35043
    }
35044
 
35045
    public long getWarehouseId() {
35046
      return this.warehouseId;
35047
    }
35048
 
35049
    public getReturnOrders_args setWarehouseId(long warehouseId) {
35050
      this.warehouseId = warehouseId;
35051
      setWarehouseIdIsSet(true);
35052
      return this;
35053
    }
35054
 
35055
    public void unsetWarehouseId() {
35056
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
35057
    }
35058
 
35059
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
35060
    public boolean isSetWarehouseId() {
35061
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
35062
    }
35063
 
35064
    public void setWarehouseIdIsSet(boolean value) {
35065
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
35066
    }
35067
 
35068
    public long getFromDate() {
35069
      return this.fromDate;
35070
    }
35071
 
35072
    public getReturnOrders_args setFromDate(long fromDate) {
35073
      this.fromDate = fromDate;
35074
      setFromDateIsSet(true);
35075
      return this;
35076
    }
35077
 
35078
    public void unsetFromDate() {
35079
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
35080
    }
35081
 
35082
    /** Returns true if field fromDate is set (has been asigned a value) and false otherwise */
35083
    public boolean isSetFromDate() {
35084
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
35085
    }
35086
 
35087
    public void setFromDateIsSet(boolean value) {
35088
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
35089
    }
35090
 
35091
    public long getToDate() {
35092
      return this.toDate;
35093
    }
35094
 
35095
    public getReturnOrders_args setToDate(long toDate) {
35096
      this.toDate = toDate;
35097
      setToDateIsSet(true);
35098
      return this;
35099
    }
35100
 
35101
    public void unsetToDate() {
35102
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
35103
    }
35104
 
35105
    /** Returns true if field toDate is set (has been asigned a value) and false otherwise */
35106
    public boolean isSetToDate() {
35107
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
35108
    }
35109
 
35110
    public void setToDateIsSet(boolean value) {
35111
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
35112
    }
35113
 
35114
    public void setFieldValue(_Fields field, Object value) {
35115
      switch (field) {
35116
      case WAREHOUSE_ID:
35117
        if (value == null) {
35118
          unsetWarehouseId();
35119
        } else {
35120
          setWarehouseId((Long)value);
35121
        }
35122
        break;
35123
 
35124
      case FROM_DATE:
35125
        if (value == null) {
35126
          unsetFromDate();
35127
        } else {
35128
          setFromDate((Long)value);
35129
        }
35130
        break;
35131
 
35132
      case TO_DATE:
35133
        if (value == null) {
35134
          unsetToDate();
35135
        } else {
35136
          setToDate((Long)value);
35137
        }
35138
        break;
35139
 
35140
      }
35141
    }
35142
 
35143
    public void setFieldValue(int fieldID, Object value) {
35144
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35145
    }
35146
 
35147
    public Object getFieldValue(_Fields field) {
35148
      switch (field) {
35149
      case WAREHOUSE_ID:
35150
        return new Long(getWarehouseId());
35151
 
35152
      case FROM_DATE:
35153
        return new Long(getFromDate());
35154
 
35155
      case TO_DATE:
35156
        return new Long(getToDate());
35157
 
35158
      }
35159
      throw new IllegalStateException();
35160
    }
35161
 
35162
    public Object getFieldValue(int fieldId) {
35163
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35164
    }
35165
 
35166
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35167
    public boolean isSet(_Fields field) {
35168
      switch (field) {
35169
      case WAREHOUSE_ID:
35170
        return isSetWarehouseId();
35171
      case FROM_DATE:
35172
        return isSetFromDate();
35173
      case TO_DATE:
35174
        return isSetToDate();
35175
      }
35176
      throw new IllegalStateException();
35177
    }
35178
 
35179
    public boolean isSet(int fieldID) {
35180
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35181
    }
35182
 
35183
    @Override
35184
    public boolean equals(Object that) {
35185
      if (that == null)
35186
        return false;
35187
      if (that instanceof getReturnOrders_args)
35188
        return this.equals((getReturnOrders_args)that);
35189
      return false;
35190
    }
35191
 
35192
    public boolean equals(getReturnOrders_args that) {
35193
      if (that == null)
35194
        return false;
35195
 
35196
      boolean this_present_warehouseId = true;
35197
      boolean that_present_warehouseId = true;
35198
      if (this_present_warehouseId || that_present_warehouseId) {
35199
        if (!(this_present_warehouseId && that_present_warehouseId))
35200
          return false;
35201
        if (this.warehouseId != that.warehouseId)
35202
          return false;
35203
      }
35204
 
35205
      boolean this_present_fromDate = true;
35206
      boolean that_present_fromDate = true;
35207
      if (this_present_fromDate || that_present_fromDate) {
35208
        if (!(this_present_fromDate && that_present_fromDate))
35209
          return false;
35210
        if (this.fromDate != that.fromDate)
35211
          return false;
35212
      }
35213
 
35214
      boolean this_present_toDate = true;
35215
      boolean that_present_toDate = true;
35216
      if (this_present_toDate || that_present_toDate) {
35217
        if (!(this_present_toDate && that_present_toDate))
35218
          return false;
35219
        if (this.toDate != that.toDate)
35220
          return false;
35221
      }
35222
 
35223
      return true;
35224
    }
35225
 
35226
    @Override
35227
    public int hashCode() {
35228
      return 0;
35229
    }
35230
 
35231
    public int compareTo(getReturnOrders_args other) {
35232
      if (!getClass().equals(other.getClass())) {
35233
        return getClass().getName().compareTo(other.getClass().getName());
35234
      }
35235
 
35236
      int lastComparison = 0;
35237
      getReturnOrders_args typedOther = (getReturnOrders_args)other;
35238
 
35239
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
35240
      if (lastComparison != 0) {
35241
        return lastComparison;
35242
      }
35243
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
35244
      if (lastComparison != 0) {
35245
        return lastComparison;
35246
      }
35247
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(isSetFromDate());
35248
      if (lastComparison != 0) {
35249
        return lastComparison;
35250
      }
35251
      lastComparison = TBaseHelper.compareTo(fromDate, typedOther.fromDate);
35252
      if (lastComparison != 0) {
35253
        return lastComparison;
35254
      }
35255
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(isSetToDate());
35256
      if (lastComparison != 0) {
35257
        return lastComparison;
35258
      }
35259
      lastComparison = TBaseHelper.compareTo(toDate, typedOther.toDate);
35260
      if (lastComparison != 0) {
35261
        return lastComparison;
35262
      }
35263
      return 0;
35264
    }
35265
 
35266
    public void read(TProtocol iprot) throws TException {
35267
      TField field;
35268
      iprot.readStructBegin();
35269
      while (true)
35270
      {
35271
        field = iprot.readFieldBegin();
35272
        if (field.type == TType.STOP) { 
35273
          break;
35274
        }
35275
        _Fields fieldId = _Fields.findByThriftId(field.id);
35276
        if (fieldId == null) {
35277
          TProtocolUtil.skip(iprot, field.type);
35278
        } else {
35279
          switch (fieldId) {
35280
            case WAREHOUSE_ID:
35281
              if (field.type == TType.I64) {
35282
                this.warehouseId = iprot.readI64();
35283
                setWarehouseIdIsSet(true);
35284
              } else { 
35285
                TProtocolUtil.skip(iprot, field.type);
35286
              }
35287
              break;
35288
            case FROM_DATE:
35289
              if (field.type == TType.I64) {
35290
                this.fromDate = iprot.readI64();
35291
                setFromDateIsSet(true);
35292
              } else { 
35293
                TProtocolUtil.skip(iprot, field.type);
35294
              }
35295
              break;
35296
            case TO_DATE:
35297
              if (field.type == TType.I64) {
35298
                this.toDate = iprot.readI64();
35299
                setToDateIsSet(true);
35300
              } else { 
35301
                TProtocolUtil.skip(iprot, field.type);
35302
              }
35303
              break;
35304
          }
35305
          iprot.readFieldEnd();
35306
        }
35307
      }
35308
      iprot.readStructEnd();
35309
      validate();
35310
    }
35311
 
35312
    public void write(TProtocol oprot) throws TException {
35313
      validate();
35314
 
35315
      oprot.writeStructBegin(STRUCT_DESC);
35316
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
35317
      oprot.writeI64(this.warehouseId);
35318
      oprot.writeFieldEnd();
35319
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
35320
      oprot.writeI64(this.fromDate);
35321
      oprot.writeFieldEnd();
35322
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
35323
      oprot.writeI64(this.toDate);
35324
      oprot.writeFieldEnd();
35325
      oprot.writeFieldStop();
35326
      oprot.writeStructEnd();
35327
    }
35328
 
35329
    @Override
35330
    public String toString() {
35331
      StringBuilder sb = new StringBuilder("getReturnOrders_args(");
35332
      boolean first = true;
35333
 
35334
      sb.append("warehouseId:");
35335
      sb.append(this.warehouseId);
35336
      first = false;
35337
      if (!first) sb.append(", ");
35338
      sb.append("fromDate:");
35339
      sb.append(this.fromDate);
35340
      first = false;
35341
      if (!first) sb.append(", ");
35342
      sb.append("toDate:");
35343
      sb.append(this.toDate);
35344
      first = false;
35345
      sb.append(")");
35346
      return sb.toString();
35347
    }
35348
 
35349
    public void validate() throws TException {
35350
      // check for required fields
35351
    }
35352
 
35353
  }
35354
 
35355
  public static class getReturnOrders_result implements TBase<getReturnOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrders_result>   {
35356
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrders_result");
35357
 
35358
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
35359
 
35360
    private List<ReturnOrder> success;
35361
 
35362
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35363
    public enum _Fields implements TFieldIdEnum {
35364
      SUCCESS((short)0, "success");
35365
 
35366
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35367
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35368
 
35369
      static {
35370
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35371
          byId.put((int)field._thriftId, field);
35372
          byName.put(field.getFieldName(), field);
35373
        }
35374
      }
35375
 
35376
      /**
35377
       * Find the _Fields constant that matches fieldId, or null if its not found.
35378
       */
35379
      public static _Fields findByThriftId(int fieldId) {
35380
        return byId.get(fieldId);
35381
      }
35382
 
35383
      /**
35384
       * Find the _Fields constant that matches fieldId, throwing an exception
35385
       * if it is not found.
35386
       */
35387
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35388
        _Fields fields = findByThriftId(fieldId);
35389
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35390
        return fields;
35391
      }
35392
 
35393
      /**
35394
       * Find the _Fields constant that matches name, or null if its not found.
35395
       */
35396
      public static _Fields findByName(String name) {
35397
        return byName.get(name);
35398
      }
35399
 
35400
      private final short _thriftId;
35401
      private final String _fieldName;
35402
 
35403
      _Fields(short thriftId, String fieldName) {
35404
        _thriftId = thriftId;
35405
        _fieldName = fieldName;
35406
      }
35407
 
35408
      public short getThriftFieldId() {
35409
        return _thriftId;
35410
      }
35411
 
35412
      public String getFieldName() {
35413
        return _fieldName;
35414
      }
35415
    }
35416
 
35417
    // isset id assignments
35418
 
35419
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35420
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
35421
          new ListMetaData(TType.LIST, 
35422
              new StructMetaData(TType.STRUCT, ReturnOrder.class))));
35423
    }});
35424
 
35425
    static {
35426
      FieldMetaData.addStructMetaDataMap(getReturnOrders_result.class, metaDataMap);
35427
    }
35428
 
35429
    public getReturnOrders_result() {
35430
    }
35431
 
35432
    public getReturnOrders_result(
35433
      List<ReturnOrder> success)
35434
    {
35435
      this();
35436
      this.success = success;
35437
    }
35438
 
35439
    /**
35440
     * Performs a deep copy on <i>other</i>.
35441
     */
35442
    public getReturnOrders_result(getReturnOrders_result other) {
35443
      if (other.isSetSuccess()) {
35444
        List<ReturnOrder> __this__success = new ArrayList<ReturnOrder>();
35445
        for (ReturnOrder other_element : other.success) {
35446
          __this__success.add(new ReturnOrder(other_element));
35447
        }
35448
        this.success = __this__success;
35449
      }
35450
    }
35451
 
35452
    public getReturnOrders_result deepCopy() {
35453
      return new getReturnOrders_result(this);
35454
    }
35455
 
35456
    @Deprecated
35457
    public getReturnOrders_result clone() {
35458
      return new getReturnOrders_result(this);
35459
    }
35460
 
35461
    public int getSuccessSize() {
35462
      return (this.success == null) ? 0 : this.success.size();
35463
    }
35464
 
35465
    public java.util.Iterator<ReturnOrder> getSuccessIterator() {
35466
      return (this.success == null) ? null : this.success.iterator();
35467
    }
35468
 
35469
    public void addToSuccess(ReturnOrder elem) {
35470
      if (this.success == null) {
35471
        this.success = new ArrayList<ReturnOrder>();
35472
      }
35473
      this.success.add(elem);
35474
    }
35475
 
35476
    public List<ReturnOrder> getSuccess() {
35477
      return this.success;
35478
    }
35479
 
35480
    public getReturnOrders_result setSuccess(List<ReturnOrder> success) {
35481
      this.success = success;
35482
      return this;
35483
    }
35484
 
35485
    public void unsetSuccess() {
35486
      this.success = null;
35487
    }
35488
 
35489
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
35490
    public boolean isSetSuccess() {
35491
      return this.success != null;
35492
    }
35493
 
35494
    public void setSuccessIsSet(boolean value) {
35495
      if (!value) {
35496
        this.success = null;
35497
      }
35498
    }
35499
 
35500
    public void setFieldValue(_Fields field, Object value) {
35501
      switch (field) {
35502
      case SUCCESS:
35503
        if (value == null) {
35504
          unsetSuccess();
35505
        } else {
35506
          setSuccess((List<ReturnOrder>)value);
35507
        }
35508
        break;
35509
 
35510
      }
35511
    }
35512
 
35513
    public void setFieldValue(int fieldID, Object value) {
35514
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35515
    }
35516
 
35517
    public Object getFieldValue(_Fields field) {
35518
      switch (field) {
35519
      case SUCCESS:
35520
        return getSuccess();
35521
 
35522
      }
35523
      throw new IllegalStateException();
35524
    }
35525
 
35526
    public Object getFieldValue(int fieldId) {
35527
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35528
    }
35529
 
35530
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35531
    public boolean isSet(_Fields field) {
35532
      switch (field) {
35533
      case SUCCESS:
35534
        return isSetSuccess();
35535
      }
35536
      throw new IllegalStateException();
35537
    }
35538
 
35539
    public boolean isSet(int fieldID) {
35540
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35541
    }
35542
 
35543
    @Override
35544
    public boolean equals(Object that) {
35545
      if (that == null)
35546
        return false;
35547
      if (that instanceof getReturnOrders_result)
35548
        return this.equals((getReturnOrders_result)that);
35549
      return false;
35550
    }
35551
 
35552
    public boolean equals(getReturnOrders_result that) {
35553
      if (that == null)
35554
        return false;
35555
 
35556
      boolean this_present_success = true && this.isSetSuccess();
35557
      boolean that_present_success = true && that.isSetSuccess();
35558
      if (this_present_success || that_present_success) {
35559
        if (!(this_present_success && that_present_success))
35560
          return false;
35561
        if (!this.success.equals(that.success))
35562
          return false;
35563
      }
35564
 
35565
      return true;
35566
    }
35567
 
35568
    @Override
35569
    public int hashCode() {
35570
      return 0;
35571
    }
35572
 
35573
    public int compareTo(getReturnOrders_result other) {
35574
      if (!getClass().equals(other.getClass())) {
35575
        return getClass().getName().compareTo(other.getClass().getName());
35576
      }
35577
 
35578
      int lastComparison = 0;
35579
      getReturnOrders_result typedOther = (getReturnOrders_result)other;
35580
 
35581
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
35582
      if (lastComparison != 0) {
35583
        return lastComparison;
35584
      }
35585
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
35586
      if (lastComparison != 0) {
35587
        return lastComparison;
35588
      }
35589
      return 0;
35590
    }
35591
 
35592
    public void read(TProtocol iprot) throws TException {
35593
      TField field;
35594
      iprot.readStructBegin();
35595
      while (true)
35596
      {
35597
        field = iprot.readFieldBegin();
35598
        if (field.type == TType.STOP) { 
35599
          break;
35600
        }
35601
        _Fields fieldId = _Fields.findByThriftId(field.id);
35602
        if (fieldId == null) {
35603
          TProtocolUtil.skip(iprot, field.type);
35604
        } else {
35605
          switch (fieldId) {
35606
            case SUCCESS:
35607
              if (field.type == TType.LIST) {
35608
                {
2765 chandransh 35609
                  TList _list97 = iprot.readListBegin();
35610
                  this.success = new ArrayList<ReturnOrder>(_list97.size);
35611
                  for (int _i98 = 0; _i98 < _list97.size; ++_i98)
2690 chandransh 35612
                  {
2765 chandransh 35613
                    ReturnOrder _elem99;
35614
                    _elem99 = new ReturnOrder();
35615
                    _elem99.read(iprot);
35616
                    this.success.add(_elem99);
2690 chandransh 35617
                  }
35618
                  iprot.readListEnd();
35619
                }
35620
              } else { 
35621
                TProtocolUtil.skip(iprot, field.type);
35622
              }
35623
              break;
35624
          }
35625
          iprot.readFieldEnd();
35626
        }
35627
      }
35628
      iprot.readStructEnd();
35629
      validate();
35630
    }
35631
 
35632
    public void write(TProtocol oprot) throws TException {
35633
      oprot.writeStructBegin(STRUCT_DESC);
35634
 
35635
      if (this.isSetSuccess()) {
35636
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
35637
        {
35638
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
2765 chandransh 35639
          for (ReturnOrder _iter100 : this.success)
2690 chandransh 35640
          {
2765 chandransh 35641
            _iter100.write(oprot);
2690 chandransh 35642
          }
35643
          oprot.writeListEnd();
35644
        }
35645
        oprot.writeFieldEnd();
35646
      }
35647
      oprot.writeFieldStop();
35648
      oprot.writeStructEnd();
35649
    }
35650
 
35651
    @Override
35652
    public String toString() {
35653
      StringBuilder sb = new StringBuilder("getReturnOrders_result(");
35654
      boolean first = true;
35655
 
35656
      sb.append("success:");
35657
      if (this.success == null) {
35658
        sb.append("null");
35659
      } else {
35660
        sb.append(this.success);
35661
      }
35662
      first = false;
35663
      sb.append(")");
35664
      return sb.toString();
35665
    }
35666
 
35667
    public void validate() throws TException {
35668
      // check for required fields
35669
    }
35670
 
35671
  }
35672
 
2700 chandransh 35673
  public static class getReturnOrder_args implements TBase<getReturnOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrder_args>   {
35674
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrder_args");
35675
 
35676
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
35677
 
35678
    private long id;
35679
 
35680
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35681
    public enum _Fields implements TFieldIdEnum {
35682
      ID((short)1, "id");
35683
 
35684
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35685
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35686
 
35687
      static {
35688
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35689
          byId.put((int)field._thriftId, field);
35690
          byName.put(field.getFieldName(), field);
35691
        }
35692
      }
35693
 
35694
      /**
35695
       * Find the _Fields constant that matches fieldId, or null if its not found.
35696
       */
35697
      public static _Fields findByThriftId(int fieldId) {
35698
        return byId.get(fieldId);
35699
      }
35700
 
35701
      /**
35702
       * Find the _Fields constant that matches fieldId, throwing an exception
35703
       * if it is not found.
35704
       */
35705
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35706
        _Fields fields = findByThriftId(fieldId);
35707
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35708
        return fields;
35709
      }
35710
 
35711
      /**
35712
       * Find the _Fields constant that matches name, or null if its not found.
35713
       */
35714
      public static _Fields findByName(String name) {
35715
        return byName.get(name);
35716
      }
35717
 
35718
      private final short _thriftId;
35719
      private final String _fieldName;
35720
 
35721
      _Fields(short thriftId, String fieldName) {
35722
        _thriftId = thriftId;
35723
        _fieldName = fieldName;
35724
      }
35725
 
35726
      public short getThriftFieldId() {
35727
        return _thriftId;
35728
      }
35729
 
35730
      public String getFieldName() {
35731
        return _fieldName;
35732
      }
35733
    }
35734
 
35735
    // isset id assignments
35736
    private static final int __ID_ISSET_ID = 0;
35737
    private BitSet __isset_bit_vector = new BitSet(1);
35738
 
35739
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35740
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
35741
          new FieldValueMetaData(TType.I64)));
35742
    }});
35743
 
35744
    static {
35745
      FieldMetaData.addStructMetaDataMap(getReturnOrder_args.class, metaDataMap);
35746
    }
35747
 
35748
    public getReturnOrder_args() {
35749
    }
35750
 
35751
    public getReturnOrder_args(
35752
      long id)
35753
    {
35754
      this();
35755
      this.id = id;
35756
      setIdIsSet(true);
35757
    }
35758
 
35759
    /**
35760
     * Performs a deep copy on <i>other</i>.
35761
     */
35762
    public getReturnOrder_args(getReturnOrder_args other) {
35763
      __isset_bit_vector.clear();
35764
      __isset_bit_vector.or(other.__isset_bit_vector);
35765
      this.id = other.id;
35766
    }
35767
 
35768
    public getReturnOrder_args deepCopy() {
35769
      return new getReturnOrder_args(this);
35770
    }
35771
 
35772
    @Deprecated
35773
    public getReturnOrder_args clone() {
35774
      return new getReturnOrder_args(this);
35775
    }
35776
 
35777
    public long getId() {
35778
      return this.id;
35779
    }
35780
 
35781
    public getReturnOrder_args setId(long id) {
35782
      this.id = id;
35783
      setIdIsSet(true);
35784
      return this;
35785
    }
35786
 
35787
    public void unsetId() {
35788
      __isset_bit_vector.clear(__ID_ISSET_ID);
35789
    }
35790
 
35791
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
35792
    public boolean isSetId() {
35793
      return __isset_bit_vector.get(__ID_ISSET_ID);
35794
    }
35795
 
35796
    public void setIdIsSet(boolean value) {
35797
      __isset_bit_vector.set(__ID_ISSET_ID, value);
35798
    }
35799
 
35800
    public void setFieldValue(_Fields field, Object value) {
35801
      switch (field) {
35802
      case ID:
35803
        if (value == null) {
35804
          unsetId();
35805
        } else {
35806
          setId((Long)value);
35807
        }
35808
        break;
35809
 
35810
      }
35811
    }
35812
 
35813
    public void setFieldValue(int fieldID, Object value) {
35814
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35815
    }
35816
 
35817
    public Object getFieldValue(_Fields field) {
35818
      switch (field) {
35819
      case ID:
35820
        return new Long(getId());
35821
 
35822
      }
35823
      throw new IllegalStateException();
35824
    }
35825
 
35826
    public Object getFieldValue(int fieldId) {
35827
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35828
    }
35829
 
35830
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35831
    public boolean isSet(_Fields field) {
35832
      switch (field) {
35833
      case ID:
35834
        return isSetId();
35835
      }
35836
      throw new IllegalStateException();
35837
    }
35838
 
35839
    public boolean isSet(int fieldID) {
35840
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35841
    }
35842
 
35843
    @Override
35844
    public boolean equals(Object that) {
35845
      if (that == null)
35846
        return false;
35847
      if (that instanceof getReturnOrder_args)
35848
        return this.equals((getReturnOrder_args)that);
35849
      return false;
35850
    }
35851
 
35852
    public boolean equals(getReturnOrder_args that) {
35853
      if (that == null)
35854
        return false;
35855
 
35856
      boolean this_present_id = true;
35857
      boolean that_present_id = true;
35858
      if (this_present_id || that_present_id) {
35859
        if (!(this_present_id && that_present_id))
35860
          return false;
35861
        if (this.id != that.id)
35862
          return false;
35863
      }
35864
 
35865
      return true;
35866
    }
35867
 
35868
    @Override
35869
    public int hashCode() {
35870
      return 0;
35871
    }
35872
 
35873
    public int compareTo(getReturnOrder_args other) {
35874
      if (!getClass().equals(other.getClass())) {
35875
        return getClass().getName().compareTo(other.getClass().getName());
35876
      }
35877
 
35878
      int lastComparison = 0;
35879
      getReturnOrder_args typedOther = (getReturnOrder_args)other;
35880
 
35881
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
35882
      if (lastComparison != 0) {
35883
        return lastComparison;
35884
      }
35885
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
35886
      if (lastComparison != 0) {
35887
        return lastComparison;
35888
      }
35889
      return 0;
35890
    }
35891
 
35892
    public void read(TProtocol iprot) throws TException {
35893
      TField field;
35894
      iprot.readStructBegin();
35895
      while (true)
35896
      {
35897
        field = iprot.readFieldBegin();
35898
        if (field.type == TType.STOP) { 
35899
          break;
35900
        }
35901
        _Fields fieldId = _Fields.findByThriftId(field.id);
35902
        if (fieldId == null) {
35903
          TProtocolUtil.skip(iprot, field.type);
35904
        } else {
35905
          switch (fieldId) {
35906
            case ID:
35907
              if (field.type == TType.I64) {
35908
                this.id = iprot.readI64();
35909
                setIdIsSet(true);
35910
              } else { 
35911
                TProtocolUtil.skip(iprot, field.type);
35912
              }
35913
              break;
35914
          }
35915
          iprot.readFieldEnd();
35916
        }
35917
      }
35918
      iprot.readStructEnd();
35919
      validate();
35920
    }
35921
 
35922
    public void write(TProtocol oprot) throws TException {
35923
      validate();
35924
 
35925
      oprot.writeStructBegin(STRUCT_DESC);
35926
      oprot.writeFieldBegin(ID_FIELD_DESC);
35927
      oprot.writeI64(this.id);
35928
      oprot.writeFieldEnd();
35929
      oprot.writeFieldStop();
35930
      oprot.writeStructEnd();
35931
    }
35932
 
35933
    @Override
35934
    public String toString() {
35935
      StringBuilder sb = new StringBuilder("getReturnOrder_args(");
35936
      boolean first = true;
35937
 
35938
      sb.append("id:");
35939
      sb.append(this.id);
35940
      first = false;
35941
      sb.append(")");
35942
      return sb.toString();
35943
    }
35944
 
35945
    public void validate() throws TException {
35946
      // check for required fields
35947
    }
35948
 
35949
  }
35950
 
35951
  public static class getReturnOrder_result implements TBase<getReturnOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnOrder_result>   {
35952
    private static final TStruct STRUCT_DESC = new TStruct("getReturnOrder_result");
35953
 
35954
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
35955
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
35956
 
35957
    private ReturnOrder success;
35958
    private TransactionServiceException ex;
35959
 
35960
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35961
    public enum _Fields implements TFieldIdEnum {
35962
      SUCCESS((short)0, "success"),
35963
      EX((short)1, "ex");
35964
 
35965
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35966
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35967
 
35968
      static {
35969
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35970
          byId.put((int)field._thriftId, field);
35971
          byName.put(field.getFieldName(), field);
35972
        }
35973
      }
35974
 
35975
      /**
35976
       * Find the _Fields constant that matches fieldId, or null if its not found.
35977
       */
35978
      public static _Fields findByThriftId(int fieldId) {
35979
        return byId.get(fieldId);
35980
      }
35981
 
35982
      /**
35983
       * Find the _Fields constant that matches fieldId, throwing an exception
35984
       * if it is not found.
35985
       */
35986
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35987
        _Fields fields = findByThriftId(fieldId);
35988
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35989
        return fields;
35990
      }
35991
 
35992
      /**
35993
       * Find the _Fields constant that matches name, or null if its not found.
35994
       */
35995
      public static _Fields findByName(String name) {
35996
        return byName.get(name);
35997
      }
35998
 
35999
      private final short _thriftId;
36000
      private final String _fieldName;
36001
 
36002
      _Fields(short thriftId, String fieldName) {
36003
        _thriftId = thriftId;
36004
        _fieldName = fieldName;
36005
      }
36006
 
36007
      public short getThriftFieldId() {
36008
        return _thriftId;
36009
      }
36010
 
36011
      public String getFieldName() {
36012
        return _fieldName;
36013
      }
36014
    }
36015
 
36016
    // isset id assignments
36017
 
36018
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
36019
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
36020
          new StructMetaData(TType.STRUCT, ReturnOrder.class)));
36021
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
36022
          new FieldValueMetaData(TType.STRUCT)));
36023
    }});
36024
 
36025
    static {
36026
      FieldMetaData.addStructMetaDataMap(getReturnOrder_result.class, metaDataMap);
36027
    }
36028
 
36029
    public getReturnOrder_result() {
36030
    }
36031
 
36032
    public getReturnOrder_result(
36033
      ReturnOrder success,
36034
      TransactionServiceException ex)
36035
    {
36036
      this();
36037
      this.success = success;
36038
      this.ex = ex;
36039
    }
36040
 
36041
    /**
36042
     * Performs a deep copy on <i>other</i>.
36043
     */
36044
    public getReturnOrder_result(getReturnOrder_result other) {
36045
      if (other.isSetSuccess()) {
36046
        this.success = new ReturnOrder(other.success);
36047
      }
36048
      if (other.isSetEx()) {
36049
        this.ex = new TransactionServiceException(other.ex);
36050
      }
36051
    }
36052
 
36053
    public getReturnOrder_result deepCopy() {
36054
      return new getReturnOrder_result(this);
36055
    }
36056
 
36057
    @Deprecated
36058
    public getReturnOrder_result clone() {
36059
      return new getReturnOrder_result(this);
36060
    }
36061
 
36062
    public ReturnOrder getSuccess() {
36063
      return this.success;
36064
    }
36065
 
36066
    public getReturnOrder_result setSuccess(ReturnOrder success) {
36067
      this.success = success;
36068
      return this;
36069
    }
36070
 
36071
    public void unsetSuccess() {
36072
      this.success = null;
36073
    }
36074
 
36075
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
36076
    public boolean isSetSuccess() {
36077
      return this.success != null;
36078
    }
36079
 
36080
    public void setSuccessIsSet(boolean value) {
36081
      if (!value) {
36082
        this.success = null;
36083
      }
36084
    }
36085
 
36086
    public TransactionServiceException getEx() {
36087
      return this.ex;
36088
    }
36089
 
36090
    public getReturnOrder_result setEx(TransactionServiceException ex) {
36091
      this.ex = ex;
36092
      return this;
36093
    }
36094
 
36095
    public void unsetEx() {
36096
      this.ex = null;
36097
    }
36098
 
36099
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
36100
    public boolean isSetEx() {
36101
      return this.ex != null;
36102
    }
36103
 
36104
    public void setExIsSet(boolean value) {
36105
      if (!value) {
36106
        this.ex = null;
36107
      }
36108
    }
36109
 
36110
    public void setFieldValue(_Fields field, Object value) {
36111
      switch (field) {
36112
      case SUCCESS:
36113
        if (value == null) {
36114
          unsetSuccess();
36115
        } else {
36116
          setSuccess((ReturnOrder)value);
36117
        }
36118
        break;
36119
 
36120
      case EX:
36121
        if (value == null) {
36122
          unsetEx();
36123
        } else {
36124
          setEx((TransactionServiceException)value);
36125
        }
36126
        break;
36127
 
36128
      }
36129
    }
36130
 
36131
    public void setFieldValue(int fieldID, Object value) {
36132
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
36133
    }
36134
 
36135
    public Object getFieldValue(_Fields field) {
36136
      switch (field) {
36137
      case SUCCESS:
36138
        return getSuccess();
36139
 
36140
      case EX:
36141
        return getEx();
36142
 
36143
      }
36144
      throw new IllegalStateException();
36145
    }
36146
 
36147
    public Object getFieldValue(int fieldId) {
36148
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
36149
    }
36150
 
36151
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
36152
    public boolean isSet(_Fields field) {
36153
      switch (field) {
36154
      case SUCCESS:
36155
        return isSetSuccess();
36156
      case EX:
36157
        return isSetEx();
36158
      }
36159
      throw new IllegalStateException();
36160
    }
36161
 
36162
    public boolean isSet(int fieldID) {
36163
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
36164
    }
36165
 
36166
    @Override
36167
    public boolean equals(Object that) {
36168
      if (that == null)
36169
        return false;
36170
      if (that instanceof getReturnOrder_result)
36171
        return this.equals((getReturnOrder_result)that);
36172
      return false;
36173
    }
36174
 
36175
    public boolean equals(getReturnOrder_result that) {
36176
      if (that == null)
36177
        return false;
36178
 
36179
      boolean this_present_success = true && this.isSetSuccess();
36180
      boolean that_present_success = true && that.isSetSuccess();
36181
      if (this_present_success || that_present_success) {
36182
        if (!(this_present_success && that_present_success))
36183
          return false;
36184
        if (!this.success.equals(that.success))
36185
          return false;
36186
      }
36187
 
36188
      boolean this_present_ex = true && this.isSetEx();
36189
      boolean that_present_ex = true && that.isSetEx();
36190
      if (this_present_ex || that_present_ex) {
36191
        if (!(this_present_ex && that_present_ex))
36192
          return false;
36193
        if (!this.ex.equals(that.ex))
36194
          return false;
36195
      }
36196
 
36197
      return true;
36198
    }
36199
 
36200
    @Override
36201
    public int hashCode() {
36202
      return 0;
36203
    }
36204
 
36205
    public int compareTo(getReturnOrder_result other) {
36206
      if (!getClass().equals(other.getClass())) {
36207
        return getClass().getName().compareTo(other.getClass().getName());
36208
      }
36209
 
36210
      int lastComparison = 0;
36211
      getReturnOrder_result typedOther = (getReturnOrder_result)other;
36212
 
36213
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
36214
      if (lastComparison != 0) {
36215
        return lastComparison;
36216
      }
36217
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
36218
      if (lastComparison != 0) {
36219
        return lastComparison;
36220
      }
36221
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
36222
      if (lastComparison != 0) {
36223
        return lastComparison;
36224
      }
36225
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
36226
      if (lastComparison != 0) {
36227
        return lastComparison;
36228
      }
36229
      return 0;
36230
    }
36231
 
36232
    public void read(TProtocol iprot) throws TException {
36233
      TField field;
36234
      iprot.readStructBegin();
36235
      while (true)
36236
      {
36237
        field = iprot.readFieldBegin();
36238
        if (field.type == TType.STOP) { 
36239
          break;
36240
        }
36241
        _Fields fieldId = _Fields.findByThriftId(field.id);
36242
        if (fieldId == null) {
36243
          TProtocolUtil.skip(iprot, field.type);
36244
        } else {
36245
          switch (fieldId) {
36246
            case SUCCESS:
36247
              if (field.type == TType.STRUCT) {
36248
                this.success = new ReturnOrder();
36249
                this.success.read(iprot);
36250
              } else { 
36251
                TProtocolUtil.skip(iprot, field.type);
36252
              }
36253
              break;
36254
            case EX:
36255
              if (field.type == TType.STRUCT) {
36256
                this.ex = new TransactionServiceException();
36257
                this.ex.read(iprot);
36258
              } else { 
36259
                TProtocolUtil.skip(iprot, field.type);
36260
              }
36261
              break;
36262
          }
36263
          iprot.readFieldEnd();
36264
        }
36265
      }
36266
      iprot.readStructEnd();
36267
      validate();
36268
    }
36269
 
36270
    public void write(TProtocol oprot) throws TException {
36271
      oprot.writeStructBegin(STRUCT_DESC);
36272
 
36273
      if (this.isSetSuccess()) {
36274
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
36275
        this.success.write(oprot);
36276
        oprot.writeFieldEnd();
36277
      } else if (this.isSetEx()) {
36278
        oprot.writeFieldBegin(EX_FIELD_DESC);
36279
        this.ex.write(oprot);
36280
        oprot.writeFieldEnd();
36281
      }
36282
      oprot.writeFieldStop();
36283
      oprot.writeStructEnd();
36284
    }
36285
 
36286
    @Override
36287
    public String toString() {
36288
      StringBuilder sb = new StringBuilder("getReturnOrder_result(");
36289
      boolean first = true;
36290
 
36291
      sb.append("success:");
36292
      if (this.success == null) {
36293
        sb.append("null");
36294
      } else {
36295
        sb.append(this.success);
36296
      }
36297
      first = false;
36298
      if (!first) sb.append(", ");
36299
      sb.append("ex:");
36300
      if (this.ex == null) {
36301
        sb.append("null");
36302
      } else {
36303
        sb.append(this.ex);
36304
      }
36305
      first = false;
36306
      sb.append(")");
36307
      return sb.toString();
36308
    }
36309
 
36310
    public void validate() throws TException {
36311
      // check for required fields
36312
    }
36313
 
36314
  }
36315
 
2690 chandransh 36316
  public static class processReturn_args implements TBase<processReturn_args._Fields>, java.io.Serializable, Cloneable, Comparable<processReturn_args>   {
36317
    private static final TStruct STRUCT_DESC = new TStruct("processReturn_args");
36318
 
36319
    private static final TField RETURN_ORDER_ID_FIELD_DESC = new TField("returnOrderId", TType.I64, (short)1);
36320
 
36321
    private long returnOrderId;
36322
 
36323
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
36324
    public enum _Fields implements TFieldIdEnum {
36325
      RETURN_ORDER_ID((short)1, "returnOrderId");
36326
 
36327
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
36328
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
36329
 
36330
      static {
36331
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
36332
          byId.put((int)field._thriftId, field);
36333
          byName.put(field.getFieldName(), field);
36334
        }
36335
      }
36336
 
36337
      /**
36338
       * Find the _Fields constant that matches fieldId, or null if its not found.
36339
       */
36340
      public static _Fields findByThriftId(int fieldId) {
36341
        return byId.get(fieldId);
36342
      }
36343
 
36344
      /**
36345
       * Find the _Fields constant that matches fieldId, throwing an exception
36346
       * if it is not found.
36347
       */
36348
      public static _Fields findByThriftIdOrThrow(int fieldId) {
36349
        _Fields fields = findByThriftId(fieldId);
36350
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
36351
        return fields;
36352
      }
36353
 
36354
      /**
36355
       * Find the _Fields constant that matches name, or null if its not found.
36356
       */
36357
      public static _Fields findByName(String name) {
36358
        return byName.get(name);
36359
      }
36360
 
36361
      private final short _thriftId;
36362
      private final String _fieldName;
36363
 
36364
      _Fields(short thriftId, String fieldName) {
36365
        _thriftId = thriftId;
36366
        _fieldName = fieldName;
36367
      }
36368
 
36369
      public short getThriftFieldId() {
36370
        return _thriftId;
36371
      }
36372
 
36373
      public String getFieldName() {
36374
        return _fieldName;
36375
      }
36376
    }
36377
 
36378
    // isset id assignments
36379
    private static final int __RETURNORDERID_ISSET_ID = 0;
36380
    private BitSet __isset_bit_vector = new BitSet(1);
36381
 
36382
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
36383
      put(_Fields.RETURN_ORDER_ID, new FieldMetaData("returnOrderId", TFieldRequirementType.DEFAULT, 
36384
          new FieldValueMetaData(TType.I64)));
36385
    }});
36386
 
36387
    static {
36388
      FieldMetaData.addStructMetaDataMap(processReturn_args.class, metaDataMap);
36389
    }
36390
 
36391
    public processReturn_args() {
36392
    }
36393
 
36394
    public processReturn_args(
36395
      long returnOrderId)
36396
    {
36397
      this();
36398
      this.returnOrderId = returnOrderId;
36399
      setReturnOrderIdIsSet(true);
36400
    }
36401
 
36402
    /**
36403
     * Performs a deep copy on <i>other</i>.
36404
     */
36405
    public processReturn_args(processReturn_args other) {
36406
      __isset_bit_vector.clear();
36407
      __isset_bit_vector.or(other.__isset_bit_vector);
36408
      this.returnOrderId = other.returnOrderId;
36409
    }
36410
 
36411
    public processReturn_args deepCopy() {
36412
      return new processReturn_args(this);
36413
    }
36414
 
36415
    @Deprecated
36416
    public processReturn_args clone() {
36417
      return new processReturn_args(this);
36418
    }
36419
 
36420
    public long getReturnOrderId() {
36421
      return this.returnOrderId;
36422
    }
36423
 
36424
    public processReturn_args setReturnOrderId(long returnOrderId) {
36425
      this.returnOrderId = returnOrderId;
36426
      setReturnOrderIdIsSet(true);
36427
      return this;
36428
    }
36429
 
36430
    public void unsetReturnOrderId() {
36431
      __isset_bit_vector.clear(__RETURNORDERID_ISSET_ID);
36432
    }
36433
 
36434
    /** Returns true if field returnOrderId is set (has been asigned a value) and false otherwise */
36435
    public boolean isSetReturnOrderId() {
36436
      return __isset_bit_vector.get(__RETURNORDERID_ISSET_ID);
36437
    }
36438
 
36439
    public void setReturnOrderIdIsSet(boolean value) {
36440
      __isset_bit_vector.set(__RETURNORDERID_ISSET_ID, value);
36441
    }
36442
 
36443
    public void setFieldValue(_Fields field, Object value) {
36444
      switch (field) {
36445
      case RETURN_ORDER_ID:
36446
        if (value == null) {
36447
          unsetReturnOrderId();
36448
        } else {
36449
          setReturnOrderId((Long)value);
36450
        }
36451
        break;
36452
 
36453
      }
36454
    }
36455
 
36456
    public void setFieldValue(int fieldID, Object value) {
36457
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
36458
    }
36459
 
36460
    public Object getFieldValue(_Fields field) {
36461
      switch (field) {
36462
      case RETURN_ORDER_ID:
36463
        return new Long(getReturnOrderId());
36464
 
36465
      }
36466
      throw new IllegalStateException();
36467
    }
36468
 
36469
    public Object getFieldValue(int fieldId) {
36470
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
36471
    }
36472
 
36473
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
36474
    public boolean isSet(_Fields field) {
36475
      switch (field) {
36476
      case RETURN_ORDER_ID:
36477
        return isSetReturnOrderId();
36478
      }
36479
      throw new IllegalStateException();
36480
    }
36481
 
36482
    public boolean isSet(int fieldID) {
36483
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
36484
    }
36485
 
36486
    @Override
36487
    public boolean equals(Object that) {
36488
      if (that == null)
36489
        return false;
36490
      if (that instanceof processReturn_args)
36491
        return this.equals((processReturn_args)that);
36492
      return false;
36493
    }
36494
 
36495
    public boolean equals(processReturn_args that) {
36496
      if (that == null)
36497
        return false;
36498
 
36499
      boolean this_present_returnOrderId = true;
36500
      boolean that_present_returnOrderId = true;
36501
      if (this_present_returnOrderId || that_present_returnOrderId) {
36502
        if (!(this_present_returnOrderId && that_present_returnOrderId))
36503
          return false;
36504
        if (this.returnOrderId != that.returnOrderId)
36505
          return false;
36506
      }
36507
 
36508
      return true;
36509
    }
36510
 
36511
    @Override
36512
    public int hashCode() {
36513
      return 0;
36514
    }
36515
 
36516
    public int compareTo(processReturn_args other) {
36517
      if (!getClass().equals(other.getClass())) {
36518
        return getClass().getName().compareTo(other.getClass().getName());
36519
      }
36520
 
36521
      int lastComparison = 0;
36522
      processReturn_args typedOther = (processReturn_args)other;
36523
 
36524
      lastComparison = Boolean.valueOf(isSetReturnOrderId()).compareTo(isSetReturnOrderId());
36525
      if (lastComparison != 0) {
36526
        return lastComparison;
36527
      }
36528
      lastComparison = TBaseHelper.compareTo(returnOrderId, typedOther.returnOrderId);
36529
      if (lastComparison != 0) {
36530
        return lastComparison;
36531
      }
36532
      return 0;
36533
    }
36534
 
36535
    public void read(TProtocol iprot) throws TException {
36536
      TField field;
36537
      iprot.readStructBegin();
36538
      while (true)
36539
      {
36540
        field = iprot.readFieldBegin();
36541
        if (field.type == TType.STOP) { 
36542
          break;
36543
        }
36544
        _Fields fieldId = _Fields.findByThriftId(field.id);
36545
        if (fieldId == null) {
36546
          TProtocolUtil.skip(iprot, field.type);
36547
        } else {
36548
          switch (fieldId) {
36549
            case RETURN_ORDER_ID:
36550
              if (field.type == TType.I64) {
36551
                this.returnOrderId = iprot.readI64();
36552
                setReturnOrderIdIsSet(true);
36553
              } else { 
36554
                TProtocolUtil.skip(iprot, field.type);
36555
              }
36556
              break;
36557
          }
36558
          iprot.readFieldEnd();
36559
        }
36560
      }
36561
      iprot.readStructEnd();
36562
      validate();
36563
    }
36564
 
36565
    public void write(TProtocol oprot) throws TException {
36566
      validate();
36567
 
36568
      oprot.writeStructBegin(STRUCT_DESC);
36569
      oprot.writeFieldBegin(RETURN_ORDER_ID_FIELD_DESC);
36570
      oprot.writeI64(this.returnOrderId);
36571
      oprot.writeFieldEnd();
36572
      oprot.writeFieldStop();
36573
      oprot.writeStructEnd();
36574
    }
36575
 
36576
    @Override
36577
    public String toString() {
36578
      StringBuilder sb = new StringBuilder("processReturn_args(");
36579
      boolean first = true;
36580
 
36581
      sb.append("returnOrderId:");
36582
      sb.append(this.returnOrderId);
36583
      first = false;
36584
      sb.append(")");
36585
      return sb.toString();
36586
    }
36587
 
36588
    public void validate() throws TException {
36589
      // check for required fields
36590
    }
36591
 
36592
  }
36593
 
36594
  public static class processReturn_result implements TBase<processReturn_result._Fields>, java.io.Serializable, Cloneable, Comparable<processReturn_result>   {
36595
    private static final TStruct STRUCT_DESC = new TStruct("processReturn_result");
36596
 
36597
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
36598
 
36599
    private TransactionServiceException ex;
36600
 
36601
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
36602
    public enum _Fields implements TFieldIdEnum {
36603
      EX((short)1, "ex");
36604
 
36605
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
36606
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
36607
 
36608
      static {
36609
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
36610
          byId.put((int)field._thriftId, field);
36611
          byName.put(field.getFieldName(), field);
36612
        }
36613
      }
36614
 
36615
      /**
36616
       * Find the _Fields constant that matches fieldId, or null if its not found.
36617
       */
36618
      public static _Fields findByThriftId(int fieldId) {
36619
        return byId.get(fieldId);
36620
      }
36621
 
36622
      /**
36623
       * Find the _Fields constant that matches fieldId, throwing an exception
36624
       * if it is not found.
36625
       */
36626
      public static _Fields findByThriftIdOrThrow(int fieldId) {
36627
        _Fields fields = findByThriftId(fieldId);
36628
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
36629
        return fields;
36630
      }
36631
 
36632
      /**
36633
       * Find the _Fields constant that matches name, or null if its not found.
36634
       */
36635
      public static _Fields findByName(String name) {
36636
        return byName.get(name);
36637
      }
36638
 
36639
      private final short _thriftId;
36640
      private final String _fieldName;
36641
 
36642
      _Fields(short thriftId, String fieldName) {
36643
        _thriftId = thriftId;
36644
        _fieldName = fieldName;
36645
      }
36646
 
36647
      public short getThriftFieldId() {
36648
        return _thriftId;
36649
      }
36650
 
36651
      public String getFieldName() {
36652
        return _fieldName;
36653
      }
36654
    }
36655
 
36656
    // isset id assignments
36657
 
36658
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
36659
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
36660
          new FieldValueMetaData(TType.STRUCT)));
36661
    }});
36662
 
36663
    static {
36664
      FieldMetaData.addStructMetaDataMap(processReturn_result.class, metaDataMap);
36665
    }
36666
 
36667
    public processReturn_result() {
36668
    }
36669
 
36670
    public processReturn_result(
36671
      TransactionServiceException ex)
36672
    {
36673
      this();
36674
      this.ex = ex;
36675
    }
36676
 
36677
    /**
36678
     * Performs a deep copy on <i>other</i>.
36679
     */
36680
    public processReturn_result(processReturn_result other) {
36681
      if (other.isSetEx()) {
36682
        this.ex = new TransactionServiceException(other.ex);
36683
      }
36684
    }
36685
 
36686
    public processReturn_result deepCopy() {
36687
      return new processReturn_result(this);
36688
    }
36689
 
36690
    @Deprecated
36691
    public processReturn_result clone() {
36692
      return new processReturn_result(this);
36693
    }
36694
 
36695
    public TransactionServiceException getEx() {
36696
      return this.ex;
36697
    }
36698
 
36699
    public processReturn_result setEx(TransactionServiceException ex) {
36700
      this.ex = ex;
36701
      return this;
36702
    }
36703
 
36704
    public void unsetEx() {
36705
      this.ex = null;
36706
    }
36707
 
36708
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
36709
    public boolean isSetEx() {
36710
      return this.ex != null;
36711
    }
36712
 
36713
    public void setExIsSet(boolean value) {
36714
      if (!value) {
36715
        this.ex = null;
36716
      }
36717
    }
36718
 
36719
    public void setFieldValue(_Fields field, Object value) {
36720
      switch (field) {
36721
      case EX:
36722
        if (value == null) {
36723
          unsetEx();
36724
        } else {
36725
          setEx((TransactionServiceException)value);
36726
        }
36727
        break;
36728
 
36729
      }
36730
    }
36731
 
36732
    public void setFieldValue(int fieldID, Object value) {
36733
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
36734
    }
36735
 
36736
    public Object getFieldValue(_Fields field) {
36737
      switch (field) {
36738
      case EX:
36739
        return getEx();
36740
 
36741
      }
36742
      throw new IllegalStateException();
36743
    }
36744
 
36745
    public Object getFieldValue(int fieldId) {
36746
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
36747
    }
36748
 
36749
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
36750
    public boolean isSet(_Fields field) {
36751
      switch (field) {
36752
      case EX:
36753
        return isSetEx();
36754
      }
36755
      throw new IllegalStateException();
36756
    }
36757
 
36758
    public boolean isSet(int fieldID) {
36759
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
36760
    }
36761
 
36762
    @Override
36763
    public boolean equals(Object that) {
36764
      if (that == null)
36765
        return false;
36766
      if (that instanceof processReturn_result)
36767
        return this.equals((processReturn_result)that);
36768
      return false;
36769
    }
36770
 
36771
    public boolean equals(processReturn_result that) {
36772
      if (that == null)
36773
        return false;
36774
 
36775
      boolean this_present_ex = true && this.isSetEx();
36776
      boolean that_present_ex = true && that.isSetEx();
36777
      if (this_present_ex || that_present_ex) {
36778
        if (!(this_present_ex && that_present_ex))
36779
          return false;
36780
        if (!this.ex.equals(that.ex))
36781
          return false;
36782
      }
36783
 
36784
      return true;
36785
    }
36786
 
36787
    @Override
36788
    public int hashCode() {
36789
      return 0;
36790
    }
36791
 
36792
    public int compareTo(processReturn_result other) {
36793
      if (!getClass().equals(other.getClass())) {
36794
        return getClass().getName().compareTo(other.getClass().getName());
36795
      }
36796
 
36797
      int lastComparison = 0;
36798
      processReturn_result typedOther = (processReturn_result)other;
36799
 
36800
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
36801
      if (lastComparison != 0) {
36802
        return lastComparison;
36803
      }
36804
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
36805
      if (lastComparison != 0) {
36806
        return lastComparison;
36807
      }
36808
      return 0;
36809
    }
36810
 
36811
    public void read(TProtocol iprot) throws TException {
36812
      TField field;
36813
      iprot.readStructBegin();
36814
      while (true)
36815
      {
36816
        field = iprot.readFieldBegin();
36817
        if (field.type == TType.STOP) { 
36818
          break;
36819
        }
36820
        _Fields fieldId = _Fields.findByThriftId(field.id);
36821
        if (fieldId == null) {
36822
          TProtocolUtil.skip(iprot, field.type);
36823
        } else {
36824
          switch (fieldId) {
36825
            case EX:
36826
              if (field.type == TType.STRUCT) {
36827
                this.ex = new TransactionServiceException();
36828
                this.ex.read(iprot);
36829
              } else { 
36830
                TProtocolUtil.skip(iprot, field.type);
36831
              }
36832
              break;
36833
          }
36834
          iprot.readFieldEnd();
36835
        }
36836
      }
36837
      iprot.readStructEnd();
36838
      validate();
36839
    }
36840
 
36841
    public void write(TProtocol oprot) throws TException {
36842
      oprot.writeStructBegin(STRUCT_DESC);
36843
 
36844
      if (this.isSetEx()) {
36845
        oprot.writeFieldBegin(EX_FIELD_DESC);
36846
        this.ex.write(oprot);
36847
        oprot.writeFieldEnd();
36848
      }
36849
      oprot.writeFieldStop();
36850
      oprot.writeStructEnd();
36851
    }
36852
 
36853
    @Override
36854
    public String toString() {
36855
      StringBuilder sb = new StringBuilder("processReturn_result(");
36856
      boolean first = true;
36857
 
36858
      sb.append("ex:");
36859
      if (this.ex == null) {
36860
        sb.append("null");
36861
      } else {
36862
        sb.append(this.ex);
36863
      }
36864
      first = false;
36865
      sb.append(")");
36866
      return sb.toString();
36867
    }
36868
 
36869
    public void validate() throws TException {
36870
      // check for required fields
36871
    }
36872
 
36873
  }
36874
 
2819 chandransh 36875
  public static class createPurchaseOrder_args implements TBase<createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPurchaseOrder_args>   {
36876
    private static final TStruct STRUCT_DESC = new TStruct("createPurchaseOrder_args");
36877
 
36878
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
36879
 
36880
    private long warehouseId;
36881
 
36882
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
36883
    public enum _Fields implements TFieldIdEnum {
36884
      WAREHOUSE_ID((short)1, "warehouseId");
36885
 
36886
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
36887
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
36888
 
36889
      static {
36890
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
36891
          byId.put((int)field._thriftId, field);
36892
          byName.put(field.getFieldName(), field);
36893
        }
36894
      }
36895
 
36896
      /**
36897
       * Find the _Fields constant that matches fieldId, or null if its not found.
36898
       */
36899
      public static _Fields findByThriftId(int fieldId) {
36900
        return byId.get(fieldId);
36901
      }
36902
 
36903
      /**
36904
       * Find the _Fields constant that matches fieldId, throwing an exception
36905
       * if it is not found.
36906
       */
36907
      public static _Fields findByThriftIdOrThrow(int fieldId) {
36908
        _Fields fields = findByThriftId(fieldId);
36909
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
36910
        return fields;
36911
      }
36912
 
36913
      /**
36914
       * Find the _Fields constant that matches name, or null if its not found.
36915
       */
36916
      public static _Fields findByName(String name) {
36917
        return byName.get(name);
36918
      }
36919
 
36920
      private final short _thriftId;
36921
      private final String _fieldName;
36922
 
36923
      _Fields(short thriftId, String fieldName) {
36924
        _thriftId = thriftId;
36925
        _fieldName = fieldName;
36926
      }
36927
 
36928
      public short getThriftFieldId() {
36929
        return _thriftId;
36930
      }
36931
 
36932
      public String getFieldName() {
36933
        return _fieldName;
36934
      }
36935
    }
36936
 
36937
    // isset id assignments
36938
    private static final int __WAREHOUSEID_ISSET_ID = 0;
36939
    private BitSet __isset_bit_vector = new BitSet(1);
36940
 
36941
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
36942
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
36943
          new FieldValueMetaData(TType.I64)));
36944
    }});
36945
 
36946
    static {
36947
      FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
36948
    }
36949
 
36950
    public createPurchaseOrder_args() {
36951
    }
36952
 
36953
    public createPurchaseOrder_args(
36954
      long warehouseId)
36955
    {
36956
      this();
36957
      this.warehouseId = warehouseId;
36958
      setWarehouseIdIsSet(true);
36959
    }
36960
 
36961
    /**
36962
     * Performs a deep copy on <i>other</i>.
36963
     */
36964
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
36965
      __isset_bit_vector.clear();
36966
      __isset_bit_vector.or(other.__isset_bit_vector);
36967
      this.warehouseId = other.warehouseId;
36968
    }
36969
 
36970
    public createPurchaseOrder_args deepCopy() {
36971
      return new createPurchaseOrder_args(this);
36972
    }
36973
 
36974
    @Deprecated
36975
    public createPurchaseOrder_args clone() {
36976
      return new createPurchaseOrder_args(this);
36977
    }
36978
 
36979
    public long getWarehouseId() {
36980
      return this.warehouseId;
36981
    }
36982
 
36983
    public createPurchaseOrder_args setWarehouseId(long warehouseId) {
36984
      this.warehouseId = warehouseId;
36985
      setWarehouseIdIsSet(true);
36986
      return this;
36987
    }
36988
 
36989
    public void unsetWarehouseId() {
36990
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
36991
    }
36992
 
36993
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
36994
    public boolean isSetWarehouseId() {
36995
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
36996
    }
36997
 
36998
    public void setWarehouseIdIsSet(boolean value) {
36999
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
37000
    }
37001
 
37002
    public void setFieldValue(_Fields field, Object value) {
37003
      switch (field) {
37004
      case WAREHOUSE_ID:
37005
        if (value == null) {
37006
          unsetWarehouseId();
37007
        } else {
37008
          setWarehouseId((Long)value);
37009
        }
37010
        break;
37011
 
37012
      }
37013
    }
37014
 
37015
    public void setFieldValue(int fieldID, Object value) {
37016
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
37017
    }
37018
 
37019
    public Object getFieldValue(_Fields field) {
37020
      switch (field) {
37021
      case WAREHOUSE_ID:
37022
        return new Long(getWarehouseId());
37023
 
37024
      }
37025
      throw new IllegalStateException();
37026
    }
37027
 
37028
    public Object getFieldValue(int fieldId) {
37029
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
37030
    }
37031
 
37032
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
37033
    public boolean isSet(_Fields field) {
37034
      switch (field) {
37035
      case WAREHOUSE_ID:
37036
        return isSetWarehouseId();
37037
      }
37038
      throw new IllegalStateException();
37039
    }
37040
 
37041
    public boolean isSet(int fieldID) {
37042
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
37043
    }
37044
 
37045
    @Override
37046
    public boolean equals(Object that) {
37047
      if (that == null)
37048
        return false;
37049
      if (that instanceof createPurchaseOrder_args)
37050
        return this.equals((createPurchaseOrder_args)that);
37051
      return false;
37052
    }
37053
 
37054
    public boolean equals(createPurchaseOrder_args that) {
37055
      if (that == null)
37056
        return false;
37057
 
37058
      boolean this_present_warehouseId = true;
37059
      boolean that_present_warehouseId = true;
37060
      if (this_present_warehouseId || that_present_warehouseId) {
37061
        if (!(this_present_warehouseId && that_present_warehouseId))
37062
          return false;
37063
        if (this.warehouseId != that.warehouseId)
37064
          return false;
37065
      }
37066
 
37067
      return true;
37068
    }
37069
 
37070
    @Override
37071
    public int hashCode() {
37072
      return 0;
37073
    }
37074
 
37075
    public int compareTo(createPurchaseOrder_args other) {
37076
      if (!getClass().equals(other.getClass())) {
37077
        return getClass().getName().compareTo(other.getClass().getName());
37078
      }
37079
 
37080
      int lastComparison = 0;
37081
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
37082
 
37083
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
37084
      if (lastComparison != 0) {
37085
        return lastComparison;
37086
      }
37087
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
37088
      if (lastComparison != 0) {
37089
        return lastComparison;
37090
      }
37091
      return 0;
37092
    }
37093
 
37094
    public void read(TProtocol iprot) throws TException {
37095
      TField field;
37096
      iprot.readStructBegin();
37097
      while (true)
37098
      {
37099
        field = iprot.readFieldBegin();
37100
        if (field.type == TType.STOP) { 
37101
          break;
37102
        }
37103
        _Fields fieldId = _Fields.findByThriftId(field.id);
37104
        if (fieldId == null) {
37105
          TProtocolUtil.skip(iprot, field.type);
37106
        } else {
37107
          switch (fieldId) {
37108
            case WAREHOUSE_ID:
37109
              if (field.type == TType.I64) {
37110
                this.warehouseId = iprot.readI64();
37111
                setWarehouseIdIsSet(true);
37112
              } else { 
37113
                TProtocolUtil.skip(iprot, field.type);
37114
              }
37115
              break;
37116
          }
37117
          iprot.readFieldEnd();
37118
        }
37119
      }
37120
      iprot.readStructEnd();
37121
      validate();
37122
    }
37123
 
37124
    public void write(TProtocol oprot) throws TException {
37125
      validate();
37126
 
37127
      oprot.writeStructBegin(STRUCT_DESC);
37128
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
37129
      oprot.writeI64(this.warehouseId);
37130
      oprot.writeFieldEnd();
37131
      oprot.writeFieldStop();
37132
      oprot.writeStructEnd();
37133
    }
37134
 
37135
    @Override
37136
    public String toString() {
37137
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
37138
      boolean first = true;
37139
 
37140
      sb.append("warehouseId:");
37141
      sb.append(this.warehouseId);
37142
      first = false;
37143
      sb.append(")");
37144
      return sb.toString();
37145
    }
37146
 
37147
    public void validate() throws TException {
37148
      // check for required fields
37149
    }
37150
 
37151
  }
37152
 
37153
  public static class createPurchaseOrder_result implements TBase<createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPurchaseOrder_result>   {
37154
    private static final TStruct STRUCT_DESC = new TStruct("createPurchaseOrder_result");
37155
 
37156
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
37157
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
37158
 
37159
    private long success;
37160
    private TransactionServiceException ex;
37161
 
37162
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
37163
    public enum _Fields implements TFieldIdEnum {
37164
      SUCCESS((short)0, "success"),
37165
      EX((short)1, "ex");
37166
 
37167
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
37168
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
37169
 
37170
      static {
37171
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
37172
          byId.put((int)field._thriftId, field);
37173
          byName.put(field.getFieldName(), field);
37174
        }
37175
      }
37176
 
37177
      /**
37178
       * Find the _Fields constant that matches fieldId, or null if its not found.
37179
       */
37180
      public static _Fields findByThriftId(int fieldId) {
37181
        return byId.get(fieldId);
37182
      }
37183
 
37184
      /**
37185
       * Find the _Fields constant that matches fieldId, throwing an exception
37186
       * if it is not found.
37187
       */
37188
      public static _Fields findByThriftIdOrThrow(int fieldId) {
37189
        _Fields fields = findByThriftId(fieldId);
37190
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
37191
        return fields;
37192
      }
37193
 
37194
      /**
37195
       * Find the _Fields constant that matches name, or null if its not found.
37196
       */
37197
      public static _Fields findByName(String name) {
37198
        return byName.get(name);
37199
      }
37200
 
37201
      private final short _thriftId;
37202
      private final String _fieldName;
37203
 
37204
      _Fields(short thriftId, String fieldName) {
37205
        _thriftId = thriftId;
37206
        _fieldName = fieldName;
37207
      }
37208
 
37209
      public short getThriftFieldId() {
37210
        return _thriftId;
37211
      }
37212
 
37213
      public String getFieldName() {
37214
        return _fieldName;
37215
      }
37216
    }
37217
 
37218
    // isset id assignments
37219
    private static final int __SUCCESS_ISSET_ID = 0;
37220
    private BitSet __isset_bit_vector = new BitSet(1);
37221
 
37222
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
37223
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
37224
          new FieldValueMetaData(TType.I64)));
37225
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
37226
          new FieldValueMetaData(TType.STRUCT)));
37227
    }});
37228
 
37229
    static {
37230
      FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
37231
    }
37232
 
37233
    public createPurchaseOrder_result() {
37234
    }
37235
 
37236
    public createPurchaseOrder_result(
37237
      long success,
37238
      TransactionServiceException ex)
37239
    {
37240
      this();
37241
      this.success = success;
37242
      setSuccessIsSet(true);
37243
      this.ex = ex;
37244
    }
37245
 
37246
    /**
37247
     * Performs a deep copy on <i>other</i>.
37248
     */
37249
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
37250
      __isset_bit_vector.clear();
37251
      __isset_bit_vector.or(other.__isset_bit_vector);
37252
      this.success = other.success;
37253
      if (other.isSetEx()) {
37254
        this.ex = new TransactionServiceException(other.ex);
37255
      }
37256
    }
37257
 
37258
    public createPurchaseOrder_result deepCopy() {
37259
      return new createPurchaseOrder_result(this);
37260
    }
37261
 
37262
    @Deprecated
37263
    public createPurchaseOrder_result clone() {
37264
      return new createPurchaseOrder_result(this);
37265
    }
37266
 
37267
    public long getSuccess() {
37268
      return this.success;
37269
    }
37270
 
37271
    public createPurchaseOrder_result setSuccess(long success) {
37272
      this.success = success;
37273
      setSuccessIsSet(true);
37274
      return this;
37275
    }
37276
 
37277
    public void unsetSuccess() {
37278
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
37279
    }
37280
 
37281
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
37282
    public boolean isSetSuccess() {
37283
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
37284
    }
37285
 
37286
    public void setSuccessIsSet(boolean value) {
37287
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
37288
    }
37289
 
37290
    public TransactionServiceException getEx() {
37291
      return this.ex;
37292
    }
37293
 
37294
    public createPurchaseOrder_result setEx(TransactionServiceException ex) {
37295
      this.ex = ex;
37296
      return this;
37297
    }
37298
 
37299
    public void unsetEx() {
37300
      this.ex = null;
37301
    }
37302
 
37303
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
37304
    public boolean isSetEx() {
37305
      return this.ex != null;
37306
    }
37307
 
37308
    public void setExIsSet(boolean value) {
37309
      if (!value) {
37310
        this.ex = null;
37311
      }
37312
    }
37313
 
37314
    public void setFieldValue(_Fields field, Object value) {
37315
      switch (field) {
37316
      case SUCCESS:
37317
        if (value == null) {
37318
          unsetSuccess();
37319
        } else {
37320
          setSuccess((Long)value);
37321
        }
37322
        break;
37323
 
37324
      case EX:
37325
        if (value == null) {
37326
          unsetEx();
37327
        } else {
37328
          setEx((TransactionServiceException)value);
37329
        }
37330
        break;
37331
 
37332
      }
37333
    }
37334
 
37335
    public void setFieldValue(int fieldID, Object value) {
37336
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
37337
    }
37338
 
37339
    public Object getFieldValue(_Fields field) {
37340
      switch (field) {
37341
      case SUCCESS:
37342
        return new Long(getSuccess());
37343
 
37344
      case EX:
37345
        return getEx();
37346
 
37347
      }
37348
      throw new IllegalStateException();
37349
    }
37350
 
37351
    public Object getFieldValue(int fieldId) {
37352
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
37353
    }
37354
 
37355
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
37356
    public boolean isSet(_Fields field) {
37357
      switch (field) {
37358
      case SUCCESS:
37359
        return isSetSuccess();
37360
      case EX:
37361
        return isSetEx();
37362
      }
37363
      throw new IllegalStateException();
37364
    }
37365
 
37366
    public boolean isSet(int fieldID) {
37367
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
37368
    }
37369
 
37370
    @Override
37371
    public boolean equals(Object that) {
37372
      if (that == null)
37373
        return false;
37374
      if (that instanceof createPurchaseOrder_result)
37375
        return this.equals((createPurchaseOrder_result)that);
37376
      return false;
37377
    }
37378
 
37379
    public boolean equals(createPurchaseOrder_result that) {
37380
      if (that == null)
37381
        return false;
37382
 
37383
      boolean this_present_success = true;
37384
      boolean that_present_success = true;
37385
      if (this_present_success || that_present_success) {
37386
        if (!(this_present_success && that_present_success))
37387
          return false;
37388
        if (this.success != that.success)
37389
          return false;
37390
      }
37391
 
37392
      boolean this_present_ex = true && this.isSetEx();
37393
      boolean that_present_ex = true && that.isSetEx();
37394
      if (this_present_ex || that_present_ex) {
37395
        if (!(this_present_ex && that_present_ex))
37396
          return false;
37397
        if (!this.ex.equals(that.ex))
37398
          return false;
37399
      }
37400
 
37401
      return true;
37402
    }
37403
 
37404
    @Override
37405
    public int hashCode() {
37406
      return 0;
37407
    }
37408
 
37409
    public int compareTo(createPurchaseOrder_result other) {
37410
      if (!getClass().equals(other.getClass())) {
37411
        return getClass().getName().compareTo(other.getClass().getName());
37412
      }
37413
 
37414
      int lastComparison = 0;
37415
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
37416
 
37417
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
37418
      if (lastComparison != 0) {
37419
        return lastComparison;
37420
      }
37421
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
37422
      if (lastComparison != 0) {
37423
        return lastComparison;
37424
      }
37425
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
37426
      if (lastComparison != 0) {
37427
        return lastComparison;
37428
      }
37429
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
37430
      if (lastComparison != 0) {
37431
        return lastComparison;
37432
      }
37433
      return 0;
37434
    }
37435
 
37436
    public void read(TProtocol iprot) throws TException {
37437
      TField field;
37438
      iprot.readStructBegin();
37439
      while (true)
37440
      {
37441
        field = iprot.readFieldBegin();
37442
        if (field.type == TType.STOP) { 
37443
          break;
37444
        }
37445
        _Fields fieldId = _Fields.findByThriftId(field.id);
37446
        if (fieldId == null) {
37447
          TProtocolUtil.skip(iprot, field.type);
37448
        } else {
37449
          switch (fieldId) {
37450
            case SUCCESS:
37451
              if (field.type == TType.I64) {
37452
                this.success = iprot.readI64();
37453
                setSuccessIsSet(true);
37454
              } else { 
37455
                TProtocolUtil.skip(iprot, field.type);
37456
              }
37457
              break;
37458
            case EX:
37459
              if (field.type == TType.STRUCT) {
37460
                this.ex = new TransactionServiceException();
37461
                this.ex.read(iprot);
37462
              } else { 
37463
                TProtocolUtil.skip(iprot, field.type);
37464
              }
37465
              break;
37466
          }
37467
          iprot.readFieldEnd();
37468
        }
37469
      }
37470
      iprot.readStructEnd();
37471
      validate();
37472
    }
37473
 
37474
    public void write(TProtocol oprot) throws TException {
37475
      oprot.writeStructBegin(STRUCT_DESC);
37476
 
37477
      if (this.isSetSuccess()) {
37478
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
37479
        oprot.writeI64(this.success);
37480
        oprot.writeFieldEnd();
37481
      } else if (this.isSetEx()) {
37482
        oprot.writeFieldBegin(EX_FIELD_DESC);
37483
        this.ex.write(oprot);
37484
        oprot.writeFieldEnd();
37485
      }
37486
      oprot.writeFieldStop();
37487
      oprot.writeStructEnd();
37488
    }
37489
 
37490
    @Override
37491
    public String toString() {
37492
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
37493
      boolean first = true;
37494
 
37495
      sb.append("success:");
37496
      sb.append(this.success);
37497
      first = false;
37498
      if (!first) sb.append(", ");
37499
      sb.append("ex:");
37500
      if (this.ex == null) {
37501
        sb.append("null");
37502
      } else {
37503
        sb.append(this.ex);
37504
      }
37505
      first = false;
37506
      sb.append(")");
37507
      return sb.toString();
37508
    }
37509
 
37510
    public void validate() throws TException {
37511
      // check for required fields
37512
    }
37513
 
37514
  }
37515
 
68 ashish 37516
}