Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
132 ashish 35
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 36
 
37
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
38
 
132 ashish 39
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 40
 
132 ashish 41
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
42
 
68 ashish 43
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
44
 
45
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
46
 
1398 varun.gupt 47
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException;
1382 varun.gupt 48
 
483 rajveer 49
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 50
 
1133 chandransh 51
    /**
52
     * Returns orders within a range of their billing dates
53
     * 
54
     * @param status
55
     * @param start_billing_date
56
     * @param end_billing_date
57
     * @param warehouse_id
58
     */
1022 varun.gupt 59
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
60
 
1382 varun.gupt 61
    /**
62
     * Returns order ids for orders which can be returned
63
     * 
64
     * @param customer_id
65
     * @param limit
66
     */
67
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
68
 
69
    /**
70
     * Returns order ids for orders which can be cancelled
71
     * 
72
     * @param customer_id
73
     * @param limit
74
     */
75
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
76
 
483 rajveer 77
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 78
 
1148 chandransh 79
    /**
80
     * Add billing details such as the bill number and the biller to the Order.
81
     * 
82
     * @param orderId
83
     * @param invoice_number
84
     * @param billed_by
85
     */
86
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 87
 
1148 chandransh 88
    /**
89
     * Adds jacket number to the order. Return false if it doesn't find the order with the given ID.
90
     * 
91
     * @param orderId
92
     * @param jacketNumber
93
     */
94
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException;
95
 
923 rajveer 96
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
97
 
98
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
99
 
1529 ankur.sing 100
    /**
101
     * Returns list of orders for given transaction Id. Also filters based on customer Id so that
102
     * only user who owns the transaction can view its order details.
103
     * 
104
     * @param transactionId
105
     * @param customerId
106
     */
107
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException;
68 ashish 108
 
483 rajveer 109
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 110
 
483 rajveer 111
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 112
 
483 rajveer 113
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 114
 
483 rajveer 115
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 116
 
758 chandransh 117
    /**
1529 ankur.sing 118
     * Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
119
     * Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
120
     * 
121
     * @param orderId
122
     * @param customerId
123
     */
124
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException;
125
 
126
    /**
1221 chandransh 127
     * Create a batch of all the pending orders for the given warehouse.
128
     * The returned list is orderd by created_timestamp.
129
     * If there are no pending orders, an empty list is returned.
130
     * 
131
     * @param warehouseId
132
     */
133
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
134
 
135
    /**
1209 chandransh 136
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
137
     * 
138
     * @param orderId
139
     */
140
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
141
 
142
    /**
758 chandransh 143
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
144
     * 
145
     * @param warehouseId
146
     * @param providerId
147
     */
148
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
149
 
1114 chandransh 150
    /**
151
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
152
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
153
     * Raises an exception if we encounter report for an AWB number that we did not ship.
154
     * 
155
     * @param providerId
156
     * @param pickupDetails
157
     */
1245 chandransh 158
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 159
 
1133 chandransh 160
    /**
161
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
162
     * the name of the receiver.
163
     * Raises an exception if we encounter report for an AWB number that we did not ship.
164
     * 
165
     * @param providerId
166
     * @param deliveredOrders
167
     */
168
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
169
 
170
    /**
171
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
172
     * Raises an exception if we encounter report for an AWB number that we did not ship.
173
     * 
174
     * @param providerId
175
     * @param returnedOrders
176
     */
177
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
178
 
1245 chandransh 179
    /**
180
     * Update the status description of orders whose AWB numbers are keys of the Map.
181
     * 
182
     * @param providerId
183
     * @param undeliveredOrders
184
     */
185
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
186
 
1406 ankur.sing 187
    /**
188
     * Returns the list of orders whose delivery time has passed but have not been
189
     * delivered yet for the given provider and warehouse. To get a complete list of
190
     * undelivered orders, pass them as -1.
191
     * Returns an empty list if no such orders exist.
192
     * 
193
     * @param providerId
194
     * @param warehouseId
195
     */
196
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
197
 
483 rajveer 198
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 199
 
483 rajveer 200
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 201
 
1598 ankur.sing 202
    /**
203
     * Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
204
     */
205
    public long getValidOrderCount() throws TException;
206
 
1629 ankur.sing 207
    /**
208
     * Returns the number of distinct customers who have done successful transactions
209
     */
210
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException;
211
 
212
    /**
1731 ankur.sing 213
     * Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
214
     * List contains two values, first minimum amount and second maximum amount.
1629 ankur.sing 215
     */
1731 ankur.sing 216
    public List<Double> getValidOrdersAmountRange() throws TException;
1629 ankur.sing 217
 
68 ashish 218
  }
219
 
220
  public static class Client implements Iface {
221
    public Client(TProtocol prot)
222
    {
223
      this(prot, prot);
224
    }
225
 
226
    public Client(TProtocol iprot, TProtocol oprot)
227
    {
228
      iprot_ = iprot;
229
      oprot_ = oprot;
230
    }
231
 
232
    protected TProtocol iprot_;
233
    protected TProtocol oprot_;
234
 
235
    protected int seqid_;
236
 
237
    public TProtocol getInputProtocol()
238
    {
239
      return this.iprot_;
240
    }
241
 
242
    public TProtocol getOutputProtocol()
243
    {
244
      return this.oprot_;
245
    }
246
 
764 rajveer 247
    public void closeSession() throws TException
248
    {
249
      send_closeSession();
250
      recv_closeSession();
251
    }
252
 
253
    public void send_closeSession() throws TException
254
    {
255
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
256
      closeSession_args args = new closeSession_args();
257
      args.write(oprot_);
258
      oprot_.writeMessageEnd();
259
      oprot_.getTransport().flush();
260
    }
261
 
262
    public void recv_closeSession() throws TException
263
    {
264
      TMessage msg = iprot_.readMessageBegin();
265
      if (msg.type == TMessageType.EXCEPTION) {
266
        TApplicationException x = TApplicationException.read(iprot_);
267
        iprot_.readMessageEnd();
268
        throw x;
269
      }
270
      closeSession_result result = new closeSession_result();
271
      result.read(iprot_);
272
      iprot_.readMessageEnd();
273
      return;
274
    }
275
 
132 ashish 276
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 277
    {
278
      send_createTransaction(transaction);
132 ashish 279
      return recv_createTransaction();
68 ashish 280
    }
281
 
282
    public void send_createTransaction(Transaction transaction) throws TException
283
    {
284
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
285
      createTransaction_args args = new createTransaction_args();
286
      args.transaction = transaction;
287
      args.write(oprot_);
288
      oprot_.writeMessageEnd();
289
      oprot_.getTransport().flush();
290
    }
291
 
132 ashish 292
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 293
    {
294
      TMessage msg = iprot_.readMessageBegin();
295
      if (msg.type == TMessageType.EXCEPTION) {
296
        TApplicationException x = TApplicationException.read(iprot_);
297
        iprot_.readMessageEnd();
298
        throw x;
299
      }
300
      createTransaction_result result = new createTransaction_result();
301
      result.read(iprot_);
302
      iprot_.readMessageEnd();
132 ashish 303
      if (result.isSetSuccess()) {
304
        return result.success;
305
      }
68 ashish 306
      if (result.ex != null) {
307
        throw result.ex;
308
      }
132 ashish 309
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 310
    }
311
 
312
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
313
    {
314
      send_getTransaction(id);
315
      return recv_getTransaction();
316
    }
317
 
318
    public void send_getTransaction(long id) throws TException
319
    {
320
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
321
      getTransaction_args args = new getTransaction_args();
322
      args.id = id;
323
      args.write(oprot_);
324
      oprot_.writeMessageEnd();
325
      oprot_.getTransport().flush();
326
    }
327
 
328
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
329
    {
330
      TMessage msg = iprot_.readMessageBegin();
331
      if (msg.type == TMessageType.EXCEPTION) {
332
        TApplicationException x = TApplicationException.read(iprot_);
333
        iprot_.readMessageEnd();
334
        throw x;
335
      }
336
      getTransaction_result result = new getTransaction_result();
337
      result.read(iprot_);
338
      iprot_.readMessageEnd();
339
      if (result.isSetSuccess()) {
340
        return result.success;
341
      }
342
      if (result.ex != null) {
343
        throw result.ex;
344
      }
345
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
346
    }
347
 
132 ashish 348
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 349
    {
132 ashish 350
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 351
      return recv_getTransactionsForCustomer();
352
    }
353
 
132 ashish 354
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 355
    {
356
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
357
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
358
      args.customerId = customerId;
132 ashish 359
      args.from_date = from_date;
360
      args.to_date = to_date;
68 ashish 361
      args.status = status;
362
      args.write(oprot_);
363
      oprot_.writeMessageEnd();
364
      oprot_.getTransport().flush();
365
    }
366
 
367
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
368
    {
369
      TMessage msg = iprot_.readMessageBegin();
370
      if (msg.type == TMessageType.EXCEPTION) {
371
        TApplicationException x = TApplicationException.read(iprot_);
372
        iprot_.readMessageEnd();
373
        throw x;
374
      }
375
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
376
      result.read(iprot_);
377
      iprot_.readMessageEnd();
378
      if (result.isSetSuccess()) {
379
        return result.success;
380
      }
381
      if (result.ex != null) {
382
        throw result.ex;
383
      }
384
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
385
    }
386
 
132 ashish 387
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
388
    {
389
      send_getTransactionsForShoppingCartId(shoppingCartId);
390
      return recv_getTransactionsForShoppingCartId();
391
    }
392
 
393
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
394
    {
395
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
396
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
397
      args.shoppingCartId = shoppingCartId;
398
      args.write(oprot_);
399
      oprot_.writeMessageEnd();
400
      oprot_.getTransport().flush();
401
    }
402
 
403
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
404
    {
405
      TMessage msg = iprot_.readMessageBegin();
406
      if (msg.type == TMessageType.EXCEPTION) {
407
        TApplicationException x = TApplicationException.read(iprot_);
408
        iprot_.readMessageEnd();
409
        throw x;
410
      }
411
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
412
      result.read(iprot_);
413
      iprot_.readMessageEnd();
414
      if (result.isSetSuccess()) {
415
        return result.success;
416
      }
417
      if (result.ex != null) {
418
        throw result.ex;
419
      }
420
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
421
    }
422
 
68 ashish 423
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
424
    {
425
      send_getTransactionStatus(transactionId);
426
      return recv_getTransactionStatus();
427
    }
428
 
429
    public void send_getTransactionStatus(long transactionId) throws TException
430
    {
431
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
432
      getTransactionStatus_args args = new getTransactionStatus_args();
433
      args.transactionId = transactionId;
434
      args.write(oprot_);
435
      oprot_.writeMessageEnd();
436
      oprot_.getTransport().flush();
437
    }
438
 
439
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
440
    {
441
      TMessage msg = iprot_.readMessageBegin();
442
      if (msg.type == TMessageType.EXCEPTION) {
443
        TApplicationException x = TApplicationException.read(iprot_);
444
        iprot_.readMessageEnd();
445
        throw x;
446
      }
447
      getTransactionStatus_result result = new getTransactionStatus_result();
448
      result.read(iprot_);
449
      iprot_.readMessageEnd();
450
      if (result.isSetSuccess()) {
451
        return result.success;
452
      }
453
      if (result.ex != null) {
454
        throw result.ex;
455
      }
456
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
457
    }
458
 
459
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
460
    {
461
      send_changeTransactionStatus(transactionId, status, description);
462
      return recv_changeTransactionStatus();
463
    }
464
 
465
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
466
    {
467
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
468
      changeTransactionStatus_args args = new changeTransactionStatus_args();
469
      args.transactionId = transactionId;
470
      args.status = status;
471
      args.description = description;
472
      args.write(oprot_);
473
      oprot_.writeMessageEnd();
474
      oprot_.getTransport().flush();
475
    }
476
 
477
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
478
    {
479
      TMessage msg = iprot_.readMessageBegin();
480
      if (msg.type == TMessageType.EXCEPTION) {
481
        TApplicationException x = TApplicationException.read(iprot_);
482
        iprot_.readMessageEnd();
483
        throw x;
484
      }
485
      changeTransactionStatus_result result = new changeTransactionStatus_result();
486
      result.read(iprot_);
487
      iprot_.readMessageEnd();
488
      if (result.isSetSuccess()) {
489
        return result.success;
490
      }
491
      if (result.ex != null) {
492
        throw result.ex;
493
      }
494
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
495
    }
496
 
1398 varun.gupt 497
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 498
    {
1398 varun.gupt 499
      send_enqueueTransactionInfoEmail(transactionId);
500
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 501
    }
502
 
1398 varun.gupt 503
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 504
    {
1398 varun.gupt 505
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
506
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 507
      args.transactionId = transactionId;
508
      args.write(oprot_);
509
      oprot_.writeMessageEnd();
510
      oprot_.getTransport().flush();
511
    }
512
 
1398 varun.gupt 513
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 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
      }
1398 varun.gupt 521
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 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
      }
1398 varun.gupt 530
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 531
    }
532
 
483 rajveer 533
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 534
    {
483 rajveer 535
      send_getAllOrders(status, from_date, to_date, warehouse_id);
536
      return recv_getAllOrders();
68 ashish 537
    }
538
 
483 rajveer 539
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 540
    {
483 rajveer 541
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
542
      getAllOrders_args args = new getAllOrders_args();
543
      args.status = status;
544
      args.from_date = from_date;
545
      args.to_date = to_date;
546
      args.warehouse_id = warehouse_id;
68 ashish 547
      args.write(oprot_);
548
      oprot_.writeMessageEnd();
549
      oprot_.getTransport().flush();
550
    }
551
 
483 rajveer 552
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 553
    {
554
      TMessage msg = iprot_.readMessageBegin();
555
      if (msg.type == TMessageType.EXCEPTION) {
556
        TApplicationException x = TApplicationException.read(iprot_);
557
        iprot_.readMessageEnd();
558
        throw x;
559
      }
483 rajveer 560
      getAllOrders_result result = new getAllOrders_result();
68 ashish 561
      result.read(iprot_);
562
      iprot_.readMessageEnd();
563
      if (result.isSetSuccess()) {
564
        return result.success;
565
      }
566
      if (result.ex != null) {
567
        throw result.ex;
568
      }
483 rajveer 569
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 570
    }
571
 
1022 varun.gupt 572
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
573
    {
574
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
575
      return recv_getOrdersByBillingDate();
576
    }
577
 
578
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
579
    {
580
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
581
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
582
      args.status = status;
583
      args.start_billing_date = start_billing_date;
584
      args.end_billing_date = end_billing_date;
585
      args.warehouse_id = warehouse_id;
586
      args.write(oprot_);
587
      oprot_.writeMessageEnd();
588
      oprot_.getTransport().flush();
589
    }
590
 
591
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
592
    {
593
      TMessage msg = iprot_.readMessageBegin();
594
      if (msg.type == TMessageType.EXCEPTION) {
595
        TApplicationException x = TApplicationException.read(iprot_);
596
        iprot_.readMessageEnd();
597
        throw x;
598
      }
599
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
600
      result.read(iprot_);
601
      iprot_.readMessageEnd();
602
      if (result.isSetSuccess()) {
603
        return result.success;
604
      }
605
      if (result.ex != null) {
606
        throw result.ex;
607
      }
608
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
609
    }
610
 
1382 varun.gupt 611
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
612
    {
613
      send_getReturnableOrdersForCustomer(customer_id, limit);
614
      return recv_getReturnableOrdersForCustomer();
615
    }
616
 
617
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
618
    {
619
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
620
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
621
      args.customer_id = customer_id;
622
      args.limit = limit;
623
      args.write(oprot_);
624
      oprot_.writeMessageEnd();
625
      oprot_.getTransport().flush();
626
    }
627
 
628
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
629
    {
630
      TMessage msg = iprot_.readMessageBegin();
631
      if (msg.type == TMessageType.EXCEPTION) {
632
        TApplicationException x = TApplicationException.read(iprot_);
633
        iprot_.readMessageEnd();
634
        throw x;
635
      }
636
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
637
      result.read(iprot_);
638
      iprot_.readMessageEnd();
639
      if (result.isSetSuccess()) {
640
        return result.success;
641
      }
642
      if (result.ex != null) {
643
        throw result.ex;
644
      }
645
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
646
    }
647
 
648
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
649
    {
650
      send_getCancellableOrdersForCustomer(customer_id, limit);
651
      return recv_getCancellableOrdersForCustomer();
652
    }
653
 
654
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
655
    {
656
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
657
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
658
      args.customer_id = customer_id;
659
      args.limit = limit;
660
      args.write(oprot_);
661
      oprot_.writeMessageEnd();
662
      oprot_.getTransport().flush();
663
    }
664
 
665
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
666
    {
667
      TMessage msg = iprot_.readMessageBegin();
668
      if (msg.type == TMessageType.EXCEPTION) {
669
        TApplicationException x = TApplicationException.read(iprot_);
670
        iprot_.readMessageEnd();
671
        throw x;
672
      }
673
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
674
      result.read(iprot_);
675
      iprot_.readMessageEnd();
676
      if (result.isSetSuccess()) {
677
        return result.success;
678
      }
679
      if (result.ex != null) {
680
        throw result.ex;
681
      }
682
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
683
    }
684
 
483 rajveer 685
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 686
    {
483 rajveer 687
      send_changeOrderStatus(orderId, status, description);
688
      return recv_changeOrderStatus();
68 ashish 689
    }
690
 
483 rajveer 691
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 692
    {
483 rajveer 693
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
694
      changeOrderStatus_args args = new changeOrderStatus_args();
695
      args.orderId = orderId;
696
      args.status = status;
697
      args.description = description;
68 ashish 698
      args.write(oprot_);
699
      oprot_.writeMessageEnd();
700
      oprot_.getTransport().flush();
701
    }
702
 
483 rajveer 703
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 704
    {
705
      TMessage msg = iprot_.readMessageBegin();
706
      if (msg.type == TMessageType.EXCEPTION) {
707
        TApplicationException x = TApplicationException.read(iprot_);
708
        iprot_.readMessageEnd();
709
        throw x;
710
      }
483 rajveer 711
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 712
      result.read(iprot_);
713
      iprot_.readMessageEnd();
714
      if (result.isSetSuccess()) {
715
        return result.success;
716
      }
717
      if (result.ex != null) {
718
        throw result.ex;
719
      }
483 rajveer 720
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 721
    }
722
 
1148 chandransh 723
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 724
    {
1148 chandransh 725
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 726
      return recv_addBillingDetails();
727
    }
728
 
1148 chandransh 729
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 730
    {
731
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
732
      addBillingDetails_args args = new addBillingDetails_args();
733
      args.orderId = orderId;
734
      args.invoice_number = invoice_number;
735
      args.billed_by = billed_by;
736
      args.write(oprot_);
737
      oprot_.writeMessageEnd();
738
      oprot_.getTransport().flush();
739
    }
740
 
741
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
742
    {
743
      TMessage msg = iprot_.readMessageBegin();
744
      if (msg.type == TMessageType.EXCEPTION) {
745
        TApplicationException x = TApplicationException.read(iprot_);
746
        iprot_.readMessageEnd();
747
        throw x;
748
      }
749
      addBillingDetails_result result = new addBillingDetails_result();
750
      result.read(iprot_);
751
      iprot_.readMessageEnd();
752
      if (result.isSetSuccess()) {
753
        return result.success;
754
      }
755
      if (result.ex != null) {
756
        throw result.ex;
757
      }
758
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
759
    }
760
 
1148 chandransh 761
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
762
    {
763
      send_addJacketNumber(orderId, jacketNumber);
764
      return recv_addJacketNumber();
765
    }
766
 
767
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
768
    {
769
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
770
      addJacketNumber_args args = new addJacketNumber_args();
771
      args.orderId = orderId;
772
      args.jacketNumber = jacketNumber;
773
      args.write(oprot_);
774
      oprot_.writeMessageEnd();
775
      oprot_.getTransport().flush();
776
    }
777
 
778
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
779
    {
780
      TMessage msg = iprot_.readMessageBegin();
781
      if (msg.type == TMessageType.EXCEPTION) {
782
        TApplicationException x = TApplicationException.read(iprot_);
783
        iprot_.readMessageEnd();
784
        throw x;
785
      }
786
      addJacketNumber_result result = new addJacketNumber_result();
787
      result.read(iprot_);
788
      iprot_.readMessageEnd();
789
      if (result.isSetSuccess()) {
790
        return result.success;
791
      }
792
      if (result.ex != null) {
793
        throw result.ex;
794
      }
795
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
796
    }
797
 
923 rajveer 798
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
799
    {
800
      send_acceptOrder(orderId);
801
      return recv_acceptOrder();
802
    }
803
 
804
    public void send_acceptOrder(long orderId) throws TException
805
    {
806
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
807
      acceptOrder_args args = new acceptOrder_args();
808
      args.orderId = orderId;
809
      args.write(oprot_);
810
      oprot_.writeMessageEnd();
811
      oprot_.getTransport().flush();
812
    }
813
 
814
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
815
    {
816
      TMessage msg = iprot_.readMessageBegin();
817
      if (msg.type == TMessageType.EXCEPTION) {
818
        TApplicationException x = TApplicationException.read(iprot_);
819
        iprot_.readMessageEnd();
820
        throw x;
821
      }
822
      acceptOrder_result result = new acceptOrder_result();
823
      result.read(iprot_);
824
      iprot_.readMessageEnd();
825
      if (result.isSetSuccess()) {
826
        return result.success;
827
      }
828
      if (result.ex != null) {
829
        throw result.ex;
830
      }
831
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
832
    }
833
 
834
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
835
    {
836
      send_billOrder(orderId);
837
      return recv_billOrder();
838
    }
839
 
840
    public void send_billOrder(long orderId) throws TException
841
    {
842
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
843
      billOrder_args args = new billOrder_args();
844
      args.orderId = orderId;
845
      args.write(oprot_);
846
      oprot_.writeMessageEnd();
847
      oprot_.getTransport().flush();
848
    }
849
 
850
    public boolean recv_billOrder() throws TransactionServiceException, TException
851
    {
852
      TMessage msg = iprot_.readMessageBegin();
853
      if (msg.type == TMessageType.EXCEPTION) {
854
        TApplicationException x = TApplicationException.read(iprot_);
855
        iprot_.readMessageEnd();
856
        throw x;
857
      }
858
      billOrder_result result = new billOrder_result();
859
      result.read(iprot_);
860
      iprot_.readMessageEnd();
861
      if (result.isSetSuccess()) {
862
        return result.success;
863
      }
864
      if (result.ex != null) {
865
        throw result.ex;
866
      }
867
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
868
    }
869
 
1529 ankur.sing 870
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 871
    {
1529 ankur.sing 872
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 873
      return recv_getOrdersForTransaction();
68 ashish 874
    }
875
 
1529 ankur.sing 876
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 877
    {
483 rajveer 878
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
879
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 880
      args.transactionId = transactionId;
1529 ankur.sing 881
      args.customerId = customerId;
68 ashish 882
      args.write(oprot_);
883
      oprot_.writeMessageEnd();
884
      oprot_.getTransport().flush();
885
    }
886
 
483 rajveer 887
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 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
      }
483 rajveer 895
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 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
      }
483 rajveer 904
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 905
    }
906
 
483 rajveer 907
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 908
    {
483 rajveer 909
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
910
      return recv_getOrdersForCustomer();
68 ashish 911
    }
912
 
483 rajveer 913
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 914
    {
483 rajveer 915
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
916
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
917
      args.customerId = customerId;
918
      args.from_date = from_date;
919
      args.to_date = to_date;
920
      args.status = status;
68 ashish 921
      args.write(oprot_);
922
      oprot_.writeMessageEnd();
923
      oprot_.getTransport().flush();
924
    }
925
 
483 rajveer 926
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 927
    {
928
      TMessage msg = iprot_.readMessageBegin();
929
      if (msg.type == TMessageType.EXCEPTION) {
930
        TApplicationException x = TApplicationException.read(iprot_);
931
        iprot_.readMessageEnd();
932
        throw x;
933
      }
483 rajveer 934
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 935
      result.read(iprot_);
936
      iprot_.readMessageEnd();
937
      if (result.isSetSuccess()) {
938
        return result.success;
939
      }
940
      if (result.ex != null) {
941
        throw result.ex;
942
      }
483 rajveer 943
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 944
    }
945
 
483 rajveer 946
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 947
    {
483 rajveer 948
      send_createOrder(order);
949
      return recv_createOrder();
68 ashish 950
    }
951
 
483 rajveer 952
    public void send_createOrder(Order order) throws TException
68 ashish 953
    {
483 rajveer 954
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
955
      createOrder_args args = new createOrder_args();
956
      args.order = order;
68 ashish 957
      args.write(oprot_);
958
      oprot_.writeMessageEnd();
959
      oprot_.getTransport().flush();
960
    }
961
 
483 rajveer 962
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 963
    {
964
      TMessage msg = iprot_.readMessageBegin();
965
      if (msg.type == TMessageType.EXCEPTION) {
966
        TApplicationException x = TApplicationException.read(iprot_);
967
        iprot_.readMessageEnd();
968
        throw x;
969
      }
483 rajveer 970
      createOrder_result result = new createOrder_result();
68 ashish 971
      result.read(iprot_);
972
      iprot_.readMessageEnd();
973
      if (result.isSetSuccess()) {
974
        return result.success;
975
      }
976
      if (result.ex != null) {
977
        throw result.ex;
978
      }
483 rajveer 979
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 980
    }
981
 
483 rajveer 982
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 983
    {
483 rajveer 984
      send_getOrder(id);
985
      return recv_getOrder();
68 ashish 986
    }
987
 
483 rajveer 988
    public void send_getOrder(long id) throws TException
68 ashish 989
    {
483 rajveer 990
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
991
      getOrder_args args = new getOrder_args();
992
      args.id = id;
68 ashish 993
      args.write(oprot_);
994
      oprot_.writeMessageEnd();
995
      oprot_.getTransport().flush();
996
    }
997
 
483 rajveer 998
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 999
    {
1000
      TMessage msg = iprot_.readMessageBegin();
1001
      if (msg.type == TMessageType.EXCEPTION) {
1002
        TApplicationException x = TApplicationException.read(iprot_);
1003
        iprot_.readMessageEnd();
1004
        throw x;
1005
      }
483 rajveer 1006
      getOrder_result result = new getOrder_result();
68 ashish 1007
      result.read(iprot_);
1008
      iprot_.readMessageEnd();
1009
      if (result.isSetSuccess()) {
1010
        return result.success;
1011
      }
1012
      if (result.ex != null) {
1013
        throw result.ex;
1014
      }
483 rajveer 1015
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1016
    }
1017
 
483 rajveer 1018
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1019
    {
483 rajveer 1020
      send_getLineItemsForOrder(orderId);
1021
      return recv_getLineItemsForOrder();
68 ashish 1022
    }
1023
 
483 rajveer 1024
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1025
    {
483 rajveer 1026
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1027
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1028
      args.orderId = orderId;
68 ashish 1029
      args.write(oprot_);
1030
      oprot_.writeMessageEnd();
1031
      oprot_.getTransport().flush();
1032
    }
1033
 
483 rajveer 1034
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1035
    {
1036
      TMessage msg = iprot_.readMessageBegin();
1037
      if (msg.type == TMessageType.EXCEPTION) {
1038
        TApplicationException x = TApplicationException.read(iprot_);
1039
        iprot_.readMessageEnd();
1040
        throw x;
1041
      }
483 rajveer 1042
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1043
      result.read(iprot_);
1044
      iprot_.readMessageEnd();
1045
      if (result.isSetSuccess()) {
1046
        return result.success;
1047
      }
1048
      if (result.ex != null) {
1049
        throw result.ex;
1050
      }
483 rajveer 1051
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1052
    }
1053
 
1529 ankur.sing 1054
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1055
    {
1056
      send_getOrderForCustomer(orderId, customerId);
1057
      return recv_getOrderForCustomer();
1058
    }
1059
 
1060
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1061
    {
1062
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1063
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1064
      args.orderId = orderId;
1065
      args.customerId = customerId;
1066
      args.write(oprot_);
1067
      oprot_.writeMessageEnd();
1068
      oprot_.getTransport().flush();
1069
    }
1070
 
1071
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1072
    {
1073
      TMessage msg = iprot_.readMessageBegin();
1074
      if (msg.type == TMessageType.EXCEPTION) {
1075
        TApplicationException x = TApplicationException.read(iprot_);
1076
        iprot_.readMessageEnd();
1077
        throw x;
1078
      }
1079
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1080
      result.read(iprot_);
1081
      iprot_.readMessageEnd();
1082
      if (result.isSetSuccess()) {
1083
        return result.success;
1084
      }
1085
      if (result.ex != null) {
1086
        throw result.ex;
1087
      }
1088
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1089
    }
1090
 
1221 chandransh 1091
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1092
    {
1093
      send_batchOrders(warehouseId);
1094
      return recv_batchOrders();
1095
    }
1096
 
1097
    public void send_batchOrders(long warehouseId) throws TException
1098
    {
1099
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1100
      batchOrders_args args = new batchOrders_args();
1101
      args.warehouseId = warehouseId;
1102
      args.write(oprot_);
1103
      oprot_.writeMessageEnd();
1104
      oprot_.getTransport().flush();
1105
    }
1106
 
1107
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1108
    {
1109
      TMessage msg = iprot_.readMessageBegin();
1110
      if (msg.type == TMessageType.EXCEPTION) {
1111
        TApplicationException x = TApplicationException.read(iprot_);
1112
        iprot_.readMessageEnd();
1113
        throw x;
1114
      }
1115
      batchOrders_result result = new batchOrders_result();
1116
      result.read(iprot_);
1117
      iprot_.readMessageEnd();
1118
      if (result.isSetSuccess()) {
1119
        return result.success;
1120
      }
1121
      if (result.ex != null) {
1122
        throw result.ex;
1123
      }
1124
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1125
    }
1126
 
1209 chandransh 1127
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1128
    {
1129
      send_markOrderAsOutOfStock(orderId);
1130
      return recv_markOrderAsOutOfStock();
1131
    }
1132
 
1133
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1134
    {
1135
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1136
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1137
      args.orderId = orderId;
1138
      args.write(oprot_);
1139
      oprot_.writeMessageEnd();
1140
      oprot_.getTransport().flush();
1141
    }
1142
 
1143
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1144
    {
1145
      TMessage msg = iprot_.readMessageBegin();
1146
      if (msg.type == TMessageType.EXCEPTION) {
1147
        TApplicationException x = TApplicationException.read(iprot_);
1148
        iprot_.readMessageEnd();
1149
        throw x;
1150
      }
1151
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1152
      result.read(iprot_);
1153
      iprot_.readMessageEnd();
1154
      if (result.isSetSuccess()) {
1155
        return result.success;
1156
      }
1157
      if (result.ex != null) {
1158
        throw result.ex;
1159
      }
1160
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1161
    }
1162
 
758 chandransh 1163
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1164
    {
1165
      send_markOrdersAsManifested(warehouseId, providerId);
1166
      return recv_markOrdersAsManifested();
1167
    }
1168
 
1169
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1170
    {
1171
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1172
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1173
      args.warehouseId = warehouseId;
1174
      args.providerId = providerId;
1175
      args.write(oprot_);
1176
      oprot_.writeMessageEnd();
1177
      oprot_.getTransport().flush();
1178
    }
1179
 
1180
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1181
    {
1182
      TMessage msg = iprot_.readMessageBegin();
1183
      if (msg.type == TMessageType.EXCEPTION) {
1184
        TApplicationException x = TApplicationException.read(iprot_);
1185
        iprot_.readMessageEnd();
1186
        throw x;
1187
      }
1188
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1189
      result.read(iprot_);
1190
      iprot_.readMessageEnd();
1191
      if (result.isSetSuccess()) {
1192
        return result.success;
1193
      }
1194
      if (result.ex != null) {
1195
        throw result.ex;
1196
      }
1197
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1198
    }
1199
 
1245 chandransh 1200
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1201
    {
1202
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1203
      return recv_markOrdersAsPickedUp();
1204
    }
1205
 
1245 chandransh 1206
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1207
    {
1208
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1209
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1210
      args.providerId = providerId;
1211
      args.pickupDetails = pickupDetails;
1212
      args.write(oprot_);
1213
      oprot_.writeMessageEnd();
1214
      oprot_.getTransport().flush();
1215
    }
1216
 
1217
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1218
    {
1219
      TMessage msg = iprot_.readMessageBegin();
1220
      if (msg.type == TMessageType.EXCEPTION) {
1221
        TApplicationException x = TApplicationException.read(iprot_);
1222
        iprot_.readMessageEnd();
1223
        throw x;
1224
      }
1225
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1226
      result.read(iprot_);
1227
      iprot_.readMessageEnd();
1228
      if (result.isSetSuccess()) {
1229
        return result.success;
1230
      }
1231
      if (result.ex != null) {
1232
        throw result.ex;
1233
      }
1234
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1235
    }
1236
 
1133 chandransh 1237
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1238
    {
1239
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1240
      recv_markOrdersAsDelivered();
1241
    }
1242
 
1243
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1244
    {
1245
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1246
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1247
      args.providerId = providerId;
1248
      args.deliveredOrders = deliveredOrders;
1249
      args.write(oprot_);
1250
      oprot_.writeMessageEnd();
1251
      oprot_.getTransport().flush();
1252
    }
1253
 
1254
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1255
    {
1256
      TMessage msg = iprot_.readMessageBegin();
1257
      if (msg.type == TMessageType.EXCEPTION) {
1258
        TApplicationException x = TApplicationException.read(iprot_);
1259
        iprot_.readMessageEnd();
1260
        throw x;
1261
      }
1262
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1263
      result.read(iprot_);
1264
      iprot_.readMessageEnd();
1265
      if (result.ex != null) {
1266
        throw result.ex;
1267
      }
1268
      return;
1269
    }
1270
 
1271
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1272
    {
1273
      send_markOrdersAsFailed(providerId, returnedOrders);
1274
      recv_markOrdersAsFailed();
1275
    }
1276
 
1277
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1278
    {
1279
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1280
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1281
      args.providerId = providerId;
1282
      args.returnedOrders = returnedOrders;
1283
      args.write(oprot_);
1284
      oprot_.writeMessageEnd();
1285
      oprot_.getTransport().flush();
1286
    }
1287
 
1288
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1289
    {
1290
      TMessage msg = iprot_.readMessageBegin();
1291
      if (msg.type == TMessageType.EXCEPTION) {
1292
        TApplicationException x = TApplicationException.read(iprot_);
1293
        iprot_.readMessageEnd();
1294
        throw x;
1295
      }
1296
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1297
      result.read(iprot_);
1298
      iprot_.readMessageEnd();
1299
      if (result.ex != null) {
1300
        throw result.ex;
1301
      }
1302
      return;
1303
    }
1304
 
1245 chandransh 1305
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1306
    {
1307
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1308
      recv_updateNonDeliveryReason();
1309
    }
1310
 
1311
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1312
    {
1313
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1314
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1315
      args.providerId = providerId;
1316
      args.undeliveredOrders = undeliveredOrders;
1317
      args.write(oprot_);
1318
      oprot_.writeMessageEnd();
1319
      oprot_.getTransport().flush();
1320
    }
1321
 
1322
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1323
    {
1324
      TMessage msg = iprot_.readMessageBegin();
1325
      if (msg.type == TMessageType.EXCEPTION) {
1326
        TApplicationException x = TApplicationException.read(iprot_);
1327
        iprot_.readMessageEnd();
1328
        throw x;
1329
      }
1330
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1331
      result.read(iprot_);
1332
      iprot_.readMessageEnd();
1333
      if (result.ex != null) {
1334
        throw result.ex;
1335
      }
1336
      return;
1337
    }
1338
 
1406 ankur.sing 1339
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1340
    {
1341
      send_getUndeliveredOrders(providerId, warehouseId);
1342
      return recv_getUndeliveredOrders();
1343
    }
1344
 
1345
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1346
    {
1347
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1348
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1349
      args.providerId = providerId;
1350
      args.warehouseId = warehouseId;
1351
      args.write(oprot_);
1352
      oprot_.writeMessageEnd();
1353
      oprot_.getTransport().flush();
1354
    }
1355
 
1356
    public List<Order> recv_getUndeliveredOrders() throws TException
1357
    {
1358
      TMessage msg = iprot_.readMessageBegin();
1359
      if (msg.type == TMessageType.EXCEPTION) {
1360
        TApplicationException x = TApplicationException.read(iprot_);
1361
        iprot_.readMessageEnd();
1362
        throw x;
1363
      }
1364
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1365
      result.read(iprot_);
1366
      iprot_.readMessageEnd();
1367
      if (result.isSetSuccess()) {
1368
        return result.success;
1369
      }
1370
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1371
    }
1372
 
483 rajveer 1373
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1374
    {
483 rajveer 1375
      send_getAlerts(orderId, valid);
305 ashish 1376
      return recv_getAlerts();
1377
    }
1378
 
483 rajveer 1379
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1380
    {
1381
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1382
      getAlerts_args args = new getAlerts_args();
483 rajveer 1383
      args.orderId = orderId;
305 ashish 1384
      args.valid = valid;
1385
      args.write(oprot_);
1386
      oprot_.writeMessageEnd();
1387
      oprot_.getTransport().flush();
1388
    }
1389
 
1390
    public List<Alert> recv_getAlerts() throws TException
1391
    {
1392
      TMessage msg = iprot_.readMessageBegin();
1393
      if (msg.type == TMessageType.EXCEPTION) {
1394
        TApplicationException x = TApplicationException.read(iprot_);
1395
        iprot_.readMessageEnd();
1396
        throw x;
1397
      }
1398
      getAlerts_result result = new getAlerts_result();
1399
      result.read(iprot_);
1400
      iprot_.readMessageEnd();
1401
      if (result.isSetSuccess()) {
1402
        return result.success;
1403
      }
1404
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1405
    }
1406
 
483 rajveer 1407
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1408
    {
483 rajveer 1409
      send_setAlert(orderId, unset, type, comment);
305 ashish 1410
      recv_setAlert();
1411
    }
1412
 
483 rajveer 1413
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1414
    {
1415
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1416
      setAlert_args args = new setAlert_args();
483 rajveer 1417
      args.orderId = orderId;
305 ashish 1418
      args.unset = unset;
1419
      args.type = type;
1420
      args.comment = comment;
1421
      args.write(oprot_);
1422
      oprot_.writeMessageEnd();
1423
      oprot_.getTransport().flush();
1424
    }
1425
 
1426
    public void recv_setAlert() throws TException
1427
    {
1428
      TMessage msg = iprot_.readMessageBegin();
1429
      if (msg.type == TMessageType.EXCEPTION) {
1430
        TApplicationException x = TApplicationException.read(iprot_);
1431
        iprot_.readMessageEnd();
1432
        throw x;
1433
      }
1434
      setAlert_result result = new setAlert_result();
1435
      result.read(iprot_);
1436
      iprot_.readMessageEnd();
1437
      return;
1438
    }
1439
 
1598 ankur.sing 1440
    public long getValidOrderCount() throws TException
1441
    {
1442
      send_getValidOrderCount();
1443
      return recv_getValidOrderCount();
1444
    }
1445
 
1446
    public void send_getValidOrderCount() throws TException
1447
    {
1448
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1449
      getValidOrderCount_args args = new getValidOrderCount_args();
1450
      args.write(oprot_);
1451
      oprot_.writeMessageEnd();
1452
      oprot_.getTransport().flush();
1453
    }
1454
 
1455
    public long recv_getValidOrderCount() throws TException
1456
    {
1457
      TMessage msg = iprot_.readMessageBegin();
1458
      if (msg.type == TMessageType.EXCEPTION) {
1459
        TApplicationException x = TApplicationException.read(iprot_);
1460
        iprot_.readMessageEnd();
1461
        throw x;
1462
      }
1463
      getValidOrderCount_result result = new getValidOrderCount_result();
1464
      result.read(iprot_);
1465
      iprot_.readMessageEnd();
1466
      if (result.isSetSuccess()) {
1467
        return result.success;
1468
      }
1469
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1470
    }
1471
 
1629 ankur.sing 1472
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException
1473
    {
1474
      send_getNoOfCustomersWithSuccessfulTransaction();
1475
      return recv_getNoOfCustomersWithSuccessfulTransaction();
1476
    }
1477
 
1478
    public void send_getNoOfCustomersWithSuccessfulTransaction() throws TException
1479
    {
1480
      oprot_.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.CALL, seqid_));
1481
      getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
1482
      args.write(oprot_);
1483
      oprot_.writeMessageEnd();
1484
      oprot_.getTransport().flush();
1485
    }
1486
 
1487
    public long recv_getNoOfCustomersWithSuccessfulTransaction() throws TException
1488
    {
1489
      TMessage msg = iprot_.readMessageBegin();
1490
      if (msg.type == TMessageType.EXCEPTION) {
1491
        TApplicationException x = TApplicationException.read(iprot_);
1492
        iprot_.readMessageEnd();
1493
        throw x;
1494
      }
1495
      getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
1496
      result.read(iprot_);
1497
      iprot_.readMessageEnd();
1498
      if (result.isSetSuccess()) {
1499
        return result.success;
1500
      }
1501
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1502
    }
1503
 
1731 ankur.sing 1504
    public List<Double> getValidOrdersAmountRange() throws TException
1629 ankur.sing 1505
    {
1731 ankur.sing 1506
      send_getValidOrdersAmountRange();
1507
      return recv_getValidOrdersAmountRange();
1629 ankur.sing 1508
    }
1509
 
1731 ankur.sing 1510
    public void send_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1511
    {
1731 ankur.sing 1512
      oprot_.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.CALL, seqid_));
1513
      getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 1514
      args.write(oprot_);
1515
      oprot_.writeMessageEnd();
1516
      oprot_.getTransport().flush();
1517
    }
1518
 
1731 ankur.sing 1519
    public List<Double> recv_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1520
    {
1521
      TMessage msg = iprot_.readMessageBegin();
1522
      if (msg.type == TMessageType.EXCEPTION) {
1523
        TApplicationException x = TApplicationException.read(iprot_);
1524
        iprot_.readMessageEnd();
1525
        throw x;
1526
      }
1731 ankur.sing 1527
      getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
1629 ankur.sing 1528
      result.read(iprot_);
1529
      iprot_.readMessageEnd();
1530
      if (result.isSetSuccess()) {
1531
        return result.success;
1532
      }
1731 ankur.sing 1533
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1629 ankur.sing 1534
    }
1535
 
68 ashish 1536
  }
1537
  public static class Processor implements TProcessor {
1538
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1539
    public Processor(Iface iface)
1540
    {
1541
      iface_ = iface;
764 rajveer 1542
      processMap_.put("closeSession", new closeSession());
68 ashish 1543
      processMap_.put("createTransaction", new createTransaction());
1544
      processMap_.put("getTransaction", new getTransaction());
1545
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1546
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1547
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1548
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1549
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1550
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1551
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1552
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1553
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1554
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1555
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1556
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1557
      processMap_.put("acceptOrder", new acceptOrder());
1558
      processMap_.put("billOrder", new billOrder());
483 rajveer 1559
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1560
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1561
      processMap_.put("createOrder", new createOrder());
1562
      processMap_.put("getOrder", new getOrder());
1563
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 1564
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 1565
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1566
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1567
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1568
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1569
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1570
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1571
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1572
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1573
      processMap_.put("getAlerts", new getAlerts());
1574
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 1575
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1629 ankur.sing 1576
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1731 ankur.sing 1577
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
68 ashish 1578
    }
1579
 
1580
    protected static interface ProcessFunction {
1581
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1582
    }
1583
 
1584
    private Iface iface_;
1585
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1586
 
1587
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1588
    {
1589
      TMessage msg = iprot.readMessageBegin();
1590
      ProcessFunction fn = processMap_.get(msg.name);
1591
      if (fn == null) {
1592
        TProtocolUtil.skip(iprot, TType.STRUCT);
1593
        iprot.readMessageEnd();
1594
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1595
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1596
        x.write(oprot);
1597
        oprot.writeMessageEnd();
1598
        oprot.getTransport().flush();
1599
        return true;
1600
      }
1601
      fn.process(msg.seqid, iprot, oprot);
1602
      return true;
1603
    }
1604
 
764 rajveer 1605
    private class closeSession implements ProcessFunction {
1606
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1607
      {
1608
        closeSession_args args = new closeSession_args();
1609
        args.read(iprot);
1610
        iprot.readMessageEnd();
1611
        closeSession_result result = new closeSession_result();
1612
        iface_.closeSession();
1613
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1614
        result.write(oprot);
1615
        oprot.writeMessageEnd();
1616
        oprot.getTransport().flush();
1617
      }
1618
 
1619
    }
1620
 
68 ashish 1621
    private class createTransaction implements ProcessFunction {
1622
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1623
      {
1624
        createTransaction_args args = new createTransaction_args();
1625
        args.read(iprot);
1626
        iprot.readMessageEnd();
1627
        createTransaction_result result = new createTransaction_result();
1628
        try {
132 ashish 1629
          result.success = iface_.createTransaction(args.transaction);
1630
          result.setSuccessIsSet(true);
68 ashish 1631
        } catch (TransactionServiceException ex) {
1632
          result.ex = ex;
1633
        } catch (Throwable th) {
1634
          LOGGER.error("Internal error processing createTransaction", th);
1635
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1636
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1637
          x.write(oprot);
1638
          oprot.writeMessageEnd();
1639
          oprot.getTransport().flush();
1640
          return;
1641
        }
1642
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1643
        result.write(oprot);
1644
        oprot.writeMessageEnd();
1645
        oprot.getTransport().flush();
1646
      }
1647
 
1648
    }
1649
 
1650
    private class getTransaction implements ProcessFunction {
1651
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1652
      {
1653
        getTransaction_args args = new getTransaction_args();
1654
        args.read(iprot);
1655
        iprot.readMessageEnd();
1656
        getTransaction_result result = new getTransaction_result();
1657
        try {
1658
          result.success = iface_.getTransaction(args.id);
1659
        } catch (TransactionServiceException ex) {
1660
          result.ex = ex;
1661
        } catch (Throwable th) {
1662
          LOGGER.error("Internal error processing getTransaction", th);
1663
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1664
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1665
          x.write(oprot);
1666
          oprot.writeMessageEnd();
1667
          oprot.getTransport().flush();
1668
          return;
1669
        }
1670
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1671
        result.write(oprot);
1672
        oprot.writeMessageEnd();
1673
        oprot.getTransport().flush();
1674
      }
1675
 
1676
    }
1677
 
1678
    private class getTransactionsForCustomer implements ProcessFunction {
1679
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1680
      {
1681
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1682
        args.read(iprot);
1683
        iprot.readMessageEnd();
1684
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1685
        try {
132 ashish 1686
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1687
        } catch (TransactionServiceException ex) {
1688
          result.ex = ex;
1689
        } catch (Throwable th) {
1690
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1691
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1692
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1693
          x.write(oprot);
1694
          oprot.writeMessageEnd();
1695
          oprot.getTransport().flush();
1696
          return;
1697
        }
1698
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1699
        result.write(oprot);
1700
        oprot.writeMessageEnd();
1701
        oprot.getTransport().flush();
1702
      }
1703
 
1704
    }
1705
 
132 ashish 1706
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1707
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1708
      {
1709
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1710
        args.read(iprot);
1711
        iprot.readMessageEnd();
1712
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1713
        try {
1714
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1715
        } catch (TransactionServiceException ex) {
1716
          result.ex = ex;
1717
        } catch (Throwable th) {
1718
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1719
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1720
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1721
          x.write(oprot);
1722
          oprot.writeMessageEnd();
1723
          oprot.getTransport().flush();
1724
          return;
1725
        }
1726
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1727
        result.write(oprot);
1728
        oprot.writeMessageEnd();
1729
        oprot.getTransport().flush();
1730
      }
1731
 
1732
    }
1733
 
68 ashish 1734
    private class getTransactionStatus implements ProcessFunction {
1735
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1736
      {
1737
        getTransactionStatus_args args = new getTransactionStatus_args();
1738
        args.read(iprot);
1739
        iprot.readMessageEnd();
1740
        getTransactionStatus_result result = new getTransactionStatus_result();
1741
        try {
1742
          result.success = iface_.getTransactionStatus(args.transactionId);
1743
        } catch (TransactionServiceException ex) {
1744
          result.ex = ex;
1745
        } catch (Throwable th) {
1746
          LOGGER.error("Internal error processing getTransactionStatus", th);
1747
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1748
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1749
          x.write(oprot);
1750
          oprot.writeMessageEnd();
1751
          oprot.getTransport().flush();
1752
          return;
1753
        }
1754
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1755
        result.write(oprot);
1756
        oprot.writeMessageEnd();
1757
        oprot.getTransport().flush();
1758
      }
1759
 
1760
    }
1761
 
1762
    private class changeTransactionStatus implements ProcessFunction {
1763
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1764
      {
1765
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1766
        args.read(iprot);
1767
        iprot.readMessageEnd();
1768
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1769
        try {
1770
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1771
          result.setSuccessIsSet(true);
1772
        } catch (TransactionServiceException ex) {
1773
          result.ex = ex;
1774
        } catch (Throwable th) {
1775
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1776
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1777
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1778
          x.write(oprot);
1779
          oprot.writeMessageEnd();
1780
          oprot.getTransport().flush();
1781
          return;
1782
        }
1783
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1784
        result.write(oprot);
1785
        oprot.writeMessageEnd();
1786
        oprot.getTransport().flush();
1787
      }
1788
 
1789
    }
1790
 
1398 varun.gupt 1791
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 1792
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1793
      {
1398 varun.gupt 1794
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 1795
        args.read(iprot);
1796
        iprot.readMessageEnd();
1398 varun.gupt 1797
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 1798
        try {
1398 varun.gupt 1799
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 1800
          result.setSuccessIsSet(true);
1801
        } catch (TransactionServiceException ex) {
1802
          result.ex = ex;
1803
        } catch (Throwable th) {
1398 varun.gupt 1804
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
1805
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
1806
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 1807
          x.write(oprot);
1808
          oprot.writeMessageEnd();
1809
          oprot.getTransport().flush();
1810
          return;
1811
        }
1398 varun.gupt 1812
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 1813
        result.write(oprot);
1814
        oprot.writeMessageEnd();
1815
        oprot.getTransport().flush();
1816
      }
1817
 
1818
    }
1819
 
483 rajveer 1820
    private class getAllOrders implements ProcessFunction {
68 ashish 1821
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1822
      {
483 rajveer 1823
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1824
        args.read(iprot);
1825
        iprot.readMessageEnd();
483 rajveer 1826
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1827
        try {
483 rajveer 1828
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1829
        } catch (TransactionServiceException ex) {
1830
          result.ex = ex;
1831
        } catch (Throwable th) {
483 rajveer 1832
          LOGGER.error("Internal error processing getAllOrders", th);
1833
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1834
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1835
          x.write(oprot);
1836
          oprot.writeMessageEnd();
1837
          oprot.getTransport().flush();
1838
          return;
1839
        }
483 rajveer 1840
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1841
        result.write(oprot);
1842
        oprot.writeMessageEnd();
1843
        oprot.getTransport().flush();
1844
      }
1845
 
1846
    }
1847
 
1022 varun.gupt 1848
    private class getOrdersByBillingDate implements ProcessFunction {
1849
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1850
      {
1851
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1852
        args.read(iprot);
1853
        iprot.readMessageEnd();
1854
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1855
        try {
1856
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1857
        } catch (TransactionServiceException ex) {
1858
          result.ex = ex;
1859
        } catch (Throwable th) {
1860
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1861
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1862
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1863
          x.write(oprot);
1864
          oprot.writeMessageEnd();
1865
          oprot.getTransport().flush();
1866
          return;
1867
        }
1868
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1869
        result.write(oprot);
1870
        oprot.writeMessageEnd();
1871
        oprot.getTransport().flush();
1872
      }
1873
 
1874
    }
1875
 
1382 varun.gupt 1876
    private class getReturnableOrdersForCustomer implements ProcessFunction {
1877
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1878
      {
1879
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
1880
        args.read(iprot);
1881
        iprot.readMessageEnd();
1882
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
1883
        try {
1884
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
1885
        } catch (TransactionServiceException ex) {
1886
          result.ex = ex;
1887
        } catch (Throwable th) {
1888
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
1889
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
1890
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1891
          x.write(oprot);
1892
          oprot.writeMessageEnd();
1893
          oprot.getTransport().flush();
1894
          return;
1895
        }
1896
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
1897
        result.write(oprot);
1898
        oprot.writeMessageEnd();
1899
        oprot.getTransport().flush();
1900
      }
1901
 
1902
    }
1903
 
1904
    private class getCancellableOrdersForCustomer implements ProcessFunction {
1905
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1906
      {
1907
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
1908
        args.read(iprot);
1909
        iprot.readMessageEnd();
1910
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
1911
        try {
1912
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
1913
        } catch (TransactionServiceException ex) {
1914
          result.ex = ex;
1915
        } catch (Throwable th) {
1916
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
1917
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
1918
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1919
          x.write(oprot);
1920
          oprot.writeMessageEnd();
1921
          oprot.getTransport().flush();
1922
          return;
1923
        }
1924
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
1925
        result.write(oprot);
1926
        oprot.writeMessageEnd();
1927
        oprot.getTransport().flush();
1928
      }
1929
 
1930
    }
1931
 
483 rajveer 1932
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1933
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1934
      {
483 rajveer 1935
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1936
        args.read(iprot);
1937
        iprot.readMessageEnd();
483 rajveer 1938
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1939
        try {
483 rajveer 1940
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1941
          result.setSuccessIsSet(true);
1942
        } catch (TransactionServiceException ex) {
1943
          result.ex = ex;
1944
        } catch (Throwable th) {
483 rajveer 1945
          LOGGER.error("Internal error processing changeOrderStatus", th);
1946
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1947
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1948
          x.write(oprot);
1949
          oprot.writeMessageEnd();
1950
          oprot.getTransport().flush();
1951
          return;
1952
        }
483 rajveer 1953
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1954
        result.write(oprot);
1955
        oprot.writeMessageEnd();
1956
        oprot.getTransport().flush();
1957
      }
1958
 
1959
    }
1960
 
495 rajveer 1961
    private class addBillingDetails implements ProcessFunction {
1962
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1963
      {
1964
        addBillingDetails_args args = new addBillingDetails_args();
1965
        args.read(iprot);
1966
        iprot.readMessageEnd();
1967
        addBillingDetails_result result = new addBillingDetails_result();
1968
        try {
1148 chandransh 1969
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 1970
          result.setSuccessIsSet(true);
1971
        } catch (TransactionServiceException ex) {
1972
          result.ex = ex;
1973
        } catch (Throwable th) {
1974
          LOGGER.error("Internal error processing addBillingDetails", th);
1975
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1976
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1977
          x.write(oprot);
1978
          oprot.writeMessageEnd();
1979
          oprot.getTransport().flush();
1980
          return;
1981
        }
1982
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1983
        result.write(oprot);
1984
        oprot.writeMessageEnd();
1985
        oprot.getTransport().flush();
1986
      }
1987
 
1988
    }
1989
 
1148 chandransh 1990
    private class addJacketNumber implements ProcessFunction {
1991
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1992
      {
1993
        addJacketNumber_args args = new addJacketNumber_args();
1994
        args.read(iprot);
1995
        iprot.readMessageEnd();
1996
        addJacketNumber_result result = new addJacketNumber_result();
1997
        try {
1998
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1999
          result.setSuccessIsSet(true);
2000
        } catch (TransactionServiceException ex) {
2001
          result.ex = ex;
2002
        } catch (Throwable th) {
2003
          LOGGER.error("Internal error processing addJacketNumber", th);
2004
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
2005
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
2006
          x.write(oprot);
2007
          oprot.writeMessageEnd();
2008
          oprot.getTransport().flush();
2009
          return;
2010
        }
2011
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
2012
        result.write(oprot);
2013
        oprot.writeMessageEnd();
2014
        oprot.getTransport().flush();
2015
      }
2016
 
2017
    }
2018
 
923 rajveer 2019
    private class acceptOrder implements ProcessFunction {
2020
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2021
      {
2022
        acceptOrder_args args = new acceptOrder_args();
2023
        args.read(iprot);
2024
        iprot.readMessageEnd();
2025
        acceptOrder_result result = new acceptOrder_result();
2026
        try {
2027
          result.success = iface_.acceptOrder(args.orderId);
2028
          result.setSuccessIsSet(true);
2029
        } catch (TransactionServiceException ex) {
2030
          result.ex = ex;
2031
        } catch (Throwable th) {
2032
          LOGGER.error("Internal error processing acceptOrder", th);
2033
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
2034
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
2035
          x.write(oprot);
2036
          oprot.writeMessageEnd();
2037
          oprot.getTransport().flush();
2038
          return;
2039
        }
2040
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
2041
        result.write(oprot);
2042
        oprot.writeMessageEnd();
2043
        oprot.getTransport().flush();
2044
      }
2045
 
2046
    }
2047
 
2048
    private class billOrder implements ProcessFunction {
2049
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2050
      {
2051
        billOrder_args args = new billOrder_args();
2052
        args.read(iprot);
2053
        iprot.readMessageEnd();
2054
        billOrder_result result = new billOrder_result();
2055
        try {
2056
          result.success = iface_.billOrder(args.orderId);
2057
          result.setSuccessIsSet(true);
2058
        } catch (TransactionServiceException ex) {
2059
          result.ex = ex;
2060
        } catch (Throwable th) {
2061
          LOGGER.error("Internal error processing billOrder", th);
2062
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
2063
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
2064
          x.write(oprot);
2065
          oprot.writeMessageEnd();
2066
          oprot.getTransport().flush();
2067
          return;
2068
        }
2069
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
2070
        result.write(oprot);
2071
        oprot.writeMessageEnd();
2072
        oprot.getTransport().flush();
2073
      }
2074
 
2075
    }
2076
 
483 rajveer 2077
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2078
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2079
      {
483 rajveer 2080
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2081
        args.read(iprot);
2082
        iprot.readMessageEnd();
483 rajveer 2083
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2084
        try {
1529 ankur.sing 2085
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2086
        } catch (TransactionServiceException ex) {
2087
          result.ex = ex;
2088
        } catch (Throwable th) {
483 rajveer 2089
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2090
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2091
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2092
          x.write(oprot);
2093
          oprot.writeMessageEnd();
2094
          oprot.getTransport().flush();
2095
          return;
2096
        }
483 rajveer 2097
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2098
        result.write(oprot);
2099
        oprot.writeMessageEnd();
2100
        oprot.getTransport().flush();
2101
      }
2102
 
2103
    }
2104
 
483 rajveer 2105
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2106
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2107
      {
483 rajveer 2108
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2109
        args.read(iprot);
2110
        iprot.readMessageEnd();
483 rajveer 2111
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2112
        try {
483 rajveer 2113
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2114
        } catch (TransactionServiceException ex) {
2115
          result.ex = ex;
2116
        } catch (Throwable th) {
483 rajveer 2117
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2118
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2119
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2120
          x.write(oprot);
2121
          oprot.writeMessageEnd();
2122
          oprot.getTransport().flush();
2123
          return;
2124
        }
483 rajveer 2125
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2126
        result.write(oprot);
2127
        oprot.writeMessageEnd();
2128
        oprot.getTransport().flush();
2129
      }
2130
 
2131
    }
2132
 
483 rajveer 2133
    private class createOrder implements ProcessFunction {
68 ashish 2134
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2135
      {
483 rajveer 2136
        createOrder_args args = new createOrder_args();
68 ashish 2137
        args.read(iprot);
2138
        iprot.readMessageEnd();
483 rajveer 2139
        createOrder_result result = new createOrder_result();
68 ashish 2140
        try {
483 rajveer 2141
          result.success = iface_.createOrder(args.order);
68 ashish 2142
          result.setSuccessIsSet(true);
2143
        } catch (TransactionServiceException ex) {
2144
          result.ex = ex;
2145
        } catch (Throwable th) {
483 rajveer 2146
          LOGGER.error("Internal error processing createOrder", th);
2147
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2148
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2149
          x.write(oprot);
2150
          oprot.writeMessageEnd();
2151
          oprot.getTransport().flush();
2152
          return;
2153
        }
483 rajveer 2154
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2155
        result.write(oprot);
2156
        oprot.writeMessageEnd();
2157
        oprot.getTransport().flush();
2158
      }
2159
 
2160
    }
2161
 
483 rajveer 2162
    private class getOrder implements ProcessFunction {
68 ashish 2163
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2164
      {
483 rajveer 2165
        getOrder_args args = new getOrder_args();
68 ashish 2166
        args.read(iprot);
2167
        iprot.readMessageEnd();
483 rajveer 2168
        getOrder_result result = new getOrder_result();
68 ashish 2169
        try {
483 rajveer 2170
          result.success = iface_.getOrder(args.id);
68 ashish 2171
        } catch (TransactionServiceException ex) {
2172
          result.ex = ex;
2173
        } catch (Throwable th) {
483 rajveer 2174
          LOGGER.error("Internal error processing getOrder", th);
2175
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2176
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2177
          x.write(oprot);
2178
          oprot.writeMessageEnd();
2179
          oprot.getTransport().flush();
2180
          return;
2181
        }
483 rajveer 2182
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2183
        result.write(oprot);
2184
        oprot.writeMessageEnd();
2185
        oprot.getTransport().flush();
2186
      }
2187
 
2188
    }
2189
 
483 rajveer 2190
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2191
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2192
      {
483 rajveer 2193
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2194
        args.read(iprot);
2195
        iprot.readMessageEnd();
483 rajveer 2196
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2197
        try {
483 rajveer 2198
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2199
        } catch (TransactionServiceException ex) {
2200
          result.ex = ex;
2201
        } catch (Throwable th) {
483 rajveer 2202
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2203
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2204
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2205
          x.write(oprot);
2206
          oprot.writeMessageEnd();
2207
          oprot.getTransport().flush();
2208
          return;
2209
        }
483 rajveer 2210
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2211
        result.write(oprot);
2212
        oprot.writeMessageEnd();
2213
        oprot.getTransport().flush();
2214
      }
2215
 
2216
    }
2217
 
1529 ankur.sing 2218
    private class getOrderForCustomer implements ProcessFunction {
2219
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2220
      {
2221
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2222
        args.read(iprot);
2223
        iprot.readMessageEnd();
2224
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2225
        try {
2226
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2227
        } catch (TransactionServiceException ex) {
2228
          result.ex = ex;
2229
        } catch (Throwable th) {
2230
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2231
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2232
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2233
          x.write(oprot);
2234
          oprot.writeMessageEnd();
2235
          oprot.getTransport().flush();
2236
          return;
2237
        }
2238
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2239
        result.write(oprot);
2240
        oprot.writeMessageEnd();
2241
        oprot.getTransport().flush();
2242
      }
2243
 
2244
    }
2245
 
1221 chandransh 2246
    private class batchOrders implements ProcessFunction {
2247
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2248
      {
2249
        batchOrders_args args = new batchOrders_args();
2250
        args.read(iprot);
2251
        iprot.readMessageEnd();
2252
        batchOrders_result result = new batchOrders_result();
2253
        try {
2254
          result.success = iface_.batchOrders(args.warehouseId);
2255
        } catch (TransactionServiceException ex) {
2256
          result.ex = ex;
2257
        } catch (Throwable th) {
2258
          LOGGER.error("Internal error processing batchOrders", th);
2259
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2260
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2261
          x.write(oprot);
2262
          oprot.writeMessageEnd();
2263
          oprot.getTransport().flush();
2264
          return;
2265
        }
2266
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2267
        result.write(oprot);
2268
        oprot.writeMessageEnd();
2269
        oprot.getTransport().flush();
2270
      }
2271
 
2272
    }
2273
 
1209 chandransh 2274
    private class markOrderAsOutOfStock implements ProcessFunction {
2275
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2276
      {
2277
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2278
        args.read(iprot);
2279
        iprot.readMessageEnd();
2280
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2281
        try {
2282
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2283
          result.setSuccessIsSet(true);
2284
        } catch (TransactionServiceException ex) {
2285
          result.ex = ex;
2286
        } catch (Throwable th) {
2287
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2288
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2289
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2290
          x.write(oprot);
2291
          oprot.writeMessageEnd();
2292
          oprot.getTransport().flush();
2293
          return;
2294
        }
2295
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2296
        result.write(oprot);
2297
        oprot.writeMessageEnd();
2298
        oprot.getTransport().flush();
2299
      }
2300
 
2301
    }
2302
 
758 chandransh 2303
    private class markOrdersAsManifested implements ProcessFunction {
2304
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2305
      {
2306
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2307
        args.read(iprot);
2308
        iprot.readMessageEnd();
2309
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2310
        try {
2311
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2312
          result.setSuccessIsSet(true);
2313
        } catch (TransactionServiceException ex) {
2314
          result.ex = ex;
2315
        } catch (Throwable th) {
2316
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2317
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2318
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2319
          x.write(oprot);
2320
          oprot.writeMessageEnd();
2321
          oprot.getTransport().flush();
2322
          return;
2323
        }
2324
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2325
        result.write(oprot);
2326
        oprot.writeMessageEnd();
2327
        oprot.getTransport().flush();
2328
      }
2329
 
2330
    }
2331
 
1114 chandransh 2332
    private class markOrdersAsPickedUp implements ProcessFunction {
2333
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2334
      {
2335
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2336
        args.read(iprot);
2337
        iprot.readMessageEnd();
2338
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2339
        try {
2340
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2341
        } catch (TransactionServiceException ex) {
2342
          result.ex = ex;
2343
        } catch (Throwable th) {
2344
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2345
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2346
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2347
          x.write(oprot);
2348
          oprot.writeMessageEnd();
2349
          oprot.getTransport().flush();
2350
          return;
2351
        }
2352
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2353
        result.write(oprot);
2354
        oprot.writeMessageEnd();
2355
        oprot.getTransport().flush();
2356
      }
2357
 
2358
    }
2359
 
1133 chandransh 2360
    private class markOrdersAsDelivered implements ProcessFunction {
2361
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2362
      {
2363
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2364
        args.read(iprot);
2365
        iprot.readMessageEnd();
2366
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2367
        try {
2368
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2369
        } catch (TransactionServiceException ex) {
2370
          result.ex = ex;
2371
        } catch (Throwable th) {
2372
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2373
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2374
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2375
          x.write(oprot);
2376
          oprot.writeMessageEnd();
2377
          oprot.getTransport().flush();
2378
          return;
2379
        }
2380
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2381
        result.write(oprot);
2382
        oprot.writeMessageEnd();
2383
        oprot.getTransport().flush();
2384
      }
2385
 
2386
    }
2387
 
2388
    private class markOrdersAsFailed implements ProcessFunction {
2389
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2390
      {
2391
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2392
        args.read(iprot);
2393
        iprot.readMessageEnd();
2394
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2395
        try {
2396
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2397
        } catch (TransactionServiceException ex) {
2398
          result.ex = ex;
2399
        } catch (Throwable th) {
2400
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2401
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2402
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2403
          x.write(oprot);
2404
          oprot.writeMessageEnd();
2405
          oprot.getTransport().flush();
2406
          return;
2407
        }
2408
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2409
        result.write(oprot);
2410
        oprot.writeMessageEnd();
2411
        oprot.getTransport().flush();
2412
      }
2413
 
2414
    }
2415
 
1245 chandransh 2416
    private class updateNonDeliveryReason implements ProcessFunction {
2417
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2418
      {
2419
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2420
        args.read(iprot);
2421
        iprot.readMessageEnd();
2422
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2423
        try {
2424
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2425
        } catch (TransactionServiceException ex) {
2426
          result.ex = ex;
2427
        } catch (Throwable th) {
2428
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2429
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2430
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2431
          x.write(oprot);
2432
          oprot.writeMessageEnd();
2433
          oprot.getTransport().flush();
2434
          return;
2435
        }
2436
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2437
        result.write(oprot);
2438
        oprot.writeMessageEnd();
2439
        oprot.getTransport().flush();
2440
      }
2441
 
2442
    }
2443
 
1406 ankur.sing 2444
    private class getUndeliveredOrders implements ProcessFunction {
2445
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2446
      {
2447
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2448
        args.read(iprot);
2449
        iprot.readMessageEnd();
2450
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2451
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2452
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2453
        result.write(oprot);
2454
        oprot.writeMessageEnd();
2455
        oprot.getTransport().flush();
2456
      }
2457
 
2458
    }
2459
 
305 ashish 2460
    private class getAlerts implements ProcessFunction {
2461
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2462
      {
2463
        getAlerts_args args = new getAlerts_args();
2464
        args.read(iprot);
2465
        iprot.readMessageEnd();
2466
        getAlerts_result result = new getAlerts_result();
483 rajveer 2467
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2468
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2469
        result.write(oprot);
2470
        oprot.writeMessageEnd();
2471
        oprot.getTransport().flush();
2472
      }
2473
 
2474
    }
2475
 
2476
    private class setAlert implements ProcessFunction {
2477
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2478
      {
2479
        setAlert_args args = new setAlert_args();
2480
        args.read(iprot);
2481
        iprot.readMessageEnd();
2482
        setAlert_result result = new setAlert_result();
483 rajveer 2483
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2484
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2485
        result.write(oprot);
2486
        oprot.writeMessageEnd();
2487
        oprot.getTransport().flush();
2488
      }
2489
 
2490
    }
2491
 
1598 ankur.sing 2492
    private class getValidOrderCount implements ProcessFunction {
2493
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2494
      {
2495
        getValidOrderCount_args args = new getValidOrderCount_args();
2496
        args.read(iprot);
2497
        iprot.readMessageEnd();
2498
        getValidOrderCount_result result = new getValidOrderCount_result();
2499
        result.success = iface_.getValidOrderCount();
2500
        result.setSuccessIsSet(true);
2501
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
2502
        result.write(oprot);
2503
        oprot.writeMessageEnd();
2504
        oprot.getTransport().flush();
2505
      }
2506
 
2507
    }
2508
 
1629 ankur.sing 2509
    private class getNoOfCustomersWithSuccessfulTransaction implements ProcessFunction {
2510
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2511
      {
2512
        getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
2513
        args.read(iprot);
2514
        iprot.readMessageEnd();
2515
        getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
2516
        result.success = iface_.getNoOfCustomersWithSuccessfulTransaction();
2517
        result.setSuccessIsSet(true);
2518
        oprot.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid));
2519
        result.write(oprot);
2520
        oprot.writeMessageEnd();
2521
        oprot.getTransport().flush();
2522
      }
2523
 
2524
    }
2525
 
1731 ankur.sing 2526
    private class getValidOrdersAmountRange implements ProcessFunction {
1629 ankur.sing 2527
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2528
      {
1731 ankur.sing 2529
        getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 2530
        args.read(iprot);
2531
        iprot.readMessageEnd();
1731 ankur.sing 2532
        getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
2533
        result.success = iface_.getValidOrdersAmountRange();
2534
        oprot.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 2535
        result.write(oprot);
2536
        oprot.writeMessageEnd();
2537
        oprot.getTransport().flush();
2538
      }
2539
 
2540
    }
2541
 
68 ashish 2542
  }
2543
 
764 rajveer 2544
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2545
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2546
 
2547
 
2548
 
2549
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2550
    public enum _Fields implements TFieldIdEnum {
2551
;
2552
 
2553
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2554
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2555
 
2556
      static {
2557
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2558
          byId.put((int)field._thriftId, field);
2559
          byName.put(field.getFieldName(), field);
2560
        }
2561
      }
2562
 
2563
      /**
2564
       * Find the _Fields constant that matches fieldId, or null if its not found.
2565
       */
2566
      public static _Fields findByThriftId(int fieldId) {
2567
        return byId.get(fieldId);
2568
      }
2569
 
2570
      /**
2571
       * Find the _Fields constant that matches fieldId, throwing an exception
2572
       * if it is not found.
2573
       */
2574
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2575
        _Fields fields = findByThriftId(fieldId);
2576
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2577
        return fields;
2578
      }
2579
 
2580
      /**
2581
       * Find the _Fields constant that matches name, or null if its not found.
2582
       */
2583
      public static _Fields findByName(String name) {
2584
        return byName.get(name);
2585
      }
2586
 
2587
      private final short _thriftId;
2588
      private final String _fieldName;
2589
 
2590
      _Fields(short thriftId, String fieldName) {
2591
        _thriftId = thriftId;
2592
        _fieldName = fieldName;
2593
      }
2594
 
2595
      public short getThriftFieldId() {
2596
        return _thriftId;
2597
      }
2598
 
2599
      public String getFieldName() {
2600
        return _fieldName;
2601
      }
2602
    }
2603
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2604
    }});
2605
 
2606
    static {
2607
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2608
    }
2609
 
2610
    public closeSession_args() {
2611
    }
2612
 
2613
    /**
2614
     * Performs a deep copy on <i>other</i>.
2615
     */
2616
    public closeSession_args(closeSession_args other) {
2617
    }
2618
 
2619
    public closeSession_args deepCopy() {
2620
      return new closeSession_args(this);
2621
    }
2622
 
2623
    @Deprecated
2624
    public closeSession_args clone() {
2625
      return new closeSession_args(this);
2626
    }
2627
 
2628
    public void setFieldValue(_Fields field, Object value) {
2629
      switch (field) {
2630
      }
2631
    }
2632
 
2633
    public void setFieldValue(int fieldID, Object value) {
2634
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2635
    }
2636
 
2637
    public Object getFieldValue(_Fields field) {
2638
      switch (field) {
2639
      }
2640
      throw new IllegalStateException();
2641
    }
2642
 
2643
    public Object getFieldValue(int fieldId) {
2644
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2645
    }
2646
 
2647
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2648
    public boolean isSet(_Fields field) {
2649
      switch (field) {
2650
      }
2651
      throw new IllegalStateException();
2652
    }
2653
 
2654
    public boolean isSet(int fieldID) {
2655
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2656
    }
2657
 
2658
    @Override
2659
    public boolean equals(Object that) {
2660
      if (that == null)
2661
        return false;
2662
      if (that instanceof closeSession_args)
2663
        return this.equals((closeSession_args)that);
2664
      return false;
2665
    }
2666
 
2667
    public boolean equals(closeSession_args that) {
2668
      if (that == null)
2669
        return false;
2670
 
2671
      return true;
2672
    }
2673
 
2674
    @Override
2675
    public int hashCode() {
2676
      return 0;
2677
    }
2678
 
2679
    public int compareTo(closeSession_args other) {
2680
      if (!getClass().equals(other.getClass())) {
2681
        return getClass().getName().compareTo(other.getClass().getName());
2682
      }
2683
 
2684
      int lastComparison = 0;
2685
      closeSession_args typedOther = (closeSession_args)other;
2686
 
2687
      return 0;
2688
    }
2689
 
2690
    public void read(TProtocol iprot) throws TException {
2691
      TField field;
2692
      iprot.readStructBegin();
2693
      while (true)
2694
      {
2695
        field = iprot.readFieldBegin();
2696
        if (field.type == TType.STOP) { 
2697
          break;
2698
        }
2699
        _Fields fieldId = _Fields.findByThriftId(field.id);
2700
        if (fieldId == null) {
2701
          TProtocolUtil.skip(iprot, field.type);
2702
        } else {
2703
          switch (fieldId) {
2704
          }
2705
          iprot.readFieldEnd();
2706
        }
2707
      }
2708
      iprot.readStructEnd();
2709
      validate();
2710
    }
2711
 
2712
    public void write(TProtocol oprot) throws TException {
2713
      validate();
2714
 
2715
      oprot.writeStructBegin(STRUCT_DESC);
2716
      oprot.writeFieldStop();
2717
      oprot.writeStructEnd();
2718
    }
2719
 
2720
    @Override
2721
    public String toString() {
2722
      StringBuilder sb = new StringBuilder("closeSession_args(");
2723
      boolean first = true;
2724
 
2725
      sb.append(")");
2726
      return sb.toString();
2727
    }
2728
 
2729
    public void validate() throws TException {
2730
      // check for required fields
2731
    }
2732
 
2733
  }
2734
 
2735
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2736
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2737
 
2738
 
2739
 
2740
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2741
    public enum _Fields implements TFieldIdEnum {
2742
;
2743
 
2744
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2745
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2746
 
2747
      static {
2748
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2749
          byId.put((int)field._thriftId, field);
2750
          byName.put(field.getFieldName(), field);
2751
        }
2752
      }
2753
 
2754
      /**
2755
       * Find the _Fields constant that matches fieldId, or null if its not found.
2756
       */
2757
      public static _Fields findByThriftId(int fieldId) {
2758
        return byId.get(fieldId);
2759
      }
2760
 
2761
      /**
2762
       * Find the _Fields constant that matches fieldId, throwing an exception
2763
       * if it is not found.
2764
       */
2765
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2766
        _Fields fields = findByThriftId(fieldId);
2767
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2768
        return fields;
2769
      }
2770
 
2771
      /**
2772
       * Find the _Fields constant that matches name, or null if its not found.
2773
       */
2774
      public static _Fields findByName(String name) {
2775
        return byName.get(name);
2776
      }
2777
 
2778
      private final short _thriftId;
2779
      private final String _fieldName;
2780
 
2781
      _Fields(short thriftId, String fieldName) {
2782
        _thriftId = thriftId;
2783
        _fieldName = fieldName;
2784
      }
2785
 
2786
      public short getThriftFieldId() {
2787
        return _thriftId;
2788
      }
2789
 
2790
      public String getFieldName() {
2791
        return _fieldName;
2792
      }
2793
    }
2794
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2795
    }});
2796
 
2797
    static {
2798
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2799
    }
2800
 
2801
    public closeSession_result() {
2802
    }
2803
 
2804
    /**
2805
     * Performs a deep copy on <i>other</i>.
2806
     */
2807
    public closeSession_result(closeSession_result other) {
2808
    }
2809
 
2810
    public closeSession_result deepCopy() {
2811
      return new closeSession_result(this);
2812
    }
2813
 
2814
    @Deprecated
2815
    public closeSession_result clone() {
2816
      return new closeSession_result(this);
2817
    }
2818
 
2819
    public void setFieldValue(_Fields field, Object value) {
2820
      switch (field) {
2821
      }
2822
    }
2823
 
2824
    public void setFieldValue(int fieldID, Object value) {
2825
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2826
    }
2827
 
2828
    public Object getFieldValue(_Fields field) {
2829
      switch (field) {
2830
      }
2831
      throw new IllegalStateException();
2832
    }
2833
 
2834
    public Object getFieldValue(int fieldId) {
2835
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2836
    }
2837
 
2838
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2839
    public boolean isSet(_Fields field) {
2840
      switch (field) {
2841
      }
2842
      throw new IllegalStateException();
2843
    }
2844
 
2845
    public boolean isSet(int fieldID) {
2846
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2847
    }
2848
 
2849
    @Override
2850
    public boolean equals(Object that) {
2851
      if (that == null)
2852
        return false;
2853
      if (that instanceof closeSession_result)
2854
        return this.equals((closeSession_result)that);
2855
      return false;
2856
    }
2857
 
2858
    public boolean equals(closeSession_result that) {
2859
      if (that == null)
2860
        return false;
2861
 
2862
      return true;
2863
    }
2864
 
2865
    @Override
2866
    public int hashCode() {
2867
      return 0;
2868
    }
2869
 
2870
    public int compareTo(closeSession_result other) {
2871
      if (!getClass().equals(other.getClass())) {
2872
        return getClass().getName().compareTo(other.getClass().getName());
2873
      }
2874
 
2875
      int lastComparison = 0;
2876
      closeSession_result typedOther = (closeSession_result)other;
2877
 
2878
      return 0;
2879
    }
2880
 
2881
    public void read(TProtocol iprot) throws TException {
2882
      TField field;
2883
      iprot.readStructBegin();
2884
      while (true)
2885
      {
2886
        field = iprot.readFieldBegin();
2887
        if (field.type == TType.STOP) { 
2888
          break;
2889
        }
2890
        _Fields fieldId = _Fields.findByThriftId(field.id);
2891
        if (fieldId == null) {
2892
          TProtocolUtil.skip(iprot, field.type);
2893
        } else {
2894
          switch (fieldId) {
2895
          }
2896
          iprot.readFieldEnd();
2897
        }
2898
      }
2899
      iprot.readStructEnd();
2900
      validate();
2901
    }
2902
 
2903
    public void write(TProtocol oprot) throws TException {
2904
      oprot.writeStructBegin(STRUCT_DESC);
2905
 
2906
      oprot.writeFieldStop();
2907
      oprot.writeStructEnd();
2908
    }
2909
 
2910
    @Override
2911
    public String toString() {
2912
      StringBuilder sb = new StringBuilder("closeSession_result(");
2913
      boolean first = true;
2914
 
2915
      sb.append(")");
2916
      return sb.toString();
2917
    }
2918
 
2919
    public void validate() throws TException {
2920
      // check for required fields
2921
    }
2922
 
2923
  }
2924
 
684 chandransh 2925
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2926
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2927
 
2928
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2929
 
2930
    private Transaction transaction;
2931
 
2932
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2933
    public enum _Fields implements TFieldIdEnum {
2934
      TRANSACTION((short)1, "transaction");
2935
 
2936
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2937
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2938
 
2939
      static {
2940
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2941
          byId.put((int)field._thriftId, field);
2942
          byName.put(field.getFieldName(), field);
2943
        }
2944
      }
2945
 
2946
      /**
2947
       * Find the _Fields constant that matches fieldId, or null if its not found.
2948
       */
2949
      public static _Fields findByThriftId(int fieldId) {
2950
        return byId.get(fieldId);
2951
      }
2952
 
2953
      /**
2954
       * Find the _Fields constant that matches fieldId, throwing an exception
2955
       * if it is not found.
2956
       */
2957
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2958
        _Fields fields = findByThriftId(fieldId);
2959
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2960
        return fields;
2961
      }
2962
 
2963
      /**
2964
       * Find the _Fields constant that matches name, or null if its not found.
2965
       */
2966
      public static _Fields findByName(String name) {
2967
        return byName.get(name);
2968
      }
2969
 
2970
      private final short _thriftId;
2971
      private final String _fieldName;
2972
 
2973
      _Fields(short thriftId, String fieldName) {
2974
        _thriftId = thriftId;
2975
        _fieldName = fieldName;
2976
      }
2977
 
2978
      public short getThriftFieldId() {
2979
        return _thriftId;
2980
      }
2981
 
2982
      public String getFieldName() {
2983
        return _fieldName;
2984
      }
2985
    }
2986
 
2987
    // isset id assignments
2988
 
2989
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2990
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2991
          new StructMetaData(TType.STRUCT, Transaction.class)));
2992
    }});
2993
 
2994
    static {
2995
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2996
    }
2997
 
2998
    public createTransaction_args() {
2999
    }
3000
 
3001
    public createTransaction_args(
3002
      Transaction transaction)
3003
    {
3004
      this();
3005
      this.transaction = transaction;
3006
    }
3007
 
3008
    /**
3009
     * Performs a deep copy on <i>other</i>.
3010
     */
3011
    public createTransaction_args(createTransaction_args other) {
3012
      if (other.isSetTransaction()) {
3013
        this.transaction = new Transaction(other.transaction);
3014
      }
3015
    }
3016
 
3017
    public createTransaction_args deepCopy() {
3018
      return new createTransaction_args(this);
3019
    }
3020
 
3021
    @Deprecated
3022
    public createTransaction_args clone() {
3023
      return new createTransaction_args(this);
3024
    }
3025
 
3026
    public Transaction getTransaction() {
3027
      return this.transaction;
3028
    }
3029
 
3030
    public createTransaction_args setTransaction(Transaction transaction) {
3031
      this.transaction = transaction;
3032
      return this;
3033
    }
3034
 
3035
    public void unsetTransaction() {
3036
      this.transaction = null;
3037
    }
3038
 
3039
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
3040
    public boolean isSetTransaction() {
3041
      return this.transaction != null;
3042
    }
3043
 
3044
    public void setTransactionIsSet(boolean value) {
3045
      if (!value) {
3046
        this.transaction = null;
3047
      }
3048
    }
3049
 
3050
    public void setFieldValue(_Fields field, Object value) {
3051
      switch (field) {
3052
      case TRANSACTION:
3053
        if (value == null) {
3054
          unsetTransaction();
3055
        } else {
3056
          setTransaction((Transaction)value);
3057
        }
3058
        break;
3059
 
3060
      }
3061
    }
3062
 
3063
    public void setFieldValue(int fieldID, Object value) {
3064
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3065
    }
3066
 
3067
    public Object getFieldValue(_Fields field) {
3068
      switch (field) {
3069
      case TRANSACTION:
3070
        return getTransaction();
3071
 
3072
      }
3073
      throw new IllegalStateException();
3074
    }
3075
 
3076
    public Object getFieldValue(int fieldId) {
3077
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3078
    }
3079
 
3080
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3081
    public boolean isSet(_Fields field) {
3082
      switch (field) {
3083
      case TRANSACTION:
3084
        return isSetTransaction();
3085
      }
3086
      throw new IllegalStateException();
3087
    }
3088
 
3089
    public boolean isSet(int fieldID) {
3090
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3091
    }
3092
 
3093
    @Override
3094
    public boolean equals(Object that) {
3095
      if (that == null)
3096
        return false;
3097
      if (that instanceof createTransaction_args)
3098
        return this.equals((createTransaction_args)that);
3099
      return false;
3100
    }
3101
 
3102
    public boolean equals(createTransaction_args that) {
3103
      if (that == null)
3104
        return false;
3105
 
3106
      boolean this_present_transaction = true && this.isSetTransaction();
3107
      boolean that_present_transaction = true && that.isSetTransaction();
3108
      if (this_present_transaction || that_present_transaction) {
3109
        if (!(this_present_transaction && that_present_transaction))
3110
          return false;
3111
        if (!this.transaction.equals(that.transaction))
3112
          return false;
3113
      }
3114
 
3115
      return true;
3116
    }
3117
 
3118
    @Override
3119
    public int hashCode() {
3120
      return 0;
3121
    }
3122
 
684 chandransh 3123
    public int compareTo(createTransaction_args other) {
3124
      if (!getClass().equals(other.getClass())) {
3125
        return getClass().getName().compareTo(other.getClass().getName());
3126
      }
3127
 
3128
      int lastComparison = 0;
3129
      createTransaction_args typedOther = (createTransaction_args)other;
3130
 
3131
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
3132
      if (lastComparison != 0) {
3133
        return lastComparison;
3134
      }
3135
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
3136
      if (lastComparison != 0) {
3137
        return lastComparison;
3138
      }
3139
      return 0;
3140
    }
3141
 
68 ashish 3142
    public void read(TProtocol iprot) throws TException {
3143
      TField field;
3144
      iprot.readStructBegin();
3145
      while (true)
3146
      {
3147
        field = iprot.readFieldBegin();
3148
        if (field.type == TType.STOP) { 
3149
          break;
3150
        }
3151
        _Fields fieldId = _Fields.findByThriftId(field.id);
3152
        if (fieldId == null) {
3153
          TProtocolUtil.skip(iprot, field.type);
3154
        } else {
3155
          switch (fieldId) {
3156
            case TRANSACTION:
3157
              if (field.type == TType.STRUCT) {
3158
                this.transaction = new Transaction();
3159
                this.transaction.read(iprot);
3160
              } else { 
3161
                TProtocolUtil.skip(iprot, field.type);
3162
              }
3163
              break;
3164
          }
3165
          iprot.readFieldEnd();
3166
        }
3167
      }
3168
      iprot.readStructEnd();
3169
      validate();
3170
    }
3171
 
3172
    public void write(TProtocol oprot) throws TException {
3173
      validate();
3174
 
3175
      oprot.writeStructBegin(STRUCT_DESC);
3176
      if (this.transaction != null) {
3177
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
3178
        this.transaction.write(oprot);
3179
        oprot.writeFieldEnd();
3180
      }
3181
      oprot.writeFieldStop();
3182
      oprot.writeStructEnd();
3183
    }
3184
 
3185
    @Override
3186
    public String toString() {
3187
      StringBuilder sb = new StringBuilder("createTransaction_args(");
3188
      boolean first = true;
3189
 
3190
      sb.append("transaction:");
3191
      if (this.transaction == null) {
3192
        sb.append("null");
3193
      } else {
3194
        sb.append(this.transaction);
3195
      }
3196
      first = false;
3197
      sb.append(")");
3198
      return sb.toString();
3199
    }
3200
 
3201
    public void validate() throws TException {
3202
      // check for required fields
3203
    }
3204
 
3205
  }
3206
 
3207
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
3208
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
3209
 
132 ashish 3210
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 3211
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3212
 
132 ashish 3213
    private long success;
68 ashish 3214
    private TransactionServiceException ex;
3215
 
3216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3217
    public enum _Fields implements TFieldIdEnum {
132 ashish 3218
      SUCCESS((short)0, "success"),
68 ashish 3219
      EX((short)1, "ex");
3220
 
3221
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3222
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3223
 
3224
      static {
3225
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3226
          byId.put((int)field._thriftId, field);
3227
          byName.put(field.getFieldName(), field);
3228
        }
3229
      }
3230
 
3231
      /**
3232
       * Find the _Fields constant that matches fieldId, or null if its not found.
3233
       */
3234
      public static _Fields findByThriftId(int fieldId) {
3235
        return byId.get(fieldId);
3236
      }
3237
 
3238
      /**
3239
       * Find the _Fields constant that matches fieldId, throwing an exception
3240
       * if it is not found.
3241
       */
3242
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3243
        _Fields fields = findByThriftId(fieldId);
3244
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3245
        return fields;
3246
      }
3247
 
3248
      /**
3249
       * Find the _Fields constant that matches name, or null if its not found.
3250
       */
3251
      public static _Fields findByName(String name) {
3252
        return byName.get(name);
3253
      }
3254
 
3255
      private final short _thriftId;
3256
      private final String _fieldName;
3257
 
3258
      _Fields(short thriftId, String fieldName) {
3259
        _thriftId = thriftId;
3260
        _fieldName = fieldName;
3261
      }
3262
 
3263
      public short getThriftFieldId() {
3264
        return _thriftId;
3265
      }
3266
 
3267
      public String getFieldName() {
3268
        return _fieldName;
3269
      }
3270
    }
3271
 
3272
    // isset id assignments
132 ashish 3273
    private static final int __SUCCESS_ISSET_ID = 0;
3274
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3275
 
3276
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3277
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3278
          new FieldValueMetaData(TType.I64)));
68 ashish 3279
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3280
          new FieldValueMetaData(TType.STRUCT)));
3281
    }});
3282
 
3283
    static {
3284
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3285
    }
3286
 
3287
    public createTransaction_result() {
3288
    }
3289
 
3290
    public createTransaction_result(
132 ashish 3291
      long success,
68 ashish 3292
      TransactionServiceException ex)
3293
    {
3294
      this();
132 ashish 3295
      this.success = success;
3296
      setSuccessIsSet(true);
68 ashish 3297
      this.ex = ex;
3298
    }
3299
 
3300
    /**
3301
     * Performs a deep copy on <i>other</i>.
3302
     */
3303
    public createTransaction_result(createTransaction_result other) {
132 ashish 3304
      __isset_bit_vector.clear();
3305
      __isset_bit_vector.or(other.__isset_bit_vector);
3306
      this.success = other.success;
68 ashish 3307
      if (other.isSetEx()) {
3308
        this.ex = new TransactionServiceException(other.ex);
3309
      }
3310
    }
3311
 
3312
    public createTransaction_result deepCopy() {
3313
      return new createTransaction_result(this);
3314
    }
3315
 
3316
    @Deprecated
3317
    public createTransaction_result clone() {
3318
      return new createTransaction_result(this);
3319
    }
3320
 
132 ashish 3321
    public long getSuccess() {
3322
      return this.success;
3323
    }
3324
 
3325
    public createTransaction_result setSuccess(long success) {
3326
      this.success = success;
3327
      setSuccessIsSet(true);
3328
      return this;
3329
    }
3330
 
3331
    public void unsetSuccess() {
3332
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3333
    }
3334
 
3335
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3336
    public boolean isSetSuccess() {
3337
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3338
    }
3339
 
3340
    public void setSuccessIsSet(boolean value) {
3341
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3342
    }
3343
 
68 ashish 3344
    public TransactionServiceException getEx() {
3345
      return this.ex;
3346
    }
3347
 
3348
    public createTransaction_result setEx(TransactionServiceException ex) {
3349
      this.ex = ex;
3350
      return this;
3351
    }
3352
 
3353
    public void unsetEx() {
3354
      this.ex = null;
3355
    }
3356
 
3357
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3358
    public boolean isSetEx() {
3359
      return this.ex != null;
3360
    }
3361
 
3362
    public void setExIsSet(boolean value) {
3363
      if (!value) {
3364
        this.ex = null;
3365
      }
3366
    }
3367
 
3368
    public void setFieldValue(_Fields field, Object value) {
3369
      switch (field) {
132 ashish 3370
      case SUCCESS:
3371
        if (value == null) {
3372
          unsetSuccess();
3373
        } else {
3374
          setSuccess((Long)value);
3375
        }
3376
        break;
3377
 
68 ashish 3378
      case EX:
3379
        if (value == null) {
3380
          unsetEx();
3381
        } else {
3382
          setEx((TransactionServiceException)value);
3383
        }
3384
        break;
3385
 
3386
      }
3387
    }
3388
 
3389
    public void setFieldValue(int fieldID, Object value) {
3390
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3391
    }
3392
 
3393
    public Object getFieldValue(_Fields field) {
3394
      switch (field) {
132 ashish 3395
      case SUCCESS:
3396
        return new Long(getSuccess());
3397
 
68 ashish 3398
      case EX:
3399
        return getEx();
3400
 
3401
      }
3402
      throw new IllegalStateException();
3403
    }
3404
 
3405
    public Object getFieldValue(int fieldId) {
3406
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3407
    }
3408
 
3409
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3410
    public boolean isSet(_Fields field) {
3411
      switch (field) {
132 ashish 3412
      case SUCCESS:
3413
        return isSetSuccess();
68 ashish 3414
      case EX:
3415
        return isSetEx();
3416
      }
3417
      throw new IllegalStateException();
3418
    }
3419
 
3420
    public boolean isSet(int fieldID) {
3421
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3422
    }
3423
 
3424
    @Override
3425
    public boolean equals(Object that) {
3426
      if (that == null)
3427
        return false;
3428
      if (that instanceof createTransaction_result)
3429
        return this.equals((createTransaction_result)that);
3430
      return false;
3431
    }
3432
 
3433
    public boolean equals(createTransaction_result that) {
3434
      if (that == null)
3435
        return false;
3436
 
132 ashish 3437
      boolean this_present_success = true;
3438
      boolean that_present_success = true;
3439
      if (this_present_success || that_present_success) {
3440
        if (!(this_present_success && that_present_success))
3441
          return false;
3442
        if (this.success != that.success)
3443
          return false;
3444
      }
3445
 
68 ashish 3446
      boolean this_present_ex = true && this.isSetEx();
3447
      boolean that_present_ex = true && that.isSetEx();
3448
      if (this_present_ex || that_present_ex) {
3449
        if (!(this_present_ex && that_present_ex))
3450
          return false;
3451
        if (!this.ex.equals(that.ex))
3452
          return false;
3453
      }
3454
 
3455
      return true;
3456
    }
3457
 
3458
    @Override
3459
    public int hashCode() {
3460
      return 0;
3461
    }
3462
 
3463
    public int compareTo(createTransaction_result other) {
3464
      if (!getClass().equals(other.getClass())) {
3465
        return getClass().getName().compareTo(other.getClass().getName());
3466
      }
3467
 
3468
      int lastComparison = 0;
3469
      createTransaction_result typedOther = (createTransaction_result)other;
3470
 
132 ashish 3471
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3472
      if (lastComparison != 0) {
3473
        return lastComparison;
3474
      }
3475
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3476
      if (lastComparison != 0) {
3477
        return lastComparison;
3478
      }
68 ashish 3479
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3480
      if (lastComparison != 0) {
3481
        return lastComparison;
3482
      }
3483
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3484
      if (lastComparison != 0) {
3485
        return lastComparison;
3486
      }
3487
      return 0;
3488
    }
3489
 
3490
    public void read(TProtocol iprot) throws TException {
3491
      TField field;
3492
      iprot.readStructBegin();
3493
      while (true)
3494
      {
3495
        field = iprot.readFieldBegin();
3496
        if (field.type == TType.STOP) { 
3497
          break;
3498
        }
3499
        _Fields fieldId = _Fields.findByThriftId(field.id);
3500
        if (fieldId == null) {
3501
          TProtocolUtil.skip(iprot, field.type);
3502
        } else {
3503
          switch (fieldId) {
132 ashish 3504
            case SUCCESS:
3505
              if (field.type == TType.I64) {
3506
                this.success = iprot.readI64();
3507
                setSuccessIsSet(true);
3508
              } else { 
3509
                TProtocolUtil.skip(iprot, field.type);
3510
              }
3511
              break;
68 ashish 3512
            case EX:
3513
              if (field.type == TType.STRUCT) {
3514
                this.ex = new TransactionServiceException();
3515
                this.ex.read(iprot);
3516
              } else { 
3517
                TProtocolUtil.skip(iprot, field.type);
3518
              }
3519
              break;
3520
          }
3521
          iprot.readFieldEnd();
3522
        }
3523
      }
3524
      iprot.readStructEnd();
3525
      validate();
3526
    }
3527
 
3528
    public void write(TProtocol oprot) throws TException {
3529
      oprot.writeStructBegin(STRUCT_DESC);
3530
 
132 ashish 3531
      if (this.isSetSuccess()) {
3532
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3533
        oprot.writeI64(this.success);
3534
        oprot.writeFieldEnd();
3535
      } else if (this.isSetEx()) {
68 ashish 3536
        oprot.writeFieldBegin(EX_FIELD_DESC);
3537
        this.ex.write(oprot);
3538
        oprot.writeFieldEnd();
3539
      }
3540
      oprot.writeFieldStop();
3541
      oprot.writeStructEnd();
3542
    }
3543
 
3544
    @Override
3545
    public String toString() {
3546
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3547
      boolean first = true;
3548
 
132 ashish 3549
      sb.append("success:");
3550
      sb.append(this.success);
3551
      first = false;
3552
      if (!first) sb.append(", ");
68 ashish 3553
      sb.append("ex:");
3554
      if (this.ex == null) {
3555
        sb.append("null");
3556
      } else {
3557
        sb.append(this.ex);
3558
      }
3559
      first = false;
3560
      sb.append(")");
3561
      return sb.toString();
3562
    }
3563
 
3564
    public void validate() throws TException {
3565
      // check for required fields
3566
    }
3567
 
3568
  }
3569
 
3570
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3571
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3572
 
3573
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3574
 
3575
    private long id;
3576
 
3577
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3578
    public enum _Fields implements TFieldIdEnum {
3579
      ID((short)1, "id");
3580
 
3581
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3582
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3583
 
3584
      static {
3585
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3586
          byId.put((int)field._thriftId, field);
3587
          byName.put(field.getFieldName(), field);
3588
        }
3589
      }
3590
 
3591
      /**
3592
       * Find the _Fields constant that matches fieldId, or null if its not found.
3593
       */
3594
      public static _Fields findByThriftId(int fieldId) {
3595
        return byId.get(fieldId);
3596
      }
3597
 
3598
      /**
3599
       * Find the _Fields constant that matches fieldId, throwing an exception
3600
       * if it is not found.
3601
       */
3602
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3603
        _Fields fields = findByThriftId(fieldId);
3604
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3605
        return fields;
3606
      }
3607
 
3608
      /**
3609
       * Find the _Fields constant that matches name, or null if its not found.
3610
       */
3611
      public static _Fields findByName(String name) {
3612
        return byName.get(name);
3613
      }
3614
 
3615
      private final short _thriftId;
3616
      private final String _fieldName;
3617
 
3618
      _Fields(short thriftId, String fieldName) {
3619
        _thriftId = thriftId;
3620
        _fieldName = fieldName;
3621
      }
3622
 
3623
      public short getThriftFieldId() {
3624
        return _thriftId;
3625
      }
3626
 
3627
      public String getFieldName() {
3628
        return _fieldName;
3629
      }
3630
    }
3631
 
3632
    // isset id assignments
3633
    private static final int __ID_ISSET_ID = 0;
3634
    private BitSet __isset_bit_vector = new BitSet(1);
3635
 
3636
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3637
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3638
          new FieldValueMetaData(TType.I64)));
3639
    }});
3640
 
3641
    static {
3642
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3643
    }
3644
 
3645
    public getTransaction_args() {
3646
    }
3647
 
3648
    public getTransaction_args(
3649
      long id)
3650
    {
3651
      this();
3652
      this.id = id;
3653
      setIdIsSet(true);
3654
    }
3655
 
3656
    /**
3657
     * Performs a deep copy on <i>other</i>.
3658
     */
3659
    public getTransaction_args(getTransaction_args other) {
3660
      __isset_bit_vector.clear();
3661
      __isset_bit_vector.or(other.__isset_bit_vector);
3662
      this.id = other.id;
3663
    }
3664
 
3665
    public getTransaction_args deepCopy() {
3666
      return new getTransaction_args(this);
3667
    }
3668
 
3669
    @Deprecated
3670
    public getTransaction_args clone() {
3671
      return new getTransaction_args(this);
3672
    }
3673
 
3674
    public long getId() {
3675
      return this.id;
3676
    }
3677
 
3678
    public getTransaction_args setId(long id) {
3679
      this.id = id;
3680
      setIdIsSet(true);
3681
      return this;
3682
    }
3683
 
3684
    public void unsetId() {
3685
      __isset_bit_vector.clear(__ID_ISSET_ID);
3686
    }
3687
 
3688
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3689
    public boolean isSetId() {
3690
      return __isset_bit_vector.get(__ID_ISSET_ID);
3691
    }
3692
 
3693
    public void setIdIsSet(boolean value) {
3694
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3695
    }
3696
 
3697
    public void setFieldValue(_Fields field, Object value) {
3698
      switch (field) {
3699
      case ID:
3700
        if (value == null) {
3701
          unsetId();
3702
        } else {
3703
          setId((Long)value);
3704
        }
3705
        break;
3706
 
3707
      }
3708
    }
3709
 
3710
    public void setFieldValue(int fieldID, Object value) {
3711
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3712
    }
3713
 
3714
    public Object getFieldValue(_Fields field) {
3715
      switch (field) {
3716
      case ID:
3717
        return new Long(getId());
3718
 
3719
      }
3720
      throw new IllegalStateException();
3721
    }
3722
 
3723
    public Object getFieldValue(int fieldId) {
3724
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3725
    }
3726
 
3727
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3728
    public boolean isSet(_Fields field) {
3729
      switch (field) {
3730
      case ID:
3731
        return isSetId();
3732
      }
3733
      throw new IllegalStateException();
3734
    }
3735
 
3736
    public boolean isSet(int fieldID) {
3737
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3738
    }
3739
 
3740
    @Override
3741
    public boolean equals(Object that) {
3742
      if (that == null)
3743
        return false;
3744
      if (that instanceof getTransaction_args)
3745
        return this.equals((getTransaction_args)that);
3746
      return false;
3747
    }
3748
 
3749
    public boolean equals(getTransaction_args that) {
3750
      if (that == null)
3751
        return false;
3752
 
3753
      boolean this_present_id = true;
3754
      boolean that_present_id = true;
3755
      if (this_present_id || that_present_id) {
3756
        if (!(this_present_id && that_present_id))
3757
          return false;
3758
        if (this.id != that.id)
3759
          return false;
3760
      }
3761
 
3762
      return true;
3763
    }
3764
 
3765
    @Override
3766
    public int hashCode() {
3767
      return 0;
3768
    }
3769
 
3770
    public int compareTo(getTransaction_args other) {
3771
      if (!getClass().equals(other.getClass())) {
3772
        return getClass().getName().compareTo(other.getClass().getName());
3773
      }
3774
 
3775
      int lastComparison = 0;
3776
      getTransaction_args typedOther = (getTransaction_args)other;
3777
 
3778
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3779
      if (lastComparison != 0) {
3780
        return lastComparison;
3781
      }
3782
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3783
      if (lastComparison != 0) {
3784
        return lastComparison;
3785
      }
3786
      return 0;
3787
    }
3788
 
3789
    public void read(TProtocol iprot) throws TException {
3790
      TField field;
3791
      iprot.readStructBegin();
3792
      while (true)
3793
      {
3794
        field = iprot.readFieldBegin();
3795
        if (field.type == TType.STOP) { 
3796
          break;
3797
        }
3798
        _Fields fieldId = _Fields.findByThriftId(field.id);
3799
        if (fieldId == null) {
3800
          TProtocolUtil.skip(iprot, field.type);
3801
        } else {
3802
          switch (fieldId) {
3803
            case ID:
3804
              if (field.type == TType.I64) {
3805
                this.id = iprot.readI64();
3806
                setIdIsSet(true);
3807
              } else { 
3808
                TProtocolUtil.skip(iprot, field.type);
3809
              }
3810
              break;
3811
          }
3812
          iprot.readFieldEnd();
3813
        }
3814
      }
3815
      iprot.readStructEnd();
3816
      validate();
3817
    }
3818
 
3819
    public void write(TProtocol oprot) throws TException {
3820
      validate();
3821
 
3822
      oprot.writeStructBegin(STRUCT_DESC);
3823
      oprot.writeFieldBegin(ID_FIELD_DESC);
3824
      oprot.writeI64(this.id);
3825
      oprot.writeFieldEnd();
3826
      oprot.writeFieldStop();
3827
      oprot.writeStructEnd();
3828
    }
3829
 
3830
    @Override
3831
    public String toString() {
3832
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3833
      boolean first = true;
3834
 
3835
      sb.append("id:");
3836
      sb.append(this.id);
3837
      first = false;
3838
      sb.append(")");
3839
      return sb.toString();
3840
    }
3841
 
3842
    public void validate() throws TException {
3843
      // check for required fields
3844
    }
3845
 
3846
  }
3847
 
684 chandransh 3848
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3849
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3850
 
3851
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3852
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3853
 
3854
    private Transaction success;
3855
    private TransactionServiceException ex;
3856
 
3857
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3858
    public enum _Fields implements TFieldIdEnum {
3859
      SUCCESS((short)0, "success"),
3860
      EX((short)1, "ex");
3861
 
3862
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3863
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3864
 
3865
      static {
3866
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3867
          byId.put((int)field._thriftId, field);
3868
          byName.put(field.getFieldName(), field);
3869
        }
3870
      }
3871
 
3872
      /**
3873
       * Find the _Fields constant that matches fieldId, or null if its not found.
3874
       */
3875
      public static _Fields findByThriftId(int fieldId) {
3876
        return byId.get(fieldId);
3877
      }
3878
 
3879
      /**
3880
       * Find the _Fields constant that matches fieldId, throwing an exception
3881
       * if it is not found.
3882
       */
3883
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3884
        _Fields fields = findByThriftId(fieldId);
3885
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3886
        return fields;
3887
      }
3888
 
3889
      /**
3890
       * Find the _Fields constant that matches name, or null if its not found.
3891
       */
3892
      public static _Fields findByName(String name) {
3893
        return byName.get(name);
3894
      }
3895
 
3896
      private final short _thriftId;
3897
      private final String _fieldName;
3898
 
3899
      _Fields(short thriftId, String fieldName) {
3900
        _thriftId = thriftId;
3901
        _fieldName = fieldName;
3902
      }
3903
 
3904
      public short getThriftFieldId() {
3905
        return _thriftId;
3906
      }
3907
 
3908
      public String getFieldName() {
3909
        return _fieldName;
3910
      }
3911
    }
3912
 
3913
    // isset id assignments
3914
 
3915
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3916
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3917
          new StructMetaData(TType.STRUCT, Transaction.class)));
3918
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3919
          new FieldValueMetaData(TType.STRUCT)));
3920
    }});
3921
 
3922
    static {
3923
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3924
    }
3925
 
3926
    public getTransaction_result() {
3927
    }
3928
 
3929
    public getTransaction_result(
3930
      Transaction success,
3931
      TransactionServiceException ex)
3932
    {
3933
      this();
3934
      this.success = success;
3935
      this.ex = ex;
3936
    }
3937
 
3938
    /**
3939
     * Performs a deep copy on <i>other</i>.
3940
     */
3941
    public getTransaction_result(getTransaction_result other) {
3942
      if (other.isSetSuccess()) {
3943
        this.success = new Transaction(other.success);
3944
      }
3945
      if (other.isSetEx()) {
3946
        this.ex = new TransactionServiceException(other.ex);
3947
      }
3948
    }
3949
 
3950
    public getTransaction_result deepCopy() {
3951
      return new getTransaction_result(this);
3952
    }
3953
 
3954
    @Deprecated
3955
    public getTransaction_result clone() {
3956
      return new getTransaction_result(this);
3957
    }
3958
 
3959
    public Transaction getSuccess() {
3960
      return this.success;
3961
    }
3962
 
3963
    public getTransaction_result setSuccess(Transaction success) {
3964
      this.success = success;
3965
      return this;
3966
    }
3967
 
3968
    public void unsetSuccess() {
3969
      this.success = null;
3970
    }
3971
 
3972
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3973
    public boolean isSetSuccess() {
3974
      return this.success != null;
3975
    }
3976
 
3977
    public void setSuccessIsSet(boolean value) {
3978
      if (!value) {
3979
        this.success = null;
3980
      }
3981
    }
3982
 
3983
    public TransactionServiceException getEx() {
3984
      return this.ex;
3985
    }
3986
 
3987
    public getTransaction_result setEx(TransactionServiceException ex) {
3988
      this.ex = ex;
3989
      return this;
3990
    }
3991
 
3992
    public void unsetEx() {
3993
      this.ex = null;
3994
    }
3995
 
3996
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3997
    public boolean isSetEx() {
3998
      return this.ex != null;
3999
    }
4000
 
4001
    public void setExIsSet(boolean value) {
4002
      if (!value) {
4003
        this.ex = null;
4004
      }
4005
    }
4006
 
4007
    public void setFieldValue(_Fields field, Object value) {
4008
      switch (field) {
4009
      case SUCCESS:
4010
        if (value == null) {
4011
          unsetSuccess();
4012
        } else {
4013
          setSuccess((Transaction)value);
4014
        }
4015
        break;
4016
 
4017
      case EX:
4018
        if (value == null) {
4019
          unsetEx();
4020
        } else {
4021
          setEx((TransactionServiceException)value);
4022
        }
4023
        break;
4024
 
4025
      }
4026
    }
4027
 
4028
    public void setFieldValue(int fieldID, Object value) {
4029
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4030
    }
4031
 
4032
    public Object getFieldValue(_Fields field) {
4033
      switch (field) {
4034
      case SUCCESS:
4035
        return getSuccess();
4036
 
4037
      case EX:
4038
        return getEx();
4039
 
4040
      }
4041
      throw new IllegalStateException();
4042
    }
4043
 
4044
    public Object getFieldValue(int fieldId) {
4045
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4046
    }
4047
 
4048
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4049
    public boolean isSet(_Fields field) {
4050
      switch (field) {
4051
      case SUCCESS:
4052
        return isSetSuccess();
4053
      case EX:
4054
        return isSetEx();
4055
      }
4056
      throw new IllegalStateException();
4057
    }
4058
 
4059
    public boolean isSet(int fieldID) {
4060
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4061
    }
4062
 
4063
    @Override
4064
    public boolean equals(Object that) {
4065
      if (that == null)
4066
        return false;
4067
      if (that instanceof getTransaction_result)
4068
        return this.equals((getTransaction_result)that);
4069
      return false;
4070
    }
4071
 
4072
    public boolean equals(getTransaction_result that) {
4073
      if (that == null)
4074
        return false;
4075
 
4076
      boolean this_present_success = true && this.isSetSuccess();
4077
      boolean that_present_success = true && that.isSetSuccess();
4078
      if (this_present_success || that_present_success) {
4079
        if (!(this_present_success && that_present_success))
4080
          return false;
4081
        if (!this.success.equals(that.success))
4082
          return false;
4083
      }
4084
 
4085
      boolean this_present_ex = true && this.isSetEx();
4086
      boolean that_present_ex = true && that.isSetEx();
4087
      if (this_present_ex || that_present_ex) {
4088
        if (!(this_present_ex && that_present_ex))
4089
          return false;
4090
        if (!this.ex.equals(that.ex))
4091
          return false;
4092
      }
4093
 
4094
      return true;
4095
    }
4096
 
4097
    @Override
4098
    public int hashCode() {
4099
      return 0;
4100
    }
4101
 
684 chandransh 4102
    public int compareTo(getTransaction_result other) {
4103
      if (!getClass().equals(other.getClass())) {
4104
        return getClass().getName().compareTo(other.getClass().getName());
4105
      }
4106
 
4107
      int lastComparison = 0;
4108
      getTransaction_result typedOther = (getTransaction_result)other;
4109
 
4110
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4111
      if (lastComparison != 0) {
4112
        return lastComparison;
4113
      }
4114
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4115
      if (lastComparison != 0) {
4116
        return lastComparison;
4117
      }
4118
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4119
      if (lastComparison != 0) {
4120
        return lastComparison;
4121
      }
4122
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4123
      if (lastComparison != 0) {
4124
        return lastComparison;
4125
      }
4126
      return 0;
4127
    }
4128
 
68 ashish 4129
    public void read(TProtocol iprot) throws TException {
4130
      TField field;
4131
      iprot.readStructBegin();
4132
      while (true)
4133
      {
4134
        field = iprot.readFieldBegin();
4135
        if (field.type == TType.STOP) { 
4136
          break;
4137
        }
4138
        _Fields fieldId = _Fields.findByThriftId(field.id);
4139
        if (fieldId == null) {
4140
          TProtocolUtil.skip(iprot, field.type);
4141
        } else {
4142
          switch (fieldId) {
4143
            case SUCCESS:
4144
              if (field.type == TType.STRUCT) {
4145
                this.success = new Transaction();
4146
                this.success.read(iprot);
4147
              } else { 
4148
                TProtocolUtil.skip(iprot, field.type);
4149
              }
4150
              break;
4151
            case EX:
4152
              if (field.type == TType.STRUCT) {
4153
                this.ex = new TransactionServiceException();
4154
                this.ex.read(iprot);
4155
              } else { 
4156
                TProtocolUtil.skip(iprot, field.type);
4157
              }
4158
              break;
4159
          }
4160
          iprot.readFieldEnd();
4161
        }
4162
      }
4163
      iprot.readStructEnd();
4164
      validate();
4165
    }
4166
 
4167
    public void write(TProtocol oprot) throws TException {
4168
      oprot.writeStructBegin(STRUCT_DESC);
4169
 
4170
      if (this.isSetSuccess()) {
4171
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4172
        this.success.write(oprot);
4173
        oprot.writeFieldEnd();
4174
      } else if (this.isSetEx()) {
4175
        oprot.writeFieldBegin(EX_FIELD_DESC);
4176
        this.ex.write(oprot);
4177
        oprot.writeFieldEnd();
4178
      }
4179
      oprot.writeFieldStop();
4180
      oprot.writeStructEnd();
4181
    }
4182
 
4183
    @Override
4184
    public String toString() {
4185
      StringBuilder sb = new StringBuilder("getTransaction_result(");
4186
      boolean first = true;
4187
 
4188
      sb.append("success:");
4189
      if (this.success == null) {
4190
        sb.append("null");
4191
      } else {
4192
        sb.append(this.success);
4193
      }
4194
      first = false;
4195
      if (!first) sb.append(", ");
4196
      sb.append("ex:");
4197
      if (this.ex == null) {
4198
        sb.append("null");
4199
      } else {
4200
        sb.append(this.ex);
4201
      }
4202
      first = false;
4203
      sb.append(")");
4204
      return sb.toString();
4205
    }
4206
 
4207
    public void validate() throws TException {
4208
      // check for required fields
4209
    }
4210
 
4211
  }
4212
 
4213
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4214
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4215
 
4216
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4217
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4218
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4219
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4220
 
4221
    private long customerId;
132 ashish 4222
    private long from_date;
4223
    private long to_date;
68 ashish 4224
    private TransactionStatus status;
4225
 
4226
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4227
    public enum _Fields implements TFieldIdEnum {
4228
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4229
      FROM_DATE((short)2, "from_date"),
4230
      TO_DATE((short)3, "to_date"),
68 ashish 4231
      /**
4232
       * 
4233
       * @see TransactionStatus
4234
       */
4235
      STATUS((short)4, "status");
4236
 
4237
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4238
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4239
 
4240
      static {
4241
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4242
          byId.put((int)field._thriftId, field);
4243
          byName.put(field.getFieldName(), field);
4244
        }
4245
      }
4246
 
4247
      /**
4248
       * Find the _Fields constant that matches fieldId, or null if its not found.
4249
       */
4250
      public static _Fields findByThriftId(int fieldId) {
4251
        return byId.get(fieldId);
4252
      }
4253
 
4254
      /**
4255
       * Find the _Fields constant that matches fieldId, throwing an exception
4256
       * if it is not found.
4257
       */
4258
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4259
        _Fields fields = findByThriftId(fieldId);
4260
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4261
        return fields;
4262
      }
4263
 
4264
      /**
4265
       * Find the _Fields constant that matches name, or null if its not found.
4266
       */
4267
      public static _Fields findByName(String name) {
4268
        return byName.get(name);
4269
      }
4270
 
4271
      private final short _thriftId;
4272
      private final String _fieldName;
4273
 
4274
      _Fields(short thriftId, String fieldName) {
4275
        _thriftId = thriftId;
4276
        _fieldName = fieldName;
4277
      }
4278
 
4279
      public short getThriftFieldId() {
4280
        return _thriftId;
4281
      }
4282
 
4283
      public String getFieldName() {
4284
        return _fieldName;
4285
      }
4286
    }
4287
 
4288
    // isset id assignments
4289
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4290
    private static final int __FROM_DATE_ISSET_ID = 1;
4291
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4292
    private BitSet __isset_bit_vector = new BitSet(3);
4293
 
4294
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4295
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4296
          new FieldValueMetaData(TType.I64)));
132 ashish 4297
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4298
          new FieldValueMetaData(TType.I64)));
132 ashish 4299
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4300
          new FieldValueMetaData(TType.I64)));
4301
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4302
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4303
    }});
4304
 
4305
    static {
4306
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4307
    }
4308
 
4309
    public getTransactionsForCustomer_args() {
4310
    }
4311
 
4312
    public getTransactionsForCustomer_args(
4313
      long customerId,
132 ashish 4314
      long from_date,
4315
      long to_date,
68 ashish 4316
      TransactionStatus status)
4317
    {
4318
      this();
4319
      this.customerId = customerId;
4320
      setCustomerIdIsSet(true);
132 ashish 4321
      this.from_date = from_date;
4322
      setFrom_dateIsSet(true);
4323
      this.to_date = to_date;
4324
      setTo_dateIsSet(true);
68 ashish 4325
      this.status = status;
4326
    }
4327
 
4328
    /**
4329
     * Performs a deep copy on <i>other</i>.
4330
     */
4331
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4332
      __isset_bit_vector.clear();
4333
      __isset_bit_vector.or(other.__isset_bit_vector);
4334
      this.customerId = other.customerId;
132 ashish 4335
      this.from_date = other.from_date;
4336
      this.to_date = other.to_date;
68 ashish 4337
      if (other.isSetStatus()) {
4338
        this.status = other.status;
4339
      }
4340
    }
4341
 
4342
    public getTransactionsForCustomer_args deepCopy() {
4343
      return new getTransactionsForCustomer_args(this);
4344
    }
4345
 
4346
    @Deprecated
4347
    public getTransactionsForCustomer_args clone() {
4348
      return new getTransactionsForCustomer_args(this);
4349
    }
4350
 
4351
    public long getCustomerId() {
4352
      return this.customerId;
4353
    }
4354
 
4355
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4356
      this.customerId = customerId;
4357
      setCustomerIdIsSet(true);
4358
      return this;
4359
    }
4360
 
4361
    public void unsetCustomerId() {
4362
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4363
    }
4364
 
4365
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4366
    public boolean isSetCustomerId() {
4367
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4368
    }
4369
 
4370
    public void setCustomerIdIsSet(boolean value) {
4371
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4372
    }
4373
 
132 ashish 4374
    public long getFrom_date() {
4375
      return this.from_date;
68 ashish 4376
    }
4377
 
132 ashish 4378
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4379
      this.from_date = from_date;
4380
      setFrom_dateIsSet(true);
68 ashish 4381
      return this;
4382
    }
4383
 
132 ashish 4384
    public void unsetFrom_date() {
4385
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4386
    }
4387
 
132 ashish 4388
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4389
    public boolean isSetFrom_date() {
4390
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4391
    }
4392
 
132 ashish 4393
    public void setFrom_dateIsSet(boolean value) {
4394
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4395
    }
4396
 
132 ashish 4397
    public long getTo_date() {
4398
      return this.to_date;
68 ashish 4399
    }
4400
 
132 ashish 4401
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4402
      this.to_date = to_date;
4403
      setTo_dateIsSet(true);
68 ashish 4404
      return this;
4405
    }
4406
 
132 ashish 4407
    public void unsetTo_date() {
4408
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4409
    }
4410
 
132 ashish 4411
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4412
    public boolean isSetTo_date() {
4413
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4414
    }
4415
 
132 ashish 4416
    public void setTo_dateIsSet(boolean value) {
4417
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4418
    }
4419
 
4420
    /**
4421
     * 
4422
     * @see TransactionStatus
4423
     */
4424
    public TransactionStatus getStatus() {
4425
      return this.status;
4426
    }
4427
 
4428
    /**
4429
     * 
4430
     * @see TransactionStatus
4431
     */
4432
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4433
      this.status = status;
4434
      return this;
4435
    }
4436
 
4437
    public void unsetStatus() {
4438
      this.status = null;
4439
    }
4440
 
4441
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4442
    public boolean isSetStatus() {
4443
      return this.status != null;
4444
    }
4445
 
4446
    public void setStatusIsSet(boolean value) {
4447
      if (!value) {
4448
        this.status = null;
4449
      }
4450
    }
4451
 
4452
    public void setFieldValue(_Fields field, Object value) {
4453
      switch (field) {
4454
      case CUSTOMER_ID:
4455
        if (value == null) {
4456
          unsetCustomerId();
4457
        } else {
4458
          setCustomerId((Long)value);
4459
        }
4460
        break;
4461
 
132 ashish 4462
      case FROM_DATE:
68 ashish 4463
        if (value == null) {
132 ashish 4464
          unsetFrom_date();
68 ashish 4465
        } else {
132 ashish 4466
          setFrom_date((Long)value);
68 ashish 4467
        }
4468
        break;
4469
 
132 ashish 4470
      case TO_DATE:
68 ashish 4471
        if (value == null) {
132 ashish 4472
          unsetTo_date();
68 ashish 4473
        } else {
132 ashish 4474
          setTo_date((Long)value);
68 ashish 4475
        }
4476
        break;
4477
 
4478
      case STATUS:
4479
        if (value == null) {
4480
          unsetStatus();
4481
        } else {
4482
          setStatus((TransactionStatus)value);
4483
        }
4484
        break;
4485
 
4486
      }
4487
    }
4488
 
4489
    public void setFieldValue(int fieldID, Object value) {
4490
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4491
    }
4492
 
4493
    public Object getFieldValue(_Fields field) {
4494
      switch (field) {
4495
      case CUSTOMER_ID:
4496
        return new Long(getCustomerId());
4497
 
132 ashish 4498
      case FROM_DATE:
4499
        return new Long(getFrom_date());
68 ashish 4500
 
132 ashish 4501
      case TO_DATE:
4502
        return new Long(getTo_date());
68 ashish 4503
 
4504
      case STATUS:
4505
        return getStatus();
4506
 
4507
      }
4508
      throw new IllegalStateException();
4509
    }
4510
 
4511
    public Object getFieldValue(int fieldId) {
4512
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4513
    }
4514
 
4515
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4516
    public boolean isSet(_Fields field) {
4517
      switch (field) {
4518
      case CUSTOMER_ID:
4519
        return isSetCustomerId();
132 ashish 4520
      case FROM_DATE:
4521
        return isSetFrom_date();
4522
      case TO_DATE:
4523
        return isSetTo_date();
68 ashish 4524
      case STATUS:
4525
        return isSetStatus();
4526
      }
4527
      throw new IllegalStateException();
4528
    }
4529
 
4530
    public boolean isSet(int fieldID) {
4531
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4532
    }
4533
 
4534
    @Override
4535
    public boolean equals(Object that) {
4536
      if (that == null)
4537
        return false;
4538
      if (that instanceof getTransactionsForCustomer_args)
4539
        return this.equals((getTransactionsForCustomer_args)that);
4540
      return false;
4541
    }
4542
 
4543
    public boolean equals(getTransactionsForCustomer_args that) {
4544
      if (that == null)
4545
        return false;
4546
 
4547
      boolean this_present_customerId = true;
4548
      boolean that_present_customerId = true;
4549
      if (this_present_customerId || that_present_customerId) {
4550
        if (!(this_present_customerId && that_present_customerId))
4551
          return false;
4552
        if (this.customerId != that.customerId)
4553
          return false;
4554
      }
4555
 
132 ashish 4556
      boolean this_present_from_date = true;
4557
      boolean that_present_from_date = true;
4558
      if (this_present_from_date || that_present_from_date) {
4559
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4560
          return false;
132 ashish 4561
        if (this.from_date != that.from_date)
68 ashish 4562
          return false;
4563
      }
4564
 
132 ashish 4565
      boolean this_present_to_date = true;
4566
      boolean that_present_to_date = true;
4567
      if (this_present_to_date || that_present_to_date) {
4568
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4569
          return false;
132 ashish 4570
        if (this.to_date != that.to_date)
68 ashish 4571
          return false;
4572
      }
4573
 
4574
      boolean this_present_status = true && this.isSetStatus();
4575
      boolean that_present_status = true && that.isSetStatus();
4576
      if (this_present_status || that_present_status) {
4577
        if (!(this_present_status && that_present_status))
4578
          return false;
4579
        if (!this.status.equals(that.status))
4580
          return false;
4581
      }
4582
 
4583
      return true;
4584
    }
4585
 
4586
    @Override
4587
    public int hashCode() {
4588
      return 0;
4589
    }
4590
 
4591
    public int compareTo(getTransactionsForCustomer_args other) {
4592
      if (!getClass().equals(other.getClass())) {
4593
        return getClass().getName().compareTo(other.getClass().getName());
4594
      }
4595
 
4596
      int lastComparison = 0;
4597
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4598
 
4599
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4600
      if (lastComparison != 0) {
4601
        return lastComparison;
4602
      }
4603
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4604
      if (lastComparison != 0) {
4605
        return lastComparison;
4606
      }
132 ashish 4607
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4608
      if (lastComparison != 0) {
4609
        return lastComparison;
4610
      }
132 ashish 4611
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4612
      if (lastComparison != 0) {
4613
        return lastComparison;
4614
      }
132 ashish 4615
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4616
      if (lastComparison != 0) {
4617
        return lastComparison;
4618
      }
132 ashish 4619
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4620
      if (lastComparison != 0) {
4621
        return lastComparison;
4622
      }
4623
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4624
      if (lastComparison != 0) {
4625
        return lastComparison;
4626
      }
4627
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4628
      if (lastComparison != 0) {
4629
        return lastComparison;
4630
      }
4631
      return 0;
4632
    }
4633
 
4634
    public void read(TProtocol iprot) throws TException {
4635
      TField field;
4636
      iprot.readStructBegin();
4637
      while (true)
4638
      {
4639
        field = iprot.readFieldBegin();
4640
        if (field.type == TType.STOP) { 
4641
          break;
4642
        }
4643
        _Fields fieldId = _Fields.findByThriftId(field.id);
4644
        if (fieldId == null) {
4645
          TProtocolUtil.skip(iprot, field.type);
4646
        } else {
4647
          switch (fieldId) {
4648
            case CUSTOMER_ID:
4649
              if (field.type == TType.I64) {
4650
                this.customerId = iprot.readI64();
4651
                setCustomerIdIsSet(true);
4652
              } else { 
4653
                TProtocolUtil.skip(iprot, field.type);
4654
              }
4655
              break;
132 ashish 4656
            case FROM_DATE:
68 ashish 4657
              if (field.type == TType.I64) {
132 ashish 4658
                this.from_date = iprot.readI64();
4659
                setFrom_dateIsSet(true);
68 ashish 4660
              } else { 
4661
                TProtocolUtil.skip(iprot, field.type);
4662
              }
4663
              break;
132 ashish 4664
            case TO_DATE:
68 ashish 4665
              if (field.type == TType.I64) {
132 ashish 4666
                this.to_date = iprot.readI64();
4667
                setTo_dateIsSet(true);
68 ashish 4668
              } else { 
4669
                TProtocolUtil.skip(iprot, field.type);
4670
              }
4671
              break;
4672
            case STATUS:
4673
              if (field.type == TType.I32) {
4674
                this.status = TransactionStatus.findByValue(iprot.readI32());
4675
              } else { 
4676
                TProtocolUtil.skip(iprot, field.type);
4677
              }
4678
              break;
4679
          }
4680
          iprot.readFieldEnd();
4681
        }
4682
      }
4683
      iprot.readStructEnd();
4684
      validate();
4685
    }
4686
 
4687
    public void write(TProtocol oprot) throws TException {
4688
      validate();
4689
 
4690
      oprot.writeStructBegin(STRUCT_DESC);
4691
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4692
      oprot.writeI64(this.customerId);
4693
      oprot.writeFieldEnd();
132 ashish 4694
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4695
      oprot.writeI64(this.from_date);
68 ashish 4696
      oprot.writeFieldEnd();
132 ashish 4697
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4698
      oprot.writeI64(this.to_date);
68 ashish 4699
      oprot.writeFieldEnd();
4700
      if (this.status != null) {
4701
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4702
        oprot.writeI32(this.status.getValue());
4703
        oprot.writeFieldEnd();
4704
      }
4705
      oprot.writeFieldStop();
4706
      oprot.writeStructEnd();
4707
    }
4708
 
4709
    @Override
4710
    public String toString() {
4711
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4712
      boolean first = true;
4713
 
4714
      sb.append("customerId:");
4715
      sb.append(this.customerId);
4716
      first = false;
4717
      if (!first) sb.append(", ");
132 ashish 4718
      sb.append("from_date:");
4719
      sb.append(this.from_date);
68 ashish 4720
      first = false;
4721
      if (!first) sb.append(", ");
132 ashish 4722
      sb.append("to_date:");
4723
      sb.append(this.to_date);
68 ashish 4724
      first = false;
4725
      if (!first) sb.append(", ");
4726
      sb.append("status:");
4727
      if (this.status == null) {
4728
        sb.append("null");
4729
      } else {
4730
        String status_name = status.name();
4731
        if (status_name != null) {
4732
          sb.append(status_name);
4733
          sb.append(" (");
4734
        }
4735
        sb.append(this.status);
4736
        if (status_name != null) {
4737
          sb.append(")");
4738
        }
4739
      }
4740
      first = false;
4741
      sb.append(")");
4742
      return sb.toString();
4743
    }
4744
 
4745
    public void validate() throws TException {
4746
      // check for required fields
4747
    }
4748
 
4749
  }
4750
 
684 chandransh 4751
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4752
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4753
 
4754
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4755
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4756
 
4757
    private List<Transaction> success;
4758
    private TransactionServiceException ex;
4759
 
4760
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4761
    public enum _Fields implements TFieldIdEnum {
4762
      SUCCESS((short)0, "success"),
4763
      EX((short)1, "ex");
4764
 
4765
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4766
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4767
 
4768
      static {
4769
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4770
          byId.put((int)field._thriftId, field);
4771
          byName.put(field.getFieldName(), field);
4772
        }
4773
      }
4774
 
4775
      /**
4776
       * Find the _Fields constant that matches fieldId, or null if its not found.
4777
       */
4778
      public static _Fields findByThriftId(int fieldId) {
4779
        return byId.get(fieldId);
4780
      }
4781
 
4782
      /**
4783
       * Find the _Fields constant that matches fieldId, throwing an exception
4784
       * if it is not found.
4785
       */
4786
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4787
        _Fields fields = findByThriftId(fieldId);
4788
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4789
        return fields;
4790
      }
4791
 
4792
      /**
4793
       * Find the _Fields constant that matches name, or null if its not found.
4794
       */
4795
      public static _Fields findByName(String name) {
4796
        return byName.get(name);
4797
      }
4798
 
4799
      private final short _thriftId;
4800
      private final String _fieldName;
4801
 
4802
      _Fields(short thriftId, String fieldName) {
4803
        _thriftId = thriftId;
4804
        _fieldName = fieldName;
4805
      }
4806
 
4807
      public short getThriftFieldId() {
4808
        return _thriftId;
4809
      }
4810
 
4811
      public String getFieldName() {
4812
        return _fieldName;
4813
      }
4814
    }
4815
 
4816
    // isset id assignments
4817
 
4818
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4819
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4820
          new ListMetaData(TType.LIST, 
4821
              new StructMetaData(TType.STRUCT, Transaction.class))));
4822
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4823
          new FieldValueMetaData(TType.STRUCT)));
4824
    }});
4825
 
4826
    static {
4827
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4828
    }
4829
 
4830
    public getTransactionsForCustomer_result() {
4831
    }
4832
 
4833
    public getTransactionsForCustomer_result(
4834
      List<Transaction> success,
4835
      TransactionServiceException ex)
4836
    {
4837
      this();
4838
      this.success = success;
4839
      this.ex = ex;
4840
    }
4841
 
4842
    /**
4843
     * Performs a deep copy on <i>other</i>.
4844
     */
4845
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4846
      if (other.isSetSuccess()) {
4847
        List<Transaction> __this__success = new ArrayList<Transaction>();
4848
        for (Transaction other_element : other.success) {
4849
          __this__success.add(new Transaction(other_element));
4850
        }
4851
        this.success = __this__success;
4852
      }
4853
      if (other.isSetEx()) {
4854
        this.ex = new TransactionServiceException(other.ex);
4855
      }
4856
    }
4857
 
4858
    public getTransactionsForCustomer_result deepCopy() {
4859
      return new getTransactionsForCustomer_result(this);
4860
    }
4861
 
4862
    @Deprecated
4863
    public getTransactionsForCustomer_result clone() {
4864
      return new getTransactionsForCustomer_result(this);
4865
    }
4866
 
4867
    public int getSuccessSize() {
4868
      return (this.success == null) ? 0 : this.success.size();
4869
    }
4870
 
4871
    public java.util.Iterator<Transaction> getSuccessIterator() {
4872
      return (this.success == null) ? null : this.success.iterator();
4873
    }
4874
 
4875
    public void addToSuccess(Transaction elem) {
4876
      if (this.success == null) {
4877
        this.success = new ArrayList<Transaction>();
4878
      }
4879
      this.success.add(elem);
4880
    }
4881
 
4882
    public List<Transaction> getSuccess() {
4883
      return this.success;
4884
    }
4885
 
4886
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4887
      this.success = success;
4888
      return this;
4889
    }
4890
 
4891
    public void unsetSuccess() {
4892
      this.success = null;
4893
    }
4894
 
4895
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4896
    public boolean isSetSuccess() {
4897
      return this.success != null;
4898
    }
4899
 
4900
    public void setSuccessIsSet(boolean value) {
4901
      if (!value) {
4902
        this.success = null;
4903
      }
4904
    }
4905
 
4906
    public TransactionServiceException getEx() {
4907
      return this.ex;
4908
    }
4909
 
4910
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4911
      this.ex = ex;
4912
      return this;
4913
    }
4914
 
4915
    public void unsetEx() {
4916
      this.ex = null;
4917
    }
4918
 
4919
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4920
    public boolean isSetEx() {
4921
      return this.ex != null;
4922
    }
4923
 
4924
    public void setExIsSet(boolean value) {
4925
      if (!value) {
4926
        this.ex = null;
4927
      }
4928
    }
4929
 
4930
    public void setFieldValue(_Fields field, Object value) {
4931
      switch (field) {
4932
      case SUCCESS:
4933
        if (value == null) {
4934
          unsetSuccess();
4935
        } else {
4936
          setSuccess((List<Transaction>)value);
4937
        }
4938
        break;
4939
 
4940
      case EX:
4941
        if (value == null) {
4942
          unsetEx();
4943
        } else {
4944
          setEx((TransactionServiceException)value);
4945
        }
4946
        break;
4947
 
4948
      }
4949
    }
4950
 
4951
    public void setFieldValue(int fieldID, Object value) {
4952
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4953
    }
4954
 
4955
    public Object getFieldValue(_Fields field) {
4956
      switch (field) {
4957
      case SUCCESS:
4958
        return getSuccess();
4959
 
4960
      case EX:
4961
        return getEx();
4962
 
4963
      }
4964
      throw new IllegalStateException();
4965
    }
4966
 
4967
    public Object getFieldValue(int fieldId) {
4968
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4969
    }
4970
 
4971
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4972
    public boolean isSet(_Fields field) {
4973
      switch (field) {
4974
      case SUCCESS:
4975
        return isSetSuccess();
4976
      case EX:
4977
        return isSetEx();
4978
      }
4979
      throw new IllegalStateException();
4980
    }
4981
 
4982
    public boolean isSet(int fieldID) {
4983
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4984
    }
4985
 
4986
    @Override
4987
    public boolean equals(Object that) {
4988
      if (that == null)
4989
        return false;
4990
      if (that instanceof getTransactionsForCustomer_result)
4991
        return this.equals((getTransactionsForCustomer_result)that);
4992
      return false;
4993
    }
4994
 
4995
    public boolean equals(getTransactionsForCustomer_result that) {
4996
      if (that == null)
4997
        return false;
4998
 
4999
      boolean this_present_success = true && this.isSetSuccess();
5000
      boolean that_present_success = true && that.isSetSuccess();
5001
      if (this_present_success || that_present_success) {
5002
        if (!(this_present_success && that_present_success))
5003
          return false;
5004
        if (!this.success.equals(that.success))
5005
          return false;
5006
      }
5007
 
5008
      boolean this_present_ex = true && this.isSetEx();
5009
      boolean that_present_ex = true && that.isSetEx();
5010
      if (this_present_ex || that_present_ex) {
5011
        if (!(this_present_ex && that_present_ex))
5012
          return false;
5013
        if (!this.ex.equals(that.ex))
5014
          return false;
5015
      }
5016
 
5017
      return true;
5018
    }
5019
 
5020
    @Override
5021
    public int hashCode() {
5022
      return 0;
5023
    }
5024
 
684 chandransh 5025
    public int compareTo(getTransactionsForCustomer_result other) {
5026
      if (!getClass().equals(other.getClass())) {
5027
        return getClass().getName().compareTo(other.getClass().getName());
5028
      }
5029
 
5030
      int lastComparison = 0;
5031
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
5032
 
5033
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5034
      if (lastComparison != 0) {
5035
        return lastComparison;
5036
      }
5037
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5038
      if (lastComparison != 0) {
5039
        return lastComparison;
5040
      }
5041
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5042
      if (lastComparison != 0) {
5043
        return lastComparison;
5044
      }
5045
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5046
      if (lastComparison != 0) {
5047
        return lastComparison;
5048
      }
5049
      return 0;
5050
    }
5051
 
68 ashish 5052
    public void read(TProtocol iprot) throws TException {
5053
      TField field;
5054
      iprot.readStructBegin();
5055
      while (true)
5056
      {
5057
        field = iprot.readFieldBegin();
5058
        if (field.type == TType.STOP) { 
5059
          break;
5060
        }
5061
        _Fields fieldId = _Fields.findByThriftId(field.id);
5062
        if (fieldId == null) {
5063
          TProtocolUtil.skip(iprot, field.type);
5064
        } else {
5065
          switch (fieldId) {
5066
            case SUCCESS:
5067
              if (field.type == TType.LIST) {
5068
                {
684 chandransh 5069
                  TList _list8 = iprot.readListBegin();
5070
                  this.success = new ArrayList<Transaction>(_list8.size);
5071
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 5072
                  {
684 chandransh 5073
                    Transaction _elem10;
5074
                    _elem10 = new Transaction();
5075
                    _elem10.read(iprot);
5076
                    this.success.add(_elem10);
68 ashish 5077
                  }
5078
                  iprot.readListEnd();
5079
                }
5080
              } else { 
5081
                TProtocolUtil.skip(iprot, field.type);
5082
              }
5083
              break;
5084
            case EX:
5085
              if (field.type == TType.STRUCT) {
5086
                this.ex = new TransactionServiceException();
5087
                this.ex.read(iprot);
5088
              } else { 
5089
                TProtocolUtil.skip(iprot, field.type);
5090
              }
5091
              break;
5092
          }
5093
          iprot.readFieldEnd();
5094
        }
5095
      }
5096
      iprot.readStructEnd();
5097
      validate();
5098
    }
5099
 
5100
    public void write(TProtocol oprot) throws TException {
5101
      oprot.writeStructBegin(STRUCT_DESC);
5102
 
5103
      if (this.isSetSuccess()) {
5104
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5105
        {
5106
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5107
          for (Transaction _iter11 : this.success)
68 ashish 5108
          {
684 chandransh 5109
            _iter11.write(oprot);
68 ashish 5110
          }
5111
          oprot.writeListEnd();
5112
        }
5113
        oprot.writeFieldEnd();
5114
      } else if (this.isSetEx()) {
5115
        oprot.writeFieldBegin(EX_FIELD_DESC);
5116
        this.ex.write(oprot);
5117
        oprot.writeFieldEnd();
5118
      }
5119
      oprot.writeFieldStop();
5120
      oprot.writeStructEnd();
5121
    }
5122
 
5123
    @Override
5124
    public String toString() {
5125
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5126
      boolean first = true;
5127
 
5128
      sb.append("success:");
5129
      if (this.success == null) {
5130
        sb.append("null");
5131
      } else {
5132
        sb.append(this.success);
5133
      }
5134
      first = false;
5135
      if (!first) sb.append(", ");
5136
      sb.append("ex:");
5137
      if (this.ex == null) {
5138
        sb.append("null");
5139
      } else {
5140
        sb.append(this.ex);
5141
      }
5142
      first = false;
5143
      sb.append(")");
5144
      return sb.toString();
5145
    }
5146
 
5147
    public void validate() throws TException {
5148
      // check for required fields
5149
    }
5150
 
5151
  }
5152
 
132 ashish 5153
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
5154
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
5155
 
5156
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
5157
 
5158
    private long shoppingCartId;
5159
 
5160
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5161
    public enum _Fields implements TFieldIdEnum {
5162
      SHOPPING_CART_ID((short)1, "shoppingCartId");
5163
 
5164
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5165
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5166
 
5167
      static {
5168
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5169
          byId.put((int)field._thriftId, field);
5170
          byName.put(field.getFieldName(), field);
5171
        }
5172
      }
5173
 
5174
      /**
5175
       * Find the _Fields constant that matches fieldId, or null if its not found.
5176
       */
5177
      public static _Fields findByThriftId(int fieldId) {
5178
        return byId.get(fieldId);
5179
      }
5180
 
5181
      /**
5182
       * Find the _Fields constant that matches fieldId, throwing an exception
5183
       * if it is not found.
5184
       */
5185
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5186
        _Fields fields = findByThriftId(fieldId);
5187
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5188
        return fields;
5189
      }
5190
 
5191
      /**
5192
       * Find the _Fields constant that matches name, or null if its not found.
5193
       */
5194
      public static _Fields findByName(String name) {
5195
        return byName.get(name);
5196
      }
5197
 
5198
      private final short _thriftId;
5199
      private final String _fieldName;
5200
 
5201
      _Fields(short thriftId, String fieldName) {
5202
        _thriftId = thriftId;
5203
        _fieldName = fieldName;
5204
      }
5205
 
5206
      public short getThriftFieldId() {
5207
        return _thriftId;
5208
      }
5209
 
5210
      public String getFieldName() {
5211
        return _fieldName;
5212
      }
5213
    }
5214
 
5215
    // isset id assignments
5216
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
5217
    private BitSet __isset_bit_vector = new BitSet(1);
5218
 
5219
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5220
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
5221
          new FieldValueMetaData(TType.I64)));
5222
    }});
5223
 
5224
    static {
5225
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
5226
    }
5227
 
5228
    public getTransactionsForShoppingCartId_args() {
5229
    }
5230
 
5231
    public getTransactionsForShoppingCartId_args(
5232
      long shoppingCartId)
5233
    {
5234
      this();
5235
      this.shoppingCartId = shoppingCartId;
5236
      setShoppingCartIdIsSet(true);
5237
    }
5238
 
5239
    /**
5240
     * Performs a deep copy on <i>other</i>.
5241
     */
5242
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
5243
      __isset_bit_vector.clear();
5244
      __isset_bit_vector.or(other.__isset_bit_vector);
5245
      this.shoppingCartId = other.shoppingCartId;
5246
    }
5247
 
5248
    public getTransactionsForShoppingCartId_args deepCopy() {
5249
      return new getTransactionsForShoppingCartId_args(this);
5250
    }
5251
 
5252
    @Deprecated
5253
    public getTransactionsForShoppingCartId_args clone() {
5254
      return new getTransactionsForShoppingCartId_args(this);
5255
    }
5256
 
5257
    public long getShoppingCartId() {
5258
      return this.shoppingCartId;
5259
    }
5260
 
5261
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5262
      this.shoppingCartId = shoppingCartId;
5263
      setShoppingCartIdIsSet(true);
5264
      return this;
5265
    }
5266
 
5267
    public void unsetShoppingCartId() {
5268
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5269
    }
5270
 
5271
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5272
    public boolean isSetShoppingCartId() {
5273
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5274
    }
5275
 
5276
    public void setShoppingCartIdIsSet(boolean value) {
5277
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5278
    }
5279
 
5280
    public void setFieldValue(_Fields field, Object value) {
5281
      switch (field) {
5282
      case SHOPPING_CART_ID:
5283
        if (value == null) {
5284
          unsetShoppingCartId();
5285
        } else {
5286
          setShoppingCartId((Long)value);
5287
        }
5288
        break;
5289
 
5290
      }
5291
    }
5292
 
5293
    public void setFieldValue(int fieldID, Object value) {
5294
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5295
    }
5296
 
5297
    public Object getFieldValue(_Fields field) {
5298
      switch (field) {
5299
      case SHOPPING_CART_ID:
5300
        return new Long(getShoppingCartId());
5301
 
5302
      }
5303
      throw new IllegalStateException();
5304
    }
5305
 
5306
    public Object getFieldValue(int fieldId) {
5307
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5308
    }
5309
 
5310
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5311
    public boolean isSet(_Fields field) {
5312
      switch (field) {
5313
      case SHOPPING_CART_ID:
5314
        return isSetShoppingCartId();
5315
      }
5316
      throw new IllegalStateException();
5317
    }
5318
 
5319
    public boolean isSet(int fieldID) {
5320
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5321
    }
5322
 
5323
    @Override
5324
    public boolean equals(Object that) {
5325
      if (that == null)
5326
        return false;
5327
      if (that instanceof getTransactionsForShoppingCartId_args)
5328
        return this.equals((getTransactionsForShoppingCartId_args)that);
5329
      return false;
5330
    }
5331
 
5332
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5333
      if (that == null)
5334
        return false;
5335
 
5336
      boolean this_present_shoppingCartId = true;
5337
      boolean that_present_shoppingCartId = true;
5338
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5339
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5340
          return false;
5341
        if (this.shoppingCartId != that.shoppingCartId)
5342
          return false;
5343
      }
5344
 
5345
      return true;
5346
    }
5347
 
5348
    @Override
5349
    public int hashCode() {
5350
      return 0;
5351
    }
5352
 
5353
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5354
      if (!getClass().equals(other.getClass())) {
5355
        return getClass().getName().compareTo(other.getClass().getName());
5356
      }
5357
 
5358
      int lastComparison = 0;
5359
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5360
 
5361
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5362
      if (lastComparison != 0) {
5363
        return lastComparison;
5364
      }
5365
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5366
      if (lastComparison != 0) {
5367
        return lastComparison;
5368
      }
5369
      return 0;
5370
    }
5371
 
5372
    public void read(TProtocol iprot) throws TException {
5373
      TField field;
5374
      iprot.readStructBegin();
5375
      while (true)
5376
      {
5377
        field = iprot.readFieldBegin();
5378
        if (field.type == TType.STOP) { 
5379
          break;
5380
        }
5381
        _Fields fieldId = _Fields.findByThriftId(field.id);
5382
        if (fieldId == null) {
5383
          TProtocolUtil.skip(iprot, field.type);
5384
        } else {
5385
          switch (fieldId) {
5386
            case SHOPPING_CART_ID:
5387
              if (field.type == TType.I64) {
5388
                this.shoppingCartId = iprot.readI64();
5389
                setShoppingCartIdIsSet(true);
5390
              } else { 
5391
                TProtocolUtil.skip(iprot, field.type);
5392
              }
5393
              break;
5394
          }
5395
          iprot.readFieldEnd();
5396
        }
5397
      }
5398
      iprot.readStructEnd();
5399
      validate();
5400
    }
5401
 
5402
    public void write(TProtocol oprot) throws TException {
5403
      validate();
5404
 
5405
      oprot.writeStructBegin(STRUCT_DESC);
5406
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5407
      oprot.writeI64(this.shoppingCartId);
5408
      oprot.writeFieldEnd();
5409
      oprot.writeFieldStop();
5410
      oprot.writeStructEnd();
5411
    }
5412
 
5413
    @Override
5414
    public String toString() {
5415
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5416
      boolean first = true;
5417
 
5418
      sb.append("shoppingCartId:");
5419
      sb.append(this.shoppingCartId);
5420
      first = false;
5421
      sb.append(")");
5422
      return sb.toString();
5423
    }
5424
 
5425
    public void validate() throws TException {
5426
      // check for required fields
5427
    }
5428
 
5429
  }
5430
 
684 chandransh 5431
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5432
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5433
 
5434
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5435
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5436
 
5437
    private List<Transaction> success;
5438
    private TransactionServiceException ex;
5439
 
5440
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5441
    public enum _Fields implements TFieldIdEnum {
5442
      SUCCESS((short)0, "success"),
5443
      EX((short)1, "ex");
5444
 
5445
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5446
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5447
 
5448
      static {
5449
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5450
          byId.put((int)field._thriftId, field);
5451
          byName.put(field.getFieldName(), field);
5452
        }
5453
      }
5454
 
5455
      /**
5456
       * Find the _Fields constant that matches fieldId, or null if its not found.
5457
       */
5458
      public static _Fields findByThriftId(int fieldId) {
5459
        return byId.get(fieldId);
5460
      }
5461
 
5462
      /**
5463
       * Find the _Fields constant that matches fieldId, throwing an exception
5464
       * if it is not found.
5465
       */
5466
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5467
        _Fields fields = findByThriftId(fieldId);
5468
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5469
        return fields;
5470
      }
5471
 
5472
      /**
5473
       * Find the _Fields constant that matches name, or null if its not found.
5474
       */
5475
      public static _Fields findByName(String name) {
5476
        return byName.get(name);
5477
      }
5478
 
5479
      private final short _thriftId;
5480
      private final String _fieldName;
5481
 
5482
      _Fields(short thriftId, String fieldName) {
5483
        _thriftId = thriftId;
5484
        _fieldName = fieldName;
5485
      }
5486
 
5487
      public short getThriftFieldId() {
5488
        return _thriftId;
5489
      }
5490
 
5491
      public String getFieldName() {
5492
        return _fieldName;
5493
      }
5494
    }
5495
 
5496
    // isset id assignments
5497
 
5498
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5499
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5500
          new ListMetaData(TType.LIST, 
5501
              new StructMetaData(TType.STRUCT, Transaction.class))));
5502
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5503
          new FieldValueMetaData(TType.STRUCT)));
5504
    }});
5505
 
5506
    static {
5507
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5508
    }
5509
 
5510
    public getTransactionsForShoppingCartId_result() {
5511
    }
5512
 
5513
    public getTransactionsForShoppingCartId_result(
5514
      List<Transaction> success,
5515
      TransactionServiceException ex)
5516
    {
5517
      this();
5518
      this.success = success;
5519
      this.ex = ex;
5520
    }
5521
 
5522
    /**
5523
     * Performs a deep copy on <i>other</i>.
5524
     */
5525
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5526
      if (other.isSetSuccess()) {
5527
        List<Transaction> __this__success = new ArrayList<Transaction>();
5528
        for (Transaction other_element : other.success) {
5529
          __this__success.add(new Transaction(other_element));
5530
        }
5531
        this.success = __this__success;
5532
      }
5533
      if (other.isSetEx()) {
5534
        this.ex = new TransactionServiceException(other.ex);
5535
      }
5536
    }
5537
 
5538
    public getTransactionsForShoppingCartId_result deepCopy() {
5539
      return new getTransactionsForShoppingCartId_result(this);
5540
    }
5541
 
5542
    @Deprecated
5543
    public getTransactionsForShoppingCartId_result clone() {
5544
      return new getTransactionsForShoppingCartId_result(this);
5545
    }
5546
 
5547
    public int getSuccessSize() {
5548
      return (this.success == null) ? 0 : this.success.size();
5549
    }
5550
 
5551
    public java.util.Iterator<Transaction> getSuccessIterator() {
5552
      return (this.success == null) ? null : this.success.iterator();
5553
    }
5554
 
5555
    public void addToSuccess(Transaction elem) {
5556
      if (this.success == null) {
5557
        this.success = new ArrayList<Transaction>();
5558
      }
5559
      this.success.add(elem);
5560
    }
5561
 
5562
    public List<Transaction> getSuccess() {
5563
      return this.success;
5564
    }
5565
 
5566
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5567
      this.success = success;
5568
      return this;
5569
    }
5570
 
5571
    public void unsetSuccess() {
5572
      this.success = null;
5573
    }
5574
 
5575
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5576
    public boolean isSetSuccess() {
5577
      return this.success != null;
5578
    }
5579
 
5580
    public void setSuccessIsSet(boolean value) {
5581
      if (!value) {
5582
        this.success = null;
5583
      }
5584
    }
5585
 
5586
    public TransactionServiceException getEx() {
5587
      return this.ex;
5588
    }
5589
 
5590
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5591
      this.ex = ex;
5592
      return this;
5593
    }
5594
 
5595
    public void unsetEx() {
5596
      this.ex = null;
5597
    }
5598
 
5599
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5600
    public boolean isSetEx() {
5601
      return this.ex != null;
5602
    }
5603
 
5604
    public void setExIsSet(boolean value) {
5605
      if (!value) {
5606
        this.ex = null;
5607
      }
5608
    }
5609
 
5610
    public void setFieldValue(_Fields field, Object value) {
5611
      switch (field) {
5612
      case SUCCESS:
5613
        if (value == null) {
5614
          unsetSuccess();
5615
        } else {
5616
          setSuccess((List<Transaction>)value);
5617
        }
5618
        break;
5619
 
5620
      case EX:
5621
        if (value == null) {
5622
          unsetEx();
5623
        } else {
5624
          setEx((TransactionServiceException)value);
5625
        }
5626
        break;
5627
 
5628
      }
5629
    }
5630
 
5631
    public void setFieldValue(int fieldID, Object value) {
5632
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5633
    }
5634
 
5635
    public Object getFieldValue(_Fields field) {
5636
      switch (field) {
5637
      case SUCCESS:
5638
        return getSuccess();
5639
 
5640
      case EX:
5641
        return getEx();
5642
 
5643
      }
5644
      throw new IllegalStateException();
5645
    }
5646
 
5647
    public Object getFieldValue(int fieldId) {
5648
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5649
    }
5650
 
5651
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5652
    public boolean isSet(_Fields field) {
5653
      switch (field) {
5654
      case SUCCESS:
5655
        return isSetSuccess();
5656
      case EX:
5657
        return isSetEx();
5658
      }
5659
      throw new IllegalStateException();
5660
    }
5661
 
5662
    public boolean isSet(int fieldID) {
5663
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5664
    }
5665
 
5666
    @Override
5667
    public boolean equals(Object that) {
5668
      if (that == null)
5669
        return false;
5670
      if (that instanceof getTransactionsForShoppingCartId_result)
5671
        return this.equals((getTransactionsForShoppingCartId_result)that);
5672
      return false;
5673
    }
5674
 
5675
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5676
      if (that == null)
5677
        return false;
5678
 
5679
      boolean this_present_success = true && this.isSetSuccess();
5680
      boolean that_present_success = true && that.isSetSuccess();
5681
      if (this_present_success || that_present_success) {
5682
        if (!(this_present_success && that_present_success))
5683
          return false;
5684
        if (!this.success.equals(that.success))
5685
          return false;
5686
      }
5687
 
5688
      boolean this_present_ex = true && this.isSetEx();
5689
      boolean that_present_ex = true && that.isSetEx();
5690
      if (this_present_ex || that_present_ex) {
5691
        if (!(this_present_ex && that_present_ex))
5692
          return false;
5693
        if (!this.ex.equals(that.ex))
5694
          return false;
5695
      }
5696
 
5697
      return true;
5698
    }
5699
 
5700
    @Override
5701
    public int hashCode() {
5702
      return 0;
5703
    }
5704
 
684 chandransh 5705
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5706
      if (!getClass().equals(other.getClass())) {
5707
        return getClass().getName().compareTo(other.getClass().getName());
5708
      }
5709
 
5710
      int lastComparison = 0;
5711
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5712
 
5713
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5714
      if (lastComparison != 0) {
5715
        return lastComparison;
5716
      }
5717
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5718
      if (lastComparison != 0) {
5719
        return lastComparison;
5720
      }
5721
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5722
      if (lastComparison != 0) {
5723
        return lastComparison;
5724
      }
5725
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5726
      if (lastComparison != 0) {
5727
        return lastComparison;
5728
      }
5729
      return 0;
5730
    }
5731
 
132 ashish 5732
    public void read(TProtocol iprot) throws TException {
5733
      TField field;
5734
      iprot.readStructBegin();
5735
      while (true)
5736
      {
5737
        field = iprot.readFieldBegin();
5738
        if (field.type == TType.STOP) { 
5739
          break;
5740
        }
5741
        _Fields fieldId = _Fields.findByThriftId(field.id);
5742
        if (fieldId == null) {
5743
          TProtocolUtil.skip(iprot, field.type);
5744
        } else {
5745
          switch (fieldId) {
5746
            case SUCCESS:
5747
              if (field.type == TType.LIST) {
5748
                {
684 chandransh 5749
                  TList _list12 = iprot.readListBegin();
5750
                  this.success = new ArrayList<Transaction>(_list12.size);
5751
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5752
                  {
684 chandransh 5753
                    Transaction _elem14;
5754
                    _elem14 = new Transaction();
5755
                    _elem14.read(iprot);
5756
                    this.success.add(_elem14);
132 ashish 5757
                  }
5758
                  iprot.readListEnd();
5759
                }
5760
              } else { 
5761
                TProtocolUtil.skip(iprot, field.type);
5762
              }
5763
              break;
5764
            case EX:
5765
              if (field.type == TType.STRUCT) {
5766
                this.ex = new TransactionServiceException();
5767
                this.ex.read(iprot);
5768
              } else { 
5769
                TProtocolUtil.skip(iprot, field.type);
5770
              }
5771
              break;
5772
          }
5773
          iprot.readFieldEnd();
5774
        }
5775
      }
5776
      iprot.readStructEnd();
5777
      validate();
5778
    }
5779
 
5780
    public void write(TProtocol oprot) throws TException {
5781
      oprot.writeStructBegin(STRUCT_DESC);
5782
 
5783
      if (this.isSetSuccess()) {
5784
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5785
        {
5786
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5787
          for (Transaction _iter15 : this.success)
132 ashish 5788
          {
684 chandransh 5789
            _iter15.write(oprot);
132 ashish 5790
          }
5791
          oprot.writeListEnd();
5792
        }
5793
        oprot.writeFieldEnd();
5794
      } else if (this.isSetEx()) {
5795
        oprot.writeFieldBegin(EX_FIELD_DESC);
5796
        this.ex.write(oprot);
5797
        oprot.writeFieldEnd();
5798
      }
5799
      oprot.writeFieldStop();
5800
      oprot.writeStructEnd();
5801
    }
5802
 
5803
    @Override
5804
    public String toString() {
5805
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5806
      boolean first = true;
5807
 
5808
      sb.append("success:");
5809
      if (this.success == null) {
5810
        sb.append("null");
5811
      } else {
5812
        sb.append(this.success);
5813
      }
5814
      first = false;
5815
      if (!first) sb.append(", ");
5816
      sb.append("ex:");
5817
      if (this.ex == null) {
5818
        sb.append("null");
5819
      } else {
5820
        sb.append(this.ex);
5821
      }
5822
      first = false;
5823
      sb.append(")");
5824
      return sb.toString();
5825
    }
5826
 
5827
    public void validate() throws TException {
5828
      // check for required fields
5829
    }
5830
 
5831
  }
5832
 
68 ashish 5833
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5834
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5835
 
5836
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5837
 
5838
    private long transactionId;
5839
 
5840
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5841
    public enum _Fields implements TFieldIdEnum {
5842
      TRANSACTION_ID((short)1, "transactionId");
5843
 
5844
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5845
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5846
 
5847
      static {
5848
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5849
          byId.put((int)field._thriftId, field);
5850
          byName.put(field.getFieldName(), field);
5851
        }
5852
      }
5853
 
5854
      /**
5855
       * Find the _Fields constant that matches fieldId, or null if its not found.
5856
       */
5857
      public static _Fields findByThriftId(int fieldId) {
5858
        return byId.get(fieldId);
5859
      }
5860
 
5861
      /**
5862
       * Find the _Fields constant that matches fieldId, throwing an exception
5863
       * if it is not found.
5864
       */
5865
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5866
        _Fields fields = findByThriftId(fieldId);
5867
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5868
        return fields;
5869
      }
5870
 
5871
      /**
5872
       * Find the _Fields constant that matches name, or null if its not found.
5873
       */
5874
      public static _Fields findByName(String name) {
5875
        return byName.get(name);
5876
      }
5877
 
5878
      private final short _thriftId;
5879
      private final String _fieldName;
5880
 
5881
      _Fields(short thriftId, String fieldName) {
5882
        _thriftId = thriftId;
5883
        _fieldName = fieldName;
5884
      }
5885
 
5886
      public short getThriftFieldId() {
5887
        return _thriftId;
5888
      }
5889
 
5890
      public String getFieldName() {
5891
        return _fieldName;
5892
      }
5893
    }
5894
 
5895
    // isset id assignments
5896
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5897
    private BitSet __isset_bit_vector = new BitSet(1);
5898
 
5899
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5900
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5901
          new FieldValueMetaData(TType.I64)));
5902
    }});
5903
 
5904
    static {
5905
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5906
    }
5907
 
5908
    public getTransactionStatus_args() {
5909
    }
5910
 
5911
    public getTransactionStatus_args(
5912
      long transactionId)
5913
    {
5914
      this();
5915
      this.transactionId = transactionId;
5916
      setTransactionIdIsSet(true);
5917
    }
5918
 
5919
    /**
5920
     * Performs a deep copy on <i>other</i>.
5921
     */
5922
    public getTransactionStatus_args(getTransactionStatus_args other) {
5923
      __isset_bit_vector.clear();
5924
      __isset_bit_vector.or(other.__isset_bit_vector);
5925
      this.transactionId = other.transactionId;
5926
    }
5927
 
5928
    public getTransactionStatus_args deepCopy() {
5929
      return new getTransactionStatus_args(this);
5930
    }
5931
 
5932
    @Deprecated
5933
    public getTransactionStatus_args clone() {
5934
      return new getTransactionStatus_args(this);
5935
    }
5936
 
5937
    public long getTransactionId() {
5938
      return this.transactionId;
5939
    }
5940
 
5941
    public getTransactionStatus_args setTransactionId(long transactionId) {
5942
      this.transactionId = transactionId;
5943
      setTransactionIdIsSet(true);
5944
      return this;
5945
    }
5946
 
5947
    public void unsetTransactionId() {
5948
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5949
    }
5950
 
5951
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5952
    public boolean isSetTransactionId() {
5953
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5954
    }
5955
 
5956
    public void setTransactionIdIsSet(boolean value) {
5957
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5958
    }
5959
 
5960
    public void setFieldValue(_Fields field, Object value) {
5961
      switch (field) {
5962
      case TRANSACTION_ID:
5963
        if (value == null) {
5964
          unsetTransactionId();
5965
        } else {
5966
          setTransactionId((Long)value);
5967
        }
5968
        break;
5969
 
5970
      }
5971
    }
5972
 
5973
    public void setFieldValue(int fieldID, Object value) {
5974
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5975
    }
5976
 
5977
    public Object getFieldValue(_Fields field) {
5978
      switch (field) {
5979
      case TRANSACTION_ID:
5980
        return new Long(getTransactionId());
5981
 
5982
      }
5983
      throw new IllegalStateException();
5984
    }
5985
 
5986
    public Object getFieldValue(int fieldId) {
5987
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5988
    }
5989
 
5990
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5991
    public boolean isSet(_Fields field) {
5992
      switch (field) {
5993
      case TRANSACTION_ID:
5994
        return isSetTransactionId();
5995
      }
5996
      throw new IllegalStateException();
5997
    }
5998
 
5999
    public boolean isSet(int fieldID) {
6000
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6001
    }
6002
 
6003
    @Override
6004
    public boolean equals(Object that) {
6005
      if (that == null)
6006
        return false;
6007
      if (that instanceof getTransactionStatus_args)
6008
        return this.equals((getTransactionStatus_args)that);
6009
      return false;
6010
    }
6011
 
6012
    public boolean equals(getTransactionStatus_args that) {
6013
      if (that == null)
6014
        return false;
6015
 
6016
      boolean this_present_transactionId = true;
6017
      boolean that_present_transactionId = true;
6018
      if (this_present_transactionId || that_present_transactionId) {
6019
        if (!(this_present_transactionId && that_present_transactionId))
6020
          return false;
6021
        if (this.transactionId != that.transactionId)
6022
          return false;
6023
      }
6024
 
6025
      return true;
6026
    }
6027
 
6028
    @Override
6029
    public int hashCode() {
6030
      return 0;
6031
    }
6032
 
6033
    public int compareTo(getTransactionStatus_args other) {
6034
      if (!getClass().equals(other.getClass())) {
6035
        return getClass().getName().compareTo(other.getClass().getName());
6036
      }
6037
 
6038
      int lastComparison = 0;
6039
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
6040
 
6041
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6042
      if (lastComparison != 0) {
6043
        return lastComparison;
6044
      }
6045
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6046
      if (lastComparison != 0) {
6047
        return lastComparison;
6048
      }
6049
      return 0;
6050
    }
6051
 
6052
    public void read(TProtocol iprot) throws TException {
6053
      TField field;
6054
      iprot.readStructBegin();
6055
      while (true)
6056
      {
6057
        field = iprot.readFieldBegin();
6058
        if (field.type == TType.STOP) { 
6059
          break;
6060
        }
6061
        _Fields fieldId = _Fields.findByThriftId(field.id);
6062
        if (fieldId == null) {
6063
          TProtocolUtil.skip(iprot, field.type);
6064
        } else {
6065
          switch (fieldId) {
6066
            case TRANSACTION_ID:
6067
              if (field.type == TType.I64) {
6068
                this.transactionId = iprot.readI64();
6069
                setTransactionIdIsSet(true);
6070
              } else { 
6071
                TProtocolUtil.skip(iprot, field.type);
6072
              }
6073
              break;
6074
          }
6075
          iprot.readFieldEnd();
6076
        }
6077
      }
6078
      iprot.readStructEnd();
6079
      validate();
6080
    }
6081
 
6082
    public void write(TProtocol oprot) throws TException {
6083
      validate();
6084
 
6085
      oprot.writeStructBegin(STRUCT_DESC);
6086
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6087
      oprot.writeI64(this.transactionId);
6088
      oprot.writeFieldEnd();
6089
      oprot.writeFieldStop();
6090
      oprot.writeStructEnd();
6091
    }
6092
 
6093
    @Override
6094
    public String toString() {
6095
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
6096
      boolean first = true;
6097
 
6098
      sb.append("transactionId:");
6099
      sb.append(this.transactionId);
6100
      first = false;
6101
      sb.append(")");
6102
      return sb.toString();
6103
    }
6104
 
6105
    public void validate() throws TException {
6106
      // check for required fields
6107
    }
6108
 
6109
  }
6110
 
6111
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
6112
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
6113
 
6114
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
6115
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6116
 
6117
    private TransactionStatus success;
6118
    private TransactionServiceException ex;
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
      /**
6123
       * 
6124
       * @see TransactionStatus
6125
       */
6126
      SUCCESS((short)0, "success"),
6127
      EX((short)1, "ex");
6128
 
6129
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6130
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6131
 
6132
      static {
6133
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6134
          byId.put((int)field._thriftId, field);
6135
          byName.put(field.getFieldName(), field);
6136
        }
6137
      }
6138
 
6139
      /**
6140
       * Find the _Fields constant that matches fieldId, or null if its not found.
6141
       */
6142
      public static _Fields findByThriftId(int fieldId) {
6143
        return byId.get(fieldId);
6144
      }
6145
 
6146
      /**
6147
       * Find the _Fields constant that matches fieldId, throwing an exception
6148
       * if it is not found.
6149
       */
6150
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6151
        _Fields fields = findByThriftId(fieldId);
6152
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6153
        return fields;
6154
      }
6155
 
6156
      /**
6157
       * Find the _Fields constant that matches name, or null if its not found.
6158
       */
6159
      public static _Fields findByName(String name) {
6160
        return byName.get(name);
6161
      }
6162
 
6163
      private final short _thriftId;
6164
      private final String _fieldName;
6165
 
6166
      _Fields(short thriftId, String fieldName) {
6167
        _thriftId = thriftId;
6168
        _fieldName = fieldName;
6169
      }
6170
 
6171
      public short getThriftFieldId() {
6172
        return _thriftId;
6173
      }
6174
 
6175
      public String getFieldName() {
6176
        return _fieldName;
6177
      }
6178
    }
6179
 
6180
    // isset id assignments
6181
 
6182
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6183
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6184
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6185
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6186
          new FieldValueMetaData(TType.STRUCT)));
6187
    }});
6188
 
6189
    static {
6190
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
6191
    }
6192
 
6193
    public getTransactionStatus_result() {
6194
    }
6195
 
6196
    public getTransactionStatus_result(
6197
      TransactionStatus success,
6198
      TransactionServiceException ex)
6199
    {
6200
      this();
6201
      this.success = success;
6202
      this.ex = ex;
6203
    }
6204
 
6205
    /**
6206
     * Performs a deep copy on <i>other</i>.
6207
     */
6208
    public getTransactionStatus_result(getTransactionStatus_result other) {
6209
      if (other.isSetSuccess()) {
6210
        this.success = other.success;
6211
      }
6212
      if (other.isSetEx()) {
6213
        this.ex = new TransactionServiceException(other.ex);
6214
      }
6215
    }
6216
 
6217
    public getTransactionStatus_result deepCopy() {
6218
      return new getTransactionStatus_result(this);
6219
    }
6220
 
6221
    @Deprecated
6222
    public getTransactionStatus_result clone() {
6223
      return new getTransactionStatus_result(this);
6224
    }
6225
 
6226
    /**
6227
     * 
6228
     * @see TransactionStatus
6229
     */
6230
    public TransactionStatus getSuccess() {
6231
      return this.success;
6232
    }
6233
 
6234
    /**
6235
     * 
6236
     * @see TransactionStatus
6237
     */
6238
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
6239
      this.success = success;
6240
      return this;
6241
    }
6242
 
6243
    public void unsetSuccess() {
6244
      this.success = null;
6245
    }
6246
 
6247
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6248
    public boolean isSetSuccess() {
6249
      return this.success != null;
6250
    }
6251
 
6252
    public void setSuccessIsSet(boolean value) {
6253
      if (!value) {
6254
        this.success = null;
6255
      }
6256
    }
6257
 
6258
    public TransactionServiceException getEx() {
6259
      return this.ex;
6260
    }
6261
 
6262
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6263
      this.ex = ex;
6264
      return this;
6265
    }
6266
 
6267
    public void unsetEx() {
6268
      this.ex = null;
6269
    }
6270
 
6271
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6272
    public boolean isSetEx() {
6273
      return this.ex != null;
6274
    }
6275
 
6276
    public void setExIsSet(boolean value) {
6277
      if (!value) {
6278
        this.ex = null;
6279
      }
6280
    }
6281
 
6282
    public void setFieldValue(_Fields field, Object value) {
6283
      switch (field) {
6284
      case SUCCESS:
6285
        if (value == null) {
6286
          unsetSuccess();
6287
        } else {
6288
          setSuccess((TransactionStatus)value);
6289
        }
6290
        break;
6291
 
6292
      case EX:
6293
        if (value == null) {
6294
          unsetEx();
6295
        } else {
6296
          setEx((TransactionServiceException)value);
6297
        }
6298
        break;
6299
 
6300
      }
6301
    }
6302
 
6303
    public void setFieldValue(int fieldID, Object value) {
6304
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6305
    }
6306
 
6307
    public Object getFieldValue(_Fields field) {
6308
      switch (field) {
6309
      case SUCCESS:
6310
        return getSuccess();
6311
 
6312
      case EX:
6313
        return getEx();
6314
 
6315
      }
6316
      throw new IllegalStateException();
6317
    }
6318
 
6319
    public Object getFieldValue(int fieldId) {
6320
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6321
    }
6322
 
6323
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6324
    public boolean isSet(_Fields field) {
6325
      switch (field) {
6326
      case SUCCESS:
6327
        return isSetSuccess();
6328
      case EX:
6329
        return isSetEx();
6330
      }
6331
      throw new IllegalStateException();
6332
    }
6333
 
6334
    public boolean isSet(int fieldID) {
6335
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6336
    }
6337
 
6338
    @Override
6339
    public boolean equals(Object that) {
6340
      if (that == null)
6341
        return false;
6342
      if (that instanceof getTransactionStatus_result)
6343
        return this.equals((getTransactionStatus_result)that);
6344
      return false;
6345
    }
6346
 
6347
    public boolean equals(getTransactionStatus_result that) {
6348
      if (that == null)
6349
        return false;
6350
 
6351
      boolean this_present_success = true && this.isSetSuccess();
6352
      boolean that_present_success = true && that.isSetSuccess();
6353
      if (this_present_success || that_present_success) {
6354
        if (!(this_present_success && that_present_success))
6355
          return false;
6356
        if (!this.success.equals(that.success))
6357
          return false;
6358
      }
6359
 
6360
      boolean this_present_ex = true && this.isSetEx();
6361
      boolean that_present_ex = true && that.isSetEx();
6362
      if (this_present_ex || that_present_ex) {
6363
        if (!(this_present_ex && that_present_ex))
6364
          return false;
6365
        if (!this.ex.equals(that.ex))
6366
          return false;
6367
      }
6368
 
6369
      return true;
6370
    }
6371
 
6372
    @Override
6373
    public int hashCode() {
6374
      return 0;
6375
    }
6376
 
6377
    public int compareTo(getTransactionStatus_result other) {
6378
      if (!getClass().equals(other.getClass())) {
6379
        return getClass().getName().compareTo(other.getClass().getName());
6380
      }
6381
 
6382
      int lastComparison = 0;
6383
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6384
 
6385
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6386
      if (lastComparison != 0) {
6387
        return lastComparison;
6388
      }
6389
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6390
      if (lastComparison != 0) {
6391
        return lastComparison;
6392
      }
6393
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6394
      if (lastComparison != 0) {
6395
        return lastComparison;
6396
      }
6397
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6398
      if (lastComparison != 0) {
6399
        return lastComparison;
6400
      }
6401
      return 0;
6402
    }
6403
 
6404
    public void read(TProtocol iprot) throws TException {
6405
      TField field;
6406
      iprot.readStructBegin();
6407
      while (true)
6408
      {
6409
        field = iprot.readFieldBegin();
6410
        if (field.type == TType.STOP) { 
6411
          break;
6412
        }
6413
        _Fields fieldId = _Fields.findByThriftId(field.id);
6414
        if (fieldId == null) {
6415
          TProtocolUtil.skip(iprot, field.type);
6416
        } else {
6417
          switch (fieldId) {
6418
            case SUCCESS:
6419
              if (field.type == TType.I32) {
6420
                this.success = TransactionStatus.findByValue(iprot.readI32());
6421
              } else { 
6422
                TProtocolUtil.skip(iprot, field.type);
6423
              }
6424
              break;
6425
            case EX:
6426
              if (field.type == TType.STRUCT) {
6427
                this.ex = new TransactionServiceException();
6428
                this.ex.read(iprot);
6429
              } else { 
6430
                TProtocolUtil.skip(iprot, field.type);
6431
              }
6432
              break;
6433
          }
6434
          iprot.readFieldEnd();
6435
        }
6436
      }
6437
      iprot.readStructEnd();
6438
      validate();
6439
    }
6440
 
6441
    public void write(TProtocol oprot) throws TException {
6442
      oprot.writeStructBegin(STRUCT_DESC);
6443
 
6444
      if (this.isSetSuccess()) {
6445
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6446
        oprot.writeI32(this.success.getValue());
6447
        oprot.writeFieldEnd();
6448
      } else if (this.isSetEx()) {
6449
        oprot.writeFieldBegin(EX_FIELD_DESC);
6450
        this.ex.write(oprot);
6451
        oprot.writeFieldEnd();
6452
      }
6453
      oprot.writeFieldStop();
6454
      oprot.writeStructEnd();
6455
    }
6456
 
6457
    @Override
6458
    public String toString() {
6459
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6460
      boolean first = true;
6461
 
6462
      sb.append("success:");
6463
      if (this.success == null) {
6464
        sb.append("null");
6465
      } else {
6466
        String success_name = success.name();
6467
        if (success_name != null) {
6468
          sb.append(success_name);
6469
          sb.append(" (");
6470
        }
6471
        sb.append(this.success);
6472
        if (success_name != null) {
6473
          sb.append(")");
6474
        }
6475
      }
6476
      first = false;
6477
      if (!first) sb.append(", ");
6478
      sb.append("ex:");
6479
      if (this.ex == null) {
6480
        sb.append("null");
6481
      } else {
6482
        sb.append(this.ex);
6483
      }
6484
      first = false;
6485
      sb.append(")");
6486
      return sb.toString();
6487
    }
6488
 
6489
    public void validate() throws TException {
6490
      // check for required fields
6491
    }
6492
 
6493
  }
6494
 
6495
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6496
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6497
 
6498
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6499
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6500
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6501
 
6502
    private long transactionId;
6503
    private TransactionStatus status;
6504
    private String description;
6505
 
6506
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6507
    public enum _Fields implements TFieldIdEnum {
6508
      TRANSACTION_ID((short)1, "transactionId"),
6509
      /**
6510
       * 
6511
       * @see TransactionStatus
6512
       */
6513
      STATUS((short)2, "status"),
6514
      DESCRIPTION((short)3, "description");
6515
 
6516
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6517
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6518
 
6519
      static {
6520
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6521
          byId.put((int)field._thriftId, field);
6522
          byName.put(field.getFieldName(), field);
6523
        }
6524
      }
6525
 
6526
      /**
6527
       * Find the _Fields constant that matches fieldId, or null if its not found.
6528
       */
6529
      public static _Fields findByThriftId(int fieldId) {
6530
        return byId.get(fieldId);
6531
      }
6532
 
6533
      /**
6534
       * Find the _Fields constant that matches fieldId, throwing an exception
6535
       * if it is not found.
6536
       */
6537
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6538
        _Fields fields = findByThriftId(fieldId);
6539
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6540
        return fields;
6541
      }
6542
 
6543
      /**
6544
       * Find the _Fields constant that matches name, or null if its not found.
6545
       */
6546
      public static _Fields findByName(String name) {
6547
        return byName.get(name);
6548
      }
6549
 
6550
      private final short _thriftId;
6551
      private final String _fieldName;
6552
 
6553
      _Fields(short thriftId, String fieldName) {
6554
        _thriftId = thriftId;
6555
        _fieldName = fieldName;
6556
      }
6557
 
6558
      public short getThriftFieldId() {
6559
        return _thriftId;
6560
      }
6561
 
6562
      public String getFieldName() {
6563
        return _fieldName;
6564
      }
6565
    }
6566
 
6567
    // isset id assignments
6568
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6569
    private BitSet __isset_bit_vector = new BitSet(1);
6570
 
6571
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6572
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6573
          new FieldValueMetaData(TType.I64)));
6574
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6575
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6576
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6577
          new FieldValueMetaData(TType.STRING)));
6578
    }});
6579
 
6580
    static {
6581
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6582
    }
6583
 
6584
    public changeTransactionStatus_args() {
6585
    }
6586
 
6587
    public changeTransactionStatus_args(
6588
      long transactionId,
6589
      TransactionStatus status,
6590
      String description)
6591
    {
6592
      this();
6593
      this.transactionId = transactionId;
6594
      setTransactionIdIsSet(true);
6595
      this.status = status;
6596
      this.description = description;
6597
    }
6598
 
6599
    /**
6600
     * Performs a deep copy on <i>other</i>.
6601
     */
6602
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6603
      __isset_bit_vector.clear();
6604
      __isset_bit_vector.or(other.__isset_bit_vector);
6605
      this.transactionId = other.transactionId;
6606
      if (other.isSetStatus()) {
6607
        this.status = other.status;
6608
      }
6609
      if (other.isSetDescription()) {
6610
        this.description = other.description;
6611
      }
6612
    }
6613
 
6614
    public changeTransactionStatus_args deepCopy() {
6615
      return new changeTransactionStatus_args(this);
6616
    }
6617
 
6618
    @Deprecated
6619
    public changeTransactionStatus_args clone() {
6620
      return new changeTransactionStatus_args(this);
6621
    }
6622
 
6623
    public long getTransactionId() {
6624
      return this.transactionId;
6625
    }
6626
 
6627
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6628
      this.transactionId = transactionId;
6629
      setTransactionIdIsSet(true);
6630
      return this;
6631
    }
6632
 
6633
    public void unsetTransactionId() {
6634
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6635
    }
6636
 
6637
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6638
    public boolean isSetTransactionId() {
6639
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6640
    }
6641
 
6642
    public void setTransactionIdIsSet(boolean value) {
6643
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6644
    }
6645
 
6646
    /**
6647
     * 
6648
     * @see TransactionStatus
6649
     */
6650
    public TransactionStatus getStatus() {
6651
      return this.status;
6652
    }
6653
 
6654
    /**
6655
     * 
6656
     * @see TransactionStatus
6657
     */
6658
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6659
      this.status = status;
6660
      return this;
6661
    }
6662
 
6663
    public void unsetStatus() {
6664
      this.status = null;
6665
    }
6666
 
6667
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6668
    public boolean isSetStatus() {
6669
      return this.status != null;
6670
    }
6671
 
6672
    public void setStatusIsSet(boolean value) {
6673
      if (!value) {
6674
        this.status = null;
6675
      }
6676
    }
6677
 
6678
    public String getDescription() {
6679
      return this.description;
6680
    }
6681
 
6682
    public changeTransactionStatus_args setDescription(String description) {
6683
      this.description = description;
6684
      return this;
6685
    }
6686
 
6687
    public void unsetDescription() {
6688
      this.description = null;
6689
    }
6690
 
6691
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6692
    public boolean isSetDescription() {
6693
      return this.description != null;
6694
    }
6695
 
6696
    public void setDescriptionIsSet(boolean value) {
6697
      if (!value) {
6698
        this.description = null;
6699
      }
6700
    }
6701
 
6702
    public void setFieldValue(_Fields field, Object value) {
6703
      switch (field) {
6704
      case TRANSACTION_ID:
6705
        if (value == null) {
6706
          unsetTransactionId();
6707
        } else {
6708
          setTransactionId((Long)value);
6709
        }
6710
        break;
6711
 
6712
      case STATUS:
6713
        if (value == null) {
6714
          unsetStatus();
6715
        } else {
6716
          setStatus((TransactionStatus)value);
6717
        }
6718
        break;
6719
 
6720
      case DESCRIPTION:
6721
        if (value == null) {
6722
          unsetDescription();
6723
        } else {
6724
          setDescription((String)value);
6725
        }
6726
        break;
6727
 
6728
      }
6729
    }
6730
 
6731
    public void setFieldValue(int fieldID, Object value) {
6732
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6733
    }
6734
 
6735
    public Object getFieldValue(_Fields field) {
6736
      switch (field) {
6737
      case TRANSACTION_ID:
6738
        return new Long(getTransactionId());
6739
 
6740
      case STATUS:
6741
        return getStatus();
6742
 
6743
      case DESCRIPTION:
6744
        return getDescription();
6745
 
6746
      }
6747
      throw new IllegalStateException();
6748
    }
6749
 
6750
    public Object getFieldValue(int fieldId) {
6751
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6752
    }
6753
 
6754
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6755
    public boolean isSet(_Fields field) {
6756
      switch (field) {
6757
      case TRANSACTION_ID:
6758
        return isSetTransactionId();
6759
      case STATUS:
6760
        return isSetStatus();
6761
      case DESCRIPTION:
6762
        return isSetDescription();
6763
      }
6764
      throw new IllegalStateException();
6765
    }
6766
 
6767
    public boolean isSet(int fieldID) {
6768
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6769
    }
6770
 
6771
    @Override
6772
    public boolean equals(Object that) {
6773
      if (that == null)
6774
        return false;
6775
      if (that instanceof changeTransactionStatus_args)
6776
        return this.equals((changeTransactionStatus_args)that);
6777
      return false;
6778
    }
6779
 
6780
    public boolean equals(changeTransactionStatus_args that) {
6781
      if (that == null)
6782
        return false;
6783
 
6784
      boolean this_present_transactionId = true;
6785
      boolean that_present_transactionId = true;
6786
      if (this_present_transactionId || that_present_transactionId) {
6787
        if (!(this_present_transactionId && that_present_transactionId))
6788
          return false;
6789
        if (this.transactionId != that.transactionId)
6790
          return false;
6791
      }
6792
 
6793
      boolean this_present_status = true && this.isSetStatus();
6794
      boolean that_present_status = true && that.isSetStatus();
6795
      if (this_present_status || that_present_status) {
6796
        if (!(this_present_status && that_present_status))
6797
          return false;
6798
        if (!this.status.equals(that.status))
6799
          return false;
6800
      }
6801
 
6802
      boolean this_present_description = true && this.isSetDescription();
6803
      boolean that_present_description = true && that.isSetDescription();
6804
      if (this_present_description || that_present_description) {
6805
        if (!(this_present_description && that_present_description))
6806
          return false;
6807
        if (!this.description.equals(that.description))
6808
          return false;
6809
      }
6810
 
6811
      return true;
6812
    }
6813
 
6814
    @Override
6815
    public int hashCode() {
6816
      return 0;
6817
    }
6818
 
6819
    public int compareTo(changeTransactionStatus_args other) {
6820
      if (!getClass().equals(other.getClass())) {
6821
        return getClass().getName().compareTo(other.getClass().getName());
6822
      }
6823
 
6824
      int lastComparison = 0;
6825
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6826
 
6827
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6828
      if (lastComparison != 0) {
6829
        return lastComparison;
6830
      }
6831
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6832
      if (lastComparison != 0) {
6833
        return lastComparison;
6834
      }
6835
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6836
      if (lastComparison != 0) {
6837
        return lastComparison;
6838
      }
6839
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6840
      if (lastComparison != 0) {
6841
        return lastComparison;
6842
      }
6843
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6844
      if (lastComparison != 0) {
6845
        return lastComparison;
6846
      }
6847
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6848
      if (lastComparison != 0) {
6849
        return lastComparison;
6850
      }
6851
      return 0;
6852
    }
6853
 
6854
    public void read(TProtocol iprot) throws TException {
6855
      TField field;
6856
      iprot.readStructBegin();
6857
      while (true)
6858
      {
6859
        field = iprot.readFieldBegin();
6860
        if (field.type == TType.STOP) { 
6861
          break;
6862
        }
6863
        _Fields fieldId = _Fields.findByThriftId(field.id);
6864
        if (fieldId == null) {
6865
          TProtocolUtil.skip(iprot, field.type);
6866
        } else {
6867
          switch (fieldId) {
6868
            case TRANSACTION_ID:
6869
              if (field.type == TType.I64) {
6870
                this.transactionId = iprot.readI64();
6871
                setTransactionIdIsSet(true);
6872
              } else { 
6873
                TProtocolUtil.skip(iprot, field.type);
6874
              }
6875
              break;
6876
            case STATUS:
6877
              if (field.type == TType.I32) {
6878
                this.status = TransactionStatus.findByValue(iprot.readI32());
6879
              } else { 
6880
                TProtocolUtil.skip(iprot, field.type);
6881
              }
6882
              break;
6883
            case DESCRIPTION:
6884
              if (field.type == TType.STRING) {
6885
                this.description = iprot.readString();
6886
              } else { 
6887
                TProtocolUtil.skip(iprot, field.type);
6888
              }
6889
              break;
6890
          }
6891
          iprot.readFieldEnd();
6892
        }
6893
      }
6894
      iprot.readStructEnd();
6895
      validate();
6896
    }
6897
 
6898
    public void write(TProtocol oprot) throws TException {
6899
      validate();
6900
 
6901
      oprot.writeStructBegin(STRUCT_DESC);
6902
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6903
      oprot.writeI64(this.transactionId);
6904
      oprot.writeFieldEnd();
6905
      if (this.status != null) {
6906
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6907
        oprot.writeI32(this.status.getValue());
6908
        oprot.writeFieldEnd();
6909
      }
6910
      if (this.description != null) {
6911
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6912
        oprot.writeString(this.description);
6913
        oprot.writeFieldEnd();
6914
      }
6915
      oprot.writeFieldStop();
6916
      oprot.writeStructEnd();
6917
    }
6918
 
6919
    @Override
6920
    public String toString() {
6921
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6922
      boolean first = true;
6923
 
6924
      sb.append("transactionId:");
6925
      sb.append(this.transactionId);
6926
      first = false;
6927
      if (!first) sb.append(", ");
6928
      sb.append("status:");
6929
      if (this.status == null) {
6930
        sb.append("null");
6931
      } else {
6932
        String status_name = status.name();
6933
        if (status_name != null) {
6934
          sb.append(status_name);
6935
          sb.append(" (");
6936
        }
6937
        sb.append(this.status);
6938
        if (status_name != null) {
6939
          sb.append(")");
6940
        }
6941
      }
6942
      first = false;
6943
      if (!first) sb.append(", ");
6944
      sb.append("description:");
6945
      if (this.description == null) {
6946
        sb.append("null");
6947
      } else {
6948
        sb.append(this.description);
6949
      }
6950
      first = false;
6951
      sb.append(")");
6952
      return sb.toString();
6953
    }
6954
 
6955
    public void validate() throws TException {
6956
      // check for required fields
6957
    }
6958
 
6959
  }
6960
 
6961
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6962
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6963
 
6964
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6965
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6966
 
6967
    private boolean success;
6968
    private TransactionServiceException ex;
6969
 
6970
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6971
    public enum _Fields implements TFieldIdEnum {
6972
      SUCCESS((short)0, "success"),
6973
      EX((short)1, "ex");
6974
 
6975
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6976
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6977
 
6978
      static {
6979
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6980
          byId.put((int)field._thriftId, field);
6981
          byName.put(field.getFieldName(), field);
6982
        }
6983
      }
6984
 
6985
      /**
6986
       * Find the _Fields constant that matches fieldId, or null if its not found.
6987
       */
6988
      public static _Fields findByThriftId(int fieldId) {
6989
        return byId.get(fieldId);
6990
      }
6991
 
6992
      /**
6993
       * Find the _Fields constant that matches fieldId, throwing an exception
6994
       * if it is not found.
6995
       */
6996
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6997
        _Fields fields = findByThriftId(fieldId);
6998
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6999
        return fields;
7000
      }
7001
 
7002
      /**
7003
       * Find the _Fields constant that matches name, or null if its not found.
7004
       */
7005
      public static _Fields findByName(String name) {
7006
        return byName.get(name);
7007
      }
7008
 
7009
      private final short _thriftId;
7010
      private final String _fieldName;
7011
 
7012
      _Fields(short thriftId, String fieldName) {
7013
        _thriftId = thriftId;
7014
        _fieldName = fieldName;
7015
      }
7016
 
7017
      public short getThriftFieldId() {
7018
        return _thriftId;
7019
      }
7020
 
7021
      public String getFieldName() {
7022
        return _fieldName;
7023
      }
7024
    }
7025
 
7026
    // isset id assignments
7027
    private static final int __SUCCESS_ISSET_ID = 0;
7028
    private BitSet __isset_bit_vector = new BitSet(1);
7029
 
7030
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7031
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7032
          new FieldValueMetaData(TType.BOOL)));
7033
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7034
          new FieldValueMetaData(TType.STRUCT)));
7035
    }});
7036
 
7037
    static {
7038
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
7039
    }
7040
 
7041
    public changeTransactionStatus_result() {
7042
    }
7043
 
7044
    public changeTransactionStatus_result(
7045
      boolean success,
7046
      TransactionServiceException ex)
7047
    {
7048
      this();
7049
      this.success = success;
7050
      setSuccessIsSet(true);
7051
      this.ex = ex;
7052
    }
7053
 
7054
    /**
7055
     * Performs a deep copy on <i>other</i>.
7056
     */
7057
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
7058
      __isset_bit_vector.clear();
7059
      __isset_bit_vector.or(other.__isset_bit_vector);
7060
      this.success = other.success;
7061
      if (other.isSetEx()) {
7062
        this.ex = new TransactionServiceException(other.ex);
7063
      }
7064
    }
7065
 
7066
    public changeTransactionStatus_result deepCopy() {
7067
      return new changeTransactionStatus_result(this);
7068
    }
7069
 
7070
    @Deprecated
7071
    public changeTransactionStatus_result clone() {
7072
      return new changeTransactionStatus_result(this);
7073
    }
7074
 
7075
    public boolean isSuccess() {
7076
      return this.success;
7077
    }
7078
 
7079
    public changeTransactionStatus_result setSuccess(boolean success) {
7080
      this.success = success;
7081
      setSuccessIsSet(true);
7082
      return this;
7083
    }
7084
 
7085
    public void unsetSuccess() {
7086
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7087
    }
7088
 
7089
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7090
    public boolean isSetSuccess() {
7091
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7092
    }
7093
 
7094
    public void setSuccessIsSet(boolean value) {
7095
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7096
    }
7097
 
7098
    public TransactionServiceException getEx() {
7099
      return this.ex;
7100
    }
7101
 
7102
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
7103
      this.ex = ex;
7104
      return this;
7105
    }
7106
 
7107
    public void unsetEx() {
7108
      this.ex = null;
7109
    }
7110
 
7111
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7112
    public boolean isSetEx() {
7113
      return this.ex != null;
7114
    }
7115
 
7116
    public void setExIsSet(boolean value) {
7117
      if (!value) {
7118
        this.ex = null;
7119
      }
7120
    }
7121
 
7122
    public void setFieldValue(_Fields field, Object value) {
7123
      switch (field) {
7124
      case SUCCESS:
7125
        if (value == null) {
7126
          unsetSuccess();
7127
        } else {
7128
          setSuccess((Boolean)value);
7129
        }
7130
        break;
7131
 
7132
      case EX:
7133
        if (value == null) {
7134
          unsetEx();
7135
        } else {
7136
          setEx((TransactionServiceException)value);
7137
        }
7138
        break;
7139
 
7140
      }
7141
    }
7142
 
7143
    public void setFieldValue(int fieldID, Object value) {
7144
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7145
    }
7146
 
7147
    public Object getFieldValue(_Fields field) {
7148
      switch (field) {
7149
      case SUCCESS:
7150
        return new Boolean(isSuccess());
7151
 
7152
      case EX:
7153
        return getEx();
7154
 
7155
      }
7156
      throw new IllegalStateException();
7157
    }
7158
 
7159
    public Object getFieldValue(int fieldId) {
7160
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7161
    }
7162
 
7163
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7164
    public boolean isSet(_Fields field) {
7165
      switch (field) {
7166
      case SUCCESS:
7167
        return isSetSuccess();
7168
      case EX:
7169
        return isSetEx();
7170
      }
7171
      throw new IllegalStateException();
7172
    }
7173
 
7174
    public boolean isSet(int fieldID) {
7175
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7176
    }
7177
 
7178
    @Override
7179
    public boolean equals(Object that) {
7180
      if (that == null)
7181
        return false;
7182
      if (that instanceof changeTransactionStatus_result)
7183
        return this.equals((changeTransactionStatus_result)that);
7184
      return false;
7185
    }
7186
 
7187
    public boolean equals(changeTransactionStatus_result that) {
7188
      if (that == null)
7189
        return false;
7190
 
7191
      boolean this_present_success = true;
7192
      boolean that_present_success = true;
7193
      if (this_present_success || that_present_success) {
7194
        if (!(this_present_success && that_present_success))
7195
          return false;
7196
        if (this.success != that.success)
7197
          return false;
7198
      }
7199
 
7200
      boolean this_present_ex = true && this.isSetEx();
7201
      boolean that_present_ex = true && that.isSetEx();
7202
      if (this_present_ex || that_present_ex) {
7203
        if (!(this_present_ex && that_present_ex))
7204
          return false;
7205
        if (!this.ex.equals(that.ex))
7206
          return false;
7207
      }
7208
 
7209
      return true;
7210
    }
7211
 
7212
    @Override
7213
    public int hashCode() {
7214
      return 0;
7215
    }
7216
 
7217
    public int compareTo(changeTransactionStatus_result other) {
7218
      if (!getClass().equals(other.getClass())) {
7219
        return getClass().getName().compareTo(other.getClass().getName());
7220
      }
7221
 
7222
      int lastComparison = 0;
7223
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
7224
 
7225
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7226
      if (lastComparison != 0) {
7227
        return lastComparison;
7228
      }
7229
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7230
      if (lastComparison != 0) {
7231
        return lastComparison;
7232
      }
7233
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7234
      if (lastComparison != 0) {
7235
        return lastComparison;
7236
      }
7237
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7238
      if (lastComparison != 0) {
7239
        return lastComparison;
7240
      }
7241
      return 0;
7242
    }
7243
 
7244
    public void read(TProtocol iprot) throws TException {
7245
      TField field;
7246
      iprot.readStructBegin();
7247
      while (true)
7248
      {
7249
        field = iprot.readFieldBegin();
7250
        if (field.type == TType.STOP) { 
7251
          break;
7252
        }
7253
        _Fields fieldId = _Fields.findByThriftId(field.id);
7254
        if (fieldId == null) {
7255
          TProtocolUtil.skip(iprot, field.type);
7256
        } else {
7257
          switch (fieldId) {
7258
            case SUCCESS:
7259
              if (field.type == TType.BOOL) {
7260
                this.success = iprot.readBool();
7261
                setSuccessIsSet(true);
7262
              } else { 
7263
                TProtocolUtil.skip(iprot, field.type);
7264
              }
7265
              break;
7266
            case EX:
7267
              if (field.type == TType.STRUCT) {
7268
                this.ex = new TransactionServiceException();
7269
                this.ex.read(iprot);
7270
              } else { 
7271
                TProtocolUtil.skip(iprot, field.type);
7272
              }
7273
              break;
7274
          }
7275
          iprot.readFieldEnd();
7276
        }
7277
      }
7278
      iprot.readStructEnd();
7279
      validate();
7280
    }
7281
 
7282
    public void write(TProtocol oprot) throws TException {
7283
      oprot.writeStructBegin(STRUCT_DESC);
7284
 
7285
      if (this.isSetSuccess()) {
7286
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7287
        oprot.writeBool(this.success);
7288
        oprot.writeFieldEnd();
7289
      } else if (this.isSetEx()) {
7290
        oprot.writeFieldBegin(EX_FIELD_DESC);
7291
        this.ex.write(oprot);
7292
        oprot.writeFieldEnd();
7293
      }
7294
      oprot.writeFieldStop();
7295
      oprot.writeStructEnd();
7296
    }
7297
 
7298
    @Override
7299
    public String toString() {
7300
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7301
      boolean first = true;
7302
 
7303
      sb.append("success:");
7304
      sb.append(this.success);
7305
      first = false;
7306
      if (!first) sb.append(", ");
7307
      sb.append("ex:");
7308
      if (this.ex == null) {
7309
        sb.append("null");
7310
      } else {
7311
        sb.append(this.ex);
7312
      }
7313
      first = false;
7314
      sb.append(")");
7315
      return sb.toString();
7316
    }
7317
 
7318
    public void validate() throws TException {
7319
      // check for required fields
7320
    }
7321
 
7322
  }
7323
 
1398 varun.gupt 7324
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7325
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7326
 
7327
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7328
 
7329
    private long transactionId;
7330
 
7331
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7332
    public enum _Fields implements TFieldIdEnum {
7333
      TRANSACTION_ID((short)1, "transactionId");
7334
 
7335
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7336
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7337
 
7338
      static {
7339
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7340
          byId.put((int)field._thriftId, field);
7341
          byName.put(field.getFieldName(), field);
7342
        }
7343
      }
7344
 
7345
      /**
7346
       * Find the _Fields constant that matches fieldId, or null if its not found.
7347
       */
7348
      public static _Fields findByThriftId(int fieldId) {
7349
        return byId.get(fieldId);
7350
      }
7351
 
7352
      /**
7353
       * Find the _Fields constant that matches fieldId, throwing an exception
7354
       * if it is not found.
7355
       */
7356
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7357
        _Fields fields = findByThriftId(fieldId);
7358
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7359
        return fields;
7360
      }
7361
 
7362
      /**
7363
       * Find the _Fields constant that matches name, or null if its not found.
7364
       */
7365
      public static _Fields findByName(String name) {
7366
        return byName.get(name);
7367
      }
7368
 
7369
      private final short _thriftId;
7370
      private final String _fieldName;
7371
 
7372
      _Fields(short thriftId, String fieldName) {
7373
        _thriftId = thriftId;
7374
        _fieldName = fieldName;
7375
      }
7376
 
7377
      public short getThriftFieldId() {
7378
        return _thriftId;
7379
      }
7380
 
7381
      public String getFieldName() {
7382
        return _fieldName;
7383
      }
7384
    }
7385
 
7386
    // isset id assignments
7387
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7388
    private BitSet __isset_bit_vector = new BitSet(1);
7389
 
7390
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7391
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7392
          new FieldValueMetaData(TType.I64)));
7393
    }});
7394
 
7395
    static {
1398 varun.gupt 7396
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7397
    }
7398
 
1398 varun.gupt 7399
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7400
    }
7401
 
1398 varun.gupt 7402
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7403
      long transactionId)
7404
    {
7405
      this();
7406
      this.transactionId = transactionId;
7407
      setTransactionIdIsSet(true);
7408
    }
7409
 
7410
    /**
7411
     * Performs a deep copy on <i>other</i>.
7412
     */
1398 varun.gupt 7413
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7414
      __isset_bit_vector.clear();
7415
      __isset_bit_vector.or(other.__isset_bit_vector);
7416
      this.transactionId = other.transactionId;
7417
    }
7418
 
1398 varun.gupt 7419
    public enqueueTransactionInfoEmail_args deepCopy() {
7420
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7421
    }
7422
 
7423
    @Deprecated
1398 varun.gupt 7424
    public enqueueTransactionInfoEmail_args clone() {
7425
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7426
    }
7427
 
7428
    public long getTransactionId() {
7429
      return this.transactionId;
7430
    }
7431
 
1398 varun.gupt 7432
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7433
      this.transactionId = transactionId;
7434
      setTransactionIdIsSet(true);
7435
      return this;
7436
    }
7437
 
7438
    public void unsetTransactionId() {
7439
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7440
    }
7441
 
7442
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7443
    public boolean isSetTransactionId() {
7444
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7445
    }
7446
 
7447
    public void setTransactionIdIsSet(boolean value) {
7448
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7449
    }
7450
 
7451
    public void setFieldValue(_Fields field, Object value) {
7452
      switch (field) {
7453
      case TRANSACTION_ID:
7454
        if (value == null) {
7455
          unsetTransactionId();
7456
        } else {
7457
          setTransactionId((Long)value);
7458
        }
7459
        break;
7460
 
7461
      }
7462
    }
7463
 
7464
    public void setFieldValue(int fieldID, Object value) {
7465
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7466
    }
7467
 
7468
    public Object getFieldValue(_Fields field) {
7469
      switch (field) {
7470
      case TRANSACTION_ID:
7471
        return new Long(getTransactionId());
7472
 
7473
      }
7474
      throw new IllegalStateException();
7475
    }
7476
 
7477
    public Object getFieldValue(int fieldId) {
7478
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7479
    }
7480
 
7481
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7482
    public boolean isSet(_Fields field) {
7483
      switch (field) {
7484
      case TRANSACTION_ID:
7485
        return isSetTransactionId();
7486
      }
7487
      throw new IllegalStateException();
7488
    }
7489
 
7490
    public boolean isSet(int fieldID) {
7491
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7492
    }
7493
 
7494
    @Override
7495
    public boolean equals(Object that) {
7496
      if (that == null)
7497
        return false;
1398 varun.gupt 7498
      if (that instanceof enqueueTransactionInfoEmail_args)
7499
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7500
      return false;
7501
    }
7502
 
1398 varun.gupt 7503
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7504
      if (that == null)
7505
        return false;
7506
 
7507
      boolean this_present_transactionId = true;
7508
      boolean that_present_transactionId = true;
7509
      if (this_present_transactionId || that_present_transactionId) {
7510
        if (!(this_present_transactionId && that_present_transactionId))
7511
          return false;
7512
        if (this.transactionId != that.transactionId)
7513
          return false;
7514
      }
7515
 
7516
      return true;
7517
    }
7518
 
7519
    @Override
7520
    public int hashCode() {
7521
      return 0;
7522
    }
7523
 
1398 varun.gupt 7524
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7525
      if (!getClass().equals(other.getClass())) {
7526
        return getClass().getName().compareTo(other.getClass().getName());
7527
      }
7528
 
7529
      int lastComparison = 0;
1398 varun.gupt 7530
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7531
 
7532
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7533
      if (lastComparison != 0) {
7534
        return lastComparison;
7535
      }
7536
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7537
      if (lastComparison != 0) {
7538
        return lastComparison;
7539
      }
7540
      return 0;
7541
    }
7542
 
7543
    public void read(TProtocol iprot) throws TException {
7544
      TField field;
7545
      iprot.readStructBegin();
7546
      while (true)
7547
      {
7548
        field = iprot.readFieldBegin();
7549
        if (field.type == TType.STOP) { 
7550
          break;
7551
        }
7552
        _Fields fieldId = _Fields.findByThriftId(field.id);
7553
        if (fieldId == null) {
7554
          TProtocolUtil.skip(iprot, field.type);
7555
        } else {
7556
          switch (fieldId) {
7557
            case TRANSACTION_ID:
7558
              if (field.type == TType.I64) {
7559
                this.transactionId = iprot.readI64();
7560
                setTransactionIdIsSet(true);
7561
              } else { 
7562
                TProtocolUtil.skip(iprot, field.type);
7563
              }
7564
              break;
7565
          }
7566
          iprot.readFieldEnd();
7567
        }
7568
      }
7569
      iprot.readStructEnd();
7570
      validate();
7571
    }
7572
 
7573
    public void write(TProtocol oprot) throws TException {
7574
      validate();
7575
 
7576
      oprot.writeStructBegin(STRUCT_DESC);
7577
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7578
      oprot.writeI64(this.transactionId);
7579
      oprot.writeFieldEnd();
7580
      oprot.writeFieldStop();
7581
      oprot.writeStructEnd();
7582
    }
7583
 
7584
    @Override
7585
    public String toString() {
1398 varun.gupt 7586
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 7587
      boolean first = true;
7588
 
7589
      sb.append("transactionId:");
7590
      sb.append(this.transactionId);
7591
      first = false;
7592
      sb.append(")");
7593
      return sb.toString();
7594
    }
7595
 
7596
    public void validate() throws TException {
7597
      // check for required fields
7598
    }
7599
 
7600
  }
7601
 
1398 varun.gupt 7602
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
7603
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 7604
 
7605
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7606
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7607
 
7608
    private boolean success;
7609
    private TransactionServiceException ex;
7610
 
7611
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7612
    public enum _Fields implements TFieldIdEnum {
7613
      SUCCESS((short)0, "success"),
7614
      EX((short)1, "ex");
7615
 
7616
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7617
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7618
 
7619
      static {
7620
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7621
          byId.put((int)field._thriftId, field);
7622
          byName.put(field.getFieldName(), field);
7623
        }
7624
      }
7625
 
7626
      /**
7627
       * Find the _Fields constant that matches fieldId, or null if its not found.
7628
       */
7629
      public static _Fields findByThriftId(int fieldId) {
7630
        return byId.get(fieldId);
7631
      }
7632
 
7633
      /**
7634
       * Find the _Fields constant that matches fieldId, throwing an exception
7635
       * if it is not found.
7636
       */
7637
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7638
        _Fields fields = findByThriftId(fieldId);
7639
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7640
        return fields;
7641
      }
7642
 
7643
      /**
7644
       * Find the _Fields constant that matches name, or null if its not found.
7645
       */
7646
      public static _Fields findByName(String name) {
7647
        return byName.get(name);
7648
      }
7649
 
7650
      private final short _thriftId;
7651
      private final String _fieldName;
7652
 
7653
      _Fields(short thriftId, String fieldName) {
7654
        _thriftId = thriftId;
7655
        _fieldName = fieldName;
7656
      }
7657
 
7658
      public short getThriftFieldId() {
7659
        return _thriftId;
7660
      }
7661
 
7662
      public String getFieldName() {
7663
        return _fieldName;
7664
      }
7665
    }
7666
 
7667
    // isset id assignments
7668
    private static final int __SUCCESS_ISSET_ID = 0;
7669
    private BitSet __isset_bit_vector = new BitSet(1);
7670
 
7671
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7672
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7673
          new FieldValueMetaData(TType.BOOL)));
7674
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7675
          new FieldValueMetaData(TType.STRUCT)));
7676
    }});
7677
 
7678
    static {
1398 varun.gupt 7679
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 7680
    }
7681
 
1398 varun.gupt 7682
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 7683
    }
7684
 
1398 varun.gupt 7685
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 7686
      boolean success,
7687
      TransactionServiceException ex)
7688
    {
7689
      this();
7690
      this.success = success;
7691
      setSuccessIsSet(true);
7692
      this.ex = ex;
7693
    }
7694
 
7695
    /**
7696
     * Performs a deep copy on <i>other</i>.
7697
     */
1398 varun.gupt 7698
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7699
      __isset_bit_vector.clear();
7700
      __isset_bit_vector.or(other.__isset_bit_vector);
7701
      this.success = other.success;
7702
      if (other.isSetEx()) {
7703
        this.ex = new TransactionServiceException(other.ex);
7704
      }
7705
    }
7706
 
1398 varun.gupt 7707
    public enqueueTransactionInfoEmail_result deepCopy() {
7708
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7709
    }
7710
 
7711
    @Deprecated
1398 varun.gupt 7712
    public enqueueTransactionInfoEmail_result clone() {
7713
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7714
    }
7715
 
7716
    public boolean isSuccess() {
7717
      return this.success;
7718
    }
7719
 
1398 varun.gupt 7720
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 7721
      this.success = success;
7722
      setSuccessIsSet(true);
7723
      return this;
7724
    }
7725
 
7726
    public void unsetSuccess() {
7727
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7728
    }
7729
 
7730
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7731
    public boolean isSetSuccess() {
7732
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7733
    }
7734
 
7735
    public void setSuccessIsSet(boolean value) {
7736
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7737
    }
7738
 
7739
    public TransactionServiceException getEx() {
7740
      return this.ex;
7741
    }
7742
 
1398 varun.gupt 7743
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 7744
      this.ex = ex;
7745
      return this;
7746
    }
7747
 
7748
    public void unsetEx() {
7749
      this.ex = null;
7750
    }
7751
 
7752
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7753
    public boolean isSetEx() {
7754
      return this.ex != null;
7755
    }
7756
 
7757
    public void setExIsSet(boolean value) {
7758
      if (!value) {
7759
        this.ex = null;
7760
      }
7761
    }
7762
 
7763
    public void setFieldValue(_Fields field, Object value) {
7764
      switch (field) {
7765
      case SUCCESS:
7766
        if (value == null) {
7767
          unsetSuccess();
7768
        } else {
7769
          setSuccess((Boolean)value);
7770
        }
7771
        break;
7772
 
7773
      case EX:
7774
        if (value == null) {
7775
          unsetEx();
7776
        } else {
7777
          setEx((TransactionServiceException)value);
7778
        }
7779
        break;
7780
 
7781
      }
7782
    }
7783
 
7784
    public void setFieldValue(int fieldID, Object value) {
7785
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7786
    }
7787
 
7788
    public Object getFieldValue(_Fields field) {
7789
      switch (field) {
7790
      case SUCCESS:
7791
        return new Boolean(isSuccess());
7792
 
7793
      case EX:
7794
        return getEx();
7795
 
7796
      }
7797
      throw new IllegalStateException();
7798
    }
7799
 
7800
    public Object getFieldValue(int fieldId) {
7801
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7802
    }
7803
 
7804
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7805
    public boolean isSet(_Fields field) {
7806
      switch (field) {
7807
      case SUCCESS:
7808
        return isSetSuccess();
7809
      case EX:
7810
        return isSetEx();
7811
      }
7812
      throw new IllegalStateException();
7813
    }
7814
 
7815
    public boolean isSet(int fieldID) {
7816
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7817
    }
7818
 
7819
    @Override
7820
    public boolean equals(Object that) {
7821
      if (that == null)
7822
        return false;
1398 varun.gupt 7823
      if (that instanceof enqueueTransactionInfoEmail_result)
7824
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 7825
      return false;
7826
    }
7827
 
1398 varun.gupt 7828
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 7829
      if (that == null)
7830
        return false;
7831
 
7832
      boolean this_present_success = true;
7833
      boolean that_present_success = true;
7834
      if (this_present_success || that_present_success) {
7835
        if (!(this_present_success && that_present_success))
7836
          return false;
7837
        if (this.success != that.success)
7838
          return false;
7839
      }
7840
 
7841
      boolean this_present_ex = true && this.isSetEx();
7842
      boolean that_present_ex = true && that.isSetEx();
7843
      if (this_present_ex || that_present_ex) {
7844
        if (!(this_present_ex && that_present_ex))
7845
          return false;
7846
        if (!this.ex.equals(that.ex))
7847
          return false;
7848
      }
7849
 
7850
      return true;
7851
    }
7852
 
7853
    @Override
7854
    public int hashCode() {
7855
      return 0;
7856
    }
7857
 
1398 varun.gupt 7858
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7859
      if (!getClass().equals(other.getClass())) {
7860
        return getClass().getName().compareTo(other.getClass().getName());
7861
      }
7862
 
7863
      int lastComparison = 0;
1398 varun.gupt 7864
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 7865
 
7866
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7867
      if (lastComparison != 0) {
7868
        return lastComparison;
7869
      }
7870
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7871
      if (lastComparison != 0) {
7872
        return lastComparison;
7873
      }
7874
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7875
      if (lastComparison != 0) {
7876
        return lastComparison;
7877
      }
7878
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7879
      if (lastComparison != 0) {
7880
        return lastComparison;
7881
      }
7882
      return 0;
7883
    }
7884
 
7885
    public void read(TProtocol iprot) throws TException {
7886
      TField field;
7887
      iprot.readStructBegin();
7888
      while (true)
7889
      {
7890
        field = iprot.readFieldBegin();
7891
        if (field.type == TType.STOP) { 
7892
          break;
7893
        }
7894
        _Fields fieldId = _Fields.findByThriftId(field.id);
7895
        if (fieldId == null) {
7896
          TProtocolUtil.skip(iprot, field.type);
7897
        } else {
7898
          switch (fieldId) {
7899
            case SUCCESS:
7900
              if (field.type == TType.BOOL) {
7901
                this.success = iprot.readBool();
7902
                setSuccessIsSet(true);
7903
              } else { 
7904
                TProtocolUtil.skip(iprot, field.type);
7905
              }
7906
              break;
7907
            case EX:
7908
              if (field.type == TType.STRUCT) {
7909
                this.ex = new TransactionServiceException();
7910
                this.ex.read(iprot);
7911
              } else { 
7912
                TProtocolUtil.skip(iprot, field.type);
7913
              }
7914
              break;
7915
          }
7916
          iprot.readFieldEnd();
7917
        }
7918
      }
7919
      iprot.readStructEnd();
7920
      validate();
7921
    }
7922
 
7923
    public void write(TProtocol oprot) throws TException {
7924
      oprot.writeStructBegin(STRUCT_DESC);
7925
 
7926
      if (this.isSetSuccess()) {
7927
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7928
        oprot.writeBool(this.success);
7929
        oprot.writeFieldEnd();
7930
      } else if (this.isSetEx()) {
7931
        oprot.writeFieldBegin(EX_FIELD_DESC);
7932
        this.ex.write(oprot);
7933
        oprot.writeFieldEnd();
7934
      }
7935
      oprot.writeFieldStop();
7936
      oprot.writeStructEnd();
7937
    }
7938
 
7939
    @Override
7940
    public String toString() {
1398 varun.gupt 7941
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 7942
      boolean first = true;
7943
 
7944
      sb.append("success:");
7945
      sb.append(this.success);
7946
      first = false;
7947
      if (!first) sb.append(", ");
7948
      sb.append("ex:");
7949
      if (this.ex == null) {
7950
        sb.append("null");
7951
      } else {
7952
        sb.append(this.ex);
7953
      }
7954
      first = false;
7955
      sb.append(")");
7956
      return sb.toString();
7957
    }
7958
 
7959
    public void validate() throws TException {
7960
      // check for required fields
7961
    }
7962
 
7963
  }
7964
 
483 rajveer 7965
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
7966
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 7967
 
483 rajveer 7968
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7969
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
7970
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
7971
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 7972
 
483 rajveer 7973
    private OrderStatus status;
7974
    private long from_date;
7975
    private long to_date;
7976
    private long warehouse_id;
68 ashish 7977
 
7978
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7979
    public enum _Fields implements TFieldIdEnum {
483 rajveer 7980
      /**
7981
       * 
7982
       * @see OrderStatus
7983
       */
7984
      STATUS((short)1, "status"),
7985
      FROM_DATE((short)2, "from_date"),
7986
      TO_DATE((short)3, "to_date"),
7987
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 7988
 
7989
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7990
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7991
 
7992
      static {
7993
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7994
          byId.put((int)field._thriftId, field);
7995
          byName.put(field.getFieldName(), field);
7996
        }
7997
      }
7998
 
7999
      /**
8000
       * Find the _Fields constant that matches fieldId, or null if its not found.
8001
       */
8002
      public static _Fields findByThriftId(int fieldId) {
8003
        return byId.get(fieldId);
8004
      }
8005
 
8006
      /**
8007
       * Find the _Fields constant that matches fieldId, throwing an exception
8008
       * if it is not found.
8009
       */
8010
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8011
        _Fields fields = findByThriftId(fieldId);
8012
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8013
        return fields;
8014
      }
8015
 
8016
      /**
8017
       * Find the _Fields constant that matches name, or null if its not found.
8018
       */
8019
      public static _Fields findByName(String name) {
8020
        return byName.get(name);
8021
      }
8022
 
8023
      private final short _thriftId;
8024
      private final String _fieldName;
8025
 
8026
      _Fields(short thriftId, String fieldName) {
8027
        _thriftId = thriftId;
8028
        _fieldName = fieldName;
8029
      }
8030
 
8031
      public short getThriftFieldId() {
8032
        return _thriftId;
8033
      }
8034
 
8035
      public String getFieldName() {
8036
        return _fieldName;
8037
      }
8038
    }
8039
 
8040
    // isset id assignments
483 rajveer 8041
    private static final int __FROM_DATE_ISSET_ID = 0;
8042
    private static final int __TO_DATE_ISSET_ID = 1;
8043
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8044
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 8045
 
8046
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8047
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8048
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8049
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 8050
          new FieldValueMetaData(TType.I64)));
483 rajveer 8051
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
8052
          new FieldValueMetaData(TType.I64)));
8053
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8054
          new FieldValueMetaData(TType.I64)));
68 ashish 8055
    }});
8056
 
8057
    static {
483 rajveer 8058
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 8059
    }
8060
 
483 rajveer 8061
    public getAllOrders_args() {
68 ashish 8062
    }
8063
 
483 rajveer 8064
    public getAllOrders_args(
8065
      OrderStatus status,
8066
      long from_date,
8067
      long to_date,
8068
      long warehouse_id)
68 ashish 8069
    {
8070
      this();
483 rajveer 8071
      this.status = status;
8072
      this.from_date = from_date;
8073
      setFrom_dateIsSet(true);
8074
      this.to_date = to_date;
8075
      setTo_dateIsSet(true);
8076
      this.warehouse_id = warehouse_id;
8077
      setWarehouse_idIsSet(true);
68 ashish 8078
    }
8079
 
8080
    /**
8081
     * Performs a deep copy on <i>other</i>.
8082
     */
483 rajveer 8083
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 8084
      __isset_bit_vector.clear();
8085
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8086
      if (other.isSetStatus()) {
8087
        this.status = other.status;
8088
      }
8089
      this.from_date = other.from_date;
8090
      this.to_date = other.to_date;
8091
      this.warehouse_id = other.warehouse_id;
68 ashish 8092
    }
8093
 
483 rajveer 8094
    public getAllOrders_args deepCopy() {
8095
      return new getAllOrders_args(this);
68 ashish 8096
    }
8097
 
8098
    @Deprecated
483 rajveer 8099
    public getAllOrders_args clone() {
8100
      return new getAllOrders_args(this);
68 ashish 8101
    }
8102
 
483 rajveer 8103
    /**
8104
     * 
8105
     * @see OrderStatus
8106
     */
8107
    public OrderStatus getStatus() {
8108
      return this.status;
68 ashish 8109
    }
8110
 
483 rajveer 8111
    /**
8112
     * 
8113
     * @see OrderStatus
8114
     */
8115
    public getAllOrders_args setStatus(OrderStatus status) {
8116
      this.status = status;
68 ashish 8117
      return this;
8118
    }
8119
 
483 rajveer 8120
    public void unsetStatus() {
8121
      this.status = null;
68 ashish 8122
    }
8123
 
483 rajveer 8124
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8125
    public boolean isSetStatus() {
8126
      return this.status != null;
68 ashish 8127
    }
8128
 
483 rajveer 8129
    public void setStatusIsSet(boolean value) {
8130
      if (!value) {
8131
        this.status = null;
68 ashish 8132
      }
8133
    }
8134
 
483 rajveer 8135
    public long getFrom_date() {
8136
      return this.from_date;
68 ashish 8137
    }
8138
 
483 rajveer 8139
    public getAllOrders_args setFrom_date(long from_date) {
8140
      this.from_date = from_date;
8141
      setFrom_dateIsSet(true);
8142
      return this;
68 ashish 8143
    }
8144
 
483 rajveer 8145
    public void unsetFrom_date() {
8146
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 8147
    }
8148
 
483 rajveer 8149
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
8150
    public boolean isSetFrom_date() {
8151
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 8152
    }
8153
 
483 rajveer 8154
    public void setFrom_dateIsSet(boolean value) {
8155
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 8156
    }
8157
 
483 rajveer 8158
    public long getTo_date() {
8159
      return this.to_date;
68 ashish 8160
    }
8161
 
483 rajveer 8162
    public getAllOrders_args setTo_date(long to_date) {
8163
      this.to_date = to_date;
8164
      setTo_dateIsSet(true);
68 ashish 8165
      return this;
8166
    }
8167
 
483 rajveer 8168
    public void unsetTo_date() {
8169
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 8170
    }
8171
 
483 rajveer 8172
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
8173
    public boolean isSetTo_date() {
8174
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 8175
    }
8176
 
483 rajveer 8177
    public void setTo_dateIsSet(boolean value) {
8178
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 8179
    }
8180
 
483 rajveer 8181
    public long getWarehouse_id() {
8182
      return this.warehouse_id;
68 ashish 8183
    }
8184
 
483 rajveer 8185
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
8186
      this.warehouse_id = warehouse_id;
8187
      setWarehouse_idIsSet(true);
68 ashish 8188
      return this;
8189
    }
8190
 
483 rajveer 8191
    public void unsetWarehouse_id() {
8192
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8193
    }
8194
 
483 rajveer 8195
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8196
    public boolean isSetWarehouse_id() {
8197
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8198
    }
8199
 
483 rajveer 8200
    public void setWarehouse_idIsSet(boolean value) {
8201
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 8202
    }
8203
 
8204
    public void setFieldValue(_Fields field, Object value) {
8205
      switch (field) {
483 rajveer 8206
      case STATUS:
68 ashish 8207
        if (value == null) {
483 rajveer 8208
          unsetStatus();
68 ashish 8209
        } else {
483 rajveer 8210
          setStatus((OrderStatus)value);
68 ashish 8211
        }
8212
        break;
8213
 
483 rajveer 8214
      case FROM_DATE:
68 ashish 8215
        if (value == null) {
483 rajveer 8216
          unsetFrom_date();
68 ashish 8217
        } else {
483 rajveer 8218
          setFrom_date((Long)value);
68 ashish 8219
        }
8220
        break;
8221
 
483 rajveer 8222
      case TO_DATE:
8223
        if (value == null) {
8224
          unsetTo_date();
8225
        } else {
8226
          setTo_date((Long)value);
8227
        }
8228
        break;
8229
 
8230
      case WAREHOUSE_ID:
8231
        if (value == null) {
8232
          unsetWarehouse_id();
8233
        } else {
8234
          setWarehouse_id((Long)value);
8235
        }
8236
        break;
8237
 
68 ashish 8238
      }
8239
    }
8240
 
8241
    public void setFieldValue(int fieldID, Object value) {
8242
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8243
    }
8244
 
8245
    public Object getFieldValue(_Fields field) {
8246
      switch (field) {
483 rajveer 8247
      case STATUS:
8248
        return getStatus();
68 ashish 8249
 
483 rajveer 8250
      case FROM_DATE:
8251
        return new Long(getFrom_date());
68 ashish 8252
 
483 rajveer 8253
      case TO_DATE:
8254
        return new Long(getTo_date());
8255
 
8256
      case WAREHOUSE_ID:
8257
        return new Long(getWarehouse_id());
8258
 
68 ashish 8259
      }
8260
      throw new IllegalStateException();
8261
    }
8262
 
8263
    public Object getFieldValue(int fieldId) {
8264
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8265
    }
8266
 
8267
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8268
    public boolean isSet(_Fields field) {
8269
      switch (field) {
483 rajveer 8270
      case STATUS:
8271
        return isSetStatus();
8272
      case FROM_DATE:
8273
        return isSetFrom_date();
8274
      case TO_DATE:
8275
        return isSetTo_date();
8276
      case WAREHOUSE_ID:
8277
        return isSetWarehouse_id();
68 ashish 8278
      }
8279
      throw new IllegalStateException();
8280
    }
8281
 
8282
    public boolean isSet(int fieldID) {
8283
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8284
    }
8285
 
8286
    @Override
8287
    public boolean equals(Object that) {
8288
      if (that == null)
8289
        return false;
483 rajveer 8290
      if (that instanceof getAllOrders_args)
8291
        return this.equals((getAllOrders_args)that);
68 ashish 8292
      return false;
8293
    }
8294
 
483 rajveer 8295
    public boolean equals(getAllOrders_args that) {
68 ashish 8296
      if (that == null)
8297
        return false;
8298
 
483 rajveer 8299
      boolean this_present_status = true && this.isSetStatus();
8300
      boolean that_present_status = true && that.isSetStatus();
8301
      if (this_present_status || that_present_status) {
8302
        if (!(this_present_status && that_present_status))
68 ashish 8303
          return false;
483 rajveer 8304
        if (!this.status.equals(that.status))
68 ashish 8305
          return false;
8306
      }
8307
 
483 rajveer 8308
      boolean this_present_from_date = true;
8309
      boolean that_present_from_date = true;
8310
      if (this_present_from_date || that_present_from_date) {
8311
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8312
          return false;
483 rajveer 8313
        if (this.from_date != that.from_date)
68 ashish 8314
          return false;
8315
      }
8316
 
483 rajveer 8317
      boolean this_present_to_date = true;
8318
      boolean that_present_to_date = true;
8319
      if (this_present_to_date || that_present_to_date) {
8320
        if (!(this_present_to_date && that_present_to_date))
8321
          return false;
8322
        if (this.to_date != that.to_date)
8323
          return false;
68 ashish 8324
      }
8325
 
483 rajveer 8326
      boolean this_present_warehouse_id = true;
8327
      boolean that_present_warehouse_id = true;
8328
      if (this_present_warehouse_id || that_present_warehouse_id) {
8329
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8330
          return false;
483 rajveer 8331
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8332
          return false;
8333
      }
8334
 
8335
      return true;
8336
    }
8337
 
8338
    @Override
8339
    public int hashCode() {
8340
      return 0;
8341
    }
8342
 
483 rajveer 8343
    public int compareTo(getAllOrders_args other) {
68 ashish 8344
      if (!getClass().equals(other.getClass())) {
8345
        return getClass().getName().compareTo(other.getClass().getName());
8346
      }
8347
 
8348
      int lastComparison = 0;
483 rajveer 8349
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8350
 
483 rajveer 8351
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8352
      if (lastComparison != 0) {
8353
        return lastComparison;
8354
      }
483 rajveer 8355
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8356
      if (lastComparison != 0) {
8357
        return lastComparison;
8358
      }
483 rajveer 8359
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8360
      if (lastComparison != 0) {
8361
        return lastComparison;
8362
      }
8363
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8364
      if (lastComparison != 0) {
8365
        return lastComparison;
8366
      }
8367
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8368
      if (lastComparison != 0) {
8369
        return lastComparison;
8370
      }
8371
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8372
      if (lastComparison != 0) {
8373
        return lastComparison;
8374
      }
8375
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8376
      if (lastComparison != 0) {
8377
        return lastComparison;
8378
      }
8379
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8380
      if (lastComparison != 0) {
8381
        return lastComparison;
8382
      }
68 ashish 8383
      return 0;
8384
    }
8385
 
8386
    public void read(TProtocol iprot) throws TException {
8387
      TField field;
8388
      iprot.readStructBegin();
8389
      while (true)
8390
      {
8391
        field = iprot.readFieldBegin();
8392
        if (field.type == TType.STOP) { 
8393
          break;
8394
        }
8395
        _Fields fieldId = _Fields.findByThriftId(field.id);
8396
        if (fieldId == null) {
8397
          TProtocolUtil.skip(iprot, field.type);
8398
        } else {
8399
          switch (fieldId) {
483 rajveer 8400
            case STATUS:
8401
              if (field.type == TType.I32) {
8402
                this.status = OrderStatus.findByValue(iprot.readI32());
8403
              } else { 
8404
                TProtocolUtil.skip(iprot, field.type);
8405
              }
8406
              break;
8407
            case FROM_DATE:
68 ashish 8408
              if (field.type == TType.I64) {
483 rajveer 8409
                this.from_date = iprot.readI64();
8410
                setFrom_dateIsSet(true);
68 ashish 8411
              } else { 
8412
                TProtocolUtil.skip(iprot, field.type);
8413
              }
8414
              break;
483 rajveer 8415
            case TO_DATE:
8416
              if (field.type == TType.I64) {
8417
                this.to_date = iprot.readI64();
8418
                setTo_dateIsSet(true);
8419
              } else { 
8420
                TProtocolUtil.skip(iprot, field.type);
8421
              }
8422
              break;
8423
            case WAREHOUSE_ID:
8424
              if (field.type == TType.I64) {
8425
                this.warehouse_id = iprot.readI64();
8426
                setWarehouse_idIsSet(true);
8427
              } else { 
8428
                TProtocolUtil.skip(iprot, field.type);
8429
              }
8430
              break;
68 ashish 8431
          }
8432
          iprot.readFieldEnd();
8433
        }
8434
      }
8435
      iprot.readStructEnd();
8436
      validate();
8437
    }
8438
 
8439
    public void write(TProtocol oprot) throws TException {
8440
      validate();
8441
 
8442
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8443
      if (this.status != null) {
8444
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8445
        oprot.writeI32(this.status.getValue());
8446
        oprot.writeFieldEnd();
8447
      }
8448
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8449
      oprot.writeI64(this.from_date);
68 ashish 8450
      oprot.writeFieldEnd();
483 rajveer 8451
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8452
      oprot.writeI64(this.to_date);
8453
      oprot.writeFieldEnd();
8454
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8455
      oprot.writeI64(this.warehouse_id);
8456
      oprot.writeFieldEnd();
68 ashish 8457
      oprot.writeFieldStop();
8458
      oprot.writeStructEnd();
8459
    }
8460
 
8461
    @Override
8462
    public String toString() {
483 rajveer 8463
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8464
      boolean first = true;
8465
 
483 rajveer 8466
      sb.append("status:");
8467
      if (this.status == null) {
8468
        sb.append("null");
8469
      } else {
8470
        String status_name = status.name();
8471
        if (status_name != null) {
8472
          sb.append(status_name);
8473
          sb.append(" (");
8474
        }
8475
        sb.append(this.status);
8476
        if (status_name != null) {
8477
          sb.append(")");
8478
        }
8479
      }
68 ashish 8480
      first = false;
483 rajveer 8481
      if (!first) sb.append(", ");
8482
      sb.append("from_date:");
8483
      sb.append(this.from_date);
8484
      first = false;
8485
      if (!first) sb.append(", ");
8486
      sb.append("to_date:");
8487
      sb.append(this.to_date);
8488
      first = false;
8489
      if (!first) sb.append(", ");
8490
      sb.append("warehouse_id:");
8491
      sb.append(this.warehouse_id);
8492
      first = false;
68 ashish 8493
      sb.append(")");
8494
      return sb.toString();
8495
    }
8496
 
8497
    public void validate() throws TException {
8498
      // check for required fields
8499
    }
8500
 
8501
  }
8502
 
483 rajveer 8503
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8504
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8505
 
483 rajveer 8506
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8507
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8508
 
483 rajveer 8509
    private List<Order> success;
68 ashish 8510
    private TransactionServiceException ex;
8511
 
8512
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8513
    public enum _Fields implements TFieldIdEnum {
8514
      SUCCESS((short)0, "success"),
8515
      EX((short)1, "ex");
8516
 
8517
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8518
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8519
 
8520
      static {
8521
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8522
          byId.put((int)field._thriftId, field);
8523
          byName.put(field.getFieldName(), field);
8524
        }
8525
      }
8526
 
8527
      /**
8528
       * Find the _Fields constant that matches fieldId, or null if its not found.
8529
       */
8530
      public static _Fields findByThriftId(int fieldId) {
8531
        return byId.get(fieldId);
8532
      }
8533
 
8534
      /**
8535
       * Find the _Fields constant that matches fieldId, throwing an exception
8536
       * if it is not found.
8537
       */
8538
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8539
        _Fields fields = findByThriftId(fieldId);
8540
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8541
        return fields;
8542
      }
8543
 
8544
      /**
8545
       * Find the _Fields constant that matches name, or null if its not found.
8546
       */
8547
      public static _Fields findByName(String name) {
8548
        return byName.get(name);
8549
      }
8550
 
8551
      private final short _thriftId;
8552
      private final String _fieldName;
8553
 
8554
      _Fields(short thriftId, String fieldName) {
8555
        _thriftId = thriftId;
8556
        _fieldName = fieldName;
8557
      }
8558
 
8559
      public short getThriftFieldId() {
8560
        return _thriftId;
8561
      }
8562
 
8563
      public String getFieldName() {
8564
        return _fieldName;
8565
      }
8566
    }
8567
 
8568
    // isset id assignments
8569
 
8570
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8571
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 8572
          new ListMetaData(TType.LIST, 
8573
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 8574
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8575
          new FieldValueMetaData(TType.STRUCT)));
8576
    }});
8577
 
8578
    static {
483 rajveer 8579
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 8580
    }
8581
 
483 rajveer 8582
    public getAllOrders_result() {
68 ashish 8583
    }
8584
 
483 rajveer 8585
    public getAllOrders_result(
8586
      List<Order> success,
68 ashish 8587
      TransactionServiceException ex)
8588
    {
8589
      this();
8590
      this.success = success;
8591
      this.ex = ex;
8592
    }
8593
 
8594
    /**
8595
     * Performs a deep copy on <i>other</i>.
8596
     */
483 rajveer 8597
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 8598
      if (other.isSetSuccess()) {
483 rajveer 8599
        List<Order> __this__success = new ArrayList<Order>();
8600
        for (Order other_element : other.success) {
8601
          __this__success.add(new Order(other_element));
8602
        }
8603
        this.success = __this__success;
68 ashish 8604
      }
8605
      if (other.isSetEx()) {
8606
        this.ex = new TransactionServiceException(other.ex);
8607
      }
8608
    }
8609
 
483 rajveer 8610
    public getAllOrders_result deepCopy() {
8611
      return new getAllOrders_result(this);
68 ashish 8612
    }
8613
 
8614
    @Deprecated
483 rajveer 8615
    public getAllOrders_result clone() {
8616
      return new getAllOrders_result(this);
68 ashish 8617
    }
8618
 
483 rajveer 8619
    public int getSuccessSize() {
8620
      return (this.success == null) ? 0 : this.success.size();
8621
    }
8622
 
8623
    public java.util.Iterator<Order> getSuccessIterator() {
8624
      return (this.success == null) ? null : this.success.iterator();
8625
    }
8626
 
8627
    public void addToSuccess(Order elem) {
8628
      if (this.success == null) {
8629
        this.success = new ArrayList<Order>();
8630
      }
8631
      this.success.add(elem);
8632
    }
8633
 
8634
    public List<Order> getSuccess() {
68 ashish 8635
      return this.success;
8636
    }
8637
 
483 rajveer 8638
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 8639
      this.success = success;
8640
      return this;
8641
    }
8642
 
8643
    public void unsetSuccess() {
8644
      this.success = null;
8645
    }
8646
 
8647
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8648
    public boolean isSetSuccess() {
8649
      return this.success != null;
8650
    }
8651
 
8652
    public void setSuccessIsSet(boolean value) {
8653
      if (!value) {
8654
        this.success = null;
8655
      }
8656
    }
8657
 
8658
    public TransactionServiceException getEx() {
8659
      return this.ex;
8660
    }
8661
 
483 rajveer 8662
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 8663
      this.ex = ex;
8664
      return this;
8665
    }
8666
 
8667
    public void unsetEx() {
8668
      this.ex = null;
8669
    }
8670
 
8671
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8672
    public boolean isSetEx() {
8673
      return this.ex != null;
8674
    }
8675
 
8676
    public void setExIsSet(boolean value) {
8677
      if (!value) {
8678
        this.ex = null;
8679
      }
8680
    }
8681
 
8682
    public void setFieldValue(_Fields field, Object value) {
8683
      switch (field) {
8684
      case SUCCESS:
8685
        if (value == null) {
8686
          unsetSuccess();
8687
        } else {
483 rajveer 8688
          setSuccess((List<Order>)value);
68 ashish 8689
        }
8690
        break;
8691
 
8692
      case EX:
8693
        if (value == null) {
8694
          unsetEx();
8695
        } else {
8696
          setEx((TransactionServiceException)value);
8697
        }
8698
        break;
8699
 
8700
      }
8701
    }
8702
 
8703
    public void setFieldValue(int fieldID, Object value) {
8704
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8705
    }
8706
 
8707
    public Object getFieldValue(_Fields field) {
8708
      switch (field) {
8709
      case SUCCESS:
8710
        return getSuccess();
8711
 
8712
      case EX:
8713
        return getEx();
8714
 
8715
      }
8716
      throw new IllegalStateException();
8717
    }
8718
 
8719
    public Object getFieldValue(int fieldId) {
8720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8721
    }
8722
 
8723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8724
    public boolean isSet(_Fields field) {
8725
      switch (field) {
8726
      case SUCCESS:
8727
        return isSetSuccess();
8728
      case EX:
8729
        return isSetEx();
8730
      }
8731
      throw new IllegalStateException();
8732
    }
8733
 
8734
    public boolean isSet(int fieldID) {
8735
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8736
    }
8737
 
8738
    @Override
8739
    public boolean equals(Object that) {
8740
      if (that == null)
8741
        return false;
483 rajveer 8742
      if (that instanceof getAllOrders_result)
8743
        return this.equals((getAllOrders_result)that);
68 ashish 8744
      return false;
8745
    }
8746
 
483 rajveer 8747
    public boolean equals(getAllOrders_result that) {
68 ashish 8748
      if (that == null)
8749
        return false;
8750
 
8751
      boolean this_present_success = true && this.isSetSuccess();
8752
      boolean that_present_success = true && that.isSetSuccess();
8753
      if (this_present_success || that_present_success) {
8754
        if (!(this_present_success && that_present_success))
8755
          return false;
8756
        if (!this.success.equals(that.success))
8757
          return false;
8758
      }
8759
 
8760
      boolean this_present_ex = true && this.isSetEx();
8761
      boolean that_present_ex = true && that.isSetEx();
8762
      if (this_present_ex || that_present_ex) {
8763
        if (!(this_present_ex && that_present_ex))
8764
          return false;
8765
        if (!this.ex.equals(that.ex))
8766
          return false;
8767
      }
8768
 
8769
      return true;
8770
    }
8771
 
8772
    @Override
8773
    public int hashCode() {
8774
      return 0;
8775
    }
8776
 
483 rajveer 8777
    public int compareTo(getAllOrders_result other) {
8778
      if (!getClass().equals(other.getClass())) {
8779
        return getClass().getName().compareTo(other.getClass().getName());
8780
      }
8781
 
8782
      int lastComparison = 0;
8783
      getAllOrders_result typedOther = (getAllOrders_result)other;
8784
 
8785
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8786
      if (lastComparison != 0) {
8787
        return lastComparison;
8788
      }
8789
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8790
      if (lastComparison != 0) {
8791
        return lastComparison;
8792
      }
8793
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8794
      if (lastComparison != 0) {
8795
        return lastComparison;
8796
      }
8797
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8798
      if (lastComparison != 0) {
8799
        return lastComparison;
8800
      }
8801
      return 0;
8802
    }
8803
 
68 ashish 8804
    public void read(TProtocol iprot) throws TException {
8805
      TField field;
8806
      iprot.readStructBegin();
8807
      while (true)
8808
      {
8809
        field = iprot.readFieldBegin();
8810
        if (field.type == TType.STOP) { 
8811
          break;
8812
        }
8813
        _Fields fieldId = _Fields.findByThriftId(field.id);
8814
        if (fieldId == null) {
8815
          TProtocolUtil.skip(iprot, field.type);
8816
        } else {
8817
          switch (fieldId) {
8818
            case SUCCESS:
483 rajveer 8819
              if (field.type == TType.LIST) {
8820
                {
684 chandransh 8821
                  TList _list16 = iprot.readListBegin();
8822
                  this.success = new ArrayList<Order>(_list16.size);
8823
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 8824
                  {
684 chandransh 8825
                    Order _elem18;
8826
                    _elem18 = new Order();
8827
                    _elem18.read(iprot);
8828
                    this.success.add(_elem18);
483 rajveer 8829
                  }
8830
                  iprot.readListEnd();
8831
                }
68 ashish 8832
              } else { 
8833
                TProtocolUtil.skip(iprot, field.type);
8834
              }
8835
              break;
8836
            case EX:
8837
              if (field.type == TType.STRUCT) {
8838
                this.ex = new TransactionServiceException();
8839
                this.ex.read(iprot);
8840
              } else { 
8841
                TProtocolUtil.skip(iprot, field.type);
8842
              }
8843
              break;
8844
          }
8845
          iprot.readFieldEnd();
8846
        }
8847
      }
8848
      iprot.readStructEnd();
8849
      validate();
8850
    }
8851
 
8852
    public void write(TProtocol oprot) throws TException {
8853
      oprot.writeStructBegin(STRUCT_DESC);
8854
 
8855
      if (this.isSetSuccess()) {
8856
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 8857
        {
8858
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 8859
          for (Order _iter19 : this.success)
483 rajveer 8860
          {
684 chandransh 8861
            _iter19.write(oprot);
483 rajveer 8862
          }
8863
          oprot.writeListEnd();
8864
        }
68 ashish 8865
        oprot.writeFieldEnd();
8866
      } else if (this.isSetEx()) {
8867
        oprot.writeFieldBegin(EX_FIELD_DESC);
8868
        this.ex.write(oprot);
8869
        oprot.writeFieldEnd();
8870
      }
8871
      oprot.writeFieldStop();
8872
      oprot.writeStructEnd();
8873
    }
8874
 
8875
    @Override
8876
    public String toString() {
483 rajveer 8877
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 8878
      boolean first = true;
8879
 
8880
      sb.append("success:");
8881
      if (this.success == null) {
8882
        sb.append("null");
8883
      } else {
8884
        sb.append(this.success);
8885
      }
8886
      first = false;
8887
      if (!first) sb.append(", ");
8888
      sb.append("ex:");
8889
      if (this.ex == null) {
8890
        sb.append("null");
8891
      } else {
8892
        sb.append(this.ex);
8893
      }
8894
      first = false;
8895
      sb.append(")");
8896
      return sb.toString();
8897
    }
8898
 
8899
    public void validate() throws TException {
8900
      // check for required fields
8901
    }
8902
 
8903
  }
8904
 
1022 varun.gupt 8905
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
8906
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
8907
 
8908
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8909
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
8910
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
8911
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
8912
 
8913
    private OrderStatus status;
8914
    private long start_billing_date;
8915
    private long end_billing_date;
8916
    private long warehouse_id;
8917
 
8918
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8919
    public enum _Fields implements TFieldIdEnum {
8920
      /**
8921
       * 
8922
       * @see OrderStatus
8923
       */
8924
      STATUS((short)1, "status"),
8925
      START_BILLING_DATE((short)2, "start_billing_date"),
8926
      END_BILLING_DATE((short)3, "end_billing_date"),
8927
      WAREHOUSE_ID((short)4, "warehouse_id");
8928
 
8929
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8930
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8931
 
8932
      static {
8933
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8934
          byId.put((int)field._thriftId, field);
8935
          byName.put(field.getFieldName(), field);
8936
        }
8937
      }
8938
 
8939
      /**
8940
       * Find the _Fields constant that matches fieldId, or null if its not found.
8941
       */
8942
      public static _Fields findByThriftId(int fieldId) {
8943
        return byId.get(fieldId);
8944
      }
8945
 
8946
      /**
8947
       * Find the _Fields constant that matches fieldId, throwing an exception
8948
       * if it is not found.
8949
       */
8950
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8951
        _Fields fields = findByThriftId(fieldId);
8952
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8953
        return fields;
8954
      }
8955
 
8956
      /**
8957
       * Find the _Fields constant that matches name, or null if its not found.
8958
       */
8959
      public static _Fields findByName(String name) {
8960
        return byName.get(name);
8961
      }
8962
 
8963
      private final short _thriftId;
8964
      private final String _fieldName;
8965
 
8966
      _Fields(short thriftId, String fieldName) {
8967
        _thriftId = thriftId;
8968
        _fieldName = fieldName;
8969
      }
8970
 
8971
      public short getThriftFieldId() {
8972
        return _thriftId;
8973
      }
8974
 
8975
      public String getFieldName() {
8976
        return _fieldName;
8977
      }
8978
    }
8979
 
8980
    // isset id assignments
8981
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
8982
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
8983
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8984
    private BitSet __isset_bit_vector = new BitSet(3);
8985
 
8986
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8987
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8988
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8989
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
8990
          new FieldValueMetaData(TType.I64)));
8991
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
8992
          new FieldValueMetaData(TType.I64)));
8993
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8994
          new FieldValueMetaData(TType.I64)));
8995
    }});
8996
 
8997
    static {
8998
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
8999
    }
9000
 
9001
    public getOrdersByBillingDate_args() {
9002
    }
9003
 
9004
    public getOrdersByBillingDate_args(
9005
      OrderStatus status,
9006
      long start_billing_date,
9007
      long end_billing_date,
9008
      long warehouse_id)
9009
    {
9010
      this();
9011
      this.status = status;
9012
      this.start_billing_date = start_billing_date;
9013
      setStart_billing_dateIsSet(true);
9014
      this.end_billing_date = end_billing_date;
9015
      setEnd_billing_dateIsSet(true);
9016
      this.warehouse_id = warehouse_id;
9017
      setWarehouse_idIsSet(true);
9018
    }
9019
 
9020
    /**
9021
     * Performs a deep copy on <i>other</i>.
9022
     */
9023
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
9024
      __isset_bit_vector.clear();
9025
      __isset_bit_vector.or(other.__isset_bit_vector);
9026
      if (other.isSetStatus()) {
9027
        this.status = other.status;
9028
      }
9029
      this.start_billing_date = other.start_billing_date;
9030
      this.end_billing_date = other.end_billing_date;
9031
      this.warehouse_id = other.warehouse_id;
9032
    }
9033
 
9034
    public getOrdersByBillingDate_args deepCopy() {
9035
      return new getOrdersByBillingDate_args(this);
9036
    }
9037
 
9038
    @Deprecated
9039
    public getOrdersByBillingDate_args clone() {
9040
      return new getOrdersByBillingDate_args(this);
9041
    }
9042
 
9043
    /**
9044
     * 
9045
     * @see OrderStatus
9046
     */
9047
    public OrderStatus getStatus() {
9048
      return this.status;
9049
    }
9050
 
9051
    /**
9052
     * 
9053
     * @see OrderStatus
9054
     */
9055
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
9056
      this.status = status;
9057
      return this;
9058
    }
9059
 
9060
    public void unsetStatus() {
9061
      this.status = null;
9062
    }
9063
 
9064
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9065
    public boolean isSetStatus() {
9066
      return this.status != null;
9067
    }
9068
 
9069
    public void setStatusIsSet(boolean value) {
9070
      if (!value) {
9071
        this.status = null;
9072
      }
9073
    }
9074
 
9075
    public long getStart_billing_date() {
9076
      return this.start_billing_date;
9077
    }
9078
 
9079
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
9080
      this.start_billing_date = start_billing_date;
9081
      setStart_billing_dateIsSet(true);
9082
      return this;
9083
    }
9084
 
9085
    public void unsetStart_billing_date() {
9086
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
9087
    }
9088
 
9089
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
9090
    public boolean isSetStart_billing_date() {
9091
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
9092
    }
9093
 
9094
    public void setStart_billing_dateIsSet(boolean value) {
9095
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
9096
    }
9097
 
9098
    public long getEnd_billing_date() {
9099
      return this.end_billing_date;
9100
    }
9101
 
9102
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
9103
      this.end_billing_date = end_billing_date;
9104
      setEnd_billing_dateIsSet(true);
9105
      return this;
9106
    }
9107
 
9108
    public void unsetEnd_billing_date() {
9109
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
9110
    }
9111
 
9112
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
9113
    public boolean isSetEnd_billing_date() {
9114
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
9115
    }
9116
 
9117
    public void setEnd_billing_dateIsSet(boolean value) {
9118
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
9119
    }
9120
 
9121
    public long getWarehouse_id() {
9122
      return this.warehouse_id;
9123
    }
9124
 
9125
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
9126
      this.warehouse_id = warehouse_id;
9127
      setWarehouse_idIsSet(true);
9128
      return this;
9129
    }
9130
 
9131
    public void unsetWarehouse_id() {
9132
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
9133
    }
9134
 
9135
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9136
    public boolean isSetWarehouse_id() {
9137
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
9138
    }
9139
 
9140
    public void setWarehouse_idIsSet(boolean value) {
9141
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
9142
    }
9143
 
9144
    public void setFieldValue(_Fields field, Object value) {
9145
      switch (field) {
9146
      case STATUS:
9147
        if (value == null) {
9148
          unsetStatus();
9149
        } else {
9150
          setStatus((OrderStatus)value);
9151
        }
9152
        break;
9153
 
9154
      case START_BILLING_DATE:
9155
        if (value == null) {
9156
          unsetStart_billing_date();
9157
        } else {
9158
          setStart_billing_date((Long)value);
9159
        }
9160
        break;
9161
 
9162
      case END_BILLING_DATE:
9163
        if (value == null) {
9164
          unsetEnd_billing_date();
9165
        } else {
9166
          setEnd_billing_date((Long)value);
9167
        }
9168
        break;
9169
 
9170
      case WAREHOUSE_ID:
9171
        if (value == null) {
9172
          unsetWarehouse_id();
9173
        } else {
9174
          setWarehouse_id((Long)value);
9175
        }
9176
        break;
9177
 
9178
      }
9179
    }
9180
 
9181
    public void setFieldValue(int fieldID, Object value) {
9182
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9183
    }
9184
 
9185
    public Object getFieldValue(_Fields field) {
9186
      switch (field) {
9187
      case STATUS:
9188
        return getStatus();
9189
 
9190
      case START_BILLING_DATE:
9191
        return new Long(getStart_billing_date());
9192
 
9193
      case END_BILLING_DATE:
9194
        return new Long(getEnd_billing_date());
9195
 
9196
      case WAREHOUSE_ID:
9197
        return new Long(getWarehouse_id());
9198
 
9199
      }
9200
      throw new IllegalStateException();
9201
    }
9202
 
9203
    public Object getFieldValue(int fieldId) {
9204
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9205
    }
9206
 
9207
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9208
    public boolean isSet(_Fields field) {
9209
      switch (field) {
9210
      case STATUS:
9211
        return isSetStatus();
9212
      case START_BILLING_DATE:
9213
        return isSetStart_billing_date();
9214
      case END_BILLING_DATE:
9215
        return isSetEnd_billing_date();
9216
      case WAREHOUSE_ID:
9217
        return isSetWarehouse_id();
9218
      }
9219
      throw new IllegalStateException();
9220
    }
9221
 
9222
    public boolean isSet(int fieldID) {
9223
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9224
    }
9225
 
9226
    @Override
9227
    public boolean equals(Object that) {
9228
      if (that == null)
9229
        return false;
9230
      if (that instanceof getOrdersByBillingDate_args)
9231
        return this.equals((getOrdersByBillingDate_args)that);
9232
      return false;
9233
    }
9234
 
9235
    public boolean equals(getOrdersByBillingDate_args that) {
9236
      if (that == null)
9237
        return false;
9238
 
9239
      boolean this_present_status = true && this.isSetStatus();
9240
      boolean that_present_status = true && that.isSetStatus();
9241
      if (this_present_status || that_present_status) {
9242
        if (!(this_present_status && that_present_status))
9243
          return false;
9244
        if (!this.status.equals(that.status))
9245
          return false;
9246
      }
9247
 
9248
      boolean this_present_start_billing_date = true;
9249
      boolean that_present_start_billing_date = true;
9250
      if (this_present_start_billing_date || that_present_start_billing_date) {
9251
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9252
          return false;
9253
        if (this.start_billing_date != that.start_billing_date)
9254
          return false;
9255
      }
9256
 
9257
      boolean this_present_end_billing_date = true;
9258
      boolean that_present_end_billing_date = true;
9259
      if (this_present_end_billing_date || that_present_end_billing_date) {
9260
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9261
          return false;
9262
        if (this.end_billing_date != that.end_billing_date)
9263
          return false;
9264
      }
9265
 
9266
      boolean this_present_warehouse_id = true;
9267
      boolean that_present_warehouse_id = true;
9268
      if (this_present_warehouse_id || that_present_warehouse_id) {
9269
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9270
          return false;
9271
        if (this.warehouse_id != that.warehouse_id)
9272
          return false;
9273
      }
9274
 
9275
      return true;
9276
    }
9277
 
9278
    @Override
9279
    public int hashCode() {
9280
      return 0;
9281
    }
9282
 
9283
    public int compareTo(getOrdersByBillingDate_args other) {
9284
      if (!getClass().equals(other.getClass())) {
9285
        return getClass().getName().compareTo(other.getClass().getName());
9286
      }
9287
 
9288
      int lastComparison = 0;
9289
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9290
 
9291
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9292
      if (lastComparison != 0) {
9293
        return lastComparison;
9294
      }
9295
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9296
      if (lastComparison != 0) {
9297
        return lastComparison;
9298
      }
9299
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9300
      if (lastComparison != 0) {
9301
        return lastComparison;
9302
      }
9303
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9304
      if (lastComparison != 0) {
9305
        return lastComparison;
9306
      }
9307
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9308
      if (lastComparison != 0) {
9309
        return lastComparison;
9310
      }
9311
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9312
      if (lastComparison != 0) {
9313
        return lastComparison;
9314
      }
9315
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9316
      if (lastComparison != 0) {
9317
        return lastComparison;
9318
      }
9319
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9320
      if (lastComparison != 0) {
9321
        return lastComparison;
9322
      }
9323
      return 0;
9324
    }
9325
 
9326
    public void read(TProtocol iprot) throws TException {
9327
      TField field;
9328
      iprot.readStructBegin();
9329
      while (true)
9330
      {
9331
        field = iprot.readFieldBegin();
9332
        if (field.type == TType.STOP) { 
9333
          break;
9334
        }
9335
        _Fields fieldId = _Fields.findByThriftId(field.id);
9336
        if (fieldId == null) {
9337
          TProtocolUtil.skip(iprot, field.type);
9338
        } else {
9339
          switch (fieldId) {
9340
            case STATUS:
9341
              if (field.type == TType.I32) {
9342
                this.status = OrderStatus.findByValue(iprot.readI32());
9343
              } else { 
9344
                TProtocolUtil.skip(iprot, field.type);
9345
              }
9346
              break;
9347
            case START_BILLING_DATE:
9348
              if (field.type == TType.I64) {
9349
                this.start_billing_date = iprot.readI64();
9350
                setStart_billing_dateIsSet(true);
9351
              } else { 
9352
                TProtocolUtil.skip(iprot, field.type);
9353
              }
9354
              break;
9355
            case END_BILLING_DATE:
9356
              if (field.type == TType.I64) {
9357
                this.end_billing_date = iprot.readI64();
9358
                setEnd_billing_dateIsSet(true);
9359
              } else { 
9360
                TProtocolUtil.skip(iprot, field.type);
9361
              }
9362
              break;
9363
            case WAREHOUSE_ID:
9364
              if (field.type == TType.I64) {
9365
                this.warehouse_id = iprot.readI64();
9366
                setWarehouse_idIsSet(true);
9367
              } else { 
9368
                TProtocolUtil.skip(iprot, field.type);
9369
              }
9370
              break;
9371
          }
9372
          iprot.readFieldEnd();
9373
        }
9374
      }
9375
      iprot.readStructEnd();
9376
      validate();
9377
    }
9378
 
9379
    public void write(TProtocol oprot) throws TException {
9380
      validate();
9381
 
9382
      oprot.writeStructBegin(STRUCT_DESC);
9383
      if (this.status != null) {
9384
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9385
        oprot.writeI32(this.status.getValue());
9386
        oprot.writeFieldEnd();
9387
      }
9388
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9389
      oprot.writeI64(this.start_billing_date);
9390
      oprot.writeFieldEnd();
9391
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9392
      oprot.writeI64(this.end_billing_date);
9393
      oprot.writeFieldEnd();
9394
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9395
      oprot.writeI64(this.warehouse_id);
9396
      oprot.writeFieldEnd();
9397
      oprot.writeFieldStop();
9398
      oprot.writeStructEnd();
9399
    }
9400
 
9401
    @Override
9402
    public String toString() {
9403
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9404
      boolean first = true;
9405
 
9406
      sb.append("status:");
9407
      if (this.status == null) {
9408
        sb.append("null");
9409
      } else {
9410
        String status_name = status.name();
9411
        if (status_name != null) {
9412
          sb.append(status_name);
9413
          sb.append(" (");
9414
        }
9415
        sb.append(this.status);
9416
        if (status_name != null) {
9417
          sb.append(")");
9418
        }
9419
      }
9420
      first = false;
9421
      if (!first) sb.append(", ");
9422
      sb.append("start_billing_date:");
9423
      sb.append(this.start_billing_date);
9424
      first = false;
9425
      if (!first) sb.append(", ");
9426
      sb.append("end_billing_date:");
9427
      sb.append(this.end_billing_date);
9428
      first = false;
9429
      if (!first) sb.append(", ");
9430
      sb.append("warehouse_id:");
9431
      sb.append(this.warehouse_id);
9432
      first = false;
9433
      sb.append(")");
9434
      return sb.toString();
9435
    }
9436
 
9437
    public void validate() throws TException {
9438
      // check for required fields
9439
    }
9440
 
9441
  }
9442
 
9443
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9444
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9445
 
9446
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9447
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9448
 
9449
    private List<Order> success;
9450
    private TransactionServiceException ex;
9451
 
9452
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9453
    public enum _Fields implements TFieldIdEnum {
9454
      SUCCESS((short)0, "success"),
9455
      EX((short)1, "ex");
9456
 
9457
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9458
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9459
 
9460
      static {
9461
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9462
          byId.put((int)field._thriftId, field);
9463
          byName.put(field.getFieldName(), field);
9464
        }
9465
      }
9466
 
9467
      /**
9468
       * Find the _Fields constant that matches fieldId, or null if its not found.
9469
       */
9470
      public static _Fields findByThriftId(int fieldId) {
9471
        return byId.get(fieldId);
9472
      }
9473
 
9474
      /**
9475
       * Find the _Fields constant that matches fieldId, throwing an exception
9476
       * if it is not found.
9477
       */
9478
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9479
        _Fields fields = findByThriftId(fieldId);
9480
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9481
        return fields;
9482
      }
9483
 
9484
      /**
9485
       * Find the _Fields constant that matches name, or null if its not found.
9486
       */
9487
      public static _Fields findByName(String name) {
9488
        return byName.get(name);
9489
      }
9490
 
9491
      private final short _thriftId;
9492
      private final String _fieldName;
9493
 
9494
      _Fields(short thriftId, String fieldName) {
9495
        _thriftId = thriftId;
9496
        _fieldName = fieldName;
9497
      }
9498
 
9499
      public short getThriftFieldId() {
9500
        return _thriftId;
9501
      }
9502
 
9503
      public String getFieldName() {
9504
        return _fieldName;
9505
      }
9506
    }
9507
 
9508
    // isset id assignments
9509
 
9510
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9511
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9512
          new ListMetaData(TType.LIST, 
9513
              new StructMetaData(TType.STRUCT, Order.class))));
9514
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9515
          new FieldValueMetaData(TType.STRUCT)));
9516
    }});
9517
 
9518
    static {
9519
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9520
    }
9521
 
9522
    public getOrdersByBillingDate_result() {
9523
    }
9524
 
9525
    public getOrdersByBillingDate_result(
9526
      List<Order> success,
9527
      TransactionServiceException ex)
9528
    {
9529
      this();
9530
      this.success = success;
9531
      this.ex = ex;
9532
    }
9533
 
9534
    /**
9535
     * Performs a deep copy on <i>other</i>.
9536
     */
9537
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9538
      if (other.isSetSuccess()) {
9539
        List<Order> __this__success = new ArrayList<Order>();
9540
        for (Order other_element : other.success) {
9541
          __this__success.add(new Order(other_element));
9542
        }
9543
        this.success = __this__success;
9544
      }
9545
      if (other.isSetEx()) {
9546
        this.ex = new TransactionServiceException(other.ex);
9547
      }
9548
    }
9549
 
9550
    public getOrdersByBillingDate_result deepCopy() {
9551
      return new getOrdersByBillingDate_result(this);
9552
    }
9553
 
9554
    @Deprecated
9555
    public getOrdersByBillingDate_result clone() {
9556
      return new getOrdersByBillingDate_result(this);
9557
    }
9558
 
9559
    public int getSuccessSize() {
9560
      return (this.success == null) ? 0 : this.success.size();
9561
    }
9562
 
9563
    public java.util.Iterator<Order> getSuccessIterator() {
9564
      return (this.success == null) ? null : this.success.iterator();
9565
    }
9566
 
9567
    public void addToSuccess(Order elem) {
9568
      if (this.success == null) {
9569
        this.success = new ArrayList<Order>();
9570
      }
9571
      this.success.add(elem);
9572
    }
9573
 
9574
    public List<Order> getSuccess() {
9575
      return this.success;
9576
    }
9577
 
9578
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
9579
      this.success = success;
9580
      return this;
9581
    }
9582
 
9583
    public void unsetSuccess() {
9584
      this.success = null;
9585
    }
9586
 
9587
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9588
    public boolean isSetSuccess() {
9589
      return this.success != null;
9590
    }
9591
 
9592
    public void setSuccessIsSet(boolean value) {
9593
      if (!value) {
9594
        this.success = null;
9595
      }
9596
    }
9597
 
9598
    public TransactionServiceException getEx() {
9599
      return this.ex;
9600
    }
9601
 
9602
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
9603
      this.ex = ex;
9604
      return this;
9605
    }
9606
 
9607
    public void unsetEx() {
9608
      this.ex = null;
9609
    }
9610
 
9611
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9612
    public boolean isSetEx() {
9613
      return this.ex != null;
9614
    }
9615
 
9616
    public void setExIsSet(boolean value) {
9617
      if (!value) {
9618
        this.ex = null;
9619
      }
9620
    }
9621
 
9622
    public void setFieldValue(_Fields field, Object value) {
9623
      switch (field) {
9624
      case SUCCESS:
9625
        if (value == null) {
9626
          unsetSuccess();
9627
        } else {
9628
          setSuccess((List<Order>)value);
9629
        }
9630
        break;
9631
 
9632
      case EX:
9633
        if (value == null) {
9634
          unsetEx();
9635
        } else {
9636
          setEx((TransactionServiceException)value);
9637
        }
9638
        break;
9639
 
9640
      }
9641
    }
9642
 
9643
    public void setFieldValue(int fieldID, Object value) {
9644
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9645
    }
9646
 
9647
    public Object getFieldValue(_Fields field) {
9648
      switch (field) {
9649
      case SUCCESS:
9650
        return getSuccess();
9651
 
9652
      case EX:
9653
        return getEx();
9654
 
9655
      }
9656
      throw new IllegalStateException();
9657
    }
9658
 
9659
    public Object getFieldValue(int fieldId) {
9660
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9661
    }
9662
 
9663
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9664
    public boolean isSet(_Fields field) {
9665
      switch (field) {
9666
      case SUCCESS:
9667
        return isSetSuccess();
9668
      case EX:
9669
        return isSetEx();
9670
      }
9671
      throw new IllegalStateException();
9672
    }
9673
 
9674
    public boolean isSet(int fieldID) {
9675
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9676
    }
9677
 
9678
    @Override
9679
    public boolean equals(Object that) {
9680
      if (that == null)
9681
        return false;
9682
      if (that instanceof getOrdersByBillingDate_result)
9683
        return this.equals((getOrdersByBillingDate_result)that);
9684
      return false;
9685
    }
9686
 
9687
    public boolean equals(getOrdersByBillingDate_result that) {
9688
      if (that == null)
9689
        return false;
9690
 
9691
      boolean this_present_success = true && this.isSetSuccess();
9692
      boolean that_present_success = true && that.isSetSuccess();
9693
      if (this_present_success || that_present_success) {
9694
        if (!(this_present_success && that_present_success))
9695
          return false;
9696
        if (!this.success.equals(that.success))
9697
          return false;
9698
      }
9699
 
9700
      boolean this_present_ex = true && this.isSetEx();
9701
      boolean that_present_ex = true && that.isSetEx();
9702
      if (this_present_ex || that_present_ex) {
9703
        if (!(this_present_ex && that_present_ex))
9704
          return false;
9705
        if (!this.ex.equals(that.ex))
9706
          return false;
9707
      }
9708
 
9709
      return true;
9710
    }
9711
 
9712
    @Override
9713
    public int hashCode() {
9714
      return 0;
9715
    }
9716
 
9717
    public int compareTo(getOrdersByBillingDate_result other) {
9718
      if (!getClass().equals(other.getClass())) {
9719
        return getClass().getName().compareTo(other.getClass().getName());
9720
      }
9721
 
9722
      int lastComparison = 0;
9723
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
9724
 
9725
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9726
      if (lastComparison != 0) {
9727
        return lastComparison;
9728
      }
9729
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9730
      if (lastComparison != 0) {
9731
        return lastComparison;
9732
      }
9733
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9734
      if (lastComparison != 0) {
9735
        return lastComparison;
9736
      }
9737
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9738
      if (lastComparison != 0) {
9739
        return lastComparison;
9740
      }
9741
      return 0;
9742
    }
9743
 
9744
    public void read(TProtocol iprot) throws TException {
9745
      TField field;
9746
      iprot.readStructBegin();
9747
      while (true)
9748
      {
9749
        field = iprot.readFieldBegin();
9750
        if (field.type == TType.STOP) { 
9751
          break;
9752
        }
9753
        _Fields fieldId = _Fields.findByThriftId(field.id);
9754
        if (fieldId == null) {
9755
          TProtocolUtil.skip(iprot, field.type);
9756
        } else {
9757
          switch (fieldId) {
9758
            case SUCCESS:
9759
              if (field.type == TType.LIST) {
9760
                {
9761
                  TList _list20 = iprot.readListBegin();
9762
                  this.success = new ArrayList<Order>(_list20.size);
9763
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
9764
                  {
9765
                    Order _elem22;
9766
                    _elem22 = new Order();
9767
                    _elem22.read(iprot);
9768
                    this.success.add(_elem22);
9769
                  }
9770
                  iprot.readListEnd();
9771
                }
9772
              } else { 
9773
                TProtocolUtil.skip(iprot, field.type);
9774
              }
9775
              break;
9776
            case EX:
9777
              if (field.type == TType.STRUCT) {
9778
                this.ex = new TransactionServiceException();
9779
                this.ex.read(iprot);
9780
              } else { 
9781
                TProtocolUtil.skip(iprot, field.type);
9782
              }
9783
              break;
9784
          }
9785
          iprot.readFieldEnd();
9786
        }
9787
      }
9788
      iprot.readStructEnd();
9789
      validate();
9790
    }
9791
 
9792
    public void write(TProtocol oprot) throws TException {
9793
      oprot.writeStructBegin(STRUCT_DESC);
9794
 
9795
      if (this.isSetSuccess()) {
9796
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9797
        {
9798
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
9799
          for (Order _iter23 : this.success)
9800
          {
9801
            _iter23.write(oprot);
9802
          }
9803
          oprot.writeListEnd();
9804
        }
9805
        oprot.writeFieldEnd();
9806
      } else if (this.isSetEx()) {
9807
        oprot.writeFieldBegin(EX_FIELD_DESC);
9808
        this.ex.write(oprot);
9809
        oprot.writeFieldEnd();
9810
      }
9811
      oprot.writeFieldStop();
9812
      oprot.writeStructEnd();
9813
    }
9814
 
9815
    @Override
9816
    public String toString() {
9817
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
9818
      boolean first = true;
9819
 
9820
      sb.append("success:");
9821
      if (this.success == null) {
9822
        sb.append("null");
9823
      } else {
9824
        sb.append(this.success);
9825
      }
9826
      first = false;
9827
      if (!first) sb.append(", ");
9828
      sb.append("ex:");
9829
      if (this.ex == null) {
9830
        sb.append("null");
9831
      } else {
9832
        sb.append(this.ex);
9833
      }
9834
      first = false;
9835
      sb.append(")");
9836
      return sb.toString();
9837
    }
9838
 
9839
    public void validate() throws TException {
9840
      // check for required fields
9841
    }
9842
 
9843
  }
9844
 
1382 varun.gupt 9845
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
9846
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
9847
 
9848
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
9849
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
9850
 
9851
    private long customer_id;
9852
    private long limit;
9853
 
9854
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9855
    public enum _Fields implements TFieldIdEnum {
9856
      CUSTOMER_ID((short)1, "customer_id"),
9857
      LIMIT((short)2, "limit");
9858
 
9859
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9860
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9861
 
9862
      static {
9863
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9864
          byId.put((int)field._thriftId, field);
9865
          byName.put(field.getFieldName(), field);
9866
        }
9867
      }
9868
 
9869
      /**
9870
       * Find the _Fields constant that matches fieldId, or null if its not found.
9871
       */
9872
      public static _Fields findByThriftId(int fieldId) {
9873
        return byId.get(fieldId);
9874
      }
9875
 
9876
      /**
9877
       * Find the _Fields constant that matches fieldId, throwing an exception
9878
       * if it is not found.
9879
       */
9880
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9881
        _Fields fields = findByThriftId(fieldId);
9882
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9883
        return fields;
9884
      }
9885
 
9886
      /**
9887
       * Find the _Fields constant that matches name, or null if its not found.
9888
       */
9889
      public static _Fields findByName(String name) {
9890
        return byName.get(name);
9891
      }
9892
 
9893
      private final short _thriftId;
9894
      private final String _fieldName;
9895
 
9896
      _Fields(short thriftId, String fieldName) {
9897
        _thriftId = thriftId;
9898
        _fieldName = fieldName;
9899
      }
9900
 
9901
      public short getThriftFieldId() {
9902
        return _thriftId;
9903
      }
9904
 
9905
      public String getFieldName() {
9906
        return _fieldName;
9907
      }
9908
    }
9909
 
9910
    // isset id assignments
9911
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
9912
    private static final int __LIMIT_ISSET_ID = 1;
9913
    private BitSet __isset_bit_vector = new BitSet(2);
9914
 
9915
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9916
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
9917
          new FieldValueMetaData(TType.I64)));
9918
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
9919
          new FieldValueMetaData(TType.I64)));
9920
    }});
9921
 
9922
    static {
9923
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
9924
    }
9925
 
9926
    public getReturnableOrdersForCustomer_args() {
9927
    }
9928
 
9929
    public getReturnableOrdersForCustomer_args(
9930
      long customer_id,
9931
      long limit)
9932
    {
9933
      this();
9934
      this.customer_id = customer_id;
9935
      setCustomer_idIsSet(true);
9936
      this.limit = limit;
9937
      setLimitIsSet(true);
9938
    }
9939
 
9940
    /**
9941
     * Performs a deep copy on <i>other</i>.
9942
     */
9943
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
9944
      __isset_bit_vector.clear();
9945
      __isset_bit_vector.or(other.__isset_bit_vector);
9946
      this.customer_id = other.customer_id;
9947
      this.limit = other.limit;
9948
    }
9949
 
9950
    public getReturnableOrdersForCustomer_args deepCopy() {
9951
      return new getReturnableOrdersForCustomer_args(this);
9952
    }
9953
 
9954
    @Deprecated
9955
    public getReturnableOrdersForCustomer_args clone() {
9956
      return new getReturnableOrdersForCustomer_args(this);
9957
    }
9958
 
9959
    public long getCustomer_id() {
9960
      return this.customer_id;
9961
    }
9962
 
9963
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
9964
      this.customer_id = customer_id;
9965
      setCustomer_idIsSet(true);
9966
      return this;
9967
    }
9968
 
9969
    public void unsetCustomer_id() {
9970
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
9971
    }
9972
 
9973
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
9974
    public boolean isSetCustomer_id() {
9975
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
9976
    }
9977
 
9978
    public void setCustomer_idIsSet(boolean value) {
9979
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
9980
    }
9981
 
9982
    public long getLimit() {
9983
      return this.limit;
9984
    }
9985
 
9986
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
9987
      this.limit = limit;
9988
      setLimitIsSet(true);
9989
      return this;
9990
    }
9991
 
9992
    public void unsetLimit() {
9993
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
9994
    }
9995
 
9996
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
9997
    public boolean isSetLimit() {
9998
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
9999
    }
10000
 
10001
    public void setLimitIsSet(boolean value) {
10002
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10003
    }
10004
 
10005
    public void setFieldValue(_Fields field, Object value) {
10006
      switch (field) {
10007
      case CUSTOMER_ID:
10008
        if (value == null) {
10009
          unsetCustomer_id();
10010
        } else {
10011
          setCustomer_id((Long)value);
10012
        }
10013
        break;
10014
 
10015
      case LIMIT:
10016
        if (value == null) {
10017
          unsetLimit();
10018
        } else {
10019
          setLimit((Long)value);
10020
        }
10021
        break;
10022
 
10023
      }
10024
    }
10025
 
10026
    public void setFieldValue(int fieldID, Object value) {
10027
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10028
    }
10029
 
10030
    public Object getFieldValue(_Fields field) {
10031
      switch (field) {
10032
      case CUSTOMER_ID:
10033
        return new Long(getCustomer_id());
10034
 
10035
      case LIMIT:
10036
        return new Long(getLimit());
10037
 
10038
      }
10039
      throw new IllegalStateException();
10040
    }
10041
 
10042
    public Object getFieldValue(int fieldId) {
10043
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10044
    }
10045
 
10046
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10047
    public boolean isSet(_Fields field) {
10048
      switch (field) {
10049
      case CUSTOMER_ID:
10050
        return isSetCustomer_id();
10051
      case LIMIT:
10052
        return isSetLimit();
10053
      }
10054
      throw new IllegalStateException();
10055
    }
10056
 
10057
    public boolean isSet(int fieldID) {
10058
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10059
    }
10060
 
10061
    @Override
10062
    public boolean equals(Object that) {
10063
      if (that == null)
10064
        return false;
10065
      if (that instanceof getReturnableOrdersForCustomer_args)
10066
        return this.equals((getReturnableOrdersForCustomer_args)that);
10067
      return false;
10068
    }
10069
 
10070
    public boolean equals(getReturnableOrdersForCustomer_args that) {
10071
      if (that == null)
10072
        return false;
10073
 
10074
      boolean this_present_customer_id = true;
10075
      boolean that_present_customer_id = true;
10076
      if (this_present_customer_id || that_present_customer_id) {
10077
        if (!(this_present_customer_id && that_present_customer_id))
10078
          return false;
10079
        if (this.customer_id != that.customer_id)
10080
          return false;
10081
      }
10082
 
10083
      boolean this_present_limit = true;
10084
      boolean that_present_limit = true;
10085
      if (this_present_limit || that_present_limit) {
10086
        if (!(this_present_limit && that_present_limit))
10087
          return false;
10088
        if (this.limit != that.limit)
10089
          return false;
10090
      }
10091
 
10092
      return true;
10093
    }
10094
 
10095
    @Override
10096
    public int hashCode() {
10097
      return 0;
10098
    }
10099
 
10100
    public int compareTo(getReturnableOrdersForCustomer_args other) {
10101
      if (!getClass().equals(other.getClass())) {
10102
        return getClass().getName().compareTo(other.getClass().getName());
10103
      }
10104
 
10105
      int lastComparison = 0;
10106
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
10107
 
10108
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10109
      if (lastComparison != 0) {
10110
        return lastComparison;
10111
      }
10112
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10113
      if (lastComparison != 0) {
10114
        return lastComparison;
10115
      }
10116
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10117
      if (lastComparison != 0) {
10118
        return lastComparison;
10119
      }
10120
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10121
      if (lastComparison != 0) {
10122
        return lastComparison;
10123
      }
10124
      return 0;
10125
    }
10126
 
10127
    public void read(TProtocol iprot) throws TException {
10128
      TField field;
10129
      iprot.readStructBegin();
10130
      while (true)
10131
      {
10132
        field = iprot.readFieldBegin();
10133
        if (field.type == TType.STOP) { 
10134
          break;
10135
        }
10136
        _Fields fieldId = _Fields.findByThriftId(field.id);
10137
        if (fieldId == null) {
10138
          TProtocolUtil.skip(iprot, field.type);
10139
        } else {
10140
          switch (fieldId) {
10141
            case CUSTOMER_ID:
10142
              if (field.type == TType.I64) {
10143
                this.customer_id = iprot.readI64();
10144
                setCustomer_idIsSet(true);
10145
              } else { 
10146
                TProtocolUtil.skip(iprot, field.type);
10147
              }
10148
              break;
10149
            case LIMIT:
10150
              if (field.type == TType.I64) {
10151
                this.limit = iprot.readI64();
10152
                setLimitIsSet(true);
10153
              } else { 
10154
                TProtocolUtil.skip(iprot, field.type);
10155
              }
10156
              break;
10157
          }
10158
          iprot.readFieldEnd();
10159
        }
10160
      }
10161
      iprot.readStructEnd();
10162
      validate();
10163
    }
10164
 
10165
    public void write(TProtocol oprot) throws TException {
10166
      validate();
10167
 
10168
      oprot.writeStructBegin(STRUCT_DESC);
10169
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10170
      oprot.writeI64(this.customer_id);
10171
      oprot.writeFieldEnd();
10172
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10173
      oprot.writeI64(this.limit);
10174
      oprot.writeFieldEnd();
10175
      oprot.writeFieldStop();
10176
      oprot.writeStructEnd();
10177
    }
10178
 
10179
    @Override
10180
    public String toString() {
10181
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
10182
      boolean first = true;
10183
 
10184
      sb.append("customer_id:");
10185
      sb.append(this.customer_id);
10186
      first = false;
10187
      if (!first) sb.append(", ");
10188
      sb.append("limit:");
10189
      sb.append(this.limit);
10190
      first = false;
10191
      sb.append(")");
10192
      return sb.toString();
10193
    }
10194
 
10195
    public void validate() throws TException {
10196
      // check for required fields
10197
    }
10198
 
10199
  }
10200
 
10201
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
10202
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
10203
 
10204
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10205
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10206
 
10207
    private List<Long> success;
10208
    private TransactionServiceException ex;
10209
 
10210
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10211
    public enum _Fields implements TFieldIdEnum {
10212
      SUCCESS((short)0, "success"),
10213
      EX((short)1, "ex");
10214
 
10215
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10216
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10217
 
10218
      static {
10219
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10220
          byId.put((int)field._thriftId, field);
10221
          byName.put(field.getFieldName(), field);
10222
        }
10223
      }
10224
 
10225
      /**
10226
       * Find the _Fields constant that matches fieldId, or null if its not found.
10227
       */
10228
      public static _Fields findByThriftId(int fieldId) {
10229
        return byId.get(fieldId);
10230
      }
10231
 
10232
      /**
10233
       * Find the _Fields constant that matches fieldId, throwing an exception
10234
       * if it is not found.
10235
       */
10236
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10237
        _Fields fields = findByThriftId(fieldId);
10238
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10239
        return fields;
10240
      }
10241
 
10242
      /**
10243
       * Find the _Fields constant that matches name, or null if its not found.
10244
       */
10245
      public static _Fields findByName(String name) {
10246
        return byName.get(name);
10247
      }
10248
 
10249
      private final short _thriftId;
10250
      private final String _fieldName;
10251
 
10252
      _Fields(short thriftId, String fieldName) {
10253
        _thriftId = thriftId;
10254
        _fieldName = fieldName;
10255
      }
10256
 
10257
      public short getThriftFieldId() {
10258
        return _thriftId;
10259
      }
10260
 
10261
      public String getFieldName() {
10262
        return _fieldName;
10263
      }
10264
    }
10265
 
10266
    // isset id assignments
10267
 
10268
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10269
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10270
          new ListMetaData(TType.LIST, 
10271
              new FieldValueMetaData(TType.I64))));
10272
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10273
          new FieldValueMetaData(TType.STRUCT)));
10274
    }});
10275
 
10276
    static {
10277
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10278
    }
10279
 
10280
    public getReturnableOrdersForCustomer_result() {
10281
    }
10282
 
10283
    public getReturnableOrdersForCustomer_result(
10284
      List<Long> success,
10285
      TransactionServiceException ex)
10286
    {
10287
      this();
10288
      this.success = success;
10289
      this.ex = ex;
10290
    }
10291
 
10292
    /**
10293
     * Performs a deep copy on <i>other</i>.
10294
     */
10295
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10296
      if (other.isSetSuccess()) {
10297
        List<Long> __this__success = new ArrayList<Long>();
10298
        for (Long other_element : other.success) {
10299
          __this__success.add(other_element);
10300
        }
10301
        this.success = __this__success;
10302
      }
10303
      if (other.isSetEx()) {
10304
        this.ex = new TransactionServiceException(other.ex);
10305
      }
10306
    }
10307
 
10308
    public getReturnableOrdersForCustomer_result deepCopy() {
10309
      return new getReturnableOrdersForCustomer_result(this);
10310
    }
10311
 
10312
    @Deprecated
10313
    public getReturnableOrdersForCustomer_result clone() {
10314
      return new getReturnableOrdersForCustomer_result(this);
10315
    }
10316
 
10317
    public int getSuccessSize() {
10318
      return (this.success == null) ? 0 : this.success.size();
10319
    }
10320
 
10321
    public java.util.Iterator<Long> getSuccessIterator() {
10322
      return (this.success == null) ? null : this.success.iterator();
10323
    }
10324
 
10325
    public void addToSuccess(long elem) {
10326
      if (this.success == null) {
10327
        this.success = new ArrayList<Long>();
10328
      }
10329
      this.success.add(elem);
10330
    }
10331
 
10332
    public List<Long> getSuccess() {
10333
      return this.success;
10334
    }
10335
 
10336
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10337
      this.success = success;
10338
      return this;
10339
    }
10340
 
10341
    public void unsetSuccess() {
10342
      this.success = null;
10343
    }
10344
 
10345
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10346
    public boolean isSetSuccess() {
10347
      return this.success != null;
10348
    }
10349
 
10350
    public void setSuccessIsSet(boolean value) {
10351
      if (!value) {
10352
        this.success = null;
10353
      }
10354
    }
10355
 
10356
    public TransactionServiceException getEx() {
10357
      return this.ex;
10358
    }
10359
 
10360
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10361
      this.ex = ex;
10362
      return this;
10363
    }
10364
 
10365
    public void unsetEx() {
10366
      this.ex = null;
10367
    }
10368
 
10369
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10370
    public boolean isSetEx() {
10371
      return this.ex != null;
10372
    }
10373
 
10374
    public void setExIsSet(boolean value) {
10375
      if (!value) {
10376
        this.ex = null;
10377
      }
10378
    }
10379
 
10380
    public void setFieldValue(_Fields field, Object value) {
10381
      switch (field) {
10382
      case SUCCESS:
10383
        if (value == null) {
10384
          unsetSuccess();
10385
        } else {
10386
          setSuccess((List<Long>)value);
10387
        }
10388
        break;
10389
 
10390
      case EX:
10391
        if (value == null) {
10392
          unsetEx();
10393
        } else {
10394
          setEx((TransactionServiceException)value);
10395
        }
10396
        break;
10397
 
10398
      }
10399
    }
10400
 
10401
    public void setFieldValue(int fieldID, Object value) {
10402
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10403
    }
10404
 
10405
    public Object getFieldValue(_Fields field) {
10406
      switch (field) {
10407
      case SUCCESS:
10408
        return getSuccess();
10409
 
10410
      case EX:
10411
        return getEx();
10412
 
10413
      }
10414
      throw new IllegalStateException();
10415
    }
10416
 
10417
    public Object getFieldValue(int fieldId) {
10418
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10419
    }
10420
 
10421
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10422
    public boolean isSet(_Fields field) {
10423
      switch (field) {
10424
      case SUCCESS:
10425
        return isSetSuccess();
10426
      case EX:
10427
        return isSetEx();
10428
      }
10429
      throw new IllegalStateException();
10430
    }
10431
 
10432
    public boolean isSet(int fieldID) {
10433
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10434
    }
10435
 
10436
    @Override
10437
    public boolean equals(Object that) {
10438
      if (that == null)
10439
        return false;
10440
      if (that instanceof getReturnableOrdersForCustomer_result)
10441
        return this.equals((getReturnableOrdersForCustomer_result)that);
10442
      return false;
10443
    }
10444
 
10445
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10446
      if (that == null)
10447
        return false;
10448
 
10449
      boolean this_present_success = true && this.isSetSuccess();
10450
      boolean that_present_success = true && that.isSetSuccess();
10451
      if (this_present_success || that_present_success) {
10452
        if (!(this_present_success && that_present_success))
10453
          return false;
10454
        if (!this.success.equals(that.success))
10455
          return false;
10456
      }
10457
 
10458
      boolean this_present_ex = true && this.isSetEx();
10459
      boolean that_present_ex = true && that.isSetEx();
10460
      if (this_present_ex || that_present_ex) {
10461
        if (!(this_present_ex && that_present_ex))
10462
          return false;
10463
        if (!this.ex.equals(that.ex))
10464
          return false;
10465
      }
10466
 
10467
      return true;
10468
    }
10469
 
10470
    @Override
10471
    public int hashCode() {
10472
      return 0;
10473
    }
10474
 
10475
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10476
      if (!getClass().equals(other.getClass())) {
10477
        return getClass().getName().compareTo(other.getClass().getName());
10478
      }
10479
 
10480
      int lastComparison = 0;
10481
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10482
 
10483
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10484
      if (lastComparison != 0) {
10485
        return lastComparison;
10486
      }
10487
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10488
      if (lastComparison != 0) {
10489
        return lastComparison;
10490
      }
10491
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10492
      if (lastComparison != 0) {
10493
        return lastComparison;
10494
      }
10495
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10496
      if (lastComparison != 0) {
10497
        return lastComparison;
10498
      }
10499
      return 0;
10500
    }
10501
 
10502
    public void read(TProtocol iprot) throws TException {
10503
      TField field;
10504
      iprot.readStructBegin();
10505
      while (true)
10506
      {
10507
        field = iprot.readFieldBegin();
10508
        if (field.type == TType.STOP) { 
10509
          break;
10510
        }
10511
        _Fields fieldId = _Fields.findByThriftId(field.id);
10512
        if (fieldId == null) {
10513
          TProtocolUtil.skip(iprot, field.type);
10514
        } else {
10515
          switch (fieldId) {
10516
            case SUCCESS:
10517
              if (field.type == TType.LIST) {
10518
                {
10519
                  TList _list24 = iprot.readListBegin();
10520
                  this.success = new ArrayList<Long>(_list24.size);
10521
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10522
                  {
10523
                    long _elem26;
10524
                    _elem26 = iprot.readI64();
10525
                    this.success.add(_elem26);
10526
                  }
10527
                  iprot.readListEnd();
10528
                }
10529
              } else { 
10530
                TProtocolUtil.skip(iprot, field.type);
10531
              }
10532
              break;
10533
            case EX:
10534
              if (field.type == TType.STRUCT) {
10535
                this.ex = new TransactionServiceException();
10536
                this.ex.read(iprot);
10537
              } else { 
10538
                TProtocolUtil.skip(iprot, field.type);
10539
              }
10540
              break;
10541
          }
10542
          iprot.readFieldEnd();
10543
        }
10544
      }
10545
      iprot.readStructEnd();
10546
      validate();
10547
    }
10548
 
10549
    public void write(TProtocol oprot) throws TException {
10550
      oprot.writeStructBegin(STRUCT_DESC);
10551
 
10552
      if (this.isSetSuccess()) {
10553
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10554
        {
10555
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
10556
          for (long _iter27 : this.success)
10557
          {
10558
            oprot.writeI64(_iter27);
10559
          }
10560
          oprot.writeListEnd();
10561
        }
10562
        oprot.writeFieldEnd();
10563
      } else if (this.isSetEx()) {
10564
        oprot.writeFieldBegin(EX_FIELD_DESC);
10565
        this.ex.write(oprot);
10566
        oprot.writeFieldEnd();
10567
      }
10568
      oprot.writeFieldStop();
10569
      oprot.writeStructEnd();
10570
    }
10571
 
10572
    @Override
10573
    public String toString() {
10574
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
10575
      boolean first = true;
10576
 
10577
      sb.append("success:");
10578
      if (this.success == null) {
10579
        sb.append("null");
10580
      } else {
10581
        sb.append(this.success);
10582
      }
10583
      first = false;
10584
      if (!first) sb.append(", ");
10585
      sb.append("ex:");
10586
      if (this.ex == null) {
10587
        sb.append("null");
10588
      } else {
10589
        sb.append(this.ex);
10590
      }
10591
      first = false;
10592
      sb.append(")");
10593
      return sb.toString();
10594
    }
10595
 
10596
    public void validate() throws TException {
10597
      // check for required fields
10598
    }
10599
 
10600
  }
10601
 
10602
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
10603
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
10604
 
10605
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10606
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10607
 
10608
    private long customer_id;
10609
    private long limit;
10610
 
10611
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10612
    public enum _Fields implements TFieldIdEnum {
10613
      CUSTOMER_ID((short)1, "customer_id"),
10614
      LIMIT((short)2, "limit");
10615
 
10616
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10617
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10618
 
10619
      static {
10620
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10621
          byId.put((int)field._thriftId, field);
10622
          byName.put(field.getFieldName(), field);
10623
        }
10624
      }
10625
 
10626
      /**
10627
       * Find the _Fields constant that matches fieldId, or null if its not found.
10628
       */
10629
      public static _Fields findByThriftId(int fieldId) {
10630
        return byId.get(fieldId);
10631
      }
10632
 
10633
      /**
10634
       * Find the _Fields constant that matches fieldId, throwing an exception
10635
       * if it is not found.
10636
       */
10637
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10638
        _Fields fields = findByThriftId(fieldId);
10639
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10640
        return fields;
10641
      }
10642
 
10643
      /**
10644
       * Find the _Fields constant that matches name, or null if its not found.
10645
       */
10646
      public static _Fields findByName(String name) {
10647
        return byName.get(name);
10648
      }
10649
 
10650
      private final short _thriftId;
10651
      private final String _fieldName;
10652
 
10653
      _Fields(short thriftId, String fieldName) {
10654
        _thriftId = thriftId;
10655
        _fieldName = fieldName;
10656
      }
10657
 
10658
      public short getThriftFieldId() {
10659
        return _thriftId;
10660
      }
10661
 
10662
      public String getFieldName() {
10663
        return _fieldName;
10664
      }
10665
    }
10666
 
10667
    // isset id assignments
10668
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10669
    private static final int __LIMIT_ISSET_ID = 1;
10670
    private BitSet __isset_bit_vector = new BitSet(2);
10671
 
10672
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10673
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10674
          new FieldValueMetaData(TType.I64)));
10675
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10676
          new FieldValueMetaData(TType.I64)));
10677
    }});
10678
 
10679
    static {
10680
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
10681
    }
10682
 
10683
    public getCancellableOrdersForCustomer_args() {
10684
    }
10685
 
10686
    public getCancellableOrdersForCustomer_args(
10687
      long customer_id,
10688
      long limit)
10689
    {
10690
      this();
10691
      this.customer_id = customer_id;
10692
      setCustomer_idIsSet(true);
10693
      this.limit = limit;
10694
      setLimitIsSet(true);
10695
    }
10696
 
10697
    /**
10698
     * Performs a deep copy on <i>other</i>.
10699
     */
10700
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
10701
      __isset_bit_vector.clear();
10702
      __isset_bit_vector.or(other.__isset_bit_vector);
10703
      this.customer_id = other.customer_id;
10704
      this.limit = other.limit;
10705
    }
10706
 
10707
    public getCancellableOrdersForCustomer_args deepCopy() {
10708
      return new getCancellableOrdersForCustomer_args(this);
10709
    }
10710
 
10711
    @Deprecated
10712
    public getCancellableOrdersForCustomer_args clone() {
10713
      return new getCancellableOrdersForCustomer_args(this);
10714
    }
10715
 
10716
    public long getCustomer_id() {
10717
      return this.customer_id;
10718
    }
10719
 
10720
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
10721
      this.customer_id = customer_id;
10722
      setCustomer_idIsSet(true);
10723
      return this;
10724
    }
10725
 
10726
    public void unsetCustomer_id() {
10727
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10728
    }
10729
 
10730
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10731
    public boolean isSetCustomer_id() {
10732
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10733
    }
10734
 
10735
    public void setCustomer_idIsSet(boolean value) {
10736
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10737
    }
10738
 
10739
    public long getLimit() {
10740
      return this.limit;
10741
    }
10742
 
10743
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
10744
      this.limit = limit;
10745
      setLimitIsSet(true);
10746
      return this;
10747
    }
10748
 
10749
    public void unsetLimit() {
10750
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10751
    }
10752
 
10753
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10754
    public boolean isSetLimit() {
10755
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10756
    }
10757
 
10758
    public void setLimitIsSet(boolean value) {
10759
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10760
    }
10761
 
10762
    public void setFieldValue(_Fields field, Object value) {
10763
      switch (field) {
10764
      case CUSTOMER_ID:
10765
        if (value == null) {
10766
          unsetCustomer_id();
10767
        } else {
10768
          setCustomer_id((Long)value);
10769
        }
10770
        break;
10771
 
10772
      case LIMIT:
10773
        if (value == null) {
10774
          unsetLimit();
10775
        } else {
10776
          setLimit((Long)value);
10777
        }
10778
        break;
10779
 
10780
      }
10781
    }
10782
 
10783
    public void setFieldValue(int fieldID, Object value) {
10784
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10785
    }
10786
 
10787
    public Object getFieldValue(_Fields field) {
10788
      switch (field) {
10789
      case CUSTOMER_ID:
10790
        return new Long(getCustomer_id());
10791
 
10792
      case LIMIT:
10793
        return new Long(getLimit());
10794
 
10795
      }
10796
      throw new IllegalStateException();
10797
    }
10798
 
10799
    public Object getFieldValue(int fieldId) {
10800
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10801
    }
10802
 
10803
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10804
    public boolean isSet(_Fields field) {
10805
      switch (field) {
10806
      case CUSTOMER_ID:
10807
        return isSetCustomer_id();
10808
      case LIMIT:
10809
        return isSetLimit();
10810
      }
10811
      throw new IllegalStateException();
10812
    }
10813
 
10814
    public boolean isSet(int fieldID) {
10815
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10816
    }
10817
 
10818
    @Override
10819
    public boolean equals(Object that) {
10820
      if (that == null)
10821
        return false;
10822
      if (that instanceof getCancellableOrdersForCustomer_args)
10823
        return this.equals((getCancellableOrdersForCustomer_args)that);
10824
      return false;
10825
    }
10826
 
10827
    public boolean equals(getCancellableOrdersForCustomer_args that) {
10828
      if (that == null)
10829
        return false;
10830
 
10831
      boolean this_present_customer_id = true;
10832
      boolean that_present_customer_id = true;
10833
      if (this_present_customer_id || that_present_customer_id) {
10834
        if (!(this_present_customer_id && that_present_customer_id))
10835
          return false;
10836
        if (this.customer_id != that.customer_id)
10837
          return false;
10838
      }
10839
 
10840
      boolean this_present_limit = true;
10841
      boolean that_present_limit = true;
10842
      if (this_present_limit || that_present_limit) {
10843
        if (!(this_present_limit && that_present_limit))
10844
          return false;
10845
        if (this.limit != that.limit)
10846
          return false;
10847
      }
10848
 
10849
      return true;
10850
    }
10851
 
10852
    @Override
10853
    public int hashCode() {
10854
      return 0;
10855
    }
10856
 
10857
    public int compareTo(getCancellableOrdersForCustomer_args other) {
10858
      if (!getClass().equals(other.getClass())) {
10859
        return getClass().getName().compareTo(other.getClass().getName());
10860
      }
10861
 
10862
      int lastComparison = 0;
10863
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
10864
 
10865
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10866
      if (lastComparison != 0) {
10867
        return lastComparison;
10868
      }
10869
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10870
      if (lastComparison != 0) {
10871
        return lastComparison;
10872
      }
10873
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10874
      if (lastComparison != 0) {
10875
        return lastComparison;
10876
      }
10877
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10878
      if (lastComparison != 0) {
10879
        return lastComparison;
10880
      }
10881
      return 0;
10882
    }
10883
 
10884
    public void read(TProtocol iprot) throws TException {
10885
      TField field;
10886
      iprot.readStructBegin();
10887
      while (true)
10888
      {
10889
        field = iprot.readFieldBegin();
10890
        if (field.type == TType.STOP) { 
10891
          break;
10892
        }
10893
        _Fields fieldId = _Fields.findByThriftId(field.id);
10894
        if (fieldId == null) {
10895
          TProtocolUtil.skip(iprot, field.type);
10896
        } else {
10897
          switch (fieldId) {
10898
            case CUSTOMER_ID:
10899
              if (field.type == TType.I64) {
10900
                this.customer_id = iprot.readI64();
10901
                setCustomer_idIsSet(true);
10902
              } else { 
10903
                TProtocolUtil.skip(iprot, field.type);
10904
              }
10905
              break;
10906
            case LIMIT:
10907
              if (field.type == TType.I64) {
10908
                this.limit = iprot.readI64();
10909
                setLimitIsSet(true);
10910
              } else { 
10911
                TProtocolUtil.skip(iprot, field.type);
10912
              }
10913
              break;
10914
          }
10915
          iprot.readFieldEnd();
10916
        }
10917
      }
10918
      iprot.readStructEnd();
10919
      validate();
10920
    }
10921
 
10922
    public void write(TProtocol oprot) throws TException {
10923
      validate();
10924
 
10925
      oprot.writeStructBegin(STRUCT_DESC);
10926
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10927
      oprot.writeI64(this.customer_id);
10928
      oprot.writeFieldEnd();
10929
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10930
      oprot.writeI64(this.limit);
10931
      oprot.writeFieldEnd();
10932
      oprot.writeFieldStop();
10933
      oprot.writeStructEnd();
10934
    }
10935
 
10936
    @Override
10937
    public String toString() {
10938
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
10939
      boolean first = true;
10940
 
10941
      sb.append("customer_id:");
10942
      sb.append(this.customer_id);
10943
      first = false;
10944
      if (!first) sb.append(", ");
10945
      sb.append("limit:");
10946
      sb.append(this.limit);
10947
      first = false;
10948
      sb.append(")");
10949
      return sb.toString();
10950
    }
10951
 
10952
    public void validate() throws TException {
10953
      // check for required fields
10954
    }
10955
 
10956
  }
10957
 
10958
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
10959
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
10960
 
10961
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10962
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10963
 
10964
    private List<Long> success;
10965
    private TransactionServiceException ex;
10966
 
10967
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10968
    public enum _Fields implements TFieldIdEnum {
10969
      SUCCESS((short)0, "success"),
10970
      EX((short)1, "ex");
10971
 
10972
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10973
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10974
 
10975
      static {
10976
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10977
          byId.put((int)field._thriftId, field);
10978
          byName.put(field.getFieldName(), field);
10979
        }
10980
      }
10981
 
10982
      /**
10983
       * Find the _Fields constant that matches fieldId, or null if its not found.
10984
       */
10985
      public static _Fields findByThriftId(int fieldId) {
10986
        return byId.get(fieldId);
10987
      }
10988
 
10989
      /**
10990
       * Find the _Fields constant that matches fieldId, throwing an exception
10991
       * if it is not found.
10992
       */
10993
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10994
        _Fields fields = findByThriftId(fieldId);
10995
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10996
        return fields;
10997
      }
10998
 
10999
      /**
11000
       * Find the _Fields constant that matches name, or null if its not found.
11001
       */
11002
      public static _Fields findByName(String name) {
11003
        return byName.get(name);
11004
      }
11005
 
11006
      private final short _thriftId;
11007
      private final String _fieldName;
11008
 
11009
      _Fields(short thriftId, String fieldName) {
11010
        _thriftId = thriftId;
11011
        _fieldName = fieldName;
11012
      }
11013
 
11014
      public short getThriftFieldId() {
11015
        return _thriftId;
11016
      }
11017
 
11018
      public String getFieldName() {
11019
        return _fieldName;
11020
      }
11021
    }
11022
 
11023
    // isset id assignments
11024
 
11025
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11026
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11027
          new ListMetaData(TType.LIST, 
11028
              new FieldValueMetaData(TType.I64))));
11029
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11030
          new FieldValueMetaData(TType.STRUCT)));
11031
    }});
11032
 
11033
    static {
11034
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
11035
    }
11036
 
11037
    public getCancellableOrdersForCustomer_result() {
11038
    }
11039
 
11040
    public getCancellableOrdersForCustomer_result(
11041
      List<Long> success,
11042
      TransactionServiceException ex)
11043
    {
11044
      this();
11045
      this.success = success;
11046
      this.ex = ex;
11047
    }
11048
 
11049
    /**
11050
     * Performs a deep copy on <i>other</i>.
11051
     */
11052
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
11053
      if (other.isSetSuccess()) {
11054
        List<Long> __this__success = new ArrayList<Long>();
11055
        for (Long other_element : other.success) {
11056
          __this__success.add(other_element);
11057
        }
11058
        this.success = __this__success;
11059
      }
11060
      if (other.isSetEx()) {
11061
        this.ex = new TransactionServiceException(other.ex);
11062
      }
11063
    }
11064
 
11065
    public getCancellableOrdersForCustomer_result deepCopy() {
11066
      return new getCancellableOrdersForCustomer_result(this);
11067
    }
11068
 
11069
    @Deprecated
11070
    public getCancellableOrdersForCustomer_result clone() {
11071
      return new getCancellableOrdersForCustomer_result(this);
11072
    }
11073
 
11074
    public int getSuccessSize() {
11075
      return (this.success == null) ? 0 : this.success.size();
11076
    }
11077
 
11078
    public java.util.Iterator<Long> getSuccessIterator() {
11079
      return (this.success == null) ? null : this.success.iterator();
11080
    }
11081
 
11082
    public void addToSuccess(long elem) {
11083
      if (this.success == null) {
11084
        this.success = new ArrayList<Long>();
11085
      }
11086
      this.success.add(elem);
11087
    }
11088
 
11089
    public List<Long> getSuccess() {
11090
      return this.success;
11091
    }
11092
 
11093
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
11094
      this.success = success;
11095
      return this;
11096
    }
11097
 
11098
    public void unsetSuccess() {
11099
      this.success = null;
11100
    }
11101
 
11102
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11103
    public boolean isSetSuccess() {
11104
      return this.success != null;
11105
    }
11106
 
11107
    public void setSuccessIsSet(boolean value) {
11108
      if (!value) {
11109
        this.success = null;
11110
      }
11111
    }
11112
 
11113
    public TransactionServiceException getEx() {
11114
      return this.ex;
11115
    }
11116
 
11117
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11118
      this.ex = ex;
11119
      return this;
11120
    }
11121
 
11122
    public void unsetEx() {
11123
      this.ex = null;
11124
    }
11125
 
11126
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11127
    public boolean isSetEx() {
11128
      return this.ex != null;
11129
    }
11130
 
11131
    public void setExIsSet(boolean value) {
11132
      if (!value) {
11133
        this.ex = null;
11134
      }
11135
    }
11136
 
11137
    public void setFieldValue(_Fields field, Object value) {
11138
      switch (field) {
11139
      case SUCCESS:
11140
        if (value == null) {
11141
          unsetSuccess();
11142
        } else {
11143
          setSuccess((List<Long>)value);
11144
        }
11145
        break;
11146
 
11147
      case EX:
11148
        if (value == null) {
11149
          unsetEx();
11150
        } else {
11151
          setEx((TransactionServiceException)value);
11152
        }
11153
        break;
11154
 
11155
      }
11156
    }
11157
 
11158
    public void setFieldValue(int fieldID, Object value) {
11159
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11160
    }
11161
 
11162
    public Object getFieldValue(_Fields field) {
11163
      switch (field) {
11164
      case SUCCESS:
11165
        return getSuccess();
11166
 
11167
      case EX:
11168
        return getEx();
11169
 
11170
      }
11171
      throw new IllegalStateException();
11172
    }
11173
 
11174
    public Object getFieldValue(int fieldId) {
11175
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11176
    }
11177
 
11178
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11179
    public boolean isSet(_Fields field) {
11180
      switch (field) {
11181
      case SUCCESS:
11182
        return isSetSuccess();
11183
      case EX:
11184
        return isSetEx();
11185
      }
11186
      throw new IllegalStateException();
11187
    }
11188
 
11189
    public boolean isSet(int fieldID) {
11190
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11191
    }
11192
 
11193
    @Override
11194
    public boolean equals(Object that) {
11195
      if (that == null)
11196
        return false;
11197
      if (that instanceof getCancellableOrdersForCustomer_result)
11198
        return this.equals((getCancellableOrdersForCustomer_result)that);
11199
      return false;
11200
    }
11201
 
11202
    public boolean equals(getCancellableOrdersForCustomer_result that) {
11203
      if (that == null)
11204
        return false;
11205
 
11206
      boolean this_present_success = true && this.isSetSuccess();
11207
      boolean that_present_success = true && that.isSetSuccess();
11208
      if (this_present_success || that_present_success) {
11209
        if (!(this_present_success && that_present_success))
11210
          return false;
11211
        if (!this.success.equals(that.success))
11212
          return false;
11213
      }
11214
 
11215
      boolean this_present_ex = true && this.isSetEx();
11216
      boolean that_present_ex = true && that.isSetEx();
11217
      if (this_present_ex || that_present_ex) {
11218
        if (!(this_present_ex && that_present_ex))
11219
          return false;
11220
        if (!this.ex.equals(that.ex))
11221
          return false;
11222
      }
11223
 
11224
      return true;
11225
    }
11226
 
11227
    @Override
11228
    public int hashCode() {
11229
      return 0;
11230
    }
11231
 
11232
    public int compareTo(getCancellableOrdersForCustomer_result other) {
11233
      if (!getClass().equals(other.getClass())) {
11234
        return getClass().getName().compareTo(other.getClass().getName());
11235
      }
11236
 
11237
      int lastComparison = 0;
11238
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
11239
 
11240
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11241
      if (lastComparison != 0) {
11242
        return lastComparison;
11243
      }
11244
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11245
      if (lastComparison != 0) {
11246
        return lastComparison;
11247
      }
11248
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11249
      if (lastComparison != 0) {
11250
        return lastComparison;
11251
      }
11252
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11253
      if (lastComparison != 0) {
11254
        return lastComparison;
11255
      }
11256
      return 0;
11257
    }
11258
 
11259
    public void read(TProtocol iprot) throws TException {
11260
      TField field;
11261
      iprot.readStructBegin();
11262
      while (true)
11263
      {
11264
        field = iprot.readFieldBegin();
11265
        if (field.type == TType.STOP) { 
11266
          break;
11267
        }
11268
        _Fields fieldId = _Fields.findByThriftId(field.id);
11269
        if (fieldId == null) {
11270
          TProtocolUtil.skip(iprot, field.type);
11271
        } else {
11272
          switch (fieldId) {
11273
            case SUCCESS:
11274
              if (field.type == TType.LIST) {
11275
                {
11276
                  TList _list28 = iprot.readListBegin();
11277
                  this.success = new ArrayList<Long>(_list28.size);
11278
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11279
                  {
11280
                    long _elem30;
11281
                    _elem30 = iprot.readI64();
11282
                    this.success.add(_elem30);
11283
                  }
11284
                  iprot.readListEnd();
11285
                }
11286
              } else { 
11287
                TProtocolUtil.skip(iprot, field.type);
11288
              }
11289
              break;
11290
            case EX:
11291
              if (field.type == TType.STRUCT) {
11292
                this.ex = new TransactionServiceException();
11293
                this.ex.read(iprot);
11294
              } else { 
11295
                TProtocolUtil.skip(iprot, field.type);
11296
              }
11297
              break;
11298
          }
11299
          iprot.readFieldEnd();
11300
        }
11301
      }
11302
      iprot.readStructEnd();
11303
      validate();
11304
    }
11305
 
11306
    public void write(TProtocol oprot) throws TException {
11307
      oprot.writeStructBegin(STRUCT_DESC);
11308
 
11309
      if (this.isSetSuccess()) {
11310
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11311
        {
11312
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11313
          for (long _iter31 : this.success)
11314
          {
11315
            oprot.writeI64(_iter31);
11316
          }
11317
          oprot.writeListEnd();
11318
        }
11319
        oprot.writeFieldEnd();
11320
      } else if (this.isSetEx()) {
11321
        oprot.writeFieldBegin(EX_FIELD_DESC);
11322
        this.ex.write(oprot);
11323
        oprot.writeFieldEnd();
11324
      }
11325
      oprot.writeFieldStop();
11326
      oprot.writeStructEnd();
11327
    }
11328
 
11329
    @Override
11330
    public String toString() {
11331
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11332
      boolean first = true;
11333
 
11334
      sb.append("success:");
11335
      if (this.success == null) {
11336
        sb.append("null");
11337
      } else {
11338
        sb.append(this.success);
11339
      }
11340
      first = false;
11341
      if (!first) sb.append(", ");
11342
      sb.append("ex:");
11343
      if (this.ex == null) {
11344
        sb.append("null");
11345
      } else {
11346
        sb.append(this.ex);
11347
      }
11348
      first = false;
11349
      sb.append(")");
11350
      return sb.toString();
11351
    }
11352
 
11353
    public void validate() throws TException {
11354
      // check for required fields
11355
    }
11356
 
11357
  }
11358
 
483 rajveer 11359
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11360
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11361
 
483 rajveer 11362
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11363
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11364
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11365
 
483 rajveer 11366
    private long orderId;
11367
    private OrderStatus status;
11368
    private String description;
68 ashish 11369
 
11370
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11371
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11372
      ORDER_ID((short)1, "orderId"),
11373
      /**
11374
       * 
11375
       * @see OrderStatus
11376
       */
11377
      STATUS((short)2, "status"),
11378
      DESCRIPTION((short)3, "description");
68 ashish 11379
 
11380
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11381
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11382
 
11383
      static {
11384
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11385
          byId.put((int)field._thriftId, field);
11386
          byName.put(field.getFieldName(), field);
11387
        }
11388
      }
11389
 
11390
      /**
11391
       * Find the _Fields constant that matches fieldId, or null if its not found.
11392
       */
11393
      public static _Fields findByThriftId(int fieldId) {
11394
        return byId.get(fieldId);
11395
      }
11396
 
11397
      /**
11398
       * Find the _Fields constant that matches fieldId, throwing an exception
11399
       * if it is not found.
11400
       */
11401
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11402
        _Fields fields = findByThriftId(fieldId);
11403
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11404
        return fields;
11405
      }
11406
 
11407
      /**
11408
       * Find the _Fields constant that matches name, or null if its not found.
11409
       */
11410
      public static _Fields findByName(String name) {
11411
        return byName.get(name);
11412
      }
11413
 
11414
      private final short _thriftId;
11415
      private final String _fieldName;
11416
 
11417
      _Fields(short thriftId, String fieldName) {
11418
        _thriftId = thriftId;
11419
        _fieldName = fieldName;
11420
      }
11421
 
11422
      public short getThriftFieldId() {
11423
        return _thriftId;
11424
      }
11425
 
11426
      public String getFieldName() {
11427
        return _fieldName;
11428
      }
11429
    }
11430
 
11431
    // isset id assignments
483 rajveer 11432
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11433
    private BitSet __isset_bit_vector = new BitSet(1);
11434
 
11435
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11436
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11437
          new FieldValueMetaData(TType.I64)));
483 rajveer 11438
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11439
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11440
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11441
          new FieldValueMetaData(TType.STRING)));
68 ashish 11442
    }});
11443
 
11444
    static {
483 rajveer 11445
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11446
    }
11447
 
483 rajveer 11448
    public changeOrderStatus_args() {
68 ashish 11449
    }
11450
 
483 rajveer 11451
    public changeOrderStatus_args(
11452
      long orderId,
11453
      OrderStatus status,
11454
      String description)
68 ashish 11455
    {
11456
      this();
483 rajveer 11457
      this.orderId = orderId;
11458
      setOrderIdIsSet(true);
11459
      this.status = status;
11460
      this.description = description;
68 ashish 11461
    }
11462
 
11463
    /**
11464
     * Performs a deep copy on <i>other</i>.
11465
     */
483 rajveer 11466
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11467
      __isset_bit_vector.clear();
11468
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11469
      this.orderId = other.orderId;
11470
      if (other.isSetStatus()) {
11471
        this.status = other.status;
11472
      }
11473
      if (other.isSetDescription()) {
11474
        this.description = other.description;
11475
      }
68 ashish 11476
    }
11477
 
483 rajveer 11478
    public changeOrderStatus_args deepCopy() {
11479
      return new changeOrderStatus_args(this);
68 ashish 11480
    }
11481
 
11482
    @Deprecated
483 rajveer 11483
    public changeOrderStatus_args clone() {
11484
      return new changeOrderStatus_args(this);
68 ashish 11485
    }
11486
 
483 rajveer 11487
    public long getOrderId() {
11488
      return this.orderId;
68 ashish 11489
    }
11490
 
483 rajveer 11491
    public changeOrderStatus_args setOrderId(long orderId) {
11492
      this.orderId = orderId;
11493
      setOrderIdIsSet(true);
68 ashish 11494
      return this;
11495
    }
11496
 
483 rajveer 11497
    public void unsetOrderId() {
11498
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11499
    }
11500
 
483 rajveer 11501
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11502
    public boolean isSetOrderId() {
11503
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11504
    }
11505
 
483 rajveer 11506
    public void setOrderIdIsSet(boolean value) {
11507
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11508
    }
11509
 
483 rajveer 11510
    /**
11511
     * 
11512
     * @see OrderStatus
11513
     */
11514
    public OrderStatus getStatus() {
11515
      return this.status;
68 ashish 11516
    }
11517
 
11518
    /**
483 rajveer 11519
     * 
11520
     * @see OrderStatus
68 ashish 11521
     */
483 rajveer 11522
    public changeOrderStatus_args setStatus(OrderStatus status) {
11523
      this.status = status;
68 ashish 11524
      return this;
11525
    }
11526
 
483 rajveer 11527
    public void unsetStatus() {
11528
      this.status = null;
68 ashish 11529
    }
11530
 
483 rajveer 11531
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11532
    public boolean isSetStatus() {
11533
      return this.status != null;
68 ashish 11534
    }
11535
 
483 rajveer 11536
    public void setStatusIsSet(boolean value) {
68 ashish 11537
      if (!value) {
483 rajveer 11538
        this.status = null;
68 ashish 11539
      }
11540
    }
11541
 
483 rajveer 11542
    public String getDescription() {
11543
      return this.description;
68 ashish 11544
    }
11545
 
483 rajveer 11546
    public changeOrderStatus_args setDescription(String description) {
11547
      this.description = description;
68 ashish 11548
      return this;
11549
    }
11550
 
483 rajveer 11551
    public void unsetDescription() {
11552
      this.description = null;
68 ashish 11553
    }
11554
 
483 rajveer 11555
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
11556
    public boolean isSetDescription() {
11557
      return this.description != null;
68 ashish 11558
    }
11559
 
483 rajveer 11560
    public void setDescriptionIsSet(boolean value) {
68 ashish 11561
      if (!value) {
483 rajveer 11562
        this.description = null;
68 ashish 11563
      }
11564
    }
11565
 
11566
    public void setFieldValue(_Fields field, Object value) {
11567
      switch (field) {
483 rajveer 11568
      case ORDER_ID:
68 ashish 11569
        if (value == null) {
483 rajveer 11570
          unsetOrderId();
68 ashish 11571
        } else {
483 rajveer 11572
          setOrderId((Long)value);
68 ashish 11573
        }
11574
        break;
11575
 
483 rajveer 11576
      case STATUS:
68 ashish 11577
        if (value == null) {
483 rajveer 11578
          unsetStatus();
68 ashish 11579
        } else {
483 rajveer 11580
          setStatus((OrderStatus)value);
68 ashish 11581
        }
11582
        break;
11583
 
483 rajveer 11584
      case DESCRIPTION:
11585
        if (value == null) {
11586
          unsetDescription();
11587
        } else {
11588
          setDescription((String)value);
11589
        }
11590
        break;
11591
 
68 ashish 11592
      }
11593
    }
11594
 
11595
    public void setFieldValue(int fieldID, Object value) {
11596
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11597
    }
11598
 
11599
    public Object getFieldValue(_Fields field) {
11600
      switch (field) {
483 rajveer 11601
      case ORDER_ID:
11602
        return new Long(getOrderId());
68 ashish 11603
 
483 rajveer 11604
      case STATUS:
11605
        return getStatus();
68 ashish 11606
 
483 rajveer 11607
      case DESCRIPTION:
11608
        return getDescription();
11609
 
68 ashish 11610
      }
11611
      throw new IllegalStateException();
11612
    }
11613
 
11614
    public Object getFieldValue(int fieldId) {
11615
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11616
    }
11617
 
11618
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11619
    public boolean isSet(_Fields field) {
11620
      switch (field) {
483 rajveer 11621
      case ORDER_ID:
11622
        return isSetOrderId();
11623
      case STATUS:
11624
        return isSetStatus();
11625
      case DESCRIPTION:
11626
        return isSetDescription();
68 ashish 11627
      }
11628
      throw new IllegalStateException();
11629
    }
11630
 
11631
    public boolean isSet(int fieldID) {
11632
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11633
    }
11634
 
11635
    @Override
11636
    public boolean equals(Object that) {
11637
      if (that == null)
11638
        return false;
483 rajveer 11639
      if (that instanceof changeOrderStatus_args)
11640
        return this.equals((changeOrderStatus_args)that);
68 ashish 11641
      return false;
11642
    }
11643
 
483 rajveer 11644
    public boolean equals(changeOrderStatus_args that) {
68 ashish 11645
      if (that == null)
11646
        return false;
11647
 
483 rajveer 11648
      boolean this_present_orderId = true;
11649
      boolean that_present_orderId = true;
11650
      if (this_present_orderId || that_present_orderId) {
11651
        if (!(this_present_orderId && that_present_orderId))
68 ashish 11652
          return false;
483 rajveer 11653
        if (this.orderId != that.orderId)
68 ashish 11654
          return false;
11655
      }
11656
 
483 rajveer 11657
      boolean this_present_status = true && this.isSetStatus();
11658
      boolean that_present_status = true && that.isSetStatus();
11659
      if (this_present_status || that_present_status) {
11660
        if (!(this_present_status && that_present_status))
68 ashish 11661
          return false;
483 rajveer 11662
        if (!this.status.equals(that.status))
68 ashish 11663
          return false;
11664
      }
11665
 
483 rajveer 11666
      boolean this_present_description = true && this.isSetDescription();
11667
      boolean that_present_description = true && that.isSetDescription();
11668
      if (this_present_description || that_present_description) {
11669
        if (!(this_present_description && that_present_description))
11670
          return false;
11671
        if (!this.description.equals(that.description))
11672
          return false;
11673
      }
11674
 
68 ashish 11675
      return true;
11676
    }
11677
 
11678
    @Override
11679
    public int hashCode() {
11680
      return 0;
11681
    }
11682
 
483 rajveer 11683
    public int compareTo(changeOrderStatus_args other) {
11684
      if (!getClass().equals(other.getClass())) {
11685
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 11686
      }
11687
 
483 rajveer 11688
      int lastComparison = 0;
11689
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 11690
 
483 rajveer 11691
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11692
      if (lastComparison != 0) {
11693
        return lastComparison;
68 ashish 11694
      }
483 rajveer 11695
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11696
      if (lastComparison != 0) {
11697
        return lastComparison;
68 ashish 11698
      }
483 rajveer 11699
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11700
      if (lastComparison != 0) {
11701
        return lastComparison;
68 ashish 11702
      }
483 rajveer 11703
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11704
      if (lastComparison != 0) {
11705
        return lastComparison;
68 ashish 11706
      }
483 rajveer 11707
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
11708
      if (lastComparison != 0) {
11709
        return lastComparison;
68 ashish 11710
      }
483 rajveer 11711
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
11712
      if (lastComparison != 0) {
11713
        return lastComparison;
68 ashish 11714
      }
11715
      return 0;
11716
    }
11717
 
11718
    public void read(TProtocol iprot) throws TException {
11719
      TField field;
11720
      iprot.readStructBegin();
11721
      while (true)
11722
      {
11723
        field = iprot.readFieldBegin();
11724
        if (field.type == TType.STOP) { 
11725
          break;
11726
        }
11727
        _Fields fieldId = _Fields.findByThriftId(field.id);
11728
        if (fieldId == null) {
11729
          TProtocolUtil.skip(iprot, field.type);
11730
        } else {
11731
          switch (fieldId) {
483 rajveer 11732
            case ORDER_ID:
68 ashish 11733
              if (field.type == TType.I64) {
483 rajveer 11734
                this.orderId = iprot.readI64();
11735
                setOrderIdIsSet(true);
68 ashish 11736
              } else { 
11737
                TProtocolUtil.skip(iprot, field.type);
11738
              }
11739
              break;
483 rajveer 11740
            case STATUS:
11741
              if (field.type == TType.I32) {
11742
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 11743
              } else { 
11744
                TProtocolUtil.skip(iprot, field.type);
11745
              }
11746
              break;
483 rajveer 11747
            case DESCRIPTION:
11748
              if (field.type == TType.STRING) {
11749
                this.description = iprot.readString();
11750
              } else { 
11751
                TProtocolUtil.skip(iprot, field.type);
11752
              }
11753
              break;
68 ashish 11754
          }
11755
          iprot.readFieldEnd();
11756
        }
11757
      }
11758
      iprot.readStructEnd();
11759
      validate();
11760
    }
11761
 
11762
    public void write(TProtocol oprot) throws TException {
11763
      validate();
11764
 
11765
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 11766
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11767
      oprot.writeI64(this.orderId);
68 ashish 11768
      oprot.writeFieldEnd();
483 rajveer 11769
      if (this.status != null) {
11770
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11771
        oprot.writeI32(this.status.getValue());
68 ashish 11772
        oprot.writeFieldEnd();
11773
      }
483 rajveer 11774
      if (this.description != null) {
11775
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11776
        oprot.writeString(this.description);
11777
        oprot.writeFieldEnd();
11778
      }
68 ashish 11779
      oprot.writeFieldStop();
11780
      oprot.writeStructEnd();
11781
    }
11782
 
11783
    @Override
11784
    public String toString() {
483 rajveer 11785
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 11786
      boolean first = true;
11787
 
483 rajveer 11788
      sb.append("orderId:");
11789
      sb.append(this.orderId);
68 ashish 11790
      first = false;
11791
      if (!first) sb.append(", ");
483 rajveer 11792
      sb.append("status:");
11793
      if (this.status == null) {
68 ashish 11794
        sb.append("null");
11795
      } else {
483 rajveer 11796
        String status_name = status.name();
11797
        if (status_name != null) {
11798
          sb.append(status_name);
11799
          sb.append(" (");
11800
        }
11801
        sb.append(this.status);
11802
        if (status_name != null) {
11803
          sb.append(")");
11804
        }
68 ashish 11805
      }
11806
      first = false;
483 rajveer 11807
      if (!first) sb.append(", ");
11808
      sb.append("description:");
11809
      if (this.description == null) {
11810
        sb.append("null");
11811
      } else {
11812
        sb.append(this.description);
11813
      }
11814
      first = false;
68 ashish 11815
      sb.append(")");
11816
      return sb.toString();
11817
    }
11818
 
11819
    public void validate() throws TException {
11820
      // check for required fields
11821
    }
11822
 
11823
  }
11824
 
483 rajveer 11825
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
11826
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 11827
 
11828
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11829
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11830
 
11831
    private boolean success;
11832
    private TransactionServiceException ex;
11833
 
11834
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11835
    public enum _Fields implements TFieldIdEnum {
11836
      SUCCESS((short)0, "success"),
11837
      EX((short)1, "ex");
11838
 
11839
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11840
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11841
 
11842
      static {
11843
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11844
          byId.put((int)field._thriftId, field);
11845
          byName.put(field.getFieldName(), field);
11846
        }
11847
      }
11848
 
11849
      /**
11850
       * Find the _Fields constant that matches fieldId, or null if its not found.
11851
       */
11852
      public static _Fields findByThriftId(int fieldId) {
11853
        return byId.get(fieldId);
11854
      }
11855
 
11856
      /**
11857
       * Find the _Fields constant that matches fieldId, throwing an exception
11858
       * if it is not found.
11859
       */
11860
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11861
        _Fields fields = findByThriftId(fieldId);
11862
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11863
        return fields;
11864
      }
11865
 
11866
      /**
11867
       * Find the _Fields constant that matches name, or null if its not found.
11868
       */
11869
      public static _Fields findByName(String name) {
11870
        return byName.get(name);
11871
      }
11872
 
11873
      private final short _thriftId;
11874
      private final String _fieldName;
11875
 
11876
      _Fields(short thriftId, String fieldName) {
11877
        _thriftId = thriftId;
11878
        _fieldName = fieldName;
11879
      }
11880
 
11881
      public short getThriftFieldId() {
11882
        return _thriftId;
11883
      }
11884
 
11885
      public String getFieldName() {
11886
        return _fieldName;
11887
      }
11888
    }
11889
 
11890
    // isset id assignments
11891
    private static final int __SUCCESS_ISSET_ID = 0;
11892
    private BitSet __isset_bit_vector = new BitSet(1);
11893
 
11894
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11895
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11896
          new FieldValueMetaData(TType.BOOL)));
11897
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11898
          new FieldValueMetaData(TType.STRUCT)));
11899
    }});
11900
 
11901
    static {
483 rajveer 11902
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 11903
    }
11904
 
483 rajveer 11905
    public changeOrderStatus_result() {
68 ashish 11906
    }
11907
 
483 rajveer 11908
    public changeOrderStatus_result(
68 ashish 11909
      boolean success,
11910
      TransactionServiceException ex)
11911
    {
11912
      this();
11913
      this.success = success;
11914
      setSuccessIsSet(true);
11915
      this.ex = ex;
11916
    }
11917
 
11918
    /**
11919
     * Performs a deep copy on <i>other</i>.
11920
     */
483 rajveer 11921
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 11922
      __isset_bit_vector.clear();
11923
      __isset_bit_vector.or(other.__isset_bit_vector);
11924
      this.success = other.success;
11925
      if (other.isSetEx()) {
11926
        this.ex = new TransactionServiceException(other.ex);
11927
      }
11928
    }
11929
 
483 rajveer 11930
    public changeOrderStatus_result deepCopy() {
11931
      return new changeOrderStatus_result(this);
68 ashish 11932
    }
11933
 
11934
    @Deprecated
483 rajveer 11935
    public changeOrderStatus_result clone() {
11936
      return new changeOrderStatus_result(this);
68 ashish 11937
    }
11938
 
11939
    public boolean isSuccess() {
11940
      return this.success;
11941
    }
11942
 
483 rajveer 11943
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 11944
      this.success = success;
11945
      setSuccessIsSet(true);
11946
      return this;
11947
    }
11948
 
11949
    public void unsetSuccess() {
11950
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11951
    }
11952
 
11953
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11954
    public boolean isSetSuccess() {
11955
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11956
    }
11957
 
11958
    public void setSuccessIsSet(boolean value) {
11959
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11960
    }
11961
 
11962
    public TransactionServiceException getEx() {
11963
      return this.ex;
11964
    }
11965
 
483 rajveer 11966
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 11967
      this.ex = ex;
11968
      return this;
11969
    }
11970
 
11971
    public void unsetEx() {
11972
      this.ex = null;
11973
    }
11974
 
11975
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11976
    public boolean isSetEx() {
11977
      return this.ex != null;
11978
    }
11979
 
11980
    public void setExIsSet(boolean value) {
11981
      if (!value) {
11982
        this.ex = null;
11983
      }
11984
    }
11985
 
11986
    public void setFieldValue(_Fields field, Object value) {
11987
      switch (field) {
11988
      case SUCCESS:
11989
        if (value == null) {
11990
          unsetSuccess();
11991
        } else {
11992
          setSuccess((Boolean)value);
11993
        }
11994
        break;
11995
 
11996
      case EX:
11997
        if (value == null) {
11998
          unsetEx();
11999
        } else {
12000
          setEx((TransactionServiceException)value);
12001
        }
12002
        break;
12003
 
12004
      }
12005
    }
12006
 
12007
    public void setFieldValue(int fieldID, Object value) {
12008
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12009
    }
12010
 
12011
    public Object getFieldValue(_Fields field) {
12012
      switch (field) {
12013
      case SUCCESS:
12014
        return new Boolean(isSuccess());
12015
 
12016
      case EX:
12017
        return getEx();
12018
 
12019
      }
12020
      throw new IllegalStateException();
12021
    }
12022
 
12023
    public Object getFieldValue(int fieldId) {
12024
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12025
    }
12026
 
12027
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12028
    public boolean isSet(_Fields field) {
12029
      switch (field) {
12030
      case SUCCESS:
12031
        return isSetSuccess();
12032
      case EX:
12033
        return isSetEx();
12034
      }
12035
      throw new IllegalStateException();
12036
    }
12037
 
12038
    public boolean isSet(int fieldID) {
12039
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12040
    }
12041
 
12042
    @Override
12043
    public boolean equals(Object that) {
12044
      if (that == null)
12045
        return false;
483 rajveer 12046
      if (that instanceof changeOrderStatus_result)
12047
        return this.equals((changeOrderStatus_result)that);
68 ashish 12048
      return false;
12049
    }
12050
 
483 rajveer 12051
    public boolean equals(changeOrderStatus_result that) {
68 ashish 12052
      if (that == null)
12053
        return false;
12054
 
12055
      boolean this_present_success = true;
12056
      boolean that_present_success = true;
12057
      if (this_present_success || that_present_success) {
12058
        if (!(this_present_success && that_present_success))
12059
          return false;
12060
        if (this.success != that.success)
12061
          return false;
12062
      }
12063
 
12064
      boolean this_present_ex = true && this.isSetEx();
12065
      boolean that_present_ex = true && that.isSetEx();
12066
      if (this_present_ex || that_present_ex) {
12067
        if (!(this_present_ex && that_present_ex))
12068
          return false;
12069
        if (!this.ex.equals(that.ex))
12070
          return false;
12071
      }
12072
 
12073
      return true;
12074
    }
12075
 
12076
    @Override
12077
    public int hashCode() {
12078
      return 0;
12079
    }
12080
 
483 rajveer 12081
    public int compareTo(changeOrderStatus_result other) {
68 ashish 12082
      if (!getClass().equals(other.getClass())) {
12083
        return getClass().getName().compareTo(other.getClass().getName());
12084
      }
12085
 
12086
      int lastComparison = 0;
483 rajveer 12087
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 12088
 
12089
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12090
      if (lastComparison != 0) {
12091
        return lastComparison;
12092
      }
12093
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12094
      if (lastComparison != 0) {
12095
        return lastComparison;
12096
      }
12097
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12098
      if (lastComparison != 0) {
12099
        return lastComparison;
12100
      }
12101
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12102
      if (lastComparison != 0) {
12103
        return lastComparison;
12104
      }
12105
      return 0;
12106
    }
12107
 
12108
    public void read(TProtocol iprot) throws TException {
12109
      TField field;
12110
      iprot.readStructBegin();
12111
      while (true)
12112
      {
12113
        field = iprot.readFieldBegin();
12114
        if (field.type == TType.STOP) { 
12115
          break;
12116
        }
12117
        _Fields fieldId = _Fields.findByThriftId(field.id);
12118
        if (fieldId == null) {
12119
          TProtocolUtil.skip(iprot, field.type);
12120
        } else {
12121
          switch (fieldId) {
12122
            case SUCCESS:
12123
              if (field.type == TType.BOOL) {
12124
                this.success = iprot.readBool();
12125
                setSuccessIsSet(true);
12126
              } else { 
12127
                TProtocolUtil.skip(iprot, field.type);
12128
              }
12129
              break;
12130
            case EX:
12131
              if (field.type == TType.STRUCT) {
12132
                this.ex = new TransactionServiceException();
12133
                this.ex.read(iprot);
12134
              } else { 
12135
                TProtocolUtil.skip(iprot, field.type);
12136
              }
12137
              break;
12138
          }
12139
          iprot.readFieldEnd();
12140
        }
12141
      }
12142
      iprot.readStructEnd();
12143
      validate();
12144
    }
12145
 
12146
    public void write(TProtocol oprot) throws TException {
12147
      oprot.writeStructBegin(STRUCT_DESC);
12148
 
12149
      if (this.isSetSuccess()) {
12150
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12151
        oprot.writeBool(this.success);
12152
        oprot.writeFieldEnd();
12153
      } else if (this.isSetEx()) {
12154
        oprot.writeFieldBegin(EX_FIELD_DESC);
12155
        this.ex.write(oprot);
12156
        oprot.writeFieldEnd();
12157
      }
12158
      oprot.writeFieldStop();
12159
      oprot.writeStructEnd();
12160
    }
12161
 
12162
    @Override
12163
    public String toString() {
483 rajveer 12164
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 12165
      boolean first = true;
12166
 
12167
      sb.append("success:");
12168
      sb.append(this.success);
12169
      first = false;
12170
      if (!first) sb.append(", ");
12171
      sb.append("ex:");
12172
      if (this.ex == null) {
12173
        sb.append("null");
12174
      } else {
12175
        sb.append(this.ex);
12176
      }
12177
      first = false;
12178
      sb.append(")");
12179
      return sb.toString();
12180
    }
12181
 
12182
    public void validate() throws TException {
12183
      // check for required fields
12184
    }
12185
 
12186
  }
12187
 
495 rajveer 12188
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
12189
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
12190
 
12191
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12192
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 12193
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 12194
 
12195
    private long orderId;
12196
    private String invoice_number;
12197
    private String billed_by;
12198
 
12199
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12200
    public enum _Fields implements TFieldIdEnum {
12201
      ORDER_ID((short)1, "orderId"),
12202
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 12203
      BILLED_BY((short)3, "billed_by");
495 rajveer 12204
 
12205
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12206
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12207
 
12208
      static {
12209
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12210
          byId.put((int)field._thriftId, field);
12211
          byName.put(field.getFieldName(), field);
12212
        }
12213
      }
12214
 
12215
      /**
12216
       * Find the _Fields constant that matches fieldId, or null if its not found.
12217
       */
12218
      public static _Fields findByThriftId(int fieldId) {
12219
        return byId.get(fieldId);
12220
      }
12221
 
12222
      /**
12223
       * Find the _Fields constant that matches fieldId, throwing an exception
12224
       * if it is not found.
12225
       */
12226
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12227
        _Fields fields = findByThriftId(fieldId);
12228
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12229
        return fields;
12230
      }
12231
 
12232
      /**
12233
       * Find the _Fields constant that matches name, or null if its not found.
12234
       */
12235
      public static _Fields findByName(String name) {
12236
        return byName.get(name);
12237
      }
12238
 
12239
      private final short _thriftId;
12240
      private final String _fieldName;
12241
 
12242
      _Fields(short thriftId, String fieldName) {
12243
        _thriftId = thriftId;
12244
        _fieldName = fieldName;
12245
      }
12246
 
12247
      public short getThriftFieldId() {
12248
        return _thriftId;
12249
      }
12250
 
12251
      public String getFieldName() {
12252
        return _fieldName;
12253
      }
12254
    }
12255
 
12256
    // isset id assignments
12257
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12258
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12259
 
12260
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12261
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12262
          new FieldValueMetaData(TType.I64)));
12263
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12264
          new FieldValueMetaData(TType.STRING)));
12265
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12266
          new FieldValueMetaData(TType.STRING)));
12267
    }});
12268
 
12269
    static {
12270
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12271
    }
12272
 
12273
    public addBillingDetails_args() {
12274
    }
12275
 
12276
    public addBillingDetails_args(
12277
      long orderId,
12278
      String invoice_number,
12279
      String billed_by)
12280
    {
12281
      this();
12282
      this.orderId = orderId;
12283
      setOrderIdIsSet(true);
12284
      this.invoice_number = invoice_number;
12285
      this.billed_by = billed_by;
12286
    }
12287
 
12288
    /**
12289
     * Performs a deep copy on <i>other</i>.
12290
     */
12291
    public addBillingDetails_args(addBillingDetails_args other) {
12292
      __isset_bit_vector.clear();
12293
      __isset_bit_vector.or(other.__isset_bit_vector);
12294
      this.orderId = other.orderId;
12295
      if (other.isSetInvoice_number()) {
12296
        this.invoice_number = other.invoice_number;
12297
      }
12298
      if (other.isSetBilled_by()) {
12299
        this.billed_by = other.billed_by;
12300
      }
12301
    }
12302
 
12303
    public addBillingDetails_args deepCopy() {
12304
      return new addBillingDetails_args(this);
12305
    }
12306
 
12307
    @Deprecated
12308
    public addBillingDetails_args clone() {
12309
      return new addBillingDetails_args(this);
12310
    }
12311
 
12312
    public long getOrderId() {
12313
      return this.orderId;
12314
    }
12315
 
12316
    public addBillingDetails_args setOrderId(long orderId) {
12317
      this.orderId = orderId;
12318
      setOrderIdIsSet(true);
12319
      return this;
12320
    }
12321
 
12322
    public void unsetOrderId() {
12323
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12324
    }
12325
 
12326
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12327
    public boolean isSetOrderId() {
12328
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12329
    }
12330
 
12331
    public void setOrderIdIsSet(boolean value) {
12332
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12333
    }
12334
 
12335
    public String getInvoice_number() {
12336
      return this.invoice_number;
12337
    }
12338
 
12339
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12340
      this.invoice_number = invoice_number;
12341
      return this;
12342
    }
12343
 
12344
    public void unsetInvoice_number() {
12345
      this.invoice_number = null;
12346
    }
12347
 
12348
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12349
    public boolean isSetInvoice_number() {
12350
      return this.invoice_number != null;
12351
    }
12352
 
12353
    public void setInvoice_numberIsSet(boolean value) {
12354
      if (!value) {
12355
        this.invoice_number = null;
12356
      }
12357
    }
12358
 
12359
    public String getBilled_by() {
12360
      return this.billed_by;
12361
    }
12362
 
12363
    public addBillingDetails_args setBilled_by(String billed_by) {
12364
      this.billed_by = billed_by;
12365
      return this;
12366
    }
12367
 
12368
    public void unsetBilled_by() {
12369
      this.billed_by = null;
12370
    }
12371
 
12372
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12373
    public boolean isSetBilled_by() {
12374
      return this.billed_by != null;
12375
    }
12376
 
12377
    public void setBilled_byIsSet(boolean value) {
12378
      if (!value) {
12379
        this.billed_by = null;
12380
      }
12381
    }
12382
 
12383
    public void setFieldValue(_Fields field, Object value) {
12384
      switch (field) {
12385
      case ORDER_ID:
12386
        if (value == null) {
12387
          unsetOrderId();
12388
        } else {
12389
          setOrderId((Long)value);
12390
        }
12391
        break;
12392
 
12393
      case INVOICE_NUMBER:
12394
        if (value == null) {
12395
          unsetInvoice_number();
12396
        } else {
12397
          setInvoice_number((String)value);
12398
        }
12399
        break;
12400
 
12401
      case BILLED_BY:
12402
        if (value == null) {
12403
          unsetBilled_by();
12404
        } else {
12405
          setBilled_by((String)value);
12406
        }
12407
        break;
12408
 
12409
      }
12410
    }
12411
 
12412
    public void setFieldValue(int fieldID, Object value) {
12413
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12414
    }
12415
 
12416
    public Object getFieldValue(_Fields field) {
12417
      switch (field) {
12418
      case ORDER_ID:
12419
        return new Long(getOrderId());
12420
 
12421
      case INVOICE_NUMBER:
12422
        return getInvoice_number();
12423
 
12424
      case BILLED_BY:
12425
        return getBilled_by();
12426
 
12427
      }
12428
      throw new IllegalStateException();
12429
    }
12430
 
12431
    public Object getFieldValue(int fieldId) {
12432
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12433
    }
12434
 
12435
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12436
    public boolean isSet(_Fields field) {
12437
      switch (field) {
12438
      case ORDER_ID:
12439
        return isSetOrderId();
12440
      case INVOICE_NUMBER:
12441
        return isSetInvoice_number();
12442
      case BILLED_BY:
12443
        return isSetBilled_by();
12444
      }
12445
      throw new IllegalStateException();
12446
    }
12447
 
12448
    public boolean isSet(int fieldID) {
12449
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12450
    }
12451
 
12452
    @Override
12453
    public boolean equals(Object that) {
12454
      if (that == null)
12455
        return false;
12456
      if (that instanceof addBillingDetails_args)
12457
        return this.equals((addBillingDetails_args)that);
12458
      return false;
12459
    }
12460
 
12461
    public boolean equals(addBillingDetails_args that) {
12462
      if (that == null)
12463
        return false;
12464
 
12465
      boolean this_present_orderId = true;
12466
      boolean that_present_orderId = true;
12467
      if (this_present_orderId || that_present_orderId) {
12468
        if (!(this_present_orderId && that_present_orderId))
12469
          return false;
12470
        if (this.orderId != that.orderId)
12471
          return false;
12472
      }
12473
 
12474
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12475
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12476
      if (this_present_invoice_number || that_present_invoice_number) {
12477
        if (!(this_present_invoice_number && that_present_invoice_number))
12478
          return false;
12479
        if (!this.invoice_number.equals(that.invoice_number))
12480
          return false;
12481
      }
12482
 
12483
      boolean this_present_billed_by = true && this.isSetBilled_by();
12484
      boolean that_present_billed_by = true && that.isSetBilled_by();
12485
      if (this_present_billed_by || that_present_billed_by) {
12486
        if (!(this_present_billed_by && that_present_billed_by))
12487
          return false;
12488
        if (!this.billed_by.equals(that.billed_by))
12489
          return false;
12490
      }
12491
 
12492
      return true;
12493
    }
12494
 
12495
    @Override
12496
    public int hashCode() {
12497
      return 0;
12498
    }
12499
 
12500
    public int compareTo(addBillingDetails_args other) {
12501
      if (!getClass().equals(other.getClass())) {
12502
        return getClass().getName().compareTo(other.getClass().getName());
12503
      }
12504
 
12505
      int lastComparison = 0;
12506
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12507
 
12508
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12509
      if (lastComparison != 0) {
12510
        return lastComparison;
12511
      }
12512
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12513
      if (lastComparison != 0) {
12514
        return lastComparison;
12515
      }
12516
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12517
      if (lastComparison != 0) {
12518
        return lastComparison;
12519
      }
12520
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12521
      if (lastComparison != 0) {
12522
        return lastComparison;
12523
      }
12524
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12525
      if (lastComparison != 0) {
12526
        return lastComparison;
12527
      }
12528
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12529
      if (lastComparison != 0) {
12530
        return lastComparison;
12531
      }
12532
      return 0;
12533
    }
12534
 
12535
    public void read(TProtocol iprot) throws TException {
12536
      TField field;
12537
      iprot.readStructBegin();
12538
      while (true)
12539
      {
12540
        field = iprot.readFieldBegin();
12541
        if (field.type == TType.STOP) { 
12542
          break;
12543
        }
12544
        _Fields fieldId = _Fields.findByThriftId(field.id);
12545
        if (fieldId == null) {
12546
          TProtocolUtil.skip(iprot, field.type);
12547
        } else {
12548
          switch (fieldId) {
12549
            case ORDER_ID:
12550
              if (field.type == TType.I64) {
12551
                this.orderId = iprot.readI64();
12552
                setOrderIdIsSet(true);
12553
              } else { 
12554
                TProtocolUtil.skip(iprot, field.type);
12555
              }
12556
              break;
12557
            case INVOICE_NUMBER:
12558
              if (field.type == TType.STRING) {
12559
                this.invoice_number = iprot.readString();
12560
              } else { 
12561
                TProtocolUtil.skip(iprot, field.type);
12562
              }
12563
              break;
12564
            case BILLED_BY:
12565
              if (field.type == TType.STRING) {
12566
                this.billed_by = iprot.readString();
12567
              } else { 
12568
                TProtocolUtil.skip(iprot, field.type);
12569
              }
12570
              break;
12571
          }
12572
          iprot.readFieldEnd();
12573
        }
12574
      }
12575
      iprot.readStructEnd();
12576
      validate();
12577
    }
12578
 
12579
    public void write(TProtocol oprot) throws TException {
12580
      validate();
12581
 
12582
      oprot.writeStructBegin(STRUCT_DESC);
12583
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12584
      oprot.writeI64(this.orderId);
12585
      oprot.writeFieldEnd();
12586
      if (this.invoice_number != null) {
12587
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
12588
        oprot.writeString(this.invoice_number);
12589
        oprot.writeFieldEnd();
12590
      }
12591
      if (this.billed_by != null) {
12592
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
12593
        oprot.writeString(this.billed_by);
12594
        oprot.writeFieldEnd();
12595
      }
12596
      oprot.writeFieldStop();
12597
      oprot.writeStructEnd();
12598
    }
12599
 
12600
    @Override
12601
    public String toString() {
12602
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
12603
      boolean first = true;
12604
 
12605
      sb.append("orderId:");
12606
      sb.append(this.orderId);
12607
      first = false;
12608
      if (!first) sb.append(", ");
12609
      sb.append("invoice_number:");
12610
      if (this.invoice_number == null) {
12611
        sb.append("null");
12612
      } else {
12613
        sb.append(this.invoice_number);
12614
      }
12615
      first = false;
12616
      if (!first) sb.append(", ");
12617
      sb.append("billed_by:");
12618
      if (this.billed_by == null) {
12619
        sb.append("null");
12620
      } else {
12621
        sb.append(this.billed_by);
12622
      }
12623
      first = false;
12624
      sb.append(")");
12625
      return sb.toString();
12626
    }
12627
 
12628
    public void validate() throws TException {
12629
      // check for required fields
12630
    }
12631
 
12632
  }
12633
 
12634
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
12635
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
12636
 
12637
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12638
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12639
 
12640
    private boolean success;
12641
    private TransactionServiceException ex;
12642
 
12643
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12644
    public enum _Fields implements TFieldIdEnum {
12645
      SUCCESS((short)0, "success"),
12646
      EX((short)1, "ex");
12647
 
12648
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12649
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12650
 
12651
      static {
12652
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12653
          byId.put((int)field._thriftId, field);
12654
          byName.put(field.getFieldName(), field);
12655
        }
12656
      }
12657
 
12658
      /**
12659
       * Find the _Fields constant that matches fieldId, or null if its not found.
12660
       */
12661
      public static _Fields findByThriftId(int fieldId) {
12662
        return byId.get(fieldId);
12663
      }
12664
 
12665
      /**
12666
       * Find the _Fields constant that matches fieldId, throwing an exception
12667
       * if it is not found.
12668
       */
12669
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12670
        _Fields fields = findByThriftId(fieldId);
12671
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12672
        return fields;
12673
      }
12674
 
12675
      /**
12676
       * Find the _Fields constant that matches name, or null if its not found.
12677
       */
12678
      public static _Fields findByName(String name) {
12679
        return byName.get(name);
12680
      }
12681
 
12682
      private final short _thriftId;
12683
      private final String _fieldName;
12684
 
12685
      _Fields(short thriftId, String fieldName) {
12686
        _thriftId = thriftId;
12687
        _fieldName = fieldName;
12688
      }
12689
 
12690
      public short getThriftFieldId() {
12691
        return _thriftId;
12692
      }
12693
 
12694
      public String getFieldName() {
12695
        return _fieldName;
12696
      }
12697
    }
12698
 
12699
    // isset id assignments
12700
    private static final int __SUCCESS_ISSET_ID = 0;
12701
    private BitSet __isset_bit_vector = new BitSet(1);
12702
 
12703
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12704
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12705
          new FieldValueMetaData(TType.BOOL)));
12706
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12707
          new FieldValueMetaData(TType.STRUCT)));
12708
    }});
12709
 
12710
    static {
12711
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
12712
    }
12713
 
12714
    public addBillingDetails_result() {
12715
    }
12716
 
12717
    public addBillingDetails_result(
12718
      boolean success,
12719
      TransactionServiceException ex)
12720
    {
12721
      this();
12722
      this.success = success;
12723
      setSuccessIsSet(true);
12724
      this.ex = ex;
12725
    }
12726
 
12727
    /**
12728
     * Performs a deep copy on <i>other</i>.
12729
     */
12730
    public addBillingDetails_result(addBillingDetails_result other) {
12731
      __isset_bit_vector.clear();
12732
      __isset_bit_vector.or(other.__isset_bit_vector);
12733
      this.success = other.success;
12734
      if (other.isSetEx()) {
12735
        this.ex = new TransactionServiceException(other.ex);
12736
      }
12737
    }
12738
 
12739
    public addBillingDetails_result deepCopy() {
12740
      return new addBillingDetails_result(this);
12741
    }
12742
 
12743
    @Deprecated
12744
    public addBillingDetails_result clone() {
12745
      return new addBillingDetails_result(this);
12746
    }
12747
 
12748
    public boolean isSuccess() {
12749
      return this.success;
12750
    }
12751
 
12752
    public addBillingDetails_result setSuccess(boolean success) {
12753
      this.success = success;
12754
      setSuccessIsSet(true);
12755
      return this;
12756
    }
12757
 
12758
    public void unsetSuccess() {
12759
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12760
    }
12761
 
12762
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12763
    public boolean isSetSuccess() {
12764
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12765
    }
12766
 
12767
    public void setSuccessIsSet(boolean value) {
12768
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12769
    }
12770
 
12771
    public TransactionServiceException getEx() {
12772
      return this.ex;
12773
    }
12774
 
12775
    public addBillingDetails_result setEx(TransactionServiceException ex) {
12776
      this.ex = ex;
12777
      return this;
12778
    }
12779
 
12780
    public void unsetEx() {
12781
      this.ex = null;
12782
    }
12783
 
12784
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12785
    public boolean isSetEx() {
12786
      return this.ex != null;
12787
    }
12788
 
12789
    public void setExIsSet(boolean value) {
12790
      if (!value) {
12791
        this.ex = null;
12792
      }
12793
    }
12794
 
12795
    public void setFieldValue(_Fields field, Object value) {
12796
      switch (field) {
12797
      case SUCCESS:
12798
        if (value == null) {
12799
          unsetSuccess();
12800
        } else {
12801
          setSuccess((Boolean)value);
12802
        }
12803
        break;
12804
 
12805
      case EX:
12806
        if (value == null) {
12807
          unsetEx();
12808
        } else {
12809
          setEx((TransactionServiceException)value);
12810
        }
12811
        break;
12812
 
12813
      }
12814
    }
12815
 
12816
    public void setFieldValue(int fieldID, Object value) {
12817
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12818
    }
12819
 
12820
    public Object getFieldValue(_Fields field) {
12821
      switch (field) {
12822
      case SUCCESS:
12823
        return new Boolean(isSuccess());
12824
 
12825
      case EX:
12826
        return getEx();
12827
 
12828
      }
12829
      throw new IllegalStateException();
12830
    }
12831
 
12832
    public Object getFieldValue(int fieldId) {
12833
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12834
    }
12835
 
12836
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12837
    public boolean isSet(_Fields field) {
12838
      switch (field) {
12839
      case SUCCESS:
12840
        return isSetSuccess();
12841
      case EX:
12842
        return isSetEx();
12843
      }
12844
      throw new IllegalStateException();
12845
    }
12846
 
12847
    public boolean isSet(int fieldID) {
12848
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12849
    }
12850
 
12851
    @Override
12852
    public boolean equals(Object that) {
12853
      if (that == null)
12854
        return false;
12855
      if (that instanceof addBillingDetails_result)
12856
        return this.equals((addBillingDetails_result)that);
12857
      return false;
12858
    }
12859
 
12860
    public boolean equals(addBillingDetails_result that) {
12861
      if (that == null)
12862
        return false;
12863
 
12864
      boolean this_present_success = true;
12865
      boolean that_present_success = true;
12866
      if (this_present_success || that_present_success) {
12867
        if (!(this_present_success && that_present_success))
12868
          return false;
12869
        if (this.success != that.success)
12870
          return false;
12871
      }
12872
 
12873
      boolean this_present_ex = true && this.isSetEx();
12874
      boolean that_present_ex = true && that.isSetEx();
12875
      if (this_present_ex || that_present_ex) {
12876
        if (!(this_present_ex && that_present_ex))
12877
          return false;
12878
        if (!this.ex.equals(that.ex))
12879
          return false;
12880
      }
12881
 
12882
      return true;
12883
    }
12884
 
12885
    @Override
12886
    public int hashCode() {
12887
      return 0;
12888
    }
12889
 
12890
    public int compareTo(addBillingDetails_result other) {
12891
      if (!getClass().equals(other.getClass())) {
12892
        return getClass().getName().compareTo(other.getClass().getName());
12893
      }
12894
 
12895
      int lastComparison = 0;
12896
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
12897
 
12898
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12899
      if (lastComparison != 0) {
12900
        return lastComparison;
12901
      }
12902
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12903
      if (lastComparison != 0) {
12904
        return lastComparison;
12905
      }
12906
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12907
      if (lastComparison != 0) {
12908
        return lastComparison;
12909
      }
12910
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12911
      if (lastComparison != 0) {
12912
        return lastComparison;
12913
      }
12914
      return 0;
12915
    }
12916
 
12917
    public void read(TProtocol iprot) throws TException {
12918
      TField field;
12919
      iprot.readStructBegin();
12920
      while (true)
12921
      {
12922
        field = iprot.readFieldBegin();
12923
        if (field.type == TType.STOP) { 
12924
          break;
12925
        }
12926
        _Fields fieldId = _Fields.findByThriftId(field.id);
12927
        if (fieldId == null) {
12928
          TProtocolUtil.skip(iprot, field.type);
12929
        } else {
12930
          switch (fieldId) {
12931
            case SUCCESS:
12932
              if (field.type == TType.BOOL) {
12933
                this.success = iprot.readBool();
12934
                setSuccessIsSet(true);
12935
              } else { 
12936
                TProtocolUtil.skip(iprot, field.type);
12937
              }
12938
              break;
12939
            case EX:
12940
              if (field.type == TType.STRUCT) {
12941
                this.ex = new TransactionServiceException();
12942
                this.ex.read(iprot);
12943
              } else { 
12944
                TProtocolUtil.skip(iprot, field.type);
12945
              }
12946
              break;
12947
          }
12948
          iprot.readFieldEnd();
12949
        }
12950
      }
12951
      iprot.readStructEnd();
12952
      validate();
12953
    }
12954
 
12955
    public void write(TProtocol oprot) throws TException {
12956
      oprot.writeStructBegin(STRUCT_DESC);
12957
 
12958
      if (this.isSetSuccess()) {
12959
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12960
        oprot.writeBool(this.success);
12961
        oprot.writeFieldEnd();
12962
      } else if (this.isSetEx()) {
12963
        oprot.writeFieldBegin(EX_FIELD_DESC);
12964
        this.ex.write(oprot);
12965
        oprot.writeFieldEnd();
12966
      }
12967
      oprot.writeFieldStop();
12968
      oprot.writeStructEnd();
12969
    }
12970
 
12971
    @Override
12972
    public String toString() {
12973
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
12974
      boolean first = true;
12975
 
12976
      sb.append("success:");
12977
      sb.append(this.success);
12978
      first = false;
12979
      if (!first) sb.append(", ");
12980
      sb.append("ex:");
12981
      if (this.ex == null) {
12982
        sb.append("null");
12983
      } else {
12984
        sb.append(this.ex);
12985
      }
12986
      first = false;
12987
      sb.append(")");
12988
      return sb.toString();
12989
    }
12990
 
12991
    public void validate() throws TException {
12992
      // check for required fields
12993
    }
12994
 
12995
  }
12996
 
1148 chandransh 12997
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
12998
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
12999
 
13000
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13001
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
13002
 
13003
    private long orderId;
13004
    private long jacketNumber;
13005
 
13006
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13007
    public enum _Fields implements TFieldIdEnum {
13008
      ORDER_ID((short)1, "orderId"),
13009
      JACKET_NUMBER((short)2, "jacketNumber");
13010
 
13011
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13012
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13013
 
13014
      static {
13015
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13016
          byId.put((int)field._thriftId, field);
13017
          byName.put(field.getFieldName(), field);
13018
        }
13019
      }
13020
 
13021
      /**
13022
       * Find the _Fields constant that matches fieldId, or null if its not found.
13023
       */
13024
      public static _Fields findByThriftId(int fieldId) {
13025
        return byId.get(fieldId);
13026
      }
13027
 
13028
      /**
13029
       * Find the _Fields constant that matches fieldId, throwing an exception
13030
       * if it is not found.
13031
       */
13032
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13033
        _Fields fields = findByThriftId(fieldId);
13034
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13035
        return fields;
13036
      }
13037
 
13038
      /**
13039
       * Find the _Fields constant that matches name, or null if its not found.
13040
       */
13041
      public static _Fields findByName(String name) {
13042
        return byName.get(name);
13043
      }
13044
 
13045
      private final short _thriftId;
13046
      private final String _fieldName;
13047
 
13048
      _Fields(short thriftId, String fieldName) {
13049
        _thriftId = thriftId;
13050
        _fieldName = fieldName;
13051
      }
13052
 
13053
      public short getThriftFieldId() {
13054
        return _thriftId;
13055
      }
13056
 
13057
      public String getFieldName() {
13058
        return _fieldName;
13059
      }
13060
    }
13061
 
13062
    // isset id assignments
13063
    private static final int __ORDERID_ISSET_ID = 0;
13064
    private static final int __JACKETNUMBER_ISSET_ID = 1;
13065
    private BitSet __isset_bit_vector = new BitSet(2);
13066
 
13067
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13068
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13069
          new FieldValueMetaData(TType.I64)));
13070
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
13071
          new FieldValueMetaData(TType.I64)));
13072
    }});
13073
 
13074
    static {
13075
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
13076
    }
13077
 
13078
    public addJacketNumber_args() {
13079
    }
13080
 
13081
    public addJacketNumber_args(
13082
      long orderId,
13083
      long jacketNumber)
13084
    {
13085
      this();
13086
      this.orderId = orderId;
13087
      setOrderIdIsSet(true);
13088
      this.jacketNumber = jacketNumber;
13089
      setJacketNumberIsSet(true);
13090
    }
13091
 
13092
    /**
13093
     * Performs a deep copy on <i>other</i>.
13094
     */
13095
    public addJacketNumber_args(addJacketNumber_args other) {
13096
      __isset_bit_vector.clear();
13097
      __isset_bit_vector.or(other.__isset_bit_vector);
13098
      this.orderId = other.orderId;
13099
      this.jacketNumber = other.jacketNumber;
13100
    }
13101
 
13102
    public addJacketNumber_args deepCopy() {
13103
      return new addJacketNumber_args(this);
13104
    }
13105
 
13106
    @Deprecated
13107
    public addJacketNumber_args clone() {
13108
      return new addJacketNumber_args(this);
13109
    }
13110
 
13111
    public long getOrderId() {
13112
      return this.orderId;
13113
    }
13114
 
13115
    public addJacketNumber_args setOrderId(long orderId) {
13116
      this.orderId = orderId;
13117
      setOrderIdIsSet(true);
13118
      return this;
13119
    }
13120
 
13121
    public void unsetOrderId() {
13122
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13123
    }
13124
 
13125
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13126
    public boolean isSetOrderId() {
13127
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13128
    }
13129
 
13130
    public void setOrderIdIsSet(boolean value) {
13131
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13132
    }
13133
 
13134
    public long getJacketNumber() {
13135
      return this.jacketNumber;
13136
    }
13137
 
13138
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
13139
      this.jacketNumber = jacketNumber;
13140
      setJacketNumberIsSet(true);
13141
      return this;
13142
    }
13143
 
13144
    public void unsetJacketNumber() {
13145
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
13146
    }
13147
 
13148
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
13149
    public boolean isSetJacketNumber() {
13150
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
13151
    }
13152
 
13153
    public void setJacketNumberIsSet(boolean value) {
13154
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
13155
    }
13156
 
13157
    public void setFieldValue(_Fields field, Object value) {
13158
      switch (field) {
13159
      case ORDER_ID:
13160
        if (value == null) {
13161
          unsetOrderId();
13162
        } else {
13163
          setOrderId((Long)value);
13164
        }
13165
        break;
13166
 
13167
      case JACKET_NUMBER:
13168
        if (value == null) {
13169
          unsetJacketNumber();
13170
        } else {
13171
          setJacketNumber((Long)value);
13172
        }
13173
        break;
13174
 
13175
      }
13176
    }
13177
 
13178
    public void setFieldValue(int fieldID, Object value) {
13179
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13180
    }
13181
 
13182
    public Object getFieldValue(_Fields field) {
13183
      switch (field) {
13184
      case ORDER_ID:
13185
        return new Long(getOrderId());
13186
 
13187
      case JACKET_NUMBER:
13188
        return new Long(getJacketNumber());
13189
 
13190
      }
13191
      throw new IllegalStateException();
13192
    }
13193
 
13194
    public Object getFieldValue(int fieldId) {
13195
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13196
    }
13197
 
13198
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13199
    public boolean isSet(_Fields field) {
13200
      switch (field) {
13201
      case ORDER_ID:
13202
        return isSetOrderId();
13203
      case JACKET_NUMBER:
13204
        return isSetJacketNumber();
13205
      }
13206
      throw new IllegalStateException();
13207
    }
13208
 
13209
    public boolean isSet(int fieldID) {
13210
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13211
    }
13212
 
13213
    @Override
13214
    public boolean equals(Object that) {
13215
      if (that == null)
13216
        return false;
13217
      if (that instanceof addJacketNumber_args)
13218
        return this.equals((addJacketNumber_args)that);
13219
      return false;
13220
    }
13221
 
13222
    public boolean equals(addJacketNumber_args that) {
13223
      if (that == null)
13224
        return false;
13225
 
13226
      boolean this_present_orderId = true;
13227
      boolean that_present_orderId = true;
13228
      if (this_present_orderId || that_present_orderId) {
13229
        if (!(this_present_orderId && that_present_orderId))
13230
          return false;
13231
        if (this.orderId != that.orderId)
13232
          return false;
13233
      }
13234
 
13235
      boolean this_present_jacketNumber = true;
13236
      boolean that_present_jacketNumber = true;
13237
      if (this_present_jacketNumber || that_present_jacketNumber) {
13238
        if (!(this_present_jacketNumber && that_present_jacketNumber))
13239
          return false;
13240
        if (this.jacketNumber != that.jacketNumber)
13241
          return false;
13242
      }
13243
 
13244
      return true;
13245
    }
13246
 
13247
    @Override
13248
    public int hashCode() {
13249
      return 0;
13250
    }
13251
 
13252
    public int compareTo(addJacketNumber_args other) {
13253
      if (!getClass().equals(other.getClass())) {
13254
        return getClass().getName().compareTo(other.getClass().getName());
13255
      }
13256
 
13257
      int lastComparison = 0;
13258
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13259
 
13260
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13261
      if (lastComparison != 0) {
13262
        return lastComparison;
13263
      }
13264
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13265
      if (lastComparison != 0) {
13266
        return lastComparison;
13267
      }
13268
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13269
      if (lastComparison != 0) {
13270
        return lastComparison;
13271
      }
13272
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13273
      if (lastComparison != 0) {
13274
        return lastComparison;
13275
      }
13276
      return 0;
13277
    }
13278
 
13279
    public void read(TProtocol iprot) throws TException {
13280
      TField field;
13281
      iprot.readStructBegin();
13282
      while (true)
13283
      {
13284
        field = iprot.readFieldBegin();
13285
        if (field.type == TType.STOP) { 
13286
          break;
13287
        }
13288
        _Fields fieldId = _Fields.findByThriftId(field.id);
13289
        if (fieldId == null) {
13290
          TProtocolUtil.skip(iprot, field.type);
13291
        } else {
13292
          switch (fieldId) {
13293
            case ORDER_ID:
13294
              if (field.type == TType.I64) {
13295
                this.orderId = iprot.readI64();
13296
                setOrderIdIsSet(true);
13297
              } else { 
13298
                TProtocolUtil.skip(iprot, field.type);
13299
              }
13300
              break;
13301
            case JACKET_NUMBER:
13302
              if (field.type == TType.I64) {
13303
                this.jacketNumber = iprot.readI64();
13304
                setJacketNumberIsSet(true);
13305
              } else { 
13306
                TProtocolUtil.skip(iprot, field.type);
13307
              }
13308
              break;
13309
          }
13310
          iprot.readFieldEnd();
13311
        }
13312
      }
13313
      iprot.readStructEnd();
13314
      validate();
13315
    }
13316
 
13317
    public void write(TProtocol oprot) throws TException {
13318
      validate();
13319
 
13320
      oprot.writeStructBegin(STRUCT_DESC);
13321
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13322
      oprot.writeI64(this.orderId);
13323
      oprot.writeFieldEnd();
13324
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13325
      oprot.writeI64(this.jacketNumber);
13326
      oprot.writeFieldEnd();
13327
      oprot.writeFieldStop();
13328
      oprot.writeStructEnd();
13329
    }
13330
 
13331
    @Override
13332
    public String toString() {
13333
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13334
      boolean first = true;
13335
 
13336
      sb.append("orderId:");
13337
      sb.append(this.orderId);
13338
      first = false;
13339
      if (!first) sb.append(", ");
13340
      sb.append("jacketNumber:");
13341
      sb.append(this.jacketNumber);
13342
      first = false;
13343
      sb.append(")");
13344
      return sb.toString();
13345
    }
13346
 
13347
    public void validate() throws TException {
13348
      // check for required fields
13349
    }
13350
 
13351
  }
13352
 
13353
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13354
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13355
 
13356
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13357
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13358
 
13359
    private boolean success;
13360
    private TransactionServiceException ex;
13361
 
13362
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13363
    public enum _Fields implements TFieldIdEnum {
13364
      SUCCESS((short)0, "success"),
13365
      EX((short)1, "ex");
13366
 
13367
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13368
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13369
 
13370
      static {
13371
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13372
          byId.put((int)field._thriftId, field);
13373
          byName.put(field.getFieldName(), field);
13374
        }
13375
      }
13376
 
13377
      /**
13378
       * Find the _Fields constant that matches fieldId, or null if its not found.
13379
       */
13380
      public static _Fields findByThriftId(int fieldId) {
13381
        return byId.get(fieldId);
13382
      }
13383
 
13384
      /**
13385
       * Find the _Fields constant that matches fieldId, throwing an exception
13386
       * if it is not found.
13387
       */
13388
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13389
        _Fields fields = findByThriftId(fieldId);
13390
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13391
        return fields;
13392
      }
13393
 
13394
      /**
13395
       * Find the _Fields constant that matches name, or null if its not found.
13396
       */
13397
      public static _Fields findByName(String name) {
13398
        return byName.get(name);
13399
      }
13400
 
13401
      private final short _thriftId;
13402
      private final String _fieldName;
13403
 
13404
      _Fields(short thriftId, String fieldName) {
13405
        _thriftId = thriftId;
13406
        _fieldName = fieldName;
13407
      }
13408
 
13409
      public short getThriftFieldId() {
13410
        return _thriftId;
13411
      }
13412
 
13413
      public String getFieldName() {
13414
        return _fieldName;
13415
      }
13416
    }
13417
 
13418
    // isset id assignments
13419
    private static final int __SUCCESS_ISSET_ID = 0;
13420
    private BitSet __isset_bit_vector = new BitSet(1);
13421
 
13422
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13423
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13424
          new FieldValueMetaData(TType.BOOL)));
13425
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13426
          new FieldValueMetaData(TType.STRUCT)));
13427
    }});
13428
 
13429
    static {
13430
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13431
    }
13432
 
13433
    public addJacketNumber_result() {
13434
    }
13435
 
13436
    public addJacketNumber_result(
13437
      boolean success,
13438
      TransactionServiceException ex)
13439
    {
13440
      this();
13441
      this.success = success;
13442
      setSuccessIsSet(true);
13443
      this.ex = ex;
13444
    }
13445
 
13446
    /**
13447
     * Performs a deep copy on <i>other</i>.
13448
     */
13449
    public addJacketNumber_result(addJacketNumber_result other) {
13450
      __isset_bit_vector.clear();
13451
      __isset_bit_vector.or(other.__isset_bit_vector);
13452
      this.success = other.success;
13453
      if (other.isSetEx()) {
13454
        this.ex = new TransactionServiceException(other.ex);
13455
      }
13456
    }
13457
 
13458
    public addJacketNumber_result deepCopy() {
13459
      return new addJacketNumber_result(this);
13460
    }
13461
 
13462
    @Deprecated
13463
    public addJacketNumber_result clone() {
13464
      return new addJacketNumber_result(this);
13465
    }
13466
 
13467
    public boolean isSuccess() {
13468
      return this.success;
13469
    }
13470
 
13471
    public addJacketNumber_result setSuccess(boolean success) {
13472
      this.success = success;
13473
      setSuccessIsSet(true);
13474
      return this;
13475
    }
13476
 
13477
    public void unsetSuccess() {
13478
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13479
    }
13480
 
13481
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13482
    public boolean isSetSuccess() {
13483
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13484
    }
13485
 
13486
    public void setSuccessIsSet(boolean value) {
13487
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13488
    }
13489
 
13490
    public TransactionServiceException getEx() {
13491
      return this.ex;
13492
    }
13493
 
13494
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13495
      this.ex = ex;
13496
      return this;
13497
    }
13498
 
13499
    public void unsetEx() {
13500
      this.ex = null;
13501
    }
13502
 
13503
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13504
    public boolean isSetEx() {
13505
      return this.ex != null;
13506
    }
13507
 
13508
    public void setExIsSet(boolean value) {
13509
      if (!value) {
13510
        this.ex = null;
13511
      }
13512
    }
13513
 
13514
    public void setFieldValue(_Fields field, Object value) {
13515
      switch (field) {
13516
      case SUCCESS:
13517
        if (value == null) {
13518
          unsetSuccess();
13519
        } else {
13520
          setSuccess((Boolean)value);
13521
        }
13522
        break;
13523
 
13524
      case EX:
13525
        if (value == null) {
13526
          unsetEx();
13527
        } else {
13528
          setEx((TransactionServiceException)value);
13529
        }
13530
        break;
13531
 
13532
      }
13533
    }
13534
 
13535
    public void setFieldValue(int fieldID, Object value) {
13536
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13537
    }
13538
 
13539
    public Object getFieldValue(_Fields field) {
13540
      switch (field) {
13541
      case SUCCESS:
13542
        return new Boolean(isSuccess());
13543
 
13544
      case EX:
13545
        return getEx();
13546
 
13547
      }
13548
      throw new IllegalStateException();
13549
    }
13550
 
13551
    public Object getFieldValue(int fieldId) {
13552
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13553
    }
13554
 
13555
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13556
    public boolean isSet(_Fields field) {
13557
      switch (field) {
13558
      case SUCCESS:
13559
        return isSetSuccess();
13560
      case EX:
13561
        return isSetEx();
13562
      }
13563
      throw new IllegalStateException();
13564
    }
13565
 
13566
    public boolean isSet(int fieldID) {
13567
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13568
    }
13569
 
13570
    @Override
13571
    public boolean equals(Object that) {
13572
      if (that == null)
13573
        return false;
13574
      if (that instanceof addJacketNumber_result)
13575
        return this.equals((addJacketNumber_result)that);
13576
      return false;
13577
    }
13578
 
13579
    public boolean equals(addJacketNumber_result that) {
13580
      if (that == null)
13581
        return false;
13582
 
13583
      boolean this_present_success = true;
13584
      boolean that_present_success = true;
13585
      if (this_present_success || that_present_success) {
13586
        if (!(this_present_success && that_present_success))
13587
          return false;
13588
        if (this.success != that.success)
13589
          return false;
13590
      }
13591
 
13592
      boolean this_present_ex = true && this.isSetEx();
13593
      boolean that_present_ex = true && that.isSetEx();
13594
      if (this_present_ex || that_present_ex) {
13595
        if (!(this_present_ex && that_present_ex))
13596
          return false;
13597
        if (!this.ex.equals(that.ex))
13598
          return false;
13599
      }
13600
 
13601
      return true;
13602
    }
13603
 
13604
    @Override
13605
    public int hashCode() {
13606
      return 0;
13607
    }
13608
 
13609
    public int compareTo(addJacketNumber_result other) {
13610
      if (!getClass().equals(other.getClass())) {
13611
        return getClass().getName().compareTo(other.getClass().getName());
13612
      }
13613
 
13614
      int lastComparison = 0;
13615
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
13616
 
13617
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13618
      if (lastComparison != 0) {
13619
        return lastComparison;
13620
      }
13621
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13622
      if (lastComparison != 0) {
13623
        return lastComparison;
13624
      }
13625
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13626
      if (lastComparison != 0) {
13627
        return lastComparison;
13628
      }
13629
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13630
      if (lastComparison != 0) {
13631
        return lastComparison;
13632
      }
13633
      return 0;
13634
    }
13635
 
13636
    public void read(TProtocol iprot) throws TException {
13637
      TField field;
13638
      iprot.readStructBegin();
13639
      while (true)
13640
      {
13641
        field = iprot.readFieldBegin();
13642
        if (field.type == TType.STOP) { 
13643
          break;
13644
        }
13645
        _Fields fieldId = _Fields.findByThriftId(field.id);
13646
        if (fieldId == null) {
13647
          TProtocolUtil.skip(iprot, field.type);
13648
        } else {
13649
          switch (fieldId) {
13650
            case SUCCESS:
13651
              if (field.type == TType.BOOL) {
13652
                this.success = iprot.readBool();
13653
                setSuccessIsSet(true);
13654
              } else { 
13655
                TProtocolUtil.skip(iprot, field.type);
13656
              }
13657
              break;
13658
            case EX:
13659
              if (field.type == TType.STRUCT) {
13660
                this.ex = new TransactionServiceException();
13661
                this.ex.read(iprot);
13662
              } else { 
13663
                TProtocolUtil.skip(iprot, field.type);
13664
              }
13665
              break;
13666
          }
13667
          iprot.readFieldEnd();
13668
        }
13669
      }
13670
      iprot.readStructEnd();
13671
      validate();
13672
    }
13673
 
13674
    public void write(TProtocol oprot) throws TException {
13675
      oprot.writeStructBegin(STRUCT_DESC);
13676
 
13677
      if (this.isSetSuccess()) {
13678
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13679
        oprot.writeBool(this.success);
13680
        oprot.writeFieldEnd();
13681
      } else if (this.isSetEx()) {
13682
        oprot.writeFieldBegin(EX_FIELD_DESC);
13683
        this.ex.write(oprot);
13684
        oprot.writeFieldEnd();
13685
      }
13686
      oprot.writeFieldStop();
13687
      oprot.writeStructEnd();
13688
    }
13689
 
13690
    @Override
13691
    public String toString() {
13692
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
13693
      boolean first = true;
13694
 
13695
      sb.append("success:");
13696
      sb.append(this.success);
13697
      first = false;
13698
      if (!first) sb.append(", ");
13699
      sb.append("ex:");
13700
      if (this.ex == null) {
13701
        sb.append("null");
13702
      } else {
13703
        sb.append(this.ex);
13704
      }
13705
      first = false;
13706
      sb.append(")");
13707
      return sb.toString();
13708
    }
13709
 
13710
    public void validate() throws TException {
13711
      // check for required fields
13712
    }
13713
 
13714
  }
13715
 
923 rajveer 13716
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
13717
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
13718
 
13719
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13720
 
13721
    private long orderId;
13722
 
13723
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13724
    public enum _Fields implements TFieldIdEnum {
13725
      ORDER_ID((short)1, "orderId");
13726
 
13727
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13728
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13729
 
13730
      static {
13731
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13732
          byId.put((int)field._thriftId, field);
13733
          byName.put(field.getFieldName(), field);
13734
        }
13735
      }
13736
 
13737
      /**
13738
       * Find the _Fields constant that matches fieldId, or null if its not found.
13739
       */
13740
      public static _Fields findByThriftId(int fieldId) {
13741
        return byId.get(fieldId);
13742
      }
13743
 
13744
      /**
13745
       * Find the _Fields constant that matches fieldId, throwing an exception
13746
       * if it is not found.
13747
       */
13748
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13749
        _Fields fields = findByThriftId(fieldId);
13750
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13751
        return fields;
13752
      }
13753
 
13754
      /**
13755
       * Find the _Fields constant that matches name, or null if its not found.
13756
       */
13757
      public static _Fields findByName(String name) {
13758
        return byName.get(name);
13759
      }
13760
 
13761
      private final short _thriftId;
13762
      private final String _fieldName;
13763
 
13764
      _Fields(short thriftId, String fieldName) {
13765
        _thriftId = thriftId;
13766
        _fieldName = fieldName;
13767
      }
13768
 
13769
      public short getThriftFieldId() {
13770
        return _thriftId;
13771
      }
13772
 
13773
      public String getFieldName() {
13774
        return _fieldName;
13775
      }
13776
    }
13777
 
13778
    // isset id assignments
13779
    private static final int __ORDERID_ISSET_ID = 0;
13780
    private BitSet __isset_bit_vector = new BitSet(1);
13781
 
13782
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13783
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13784
          new FieldValueMetaData(TType.I64)));
13785
    }});
13786
 
13787
    static {
13788
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
13789
    }
13790
 
13791
    public acceptOrder_args() {
13792
    }
13793
 
13794
    public acceptOrder_args(
13795
      long orderId)
13796
    {
13797
      this();
13798
      this.orderId = orderId;
13799
      setOrderIdIsSet(true);
13800
    }
13801
 
13802
    /**
13803
     * Performs a deep copy on <i>other</i>.
13804
     */
13805
    public acceptOrder_args(acceptOrder_args other) {
13806
      __isset_bit_vector.clear();
13807
      __isset_bit_vector.or(other.__isset_bit_vector);
13808
      this.orderId = other.orderId;
13809
    }
13810
 
13811
    public acceptOrder_args deepCopy() {
13812
      return new acceptOrder_args(this);
13813
    }
13814
 
13815
    @Deprecated
13816
    public acceptOrder_args clone() {
13817
      return new acceptOrder_args(this);
13818
    }
13819
 
13820
    public long getOrderId() {
13821
      return this.orderId;
13822
    }
13823
 
13824
    public acceptOrder_args setOrderId(long orderId) {
13825
      this.orderId = orderId;
13826
      setOrderIdIsSet(true);
13827
      return this;
13828
    }
13829
 
13830
    public void unsetOrderId() {
13831
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13832
    }
13833
 
13834
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13835
    public boolean isSetOrderId() {
13836
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13837
    }
13838
 
13839
    public void setOrderIdIsSet(boolean value) {
13840
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13841
    }
13842
 
13843
    public void setFieldValue(_Fields field, Object value) {
13844
      switch (field) {
13845
      case ORDER_ID:
13846
        if (value == null) {
13847
          unsetOrderId();
13848
        } else {
13849
          setOrderId((Long)value);
13850
        }
13851
        break;
13852
 
13853
      }
13854
    }
13855
 
13856
    public void setFieldValue(int fieldID, Object value) {
13857
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13858
    }
13859
 
13860
    public Object getFieldValue(_Fields field) {
13861
      switch (field) {
13862
      case ORDER_ID:
13863
        return new Long(getOrderId());
13864
 
13865
      }
13866
      throw new IllegalStateException();
13867
    }
13868
 
13869
    public Object getFieldValue(int fieldId) {
13870
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13871
    }
13872
 
13873
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13874
    public boolean isSet(_Fields field) {
13875
      switch (field) {
13876
      case ORDER_ID:
13877
        return isSetOrderId();
13878
      }
13879
      throw new IllegalStateException();
13880
    }
13881
 
13882
    public boolean isSet(int fieldID) {
13883
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13884
    }
13885
 
13886
    @Override
13887
    public boolean equals(Object that) {
13888
      if (that == null)
13889
        return false;
13890
      if (that instanceof acceptOrder_args)
13891
        return this.equals((acceptOrder_args)that);
13892
      return false;
13893
    }
13894
 
13895
    public boolean equals(acceptOrder_args that) {
13896
      if (that == null)
13897
        return false;
13898
 
13899
      boolean this_present_orderId = true;
13900
      boolean that_present_orderId = true;
13901
      if (this_present_orderId || that_present_orderId) {
13902
        if (!(this_present_orderId && that_present_orderId))
13903
          return false;
13904
        if (this.orderId != that.orderId)
13905
          return false;
13906
      }
13907
 
13908
      return true;
13909
    }
13910
 
13911
    @Override
13912
    public int hashCode() {
13913
      return 0;
13914
    }
13915
 
13916
    public int compareTo(acceptOrder_args other) {
13917
      if (!getClass().equals(other.getClass())) {
13918
        return getClass().getName().compareTo(other.getClass().getName());
13919
      }
13920
 
13921
      int lastComparison = 0;
13922
      acceptOrder_args typedOther = (acceptOrder_args)other;
13923
 
13924
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13925
      if (lastComparison != 0) {
13926
        return lastComparison;
13927
      }
13928
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13929
      if (lastComparison != 0) {
13930
        return lastComparison;
13931
      }
13932
      return 0;
13933
    }
13934
 
13935
    public void read(TProtocol iprot) throws TException {
13936
      TField field;
13937
      iprot.readStructBegin();
13938
      while (true)
13939
      {
13940
        field = iprot.readFieldBegin();
13941
        if (field.type == TType.STOP) { 
13942
          break;
13943
        }
13944
        _Fields fieldId = _Fields.findByThriftId(field.id);
13945
        if (fieldId == null) {
13946
          TProtocolUtil.skip(iprot, field.type);
13947
        } else {
13948
          switch (fieldId) {
13949
            case ORDER_ID:
13950
              if (field.type == TType.I64) {
13951
                this.orderId = iprot.readI64();
13952
                setOrderIdIsSet(true);
13953
              } else { 
13954
                TProtocolUtil.skip(iprot, field.type);
13955
              }
13956
              break;
13957
          }
13958
          iprot.readFieldEnd();
13959
        }
13960
      }
13961
      iprot.readStructEnd();
13962
      validate();
13963
    }
13964
 
13965
    public void write(TProtocol oprot) throws TException {
13966
      validate();
13967
 
13968
      oprot.writeStructBegin(STRUCT_DESC);
13969
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13970
      oprot.writeI64(this.orderId);
13971
      oprot.writeFieldEnd();
13972
      oprot.writeFieldStop();
13973
      oprot.writeStructEnd();
13974
    }
13975
 
13976
    @Override
13977
    public String toString() {
13978
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
13979
      boolean first = true;
13980
 
13981
      sb.append("orderId:");
13982
      sb.append(this.orderId);
13983
      first = false;
13984
      sb.append(")");
13985
      return sb.toString();
13986
    }
13987
 
13988
    public void validate() throws TException {
13989
      // check for required fields
13990
    }
13991
 
13992
  }
13993
 
13994
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
13995
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
13996
 
13997
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13998
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13999
 
14000
    private boolean success;
14001
    private TransactionServiceException ex;
14002
 
14003
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14004
    public enum _Fields implements TFieldIdEnum {
14005
      SUCCESS((short)0, "success"),
14006
      EX((short)1, "ex");
14007
 
14008
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14009
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14010
 
14011
      static {
14012
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14013
          byId.put((int)field._thriftId, field);
14014
          byName.put(field.getFieldName(), field);
14015
        }
14016
      }
14017
 
14018
      /**
14019
       * Find the _Fields constant that matches fieldId, or null if its not found.
14020
       */
14021
      public static _Fields findByThriftId(int fieldId) {
14022
        return byId.get(fieldId);
14023
      }
14024
 
14025
      /**
14026
       * Find the _Fields constant that matches fieldId, throwing an exception
14027
       * if it is not found.
14028
       */
14029
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14030
        _Fields fields = findByThriftId(fieldId);
14031
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14032
        return fields;
14033
      }
14034
 
14035
      /**
14036
       * Find the _Fields constant that matches name, or null if its not found.
14037
       */
14038
      public static _Fields findByName(String name) {
14039
        return byName.get(name);
14040
      }
14041
 
14042
      private final short _thriftId;
14043
      private final String _fieldName;
14044
 
14045
      _Fields(short thriftId, String fieldName) {
14046
        _thriftId = thriftId;
14047
        _fieldName = fieldName;
14048
      }
14049
 
14050
      public short getThriftFieldId() {
14051
        return _thriftId;
14052
      }
14053
 
14054
      public String getFieldName() {
14055
        return _fieldName;
14056
      }
14057
    }
14058
 
14059
    // isset id assignments
14060
    private static final int __SUCCESS_ISSET_ID = 0;
14061
    private BitSet __isset_bit_vector = new BitSet(1);
14062
 
14063
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14064
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14065
          new FieldValueMetaData(TType.BOOL)));
14066
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14067
          new FieldValueMetaData(TType.STRUCT)));
14068
    }});
14069
 
14070
    static {
14071
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
14072
    }
14073
 
14074
    public acceptOrder_result() {
14075
    }
14076
 
14077
    public acceptOrder_result(
14078
      boolean success,
14079
      TransactionServiceException ex)
14080
    {
14081
      this();
14082
      this.success = success;
14083
      setSuccessIsSet(true);
14084
      this.ex = ex;
14085
    }
14086
 
14087
    /**
14088
     * Performs a deep copy on <i>other</i>.
14089
     */
14090
    public acceptOrder_result(acceptOrder_result other) {
14091
      __isset_bit_vector.clear();
14092
      __isset_bit_vector.or(other.__isset_bit_vector);
14093
      this.success = other.success;
14094
      if (other.isSetEx()) {
14095
        this.ex = new TransactionServiceException(other.ex);
14096
      }
14097
    }
14098
 
14099
    public acceptOrder_result deepCopy() {
14100
      return new acceptOrder_result(this);
14101
    }
14102
 
14103
    @Deprecated
14104
    public acceptOrder_result clone() {
14105
      return new acceptOrder_result(this);
14106
    }
14107
 
14108
    public boolean isSuccess() {
14109
      return this.success;
14110
    }
14111
 
14112
    public acceptOrder_result setSuccess(boolean success) {
14113
      this.success = success;
14114
      setSuccessIsSet(true);
14115
      return this;
14116
    }
14117
 
14118
    public void unsetSuccess() {
14119
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14120
    }
14121
 
14122
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14123
    public boolean isSetSuccess() {
14124
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14125
    }
14126
 
14127
    public void setSuccessIsSet(boolean value) {
14128
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14129
    }
14130
 
14131
    public TransactionServiceException getEx() {
14132
      return this.ex;
14133
    }
14134
 
14135
    public acceptOrder_result setEx(TransactionServiceException ex) {
14136
      this.ex = ex;
14137
      return this;
14138
    }
14139
 
14140
    public void unsetEx() {
14141
      this.ex = null;
14142
    }
14143
 
14144
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14145
    public boolean isSetEx() {
14146
      return this.ex != null;
14147
    }
14148
 
14149
    public void setExIsSet(boolean value) {
14150
      if (!value) {
14151
        this.ex = null;
14152
      }
14153
    }
14154
 
14155
    public void setFieldValue(_Fields field, Object value) {
14156
      switch (field) {
14157
      case SUCCESS:
14158
        if (value == null) {
14159
          unsetSuccess();
14160
        } else {
14161
          setSuccess((Boolean)value);
14162
        }
14163
        break;
14164
 
14165
      case EX:
14166
        if (value == null) {
14167
          unsetEx();
14168
        } else {
14169
          setEx((TransactionServiceException)value);
14170
        }
14171
        break;
14172
 
14173
      }
14174
    }
14175
 
14176
    public void setFieldValue(int fieldID, Object value) {
14177
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14178
    }
14179
 
14180
    public Object getFieldValue(_Fields field) {
14181
      switch (field) {
14182
      case SUCCESS:
14183
        return new Boolean(isSuccess());
14184
 
14185
      case EX:
14186
        return getEx();
14187
 
14188
      }
14189
      throw new IllegalStateException();
14190
    }
14191
 
14192
    public Object getFieldValue(int fieldId) {
14193
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14194
    }
14195
 
14196
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14197
    public boolean isSet(_Fields field) {
14198
      switch (field) {
14199
      case SUCCESS:
14200
        return isSetSuccess();
14201
      case EX:
14202
        return isSetEx();
14203
      }
14204
      throw new IllegalStateException();
14205
    }
14206
 
14207
    public boolean isSet(int fieldID) {
14208
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14209
    }
14210
 
14211
    @Override
14212
    public boolean equals(Object that) {
14213
      if (that == null)
14214
        return false;
14215
      if (that instanceof acceptOrder_result)
14216
        return this.equals((acceptOrder_result)that);
14217
      return false;
14218
    }
14219
 
14220
    public boolean equals(acceptOrder_result that) {
14221
      if (that == null)
14222
        return false;
14223
 
14224
      boolean this_present_success = true;
14225
      boolean that_present_success = true;
14226
      if (this_present_success || that_present_success) {
14227
        if (!(this_present_success && that_present_success))
14228
          return false;
14229
        if (this.success != that.success)
14230
          return false;
14231
      }
14232
 
14233
      boolean this_present_ex = true && this.isSetEx();
14234
      boolean that_present_ex = true && that.isSetEx();
14235
      if (this_present_ex || that_present_ex) {
14236
        if (!(this_present_ex && that_present_ex))
14237
          return false;
14238
        if (!this.ex.equals(that.ex))
14239
          return false;
14240
      }
14241
 
14242
      return true;
14243
    }
14244
 
14245
    @Override
14246
    public int hashCode() {
14247
      return 0;
14248
    }
14249
 
14250
    public int compareTo(acceptOrder_result other) {
14251
      if (!getClass().equals(other.getClass())) {
14252
        return getClass().getName().compareTo(other.getClass().getName());
14253
      }
14254
 
14255
      int lastComparison = 0;
14256
      acceptOrder_result typedOther = (acceptOrder_result)other;
14257
 
14258
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14259
      if (lastComparison != 0) {
14260
        return lastComparison;
14261
      }
14262
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14263
      if (lastComparison != 0) {
14264
        return lastComparison;
14265
      }
14266
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14267
      if (lastComparison != 0) {
14268
        return lastComparison;
14269
      }
14270
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14271
      if (lastComparison != 0) {
14272
        return lastComparison;
14273
      }
14274
      return 0;
14275
    }
14276
 
14277
    public void read(TProtocol iprot) throws TException {
14278
      TField field;
14279
      iprot.readStructBegin();
14280
      while (true)
14281
      {
14282
        field = iprot.readFieldBegin();
14283
        if (field.type == TType.STOP) { 
14284
          break;
14285
        }
14286
        _Fields fieldId = _Fields.findByThriftId(field.id);
14287
        if (fieldId == null) {
14288
          TProtocolUtil.skip(iprot, field.type);
14289
        } else {
14290
          switch (fieldId) {
14291
            case SUCCESS:
14292
              if (field.type == TType.BOOL) {
14293
                this.success = iprot.readBool();
14294
                setSuccessIsSet(true);
14295
              } else { 
14296
                TProtocolUtil.skip(iprot, field.type);
14297
              }
14298
              break;
14299
            case EX:
14300
              if (field.type == TType.STRUCT) {
14301
                this.ex = new TransactionServiceException();
14302
                this.ex.read(iprot);
14303
              } else { 
14304
                TProtocolUtil.skip(iprot, field.type);
14305
              }
14306
              break;
14307
          }
14308
          iprot.readFieldEnd();
14309
        }
14310
      }
14311
      iprot.readStructEnd();
14312
      validate();
14313
    }
14314
 
14315
    public void write(TProtocol oprot) throws TException {
14316
      oprot.writeStructBegin(STRUCT_DESC);
14317
 
14318
      if (this.isSetSuccess()) {
14319
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14320
        oprot.writeBool(this.success);
14321
        oprot.writeFieldEnd();
14322
      } else if (this.isSetEx()) {
14323
        oprot.writeFieldBegin(EX_FIELD_DESC);
14324
        this.ex.write(oprot);
14325
        oprot.writeFieldEnd();
14326
      }
14327
      oprot.writeFieldStop();
14328
      oprot.writeStructEnd();
14329
    }
14330
 
14331
    @Override
14332
    public String toString() {
14333
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14334
      boolean first = true;
14335
 
14336
      sb.append("success:");
14337
      sb.append(this.success);
14338
      first = false;
14339
      if (!first) sb.append(", ");
14340
      sb.append("ex:");
14341
      if (this.ex == null) {
14342
        sb.append("null");
14343
      } else {
14344
        sb.append(this.ex);
14345
      }
14346
      first = false;
14347
      sb.append(")");
14348
      return sb.toString();
14349
    }
14350
 
14351
    public void validate() throws TException {
14352
      // check for required fields
14353
    }
14354
 
14355
  }
14356
 
14357
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14358
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14359
 
14360
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14361
 
14362
    private long orderId;
14363
 
14364
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14365
    public enum _Fields implements TFieldIdEnum {
14366
      ORDER_ID((short)1, "orderId");
14367
 
14368
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14370
 
14371
      static {
14372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14373
          byId.put((int)field._thriftId, field);
14374
          byName.put(field.getFieldName(), field);
14375
        }
14376
      }
14377
 
14378
      /**
14379
       * Find the _Fields constant that matches fieldId, or null if its not found.
14380
       */
14381
      public static _Fields findByThriftId(int fieldId) {
14382
        return byId.get(fieldId);
14383
      }
14384
 
14385
      /**
14386
       * Find the _Fields constant that matches fieldId, throwing an exception
14387
       * if it is not found.
14388
       */
14389
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14390
        _Fields fields = findByThriftId(fieldId);
14391
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14392
        return fields;
14393
      }
14394
 
14395
      /**
14396
       * Find the _Fields constant that matches name, or null if its not found.
14397
       */
14398
      public static _Fields findByName(String name) {
14399
        return byName.get(name);
14400
      }
14401
 
14402
      private final short _thriftId;
14403
      private final String _fieldName;
14404
 
14405
      _Fields(short thriftId, String fieldName) {
14406
        _thriftId = thriftId;
14407
        _fieldName = fieldName;
14408
      }
14409
 
14410
      public short getThriftFieldId() {
14411
        return _thriftId;
14412
      }
14413
 
14414
      public String getFieldName() {
14415
        return _fieldName;
14416
      }
14417
    }
14418
 
14419
    // isset id assignments
14420
    private static final int __ORDERID_ISSET_ID = 0;
14421
    private BitSet __isset_bit_vector = new BitSet(1);
14422
 
14423
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14424
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14425
          new FieldValueMetaData(TType.I64)));
14426
    }});
14427
 
14428
    static {
14429
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14430
    }
14431
 
14432
    public billOrder_args() {
14433
    }
14434
 
14435
    public billOrder_args(
14436
      long orderId)
14437
    {
14438
      this();
14439
      this.orderId = orderId;
14440
      setOrderIdIsSet(true);
14441
    }
14442
 
14443
    /**
14444
     * Performs a deep copy on <i>other</i>.
14445
     */
14446
    public billOrder_args(billOrder_args other) {
14447
      __isset_bit_vector.clear();
14448
      __isset_bit_vector.or(other.__isset_bit_vector);
14449
      this.orderId = other.orderId;
14450
    }
14451
 
14452
    public billOrder_args deepCopy() {
14453
      return new billOrder_args(this);
14454
    }
14455
 
14456
    @Deprecated
14457
    public billOrder_args clone() {
14458
      return new billOrder_args(this);
14459
    }
14460
 
14461
    public long getOrderId() {
14462
      return this.orderId;
14463
    }
14464
 
14465
    public billOrder_args setOrderId(long orderId) {
14466
      this.orderId = orderId;
14467
      setOrderIdIsSet(true);
14468
      return this;
14469
    }
14470
 
14471
    public void unsetOrderId() {
14472
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14473
    }
14474
 
14475
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14476
    public boolean isSetOrderId() {
14477
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14478
    }
14479
 
14480
    public void setOrderIdIsSet(boolean value) {
14481
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14482
    }
14483
 
14484
    public void setFieldValue(_Fields field, Object value) {
14485
      switch (field) {
14486
      case ORDER_ID:
14487
        if (value == null) {
14488
          unsetOrderId();
14489
        } else {
14490
          setOrderId((Long)value);
14491
        }
14492
        break;
14493
 
14494
      }
14495
    }
14496
 
14497
    public void setFieldValue(int fieldID, Object value) {
14498
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14499
    }
14500
 
14501
    public Object getFieldValue(_Fields field) {
14502
      switch (field) {
14503
      case ORDER_ID:
14504
        return new Long(getOrderId());
14505
 
14506
      }
14507
      throw new IllegalStateException();
14508
    }
14509
 
14510
    public Object getFieldValue(int fieldId) {
14511
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14512
    }
14513
 
14514
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14515
    public boolean isSet(_Fields field) {
14516
      switch (field) {
14517
      case ORDER_ID:
14518
        return isSetOrderId();
14519
      }
14520
      throw new IllegalStateException();
14521
    }
14522
 
14523
    public boolean isSet(int fieldID) {
14524
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14525
    }
14526
 
14527
    @Override
14528
    public boolean equals(Object that) {
14529
      if (that == null)
14530
        return false;
14531
      if (that instanceof billOrder_args)
14532
        return this.equals((billOrder_args)that);
14533
      return false;
14534
    }
14535
 
14536
    public boolean equals(billOrder_args that) {
14537
      if (that == null)
14538
        return false;
14539
 
14540
      boolean this_present_orderId = true;
14541
      boolean that_present_orderId = true;
14542
      if (this_present_orderId || that_present_orderId) {
14543
        if (!(this_present_orderId && that_present_orderId))
14544
          return false;
14545
        if (this.orderId != that.orderId)
14546
          return false;
14547
      }
14548
 
14549
      return true;
14550
    }
14551
 
14552
    @Override
14553
    public int hashCode() {
14554
      return 0;
14555
    }
14556
 
14557
    public int compareTo(billOrder_args other) {
14558
      if (!getClass().equals(other.getClass())) {
14559
        return getClass().getName().compareTo(other.getClass().getName());
14560
      }
14561
 
14562
      int lastComparison = 0;
14563
      billOrder_args typedOther = (billOrder_args)other;
14564
 
14565
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14566
      if (lastComparison != 0) {
14567
        return lastComparison;
14568
      }
14569
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14570
      if (lastComparison != 0) {
14571
        return lastComparison;
14572
      }
14573
      return 0;
14574
    }
14575
 
14576
    public void read(TProtocol iprot) throws TException {
14577
      TField field;
14578
      iprot.readStructBegin();
14579
      while (true)
14580
      {
14581
        field = iprot.readFieldBegin();
14582
        if (field.type == TType.STOP) { 
14583
          break;
14584
        }
14585
        _Fields fieldId = _Fields.findByThriftId(field.id);
14586
        if (fieldId == null) {
14587
          TProtocolUtil.skip(iprot, field.type);
14588
        } else {
14589
          switch (fieldId) {
14590
            case ORDER_ID:
14591
              if (field.type == TType.I64) {
14592
                this.orderId = iprot.readI64();
14593
                setOrderIdIsSet(true);
14594
              } else { 
14595
                TProtocolUtil.skip(iprot, field.type);
14596
              }
14597
              break;
14598
          }
14599
          iprot.readFieldEnd();
14600
        }
14601
      }
14602
      iprot.readStructEnd();
14603
      validate();
14604
    }
14605
 
14606
    public void write(TProtocol oprot) throws TException {
14607
      validate();
14608
 
14609
      oprot.writeStructBegin(STRUCT_DESC);
14610
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14611
      oprot.writeI64(this.orderId);
14612
      oprot.writeFieldEnd();
14613
      oprot.writeFieldStop();
14614
      oprot.writeStructEnd();
14615
    }
14616
 
14617
    @Override
14618
    public String toString() {
14619
      StringBuilder sb = new StringBuilder("billOrder_args(");
14620
      boolean first = true;
14621
 
14622
      sb.append("orderId:");
14623
      sb.append(this.orderId);
14624
      first = false;
14625
      sb.append(")");
14626
      return sb.toString();
14627
    }
14628
 
14629
    public void validate() throws TException {
14630
      // check for required fields
14631
    }
14632
 
14633
  }
14634
 
14635
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
14636
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
14637
 
14638
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14639
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14640
 
14641
    private boolean success;
14642
    private TransactionServiceException ex;
14643
 
14644
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14645
    public enum _Fields implements TFieldIdEnum {
14646
      SUCCESS((short)0, "success"),
14647
      EX((short)1, "ex");
14648
 
14649
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14650
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14651
 
14652
      static {
14653
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14654
          byId.put((int)field._thriftId, field);
14655
          byName.put(field.getFieldName(), field);
14656
        }
14657
      }
14658
 
14659
      /**
14660
       * Find the _Fields constant that matches fieldId, or null if its not found.
14661
       */
14662
      public static _Fields findByThriftId(int fieldId) {
14663
        return byId.get(fieldId);
14664
      }
14665
 
14666
      /**
14667
       * Find the _Fields constant that matches fieldId, throwing an exception
14668
       * if it is not found.
14669
       */
14670
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14671
        _Fields fields = findByThriftId(fieldId);
14672
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14673
        return fields;
14674
      }
14675
 
14676
      /**
14677
       * Find the _Fields constant that matches name, or null if its not found.
14678
       */
14679
      public static _Fields findByName(String name) {
14680
        return byName.get(name);
14681
      }
14682
 
14683
      private final short _thriftId;
14684
      private final String _fieldName;
14685
 
14686
      _Fields(short thriftId, String fieldName) {
14687
        _thriftId = thriftId;
14688
        _fieldName = fieldName;
14689
      }
14690
 
14691
      public short getThriftFieldId() {
14692
        return _thriftId;
14693
      }
14694
 
14695
      public String getFieldName() {
14696
        return _fieldName;
14697
      }
14698
    }
14699
 
14700
    // isset id assignments
14701
    private static final int __SUCCESS_ISSET_ID = 0;
14702
    private BitSet __isset_bit_vector = new BitSet(1);
14703
 
14704
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14705
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14706
          new FieldValueMetaData(TType.BOOL)));
14707
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14708
          new FieldValueMetaData(TType.STRUCT)));
14709
    }});
14710
 
14711
    static {
14712
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
14713
    }
14714
 
14715
    public billOrder_result() {
14716
    }
14717
 
14718
    public billOrder_result(
14719
      boolean success,
14720
      TransactionServiceException ex)
14721
    {
14722
      this();
14723
      this.success = success;
14724
      setSuccessIsSet(true);
14725
      this.ex = ex;
14726
    }
14727
 
14728
    /**
14729
     * Performs a deep copy on <i>other</i>.
14730
     */
14731
    public billOrder_result(billOrder_result other) {
14732
      __isset_bit_vector.clear();
14733
      __isset_bit_vector.or(other.__isset_bit_vector);
14734
      this.success = other.success;
14735
      if (other.isSetEx()) {
14736
        this.ex = new TransactionServiceException(other.ex);
14737
      }
14738
    }
14739
 
14740
    public billOrder_result deepCopy() {
14741
      return new billOrder_result(this);
14742
    }
14743
 
14744
    @Deprecated
14745
    public billOrder_result clone() {
14746
      return new billOrder_result(this);
14747
    }
14748
 
14749
    public boolean isSuccess() {
14750
      return this.success;
14751
    }
14752
 
14753
    public billOrder_result setSuccess(boolean success) {
14754
      this.success = success;
14755
      setSuccessIsSet(true);
14756
      return this;
14757
    }
14758
 
14759
    public void unsetSuccess() {
14760
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14761
    }
14762
 
14763
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14764
    public boolean isSetSuccess() {
14765
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14766
    }
14767
 
14768
    public void setSuccessIsSet(boolean value) {
14769
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14770
    }
14771
 
14772
    public TransactionServiceException getEx() {
14773
      return this.ex;
14774
    }
14775
 
14776
    public billOrder_result setEx(TransactionServiceException ex) {
14777
      this.ex = ex;
14778
      return this;
14779
    }
14780
 
14781
    public void unsetEx() {
14782
      this.ex = null;
14783
    }
14784
 
14785
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14786
    public boolean isSetEx() {
14787
      return this.ex != null;
14788
    }
14789
 
14790
    public void setExIsSet(boolean value) {
14791
      if (!value) {
14792
        this.ex = null;
14793
      }
14794
    }
14795
 
14796
    public void setFieldValue(_Fields field, Object value) {
14797
      switch (field) {
14798
      case SUCCESS:
14799
        if (value == null) {
14800
          unsetSuccess();
14801
        } else {
14802
          setSuccess((Boolean)value);
14803
        }
14804
        break;
14805
 
14806
      case EX:
14807
        if (value == null) {
14808
          unsetEx();
14809
        } else {
14810
          setEx((TransactionServiceException)value);
14811
        }
14812
        break;
14813
 
14814
      }
14815
    }
14816
 
14817
    public void setFieldValue(int fieldID, Object value) {
14818
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14819
    }
14820
 
14821
    public Object getFieldValue(_Fields field) {
14822
      switch (field) {
14823
      case SUCCESS:
14824
        return new Boolean(isSuccess());
14825
 
14826
      case EX:
14827
        return getEx();
14828
 
14829
      }
14830
      throw new IllegalStateException();
14831
    }
14832
 
14833
    public Object getFieldValue(int fieldId) {
14834
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14835
    }
14836
 
14837
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14838
    public boolean isSet(_Fields field) {
14839
      switch (field) {
14840
      case SUCCESS:
14841
        return isSetSuccess();
14842
      case EX:
14843
        return isSetEx();
14844
      }
14845
      throw new IllegalStateException();
14846
    }
14847
 
14848
    public boolean isSet(int fieldID) {
14849
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14850
    }
14851
 
14852
    @Override
14853
    public boolean equals(Object that) {
14854
      if (that == null)
14855
        return false;
14856
      if (that instanceof billOrder_result)
14857
        return this.equals((billOrder_result)that);
14858
      return false;
14859
    }
14860
 
14861
    public boolean equals(billOrder_result that) {
14862
      if (that == null)
14863
        return false;
14864
 
14865
      boolean this_present_success = true;
14866
      boolean that_present_success = true;
14867
      if (this_present_success || that_present_success) {
14868
        if (!(this_present_success && that_present_success))
14869
          return false;
14870
        if (this.success != that.success)
14871
          return false;
14872
      }
14873
 
14874
      boolean this_present_ex = true && this.isSetEx();
14875
      boolean that_present_ex = true && that.isSetEx();
14876
      if (this_present_ex || that_present_ex) {
14877
        if (!(this_present_ex && that_present_ex))
14878
          return false;
14879
        if (!this.ex.equals(that.ex))
14880
          return false;
14881
      }
14882
 
14883
      return true;
14884
    }
14885
 
14886
    @Override
14887
    public int hashCode() {
14888
      return 0;
14889
    }
14890
 
14891
    public int compareTo(billOrder_result other) {
14892
      if (!getClass().equals(other.getClass())) {
14893
        return getClass().getName().compareTo(other.getClass().getName());
14894
      }
14895
 
14896
      int lastComparison = 0;
14897
      billOrder_result typedOther = (billOrder_result)other;
14898
 
14899
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14900
      if (lastComparison != 0) {
14901
        return lastComparison;
14902
      }
14903
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14904
      if (lastComparison != 0) {
14905
        return lastComparison;
14906
      }
14907
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14908
      if (lastComparison != 0) {
14909
        return lastComparison;
14910
      }
14911
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14912
      if (lastComparison != 0) {
14913
        return lastComparison;
14914
      }
14915
      return 0;
14916
    }
14917
 
14918
    public void read(TProtocol iprot) throws TException {
14919
      TField field;
14920
      iprot.readStructBegin();
14921
      while (true)
14922
      {
14923
        field = iprot.readFieldBegin();
14924
        if (field.type == TType.STOP) { 
14925
          break;
14926
        }
14927
        _Fields fieldId = _Fields.findByThriftId(field.id);
14928
        if (fieldId == null) {
14929
          TProtocolUtil.skip(iprot, field.type);
14930
        } else {
14931
          switch (fieldId) {
14932
            case SUCCESS:
14933
              if (field.type == TType.BOOL) {
14934
                this.success = iprot.readBool();
14935
                setSuccessIsSet(true);
14936
              } else { 
14937
                TProtocolUtil.skip(iprot, field.type);
14938
              }
14939
              break;
14940
            case EX:
14941
              if (field.type == TType.STRUCT) {
14942
                this.ex = new TransactionServiceException();
14943
                this.ex.read(iprot);
14944
              } else { 
14945
                TProtocolUtil.skip(iprot, field.type);
14946
              }
14947
              break;
14948
          }
14949
          iprot.readFieldEnd();
14950
        }
14951
      }
14952
      iprot.readStructEnd();
14953
      validate();
14954
    }
14955
 
14956
    public void write(TProtocol oprot) throws TException {
14957
      oprot.writeStructBegin(STRUCT_DESC);
14958
 
14959
      if (this.isSetSuccess()) {
14960
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14961
        oprot.writeBool(this.success);
14962
        oprot.writeFieldEnd();
14963
      } else if (this.isSetEx()) {
14964
        oprot.writeFieldBegin(EX_FIELD_DESC);
14965
        this.ex.write(oprot);
14966
        oprot.writeFieldEnd();
14967
      }
14968
      oprot.writeFieldStop();
14969
      oprot.writeStructEnd();
14970
    }
14971
 
14972
    @Override
14973
    public String toString() {
14974
      StringBuilder sb = new StringBuilder("billOrder_result(");
14975
      boolean first = true;
14976
 
14977
      sb.append("success:");
14978
      sb.append(this.success);
14979
      first = false;
14980
      if (!first) sb.append(", ");
14981
      sb.append("ex:");
14982
      if (this.ex == null) {
14983
        sb.append("null");
14984
      } else {
14985
        sb.append(this.ex);
14986
      }
14987
      first = false;
14988
      sb.append(")");
14989
      return sb.toString();
14990
    }
14991
 
14992
    public void validate() throws TException {
14993
      // check for required fields
14994
    }
14995
 
14996
  }
14997
 
483 rajveer 14998
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
14999
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 15000
 
15001
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 15002
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 15003
 
15004
    private long transactionId;
1529 ankur.sing 15005
    private long customerId;
68 ashish 15006
 
15007
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15008
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 15009
      TRANSACTION_ID((short)1, "transactionId"),
15010
      CUSTOMER_ID((short)2, "customerId");
68 ashish 15011
 
15012
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15013
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15014
 
15015
      static {
15016
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15017
          byId.put((int)field._thriftId, field);
15018
          byName.put(field.getFieldName(), field);
15019
        }
15020
      }
15021
 
15022
      /**
15023
       * Find the _Fields constant that matches fieldId, or null if its not found.
15024
       */
15025
      public static _Fields findByThriftId(int fieldId) {
15026
        return byId.get(fieldId);
15027
      }
15028
 
15029
      /**
15030
       * Find the _Fields constant that matches fieldId, throwing an exception
15031
       * if it is not found.
15032
       */
15033
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15034
        _Fields fields = findByThriftId(fieldId);
15035
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15036
        return fields;
15037
      }
15038
 
15039
      /**
15040
       * Find the _Fields constant that matches name, or null if its not found.
15041
       */
15042
      public static _Fields findByName(String name) {
15043
        return byName.get(name);
15044
      }
15045
 
15046
      private final short _thriftId;
15047
      private final String _fieldName;
15048
 
15049
      _Fields(short thriftId, String fieldName) {
15050
        _thriftId = thriftId;
15051
        _fieldName = fieldName;
15052
      }
15053
 
15054
      public short getThriftFieldId() {
15055
        return _thriftId;
15056
      }
15057
 
15058
      public String getFieldName() {
15059
        return _fieldName;
15060
      }
15061
    }
15062
 
15063
    // isset id assignments
15064
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 15065
    private static final int __CUSTOMERID_ISSET_ID = 1;
15066
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 15067
 
15068
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15069
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15070
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 15071
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
15072
          new FieldValueMetaData(TType.I64)));
68 ashish 15073
    }});
15074
 
15075
    static {
483 rajveer 15076
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 15077
    }
15078
 
483 rajveer 15079
    public getOrdersForTransaction_args() {
68 ashish 15080
    }
15081
 
483 rajveer 15082
    public getOrdersForTransaction_args(
1529 ankur.sing 15083
      long transactionId,
15084
      long customerId)
68 ashish 15085
    {
15086
      this();
15087
      this.transactionId = transactionId;
15088
      setTransactionIdIsSet(true);
1529 ankur.sing 15089
      this.customerId = customerId;
15090
      setCustomerIdIsSet(true);
68 ashish 15091
    }
15092
 
15093
    /**
15094
     * Performs a deep copy on <i>other</i>.
15095
     */
483 rajveer 15096
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 15097
      __isset_bit_vector.clear();
15098
      __isset_bit_vector.or(other.__isset_bit_vector);
15099
      this.transactionId = other.transactionId;
1529 ankur.sing 15100
      this.customerId = other.customerId;
68 ashish 15101
    }
15102
 
483 rajveer 15103
    public getOrdersForTransaction_args deepCopy() {
15104
      return new getOrdersForTransaction_args(this);
68 ashish 15105
    }
15106
 
15107
    @Deprecated
483 rajveer 15108
    public getOrdersForTransaction_args clone() {
15109
      return new getOrdersForTransaction_args(this);
68 ashish 15110
    }
15111
 
15112
    public long getTransactionId() {
15113
      return this.transactionId;
15114
    }
15115
 
483 rajveer 15116
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 15117
      this.transactionId = transactionId;
15118
      setTransactionIdIsSet(true);
15119
      return this;
15120
    }
15121
 
15122
    public void unsetTransactionId() {
15123
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15124
    }
15125
 
15126
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15127
    public boolean isSetTransactionId() {
15128
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15129
    }
15130
 
15131
    public void setTransactionIdIsSet(boolean value) {
15132
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15133
    }
15134
 
1529 ankur.sing 15135
    public long getCustomerId() {
15136
      return this.customerId;
15137
    }
15138
 
15139
    public getOrdersForTransaction_args setCustomerId(long customerId) {
15140
      this.customerId = customerId;
15141
      setCustomerIdIsSet(true);
15142
      return this;
15143
    }
15144
 
15145
    public void unsetCustomerId() {
15146
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
15147
    }
15148
 
15149
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15150
    public boolean isSetCustomerId() {
15151
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
15152
    }
15153
 
15154
    public void setCustomerIdIsSet(boolean value) {
15155
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
15156
    }
15157
 
68 ashish 15158
    public void setFieldValue(_Fields field, Object value) {
15159
      switch (field) {
15160
      case TRANSACTION_ID:
15161
        if (value == null) {
15162
          unsetTransactionId();
15163
        } else {
15164
          setTransactionId((Long)value);
15165
        }
15166
        break;
15167
 
1529 ankur.sing 15168
      case CUSTOMER_ID:
15169
        if (value == null) {
15170
          unsetCustomerId();
15171
        } else {
15172
          setCustomerId((Long)value);
15173
        }
15174
        break;
15175
 
68 ashish 15176
      }
15177
    }
15178
 
15179
    public void setFieldValue(int fieldID, Object value) {
15180
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15181
    }
15182
 
15183
    public Object getFieldValue(_Fields field) {
15184
      switch (field) {
15185
      case TRANSACTION_ID:
15186
        return new Long(getTransactionId());
15187
 
1529 ankur.sing 15188
      case CUSTOMER_ID:
15189
        return new Long(getCustomerId());
15190
 
68 ashish 15191
      }
15192
      throw new IllegalStateException();
15193
    }
15194
 
15195
    public Object getFieldValue(int fieldId) {
15196
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15197
    }
15198
 
15199
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15200
    public boolean isSet(_Fields field) {
15201
      switch (field) {
15202
      case TRANSACTION_ID:
15203
        return isSetTransactionId();
1529 ankur.sing 15204
      case CUSTOMER_ID:
15205
        return isSetCustomerId();
68 ashish 15206
      }
15207
      throw new IllegalStateException();
15208
    }
15209
 
15210
    public boolean isSet(int fieldID) {
15211
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15212
    }
15213
 
15214
    @Override
15215
    public boolean equals(Object that) {
15216
      if (that == null)
15217
        return false;
483 rajveer 15218
      if (that instanceof getOrdersForTransaction_args)
15219
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 15220
      return false;
15221
    }
15222
 
483 rajveer 15223
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 15224
      if (that == null)
15225
        return false;
15226
 
15227
      boolean this_present_transactionId = true;
15228
      boolean that_present_transactionId = true;
15229
      if (this_present_transactionId || that_present_transactionId) {
15230
        if (!(this_present_transactionId && that_present_transactionId))
15231
          return false;
15232
        if (this.transactionId != that.transactionId)
15233
          return false;
15234
      }
15235
 
1529 ankur.sing 15236
      boolean this_present_customerId = true;
15237
      boolean that_present_customerId = true;
15238
      if (this_present_customerId || that_present_customerId) {
15239
        if (!(this_present_customerId && that_present_customerId))
15240
          return false;
15241
        if (this.customerId != that.customerId)
15242
          return false;
15243
      }
15244
 
68 ashish 15245
      return true;
15246
    }
15247
 
15248
    @Override
15249
    public int hashCode() {
15250
      return 0;
15251
    }
15252
 
483 rajveer 15253
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 15254
      if (!getClass().equals(other.getClass())) {
15255
        return getClass().getName().compareTo(other.getClass().getName());
15256
      }
15257
 
15258
      int lastComparison = 0;
483 rajveer 15259
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 15260
 
15261
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15262
      if (lastComparison != 0) {
15263
        return lastComparison;
15264
      }
15265
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15266
      if (lastComparison != 0) {
15267
        return lastComparison;
15268
      }
1529 ankur.sing 15269
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
15270
      if (lastComparison != 0) {
15271
        return lastComparison;
15272
      }
15273
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
15274
      if (lastComparison != 0) {
15275
        return lastComparison;
15276
      }
68 ashish 15277
      return 0;
15278
    }
15279
 
15280
    public void read(TProtocol iprot) throws TException {
15281
      TField field;
15282
      iprot.readStructBegin();
15283
      while (true)
15284
      {
15285
        field = iprot.readFieldBegin();
15286
        if (field.type == TType.STOP) { 
15287
          break;
15288
        }
15289
        _Fields fieldId = _Fields.findByThriftId(field.id);
15290
        if (fieldId == null) {
15291
          TProtocolUtil.skip(iprot, field.type);
15292
        } else {
15293
          switch (fieldId) {
15294
            case TRANSACTION_ID:
15295
              if (field.type == TType.I64) {
15296
                this.transactionId = iprot.readI64();
15297
                setTransactionIdIsSet(true);
15298
              } else { 
15299
                TProtocolUtil.skip(iprot, field.type);
15300
              }
15301
              break;
1529 ankur.sing 15302
            case CUSTOMER_ID:
15303
              if (field.type == TType.I64) {
15304
                this.customerId = iprot.readI64();
15305
                setCustomerIdIsSet(true);
15306
              } else { 
15307
                TProtocolUtil.skip(iprot, field.type);
15308
              }
15309
              break;
68 ashish 15310
          }
15311
          iprot.readFieldEnd();
15312
        }
15313
      }
15314
      iprot.readStructEnd();
15315
      validate();
15316
    }
15317
 
15318
    public void write(TProtocol oprot) throws TException {
15319
      validate();
15320
 
15321
      oprot.writeStructBegin(STRUCT_DESC);
15322
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15323
      oprot.writeI64(this.transactionId);
15324
      oprot.writeFieldEnd();
1529 ankur.sing 15325
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15326
      oprot.writeI64(this.customerId);
15327
      oprot.writeFieldEnd();
68 ashish 15328
      oprot.writeFieldStop();
15329
      oprot.writeStructEnd();
15330
    }
15331
 
15332
    @Override
15333
    public String toString() {
483 rajveer 15334
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15335
      boolean first = true;
15336
 
15337
      sb.append("transactionId:");
15338
      sb.append(this.transactionId);
15339
      first = false;
1529 ankur.sing 15340
      if (!first) sb.append(", ");
15341
      sb.append("customerId:");
15342
      sb.append(this.customerId);
15343
      first = false;
68 ashish 15344
      sb.append(")");
15345
      return sb.toString();
15346
    }
15347
 
15348
    public void validate() throws TException {
15349
      // check for required fields
15350
    }
15351
 
15352
  }
15353
 
483 rajveer 15354
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15355
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15356
 
483 rajveer 15357
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15358
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15359
 
483 rajveer 15360
    private List<Order> success;
68 ashish 15361
    private TransactionServiceException ex;
15362
 
15363
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15364
    public enum _Fields implements TFieldIdEnum {
15365
      SUCCESS((short)0, "success"),
15366
      EX((short)1, "ex");
15367
 
15368
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15370
 
15371
      static {
15372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15373
          byId.put((int)field._thriftId, field);
15374
          byName.put(field.getFieldName(), field);
15375
        }
15376
      }
15377
 
15378
      /**
15379
       * Find the _Fields constant that matches fieldId, or null if its not found.
15380
       */
15381
      public static _Fields findByThriftId(int fieldId) {
15382
        return byId.get(fieldId);
15383
      }
15384
 
15385
      /**
15386
       * Find the _Fields constant that matches fieldId, throwing an exception
15387
       * if it is not found.
15388
       */
15389
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15390
        _Fields fields = findByThriftId(fieldId);
15391
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15392
        return fields;
15393
      }
15394
 
15395
      /**
15396
       * Find the _Fields constant that matches name, or null if its not found.
15397
       */
15398
      public static _Fields findByName(String name) {
15399
        return byName.get(name);
15400
      }
15401
 
15402
      private final short _thriftId;
15403
      private final String _fieldName;
15404
 
15405
      _Fields(short thriftId, String fieldName) {
15406
        _thriftId = thriftId;
15407
        _fieldName = fieldName;
15408
      }
15409
 
15410
      public short getThriftFieldId() {
15411
        return _thriftId;
15412
      }
15413
 
15414
      public String getFieldName() {
15415
        return _fieldName;
15416
      }
15417
    }
15418
 
15419
    // isset id assignments
15420
 
15421
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15422
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15423
          new ListMetaData(TType.LIST, 
15424
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15425
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15426
          new FieldValueMetaData(TType.STRUCT)));
15427
    }});
15428
 
15429
    static {
483 rajveer 15430
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15431
    }
15432
 
483 rajveer 15433
    public getOrdersForTransaction_result() {
68 ashish 15434
    }
15435
 
483 rajveer 15436
    public getOrdersForTransaction_result(
15437
      List<Order> success,
68 ashish 15438
      TransactionServiceException ex)
15439
    {
15440
      this();
15441
      this.success = success;
15442
      this.ex = ex;
15443
    }
15444
 
15445
    /**
15446
     * Performs a deep copy on <i>other</i>.
15447
     */
483 rajveer 15448
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15449
      if (other.isSetSuccess()) {
15450
        List<Order> __this__success = new ArrayList<Order>();
15451
        for (Order other_element : other.success) {
15452
          __this__success.add(new Order(other_element));
15453
        }
15454
        this.success = __this__success;
15455
      }
68 ashish 15456
      if (other.isSetEx()) {
15457
        this.ex = new TransactionServiceException(other.ex);
15458
      }
15459
    }
15460
 
483 rajveer 15461
    public getOrdersForTransaction_result deepCopy() {
15462
      return new getOrdersForTransaction_result(this);
68 ashish 15463
    }
15464
 
15465
    @Deprecated
483 rajveer 15466
    public getOrdersForTransaction_result clone() {
15467
      return new getOrdersForTransaction_result(this);
68 ashish 15468
    }
15469
 
483 rajveer 15470
    public int getSuccessSize() {
15471
      return (this.success == null) ? 0 : this.success.size();
15472
    }
15473
 
15474
    public java.util.Iterator<Order> getSuccessIterator() {
15475
      return (this.success == null) ? null : this.success.iterator();
15476
    }
15477
 
15478
    public void addToSuccess(Order elem) {
15479
      if (this.success == null) {
15480
        this.success = new ArrayList<Order>();
15481
      }
15482
      this.success.add(elem);
15483
    }
15484
 
15485
    public List<Order> getSuccess() {
68 ashish 15486
      return this.success;
15487
    }
15488
 
483 rajveer 15489
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15490
      this.success = success;
15491
      return this;
15492
    }
15493
 
15494
    public void unsetSuccess() {
483 rajveer 15495
      this.success = null;
68 ashish 15496
    }
15497
 
15498
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15499
    public boolean isSetSuccess() {
483 rajveer 15500
      return this.success != null;
68 ashish 15501
    }
15502
 
15503
    public void setSuccessIsSet(boolean value) {
483 rajveer 15504
      if (!value) {
15505
        this.success = null;
15506
      }
68 ashish 15507
    }
15508
 
15509
    public TransactionServiceException getEx() {
15510
      return this.ex;
15511
    }
15512
 
483 rajveer 15513
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15514
      this.ex = ex;
15515
      return this;
15516
    }
15517
 
15518
    public void unsetEx() {
15519
      this.ex = null;
15520
    }
15521
 
15522
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15523
    public boolean isSetEx() {
15524
      return this.ex != null;
15525
    }
15526
 
15527
    public void setExIsSet(boolean value) {
15528
      if (!value) {
15529
        this.ex = null;
15530
      }
15531
    }
15532
 
15533
    public void setFieldValue(_Fields field, Object value) {
15534
      switch (field) {
15535
      case SUCCESS:
15536
        if (value == null) {
15537
          unsetSuccess();
15538
        } else {
483 rajveer 15539
          setSuccess((List<Order>)value);
68 ashish 15540
        }
15541
        break;
15542
 
15543
      case EX:
15544
        if (value == null) {
15545
          unsetEx();
15546
        } else {
15547
          setEx((TransactionServiceException)value);
15548
        }
15549
        break;
15550
 
15551
      }
15552
    }
15553
 
15554
    public void setFieldValue(int fieldID, Object value) {
15555
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15556
    }
15557
 
15558
    public Object getFieldValue(_Fields field) {
15559
      switch (field) {
15560
      case SUCCESS:
483 rajveer 15561
        return getSuccess();
68 ashish 15562
 
15563
      case EX:
15564
        return getEx();
15565
 
15566
      }
15567
      throw new IllegalStateException();
15568
    }
15569
 
15570
    public Object getFieldValue(int fieldId) {
15571
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15572
    }
15573
 
15574
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15575
    public boolean isSet(_Fields field) {
15576
      switch (field) {
15577
      case SUCCESS:
15578
        return isSetSuccess();
15579
      case EX:
15580
        return isSetEx();
15581
      }
15582
      throw new IllegalStateException();
15583
    }
15584
 
15585
    public boolean isSet(int fieldID) {
15586
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15587
    }
15588
 
15589
    @Override
15590
    public boolean equals(Object that) {
15591
      if (that == null)
15592
        return false;
483 rajveer 15593
      if (that instanceof getOrdersForTransaction_result)
15594
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 15595
      return false;
15596
    }
15597
 
483 rajveer 15598
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 15599
      if (that == null)
15600
        return false;
15601
 
483 rajveer 15602
      boolean this_present_success = true && this.isSetSuccess();
15603
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15604
      if (this_present_success || that_present_success) {
15605
        if (!(this_present_success && that_present_success))
15606
          return false;
483 rajveer 15607
        if (!this.success.equals(that.success))
68 ashish 15608
          return false;
15609
      }
15610
 
15611
      boolean this_present_ex = true && this.isSetEx();
15612
      boolean that_present_ex = true && that.isSetEx();
15613
      if (this_present_ex || that_present_ex) {
15614
        if (!(this_present_ex && that_present_ex))
15615
          return false;
15616
        if (!this.ex.equals(that.ex))
15617
          return false;
15618
      }
15619
 
15620
      return true;
15621
    }
15622
 
15623
    @Override
15624
    public int hashCode() {
15625
      return 0;
15626
    }
15627
 
483 rajveer 15628
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 15629
      if (!getClass().equals(other.getClass())) {
15630
        return getClass().getName().compareTo(other.getClass().getName());
15631
      }
15632
 
15633
      int lastComparison = 0;
483 rajveer 15634
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 15635
 
15636
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15637
      if (lastComparison != 0) {
15638
        return lastComparison;
15639
      }
15640
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15641
      if (lastComparison != 0) {
15642
        return lastComparison;
15643
      }
15644
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15645
      if (lastComparison != 0) {
15646
        return lastComparison;
15647
      }
15648
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15649
      if (lastComparison != 0) {
15650
        return lastComparison;
15651
      }
15652
      return 0;
15653
    }
15654
 
15655
    public void read(TProtocol iprot) throws TException {
15656
      TField field;
15657
      iprot.readStructBegin();
15658
      while (true)
15659
      {
15660
        field = iprot.readFieldBegin();
15661
        if (field.type == TType.STOP) { 
15662
          break;
15663
        }
15664
        _Fields fieldId = _Fields.findByThriftId(field.id);
15665
        if (fieldId == null) {
15666
          TProtocolUtil.skip(iprot, field.type);
15667
        } else {
15668
          switch (fieldId) {
15669
            case SUCCESS:
483 rajveer 15670
              if (field.type == TType.LIST) {
15671
                {
1382 varun.gupt 15672
                  TList _list32 = iprot.readListBegin();
15673
                  this.success = new ArrayList<Order>(_list32.size);
15674
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15675
                  {
1382 varun.gupt 15676
                    Order _elem34;
15677
                    _elem34 = new Order();
15678
                    _elem34.read(iprot);
15679
                    this.success.add(_elem34);
483 rajveer 15680
                  }
15681
                  iprot.readListEnd();
15682
                }
68 ashish 15683
              } else { 
15684
                TProtocolUtil.skip(iprot, field.type);
15685
              }
15686
              break;
15687
            case EX:
15688
              if (field.type == TType.STRUCT) {
15689
                this.ex = new TransactionServiceException();
15690
                this.ex.read(iprot);
15691
              } else { 
15692
                TProtocolUtil.skip(iprot, field.type);
15693
              }
15694
              break;
15695
          }
15696
          iprot.readFieldEnd();
15697
        }
15698
      }
15699
      iprot.readStructEnd();
15700
      validate();
15701
    }
15702
 
15703
    public void write(TProtocol oprot) throws TException {
15704
      oprot.writeStructBegin(STRUCT_DESC);
15705
 
15706
      if (this.isSetSuccess()) {
15707
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15708
        {
15709
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 15710
          for (Order _iter35 : this.success)
483 rajveer 15711
          {
1382 varun.gupt 15712
            _iter35.write(oprot);
483 rajveer 15713
          }
15714
          oprot.writeListEnd();
15715
        }
68 ashish 15716
        oprot.writeFieldEnd();
15717
      } else if (this.isSetEx()) {
15718
        oprot.writeFieldBegin(EX_FIELD_DESC);
15719
        this.ex.write(oprot);
15720
        oprot.writeFieldEnd();
15721
      }
15722
      oprot.writeFieldStop();
15723
      oprot.writeStructEnd();
15724
    }
15725
 
15726
    @Override
15727
    public String toString() {
483 rajveer 15728
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 15729
      boolean first = true;
15730
 
15731
      sb.append("success:");
483 rajveer 15732
      if (this.success == null) {
15733
        sb.append("null");
15734
      } else {
15735
        sb.append(this.success);
15736
      }
68 ashish 15737
      first = false;
15738
      if (!first) sb.append(", ");
15739
      sb.append("ex:");
15740
      if (this.ex == null) {
15741
        sb.append("null");
15742
      } else {
15743
        sb.append(this.ex);
15744
      }
15745
      first = false;
15746
      sb.append(")");
15747
      return sb.toString();
15748
    }
15749
 
15750
    public void validate() throws TException {
15751
      // check for required fields
15752
    }
15753
 
15754
  }
15755
 
483 rajveer 15756
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
15757
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 15758
 
483 rajveer 15759
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
15760
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
15761
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
15762
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 15763
 
483 rajveer 15764
    private long customerId;
15765
    private long from_date;
15766
    private long to_date;
15767
    private OrderStatus status;
68 ashish 15768
 
15769
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15770
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15771
      CUSTOMER_ID((short)1, "customerId"),
15772
      FROM_DATE((short)2, "from_date"),
15773
      TO_DATE((short)3, "to_date"),
15774
      /**
15775
       * 
15776
       * @see OrderStatus
15777
       */
15778
      STATUS((short)4, "status");
68 ashish 15779
 
15780
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15781
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15782
 
15783
      static {
15784
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15785
          byId.put((int)field._thriftId, field);
15786
          byName.put(field.getFieldName(), field);
15787
        }
15788
      }
15789
 
15790
      /**
15791
       * Find the _Fields constant that matches fieldId, or null if its not found.
15792
       */
15793
      public static _Fields findByThriftId(int fieldId) {
15794
        return byId.get(fieldId);
15795
      }
15796
 
15797
      /**
15798
       * Find the _Fields constant that matches fieldId, throwing an exception
15799
       * if it is not found.
15800
       */
15801
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15802
        _Fields fields = findByThriftId(fieldId);
15803
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15804
        return fields;
15805
      }
15806
 
15807
      /**
15808
       * Find the _Fields constant that matches name, or null if its not found.
15809
       */
15810
      public static _Fields findByName(String name) {
15811
        return byName.get(name);
15812
      }
15813
 
15814
      private final short _thriftId;
15815
      private final String _fieldName;
15816
 
15817
      _Fields(short thriftId, String fieldName) {
15818
        _thriftId = thriftId;
15819
        _fieldName = fieldName;
15820
      }
15821
 
15822
      public short getThriftFieldId() {
15823
        return _thriftId;
15824
      }
15825
 
15826
      public String getFieldName() {
15827
        return _fieldName;
15828
      }
15829
    }
15830
 
15831
    // isset id assignments
483 rajveer 15832
    private static final int __CUSTOMERID_ISSET_ID = 0;
15833
    private static final int __FROM_DATE_ISSET_ID = 1;
15834
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 15835
    private BitSet __isset_bit_vector = new BitSet(3);
15836
 
15837
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15838
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 15839
          new FieldValueMetaData(TType.I64)));
483 rajveer 15840
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 15841
          new FieldValueMetaData(TType.I64)));
483 rajveer 15842
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 15843
          new FieldValueMetaData(TType.I64)));
483 rajveer 15844
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15845
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 15846
    }});
15847
 
15848
    static {
483 rajveer 15849
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 15850
    }
15851
 
483 rajveer 15852
    public getOrdersForCustomer_args() {
68 ashish 15853
    }
15854
 
483 rajveer 15855
    public getOrdersForCustomer_args(
15856
      long customerId,
15857
      long from_date,
15858
      long to_date,
15859
      OrderStatus status)
68 ashish 15860
    {
15861
      this();
483 rajveer 15862
      this.customerId = customerId;
15863
      setCustomerIdIsSet(true);
15864
      this.from_date = from_date;
15865
      setFrom_dateIsSet(true);
15866
      this.to_date = to_date;
15867
      setTo_dateIsSet(true);
15868
      this.status = status;
68 ashish 15869
    }
15870
 
15871
    /**
15872
     * Performs a deep copy on <i>other</i>.
15873
     */
483 rajveer 15874
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 15875
      __isset_bit_vector.clear();
15876
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15877
      this.customerId = other.customerId;
15878
      this.from_date = other.from_date;
15879
      this.to_date = other.to_date;
15880
      if (other.isSetStatus()) {
15881
        this.status = other.status;
15882
      }
68 ashish 15883
    }
15884
 
483 rajveer 15885
    public getOrdersForCustomer_args deepCopy() {
15886
      return new getOrdersForCustomer_args(this);
68 ashish 15887
    }
15888
 
15889
    @Deprecated
483 rajveer 15890
    public getOrdersForCustomer_args clone() {
15891
      return new getOrdersForCustomer_args(this);
68 ashish 15892
    }
15893
 
483 rajveer 15894
    public long getCustomerId() {
15895
      return this.customerId;
68 ashish 15896
    }
15897
 
483 rajveer 15898
    public getOrdersForCustomer_args setCustomerId(long customerId) {
15899
      this.customerId = customerId;
15900
      setCustomerIdIsSet(true);
68 ashish 15901
      return this;
15902
    }
15903
 
483 rajveer 15904
    public void unsetCustomerId() {
15905
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 15906
    }
15907
 
483 rajveer 15908
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15909
    public boolean isSetCustomerId() {
15910
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 15911
    }
15912
 
483 rajveer 15913
    public void setCustomerIdIsSet(boolean value) {
15914
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 15915
    }
15916
 
483 rajveer 15917
    public long getFrom_date() {
15918
      return this.from_date;
68 ashish 15919
    }
15920
 
483 rajveer 15921
    public getOrdersForCustomer_args setFrom_date(long from_date) {
15922
      this.from_date = from_date;
15923
      setFrom_dateIsSet(true);
68 ashish 15924
      return this;
15925
    }
15926
 
483 rajveer 15927
    public void unsetFrom_date() {
15928
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 15929
    }
15930
 
483 rajveer 15931
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
15932
    public boolean isSetFrom_date() {
15933
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 15934
    }
15935
 
483 rajveer 15936
    public void setFrom_dateIsSet(boolean value) {
15937
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 15938
    }
15939
 
483 rajveer 15940
    public long getTo_date() {
15941
      return this.to_date;
68 ashish 15942
    }
15943
 
483 rajveer 15944
    public getOrdersForCustomer_args setTo_date(long to_date) {
15945
      this.to_date = to_date;
15946
      setTo_dateIsSet(true);
68 ashish 15947
      return this;
15948
    }
15949
 
483 rajveer 15950
    public void unsetTo_date() {
15951
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 15952
    }
15953
 
483 rajveer 15954
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
15955
    public boolean isSetTo_date() {
15956
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 15957
    }
15958
 
483 rajveer 15959
    public void setTo_dateIsSet(boolean value) {
15960
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 15961
    }
15962
 
483 rajveer 15963
    /**
15964
     * 
15965
     * @see OrderStatus
15966
     */
15967
    public OrderStatus getStatus() {
15968
      return this.status;
15969
    }
15970
 
15971
    /**
15972
     * 
15973
     * @see OrderStatus
15974
     */
15975
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
15976
      this.status = status;
15977
      return this;
15978
    }
15979
 
15980
    public void unsetStatus() {
15981
      this.status = null;
15982
    }
15983
 
15984
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
15985
    public boolean isSetStatus() {
15986
      return this.status != null;
15987
    }
15988
 
15989
    public void setStatusIsSet(boolean value) {
15990
      if (!value) {
15991
        this.status = null;
15992
      }
15993
    }
15994
 
68 ashish 15995
    public void setFieldValue(_Fields field, Object value) {
15996
      switch (field) {
483 rajveer 15997
      case CUSTOMER_ID:
68 ashish 15998
        if (value == null) {
483 rajveer 15999
          unsetCustomerId();
68 ashish 16000
        } else {
483 rajveer 16001
          setCustomerId((Long)value);
68 ashish 16002
        }
16003
        break;
16004
 
483 rajveer 16005
      case FROM_DATE:
68 ashish 16006
        if (value == null) {
483 rajveer 16007
          unsetFrom_date();
68 ashish 16008
        } else {
483 rajveer 16009
          setFrom_date((Long)value);
68 ashish 16010
        }
16011
        break;
16012
 
483 rajveer 16013
      case TO_DATE:
68 ashish 16014
        if (value == null) {
483 rajveer 16015
          unsetTo_date();
68 ashish 16016
        } else {
483 rajveer 16017
          setTo_date((Long)value);
68 ashish 16018
        }
16019
        break;
16020
 
483 rajveer 16021
      case STATUS:
16022
        if (value == null) {
16023
          unsetStatus();
16024
        } else {
16025
          setStatus((OrderStatus)value);
16026
        }
16027
        break;
16028
 
68 ashish 16029
      }
16030
    }
16031
 
16032
    public void setFieldValue(int fieldID, Object value) {
16033
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16034
    }
16035
 
16036
    public Object getFieldValue(_Fields field) {
16037
      switch (field) {
483 rajveer 16038
      case CUSTOMER_ID:
16039
        return new Long(getCustomerId());
68 ashish 16040
 
483 rajveer 16041
      case FROM_DATE:
16042
        return new Long(getFrom_date());
68 ashish 16043
 
483 rajveer 16044
      case TO_DATE:
16045
        return new Long(getTo_date());
68 ashish 16046
 
483 rajveer 16047
      case STATUS:
16048
        return getStatus();
16049
 
68 ashish 16050
      }
16051
      throw new IllegalStateException();
16052
    }
16053
 
16054
    public Object getFieldValue(int fieldId) {
16055
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16056
    }
16057
 
16058
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16059
    public boolean isSet(_Fields field) {
16060
      switch (field) {
483 rajveer 16061
      case CUSTOMER_ID:
16062
        return isSetCustomerId();
16063
      case FROM_DATE:
16064
        return isSetFrom_date();
16065
      case TO_DATE:
16066
        return isSetTo_date();
16067
      case STATUS:
16068
        return isSetStatus();
68 ashish 16069
      }
16070
      throw new IllegalStateException();
16071
    }
16072
 
16073
    public boolean isSet(int fieldID) {
16074
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16075
    }
16076
 
16077
    @Override
16078
    public boolean equals(Object that) {
16079
      if (that == null)
16080
        return false;
483 rajveer 16081
      if (that instanceof getOrdersForCustomer_args)
16082
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 16083
      return false;
16084
    }
16085
 
483 rajveer 16086
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 16087
      if (that == null)
16088
        return false;
16089
 
483 rajveer 16090
      boolean this_present_customerId = true;
16091
      boolean that_present_customerId = true;
16092
      if (this_present_customerId || that_present_customerId) {
16093
        if (!(this_present_customerId && that_present_customerId))
68 ashish 16094
          return false;
483 rajveer 16095
        if (this.customerId != that.customerId)
68 ashish 16096
          return false;
16097
      }
16098
 
483 rajveer 16099
      boolean this_present_from_date = true;
16100
      boolean that_present_from_date = true;
16101
      if (this_present_from_date || that_present_from_date) {
16102
        if (!(this_present_from_date && that_present_from_date))
68 ashish 16103
          return false;
483 rajveer 16104
        if (this.from_date != that.from_date)
68 ashish 16105
          return false;
16106
      }
16107
 
483 rajveer 16108
      boolean this_present_to_date = true;
16109
      boolean that_present_to_date = true;
16110
      if (this_present_to_date || that_present_to_date) {
16111
        if (!(this_present_to_date && that_present_to_date))
68 ashish 16112
          return false;
483 rajveer 16113
        if (this.to_date != that.to_date)
68 ashish 16114
          return false;
16115
      }
16116
 
483 rajveer 16117
      boolean this_present_status = true && this.isSetStatus();
16118
      boolean that_present_status = true && that.isSetStatus();
16119
      if (this_present_status || that_present_status) {
16120
        if (!(this_present_status && that_present_status))
16121
          return false;
16122
        if (!this.status.equals(that.status))
16123
          return false;
16124
      }
16125
 
68 ashish 16126
      return true;
16127
    }
16128
 
16129
    @Override
16130
    public int hashCode() {
16131
      return 0;
16132
    }
16133
 
483 rajveer 16134
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 16135
      if (!getClass().equals(other.getClass())) {
16136
        return getClass().getName().compareTo(other.getClass().getName());
16137
      }
16138
 
16139
      int lastComparison = 0;
483 rajveer 16140
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 16141
 
483 rajveer 16142
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 16143
      if (lastComparison != 0) {
16144
        return lastComparison;
16145
      }
483 rajveer 16146
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 16147
      if (lastComparison != 0) {
16148
        return lastComparison;
16149
      }
483 rajveer 16150
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 16151
      if (lastComparison != 0) {
16152
        return lastComparison;
16153
      }
483 rajveer 16154
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 16155
      if (lastComparison != 0) {
16156
        return lastComparison;
16157
      }
483 rajveer 16158
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 16159
      if (lastComparison != 0) {
16160
        return lastComparison;
16161
      }
483 rajveer 16162
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 16163
      if (lastComparison != 0) {
16164
        return lastComparison;
16165
      }
483 rajveer 16166
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16167
      if (lastComparison != 0) {
16168
        return lastComparison;
16169
      }
16170
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16171
      if (lastComparison != 0) {
16172
        return lastComparison;
16173
      }
68 ashish 16174
      return 0;
16175
    }
16176
 
16177
    public void read(TProtocol iprot) throws TException {
16178
      TField field;
16179
      iprot.readStructBegin();
16180
      while (true)
16181
      {
16182
        field = iprot.readFieldBegin();
16183
        if (field.type == TType.STOP) { 
16184
          break;
16185
        }
16186
        _Fields fieldId = _Fields.findByThriftId(field.id);
16187
        if (fieldId == null) {
16188
          TProtocolUtil.skip(iprot, field.type);
16189
        } else {
16190
          switch (fieldId) {
483 rajveer 16191
            case CUSTOMER_ID:
68 ashish 16192
              if (field.type == TType.I64) {
483 rajveer 16193
                this.customerId = iprot.readI64();
16194
                setCustomerIdIsSet(true);
68 ashish 16195
              } else { 
16196
                TProtocolUtil.skip(iprot, field.type);
16197
              }
16198
              break;
483 rajveer 16199
            case FROM_DATE:
68 ashish 16200
              if (field.type == TType.I64) {
483 rajveer 16201
                this.from_date = iprot.readI64();
16202
                setFrom_dateIsSet(true);
68 ashish 16203
              } else { 
16204
                TProtocolUtil.skip(iprot, field.type);
16205
              }
16206
              break;
483 rajveer 16207
            case TO_DATE:
68 ashish 16208
              if (field.type == TType.I64) {
483 rajveer 16209
                this.to_date = iprot.readI64();
16210
                setTo_dateIsSet(true);
68 ashish 16211
              } else { 
16212
                TProtocolUtil.skip(iprot, field.type);
16213
              }
16214
              break;
483 rajveer 16215
            case STATUS:
16216
              if (field.type == TType.I32) {
16217
                this.status = OrderStatus.findByValue(iprot.readI32());
16218
              } else { 
16219
                TProtocolUtil.skip(iprot, field.type);
16220
              }
16221
              break;
68 ashish 16222
          }
16223
          iprot.readFieldEnd();
16224
        }
16225
      }
16226
      iprot.readStructEnd();
16227
      validate();
16228
    }
16229
 
16230
    public void write(TProtocol oprot) throws TException {
16231
      validate();
16232
 
16233
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16234
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16235
      oprot.writeI64(this.customerId);
68 ashish 16236
      oprot.writeFieldEnd();
483 rajveer 16237
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
16238
      oprot.writeI64(this.from_date);
68 ashish 16239
      oprot.writeFieldEnd();
483 rajveer 16240
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
16241
      oprot.writeI64(this.to_date);
68 ashish 16242
      oprot.writeFieldEnd();
483 rajveer 16243
      if (this.status != null) {
16244
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16245
        oprot.writeI32(this.status.getValue());
16246
        oprot.writeFieldEnd();
16247
      }
68 ashish 16248
      oprot.writeFieldStop();
16249
      oprot.writeStructEnd();
16250
    }
16251
 
16252
    @Override
16253
    public String toString() {
483 rajveer 16254
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 16255
      boolean first = true;
16256
 
483 rajveer 16257
      sb.append("customerId:");
16258
      sb.append(this.customerId);
68 ashish 16259
      first = false;
16260
      if (!first) sb.append(", ");
483 rajveer 16261
      sb.append("from_date:");
16262
      sb.append(this.from_date);
68 ashish 16263
      first = false;
16264
      if (!first) sb.append(", ");
483 rajveer 16265
      sb.append("to_date:");
16266
      sb.append(this.to_date);
68 ashish 16267
      first = false;
483 rajveer 16268
      if (!first) sb.append(", ");
16269
      sb.append("status:");
16270
      if (this.status == null) {
16271
        sb.append("null");
16272
      } else {
16273
        String status_name = status.name();
16274
        if (status_name != null) {
16275
          sb.append(status_name);
16276
          sb.append(" (");
16277
        }
16278
        sb.append(this.status);
16279
        if (status_name != null) {
16280
          sb.append(")");
16281
        }
16282
      }
16283
      first = false;
68 ashish 16284
      sb.append(")");
16285
      return sb.toString();
16286
    }
16287
 
16288
    public void validate() throws TException {
16289
      // check for required fields
16290
    }
16291
 
16292
  }
16293
 
483 rajveer 16294
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
16295
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 16296
 
483 rajveer 16297
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16298
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16299
 
483 rajveer 16300
    private List<Order> success;
68 ashish 16301
    private TransactionServiceException ex;
16302
 
16303
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16304
    public enum _Fields implements TFieldIdEnum {
16305
      SUCCESS((short)0, "success"),
16306
      EX((short)1, "ex");
16307
 
16308
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16309
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16310
 
16311
      static {
16312
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16313
          byId.put((int)field._thriftId, field);
16314
          byName.put(field.getFieldName(), field);
16315
        }
16316
      }
16317
 
16318
      /**
16319
       * Find the _Fields constant that matches fieldId, or null if its not found.
16320
       */
16321
      public static _Fields findByThriftId(int fieldId) {
16322
        return byId.get(fieldId);
16323
      }
16324
 
16325
      /**
16326
       * Find the _Fields constant that matches fieldId, throwing an exception
16327
       * if it is not found.
16328
       */
16329
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16330
        _Fields fields = findByThriftId(fieldId);
16331
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16332
        return fields;
16333
      }
16334
 
16335
      /**
16336
       * Find the _Fields constant that matches name, or null if its not found.
16337
       */
16338
      public static _Fields findByName(String name) {
16339
        return byName.get(name);
16340
      }
16341
 
16342
      private final short _thriftId;
16343
      private final String _fieldName;
16344
 
16345
      _Fields(short thriftId, String fieldName) {
16346
        _thriftId = thriftId;
16347
        _fieldName = fieldName;
16348
      }
16349
 
16350
      public short getThriftFieldId() {
16351
        return _thriftId;
16352
      }
16353
 
16354
      public String getFieldName() {
16355
        return _fieldName;
16356
      }
16357
    }
16358
 
16359
    // isset id assignments
16360
 
16361
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16362
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16363
          new ListMetaData(TType.LIST, 
16364
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16365
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16366
          new FieldValueMetaData(TType.STRUCT)));
16367
    }});
16368
 
16369
    static {
483 rajveer 16370
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16371
    }
16372
 
483 rajveer 16373
    public getOrdersForCustomer_result() {
68 ashish 16374
    }
16375
 
483 rajveer 16376
    public getOrdersForCustomer_result(
16377
      List<Order> success,
68 ashish 16378
      TransactionServiceException ex)
16379
    {
16380
      this();
16381
      this.success = success;
16382
      this.ex = ex;
16383
    }
16384
 
16385
    /**
16386
     * Performs a deep copy on <i>other</i>.
16387
     */
483 rajveer 16388
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16389
      if (other.isSetSuccess()) {
16390
        List<Order> __this__success = new ArrayList<Order>();
16391
        for (Order other_element : other.success) {
16392
          __this__success.add(new Order(other_element));
16393
        }
16394
        this.success = __this__success;
16395
      }
68 ashish 16396
      if (other.isSetEx()) {
16397
        this.ex = new TransactionServiceException(other.ex);
16398
      }
16399
    }
16400
 
483 rajveer 16401
    public getOrdersForCustomer_result deepCopy() {
16402
      return new getOrdersForCustomer_result(this);
68 ashish 16403
    }
16404
 
16405
    @Deprecated
483 rajveer 16406
    public getOrdersForCustomer_result clone() {
16407
      return new getOrdersForCustomer_result(this);
68 ashish 16408
    }
16409
 
483 rajveer 16410
    public int getSuccessSize() {
16411
      return (this.success == null) ? 0 : this.success.size();
16412
    }
16413
 
16414
    public java.util.Iterator<Order> getSuccessIterator() {
16415
      return (this.success == null) ? null : this.success.iterator();
16416
    }
16417
 
16418
    public void addToSuccess(Order elem) {
16419
      if (this.success == null) {
16420
        this.success = new ArrayList<Order>();
16421
      }
16422
      this.success.add(elem);
16423
    }
16424
 
16425
    public List<Order> getSuccess() {
68 ashish 16426
      return this.success;
16427
    }
16428
 
483 rajveer 16429
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16430
      this.success = success;
16431
      return this;
16432
    }
16433
 
16434
    public void unsetSuccess() {
483 rajveer 16435
      this.success = null;
68 ashish 16436
    }
16437
 
16438
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16439
    public boolean isSetSuccess() {
483 rajveer 16440
      return this.success != null;
68 ashish 16441
    }
16442
 
16443
    public void setSuccessIsSet(boolean value) {
483 rajveer 16444
      if (!value) {
16445
        this.success = null;
16446
      }
68 ashish 16447
    }
16448
 
16449
    public TransactionServiceException getEx() {
16450
      return this.ex;
16451
    }
16452
 
483 rajveer 16453
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16454
      this.ex = ex;
16455
      return this;
16456
    }
16457
 
16458
    public void unsetEx() {
16459
      this.ex = null;
16460
    }
16461
 
16462
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16463
    public boolean isSetEx() {
16464
      return this.ex != null;
16465
    }
16466
 
16467
    public void setExIsSet(boolean value) {
16468
      if (!value) {
16469
        this.ex = null;
16470
      }
16471
    }
16472
 
16473
    public void setFieldValue(_Fields field, Object value) {
16474
      switch (field) {
16475
      case SUCCESS:
16476
        if (value == null) {
16477
          unsetSuccess();
16478
        } else {
483 rajveer 16479
          setSuccess((List<Order>)value);
68 ashish 16480
        }
16481
        break;
16482
 
16483
      case EX:
16484
        if (value == null) {
16485
          unsetEx();
16486
        } else {
16487
          setEx((TransactionServiceException)value);
16488
        }
16489
        break;
16490
 
16491
      }
16492
    }
16493
 
16494
    public void setFieldValue(int fieldID, Object value) {
16495
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16496
    }
16497
 
16498
    public Object getFieldValue(_Fields field) {
16499
      switch (field) {
16500
      case SUCCESS:
483 rajveer 16501
        return getSuccess();
68 ashish 16502
 
16503
      case EX:
16504
        return getEx();
16505
 
16506
      }
16507
      throw new IllegalStateException();
16508
    }
16509
 
16510
    public Object getFieldValue(int fieldId) {
16511
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16512
    }
16513
 
16514
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16515
    public boolean isSet(_Fields field) {
16516
      switch (field) {
16517
      case SUCCESS:
16518
        return isSetSuccess();
16519
      case EX:
16520
        return isSetEx();
16521
      }
16522
      throw new IllegalStateException();
16523
    }
16524
 
16525
    public boolean isSet(int fieldID) {
16526
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16527
    }
16528
 
16529
    @Override
16530
    public boolean equals(Object that) {
16531
      if (that == null)
16532
        return false;
483 rajveer 16533
      if (that instanceof getOrdersForCustomer_result)
16534
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16535
      return false;
16536
    }
16537
 
483 rajveer 16538
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16539
      if (that == null)
16540
        return false;
16541
 
483 rajveer 16542
      boolean this_present_success = true && this.isSetSuccess();
16543
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16544
      if (this_present_success || that_present_success) {
16545
        if (!(this_present_success && that_present_success))
16546
          return false;
483 rajveer 16547
        if (!this.success.equals(that.success))
68 ashish 16548
          return false;
16549
      }
16550
 
16551
      boolean this_present_ex = true && this.isSetEx();
16552
      boolean that_present_ex = true && that.isSetEx();
16553
      if (this_present_ex || that_present_ex) {
16554
        if (!(this_present_ex && that_present_ex))
16555
          return false;
16556
        if (!this.ex.equals(that.ex))
16557
          return false;
16558
      }
16559
 
16560
      return true;
16561
    }
16562
 
16563
    @Override
16564
    public int hashCode() {
16565
      return 0;
16566
    }
16567
 
483 rajveer 16568
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 16569
      if (!getClass().equals(other.getClass())) {
16570
        return getClass().getName().compareTo(other.getClass().getName());
16571
      }
16572
 
16573
      int lastComparison = 0;
483 rajveer 16574
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 16575
 
16576
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16577
      if (lastComparison != 0) {
16578
        return lastComparison;
16579
      }
16580
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16581
      if (lastComparison != 0) {
16582
        return lastComparison;
16583
      }
16584
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16585
      if (lastComparison != 0) {
16586
        return lastComparison;
16587
      }
16588
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16589
      if (lastComparison != 0) {
16590
        return lastComparison;
16591
      }
16592
      return 0;
16593
    }
16594
 
16595
    public void read(TProtocol iprot) throws TException {
16596
      TField field;
16597
      iprot.readStructBegin();
16598
      while (true)
16599
      {
16600
        field = iprot.readFieldBegin();
16601
        if (field.type == TType.STOP) { 
16602
          break;
16603
        }
16604
        _Fields fieldId = _Fields.findByThriftId(field.id);
16605
        if (fieldId == null) {
16606
          TProtocolUtil.skip(iprot, field.type);
16607
        } else {
16608
          switch (fieldId) {
16609
            case SUCCESS:
483 rajveer 16610
              if (field.type == TType.LIST) {
16611
                {
1382 varun.gupt 16612
                  TList _list36 = iprot.readListBegin();
16613
                  this.success = new ArrayList<Order>(_list36.size);
16614
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 16615
                  {
1382 varun.gupt 16616
                    Order _elem38;
16617
                    _elem38 = new Order();
16618
                    _elem38.read(iprot);
16619
                    this.success.add(_elem38);
483 rajveer 16620
                  }
16621
                  iprot.readListEnd();
16622
                }
68 ashish 16623
              } else { 
16624
                TProtocolUtil.skip(iprot, field.type);
16625
              }
16626
              break;
16627
            case EX:
16628
              if (field.type == TType.STRUCT) {
16629
                this.ex = new TransactionServiceException();
16630
                this.ex.read(iprot);
16631
              } else { 
16632
                TProtocolUtil.skip(iprot, field.type);
16633
              }
16634
              break;
16635
          }
16636
          iprot.readFieldEnd();
16637
        }
16638
      }
16639
      iprot.readStructEnd();
16640
      validate();
16641
    }
16642
 
16643
    public void write(TProtocol oprot) throws TException {
16644
      oprot.writeStructBegin(STRUCT_DESC);
16645
 
16646
      if (this.isSetSuccess()) {
16647
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16648
        {
16649
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16650
          for (Order _iter39 : this.success)
483 rajveer 16651
          {
1382 varun.gupt 16652
            _iter39.write(oprot);
483 rajveer 16653
          }
16654
          oprot.writeListEnd();
16655
        }
68 ashish 16656
        oprot.writeFieldEnd();
16657
      } else if (this.isSetEx()) {
16658
        oprot.writeFieldBegin(EX_FIELD_DESC);
16659
        this.ex.write(oprot);
16660
        oprot.writeFieldEnd();
16661
      }
16662
      oprot.writeFieldStop();
16663
      oprot.writeStructEnd();
16664
    }
16665
 
16666
    @Override
16667
    public String toString() {
483 rajveer 16668
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 16669
      boolean first = true;
16670
 
16671
      sb.append("success:");
483 rajveer 16672
      if (this.success == null) {
16673
        sb.append("null");
16674
      } else {
16675
        sb.append(this.success);
16676
      }
68 ashish 16677
      first = false;
16678
      if (!first) sb.append(", ");
16679
      sb.append("ex:");
16680
      if (this.ex == null) {
16681
        sb.append("null");
16682
      } else {
16683
        sb.append(this.ex);
16684
      }
16685
      first = false;
16686
      sb.append(")");
16687
      return sb.toString();
16688
    }
16689
 
16690
    public void validate() throws TException {
16691
      // check for required fields
16692
    }
16693
 
16694
  }
16695
 
483 rajveer 16696
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
16697
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 16698
 
483 rajveer 16699
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 16700
 
483 rajveer 16701
    private Order order;
68 ashish 16702
 
16703
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16704
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16705
      ORDER((short)1, "order");
68 ashish 16706
 
16707
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16708
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16709
 
16710
      static {
16711
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16712
          byId.put((int)field._thriftId, field);
16713
          byName.put(field.getFieldName(), field);
16714
        }
16715
      }
16716
 
16717
      /**
16718
       * Find the _Fields constant that matches fieldId, or null if its not found.
16719
       */
16720
      public static _Fields findByThriftId(int fieldId) {
16721
        return byId.get(fieldId);
16722
      }
16723
 
16724
      /**
16725
       * Find the _Fields constant that matches fieldId, throwing an exception
16726
       * if it is not found.
16727
       */
16728
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16729
        _Fields fields = findByThriftId(fieldId);
16730
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16731
        return fields;
16732
      }
16733
 
16734
      /**
16735
       * Find the _Fields constant that matches name, or null if its not found.
16736
       */
16737
      public static _Fields findByName(String name) {
16738
        return byName.get(name);
16739
      }
16740
 
16741
      private final short _thriftId;
16742
      private final String _fieldName;
16743
 
16744
      _Fields(short thriftId, String fieldName) {
16745
        _thriftId = thriftId;
16746
        _fieldName = fieldName;
16747
      }
16748
 
16749
      public short getThriftFieldId() {
16750
        return _thriftId;
16751
      }
16752
 
16753
      public String getFieldName() {
16754
        return _fieldName;
16755
      }
16756
    }
16757
 
16758
    // isset id assignments
16759
 
16760
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16761
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
16762
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 16763
    }});
16764
 
16765
    static {
483 rajveer 16766
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 16767
    }
16768
 
483 rajveer 16769
    public createOrder_args() {
68 ashish 16770
    }
16771
 
483 rajveer 16772
    public createOrder_args(
16773
      Order order)
68 ashish 16774
    {
16775
      this();
483 rajveer 16776
      this.order = order;
68 ashish 16777
    }
16778
 
16779
    /**
16780
     * Performs a deep copy on <i>other</i>.
16781
     */
483 rajveer 16782
    public createOrder_args(createOrder_args other) {
16783
      if (other.isSetOrder()) {
16784
        this.order = new Order(other.order);
16785
      }
68 ashish 16786
    }
16787
 
483 rajveer 16788
    public createOrder_args deepCopy() {
16789
      return new createOrder_args(this);
68 ashish 16790
    }
16791
 
16792
    @Deprecated
483 rajveer 16793
    public createOrder_args clone() {
16794
      return new createOrder_args(this);
68 ashish 16795
    }
16796
 
483 rajveer 16797
    public Order getOrder() {
16798
      return this.order;
68 ashish 16799
    }
16800
 
483 rajveer 16801
    public createOrder_args setOrder(Order order) {
16802
      this.order = order;
68 ashish 16803
      return this;
16804
    }
16805
 
483 rajveer 16806
    public void unsetOrder() {
16807
      this.order = null;
68 ashish 16808
    }
16809
 
483 rajveer 16810
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
16811
    public boolean isSetOrder() {
16812
      return this.order != null;
68 ashish 16813
    }
16814
 
483 rajveer 16815
    public void setOrderIsSet(boolean value) {
16816
      if (!value) {
16817
        this.order = null;
16818
      }
68 ashish 16819
    }
16820
 
16821
    public void setFieldValue(_Fields field, Object value) {
16822
      switch (field) {
483 rajveer 16823
      case ORDER:
68 ashish 16824
        if (value == null) {
483 rajveer 16825
          unsetOrder();
68 ashish 16826
        } else {
483 rajveer 16827
          setOrder((Order)value);
68 ashish 16828
        }
16829
        break;
16830
 
16831
      }
16832
    }
16833
 
16834
    public void setFieldValue(int fieldID, Object value) {
16835
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16836
    }
16837
 
16838
    public Object getFieldValue(_Fields field) {
16839
      switch (field) {
483 rajveer 16840
      case ORDER:
16841
        return getOrder();
68 ashish 16842
 
16843
      }
16844
      throw new IllegalStateException();
16845
    }
16846
 
16847
    public Object getFieldValue(int fieldId) {
16848
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16849
    }
16850
 
16851
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16852
    public boolean isSet(_Fields field) {
16853
      switch (field) {
483 rajveer 16854
      case ORDER:
16855
        return isSetOrder();
68 ashish 16856
      }
16857
      throw new IllegalStateException();
16858
    }
16859
 
16860
    public boolean isSet(int fieldID) {
16861
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16862
    }
16863
 
16864
    @Override
16865
    public boolean equals(Object that) {
16866
      if (that == null)
16867
        return false;
483 rajveer 16868
      if (that instanceof createOrder_args)
16869
        return this.equals((createOrder_args)that);
68 ashish 16870
      return false;
16871
    }
16872
 
483 rajveer 16873
    public boolean equals(createOrder_args that) {
68 ashish 16874
      if (that == null)
16875
        return false;
16876
 
483 rajveer 16877
      boolean this_present_order = true && this.isSetOrder();
16878
      boolean that_present_order = true && that.isSetOrder();
16879
      if (this_present_order || that_present_order) {
16880
        if (!(this_present_order && that_present_order))
68 ashish 16881
          return false;
483 rajveer 16882
        if (!this.order.equals(that.order))
68 ashish 16883
          return false;
16884
      }
16885
 
16886
      return true;
16887
    }
16888
 
16889
    @Override
16890
    public int hashCode() {
16891
      return 0;
16892
    }
16893
 
483 rajveer 16894
    public int compareTo(createOrder_args other) {
68 ashish 16895
      if (!getClass().equals(other.getClass())) {
16896
        return getClass().getName().compareTo(other.getClass().getName());
16897
      }
16898
 
16899
      int lastComparison = 0;
483 rajveer 16900
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 16901
 
483 rajveer 16902
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 16903
      if (lastComparison != 0) {
16904
        return lastComparison;
16905
      }
483 rajveer 16906
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 16907
      if (lastComparison != 0) {
16908
        return lastComparison;
16909
      }
16910
      return 0;
16911
    }
16912
 
16913
    public void read(TProtocol iprot) throws TException {
16914
      TField field;
16915
      iprot.readStructBegin();
16916
      while (true)
16917
      {
16918
        field = iprot.readFieldBegin();
16919
        if (field.type == TType.STOP) { 
16920
          break;
16921
        }
16922
        _Fields fieldId = _Fields.findByThriftId(field.id);
16923
        if (fieldId == null) {
16924
          TProtocolUtil.skip(iprot, field.type);
16925
        } else {
16926
          switch (fieldId) {
483 rajveer 16927
            case ORDER:
16928
              if (field.type == TType.STRUCT) {
16929
                this.order = new Order();
16930
                this.order.read(iprot);
68 ashish 16931
              } else { 
16932
                TProtocolUtil.skip(iprot, field.type);
16933
              }
16934
              break;
16935
          }
16936
          iprot.readFieldEnd();
16937
        }
16938
      }
16939
      iprot.readStructEnd();
16940
      validate();
16941
    }
16942
 
16943
    public void write(TProtocol oprot) throws TException {
16944
      validate();
16945
 
16946
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16947
      if (this.order != null) {
16948
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
16949
        this.order.write(oprot);
16950
        oprot.writeFieldEnd();
16951
      }
68 ashish 16952
      oprot.writeFieldStop();
16953
      oprot.writeStructEnd();
16954
    }
16955
 
16956
    @Override
16957
    public String toString() {
483 rajveer 16958
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 16959
      boolean first = true;
16960
 
483 rajveer 16961
      sb.append("order:");
16962
      if (this.order == null) {
16963
        sb.append("null");
16964
      } else {
16965
        sb.append(this.order);
16966
      }
68 ashish 16967
      first = false;
16968
      sb.append(")");
16969
      return sb.toString();
16970
    }
16971
 
16972
    public void validate() throws TException {
16973
      // check for required fields
16974
    }
16975
 
16976
  }
16977
 
483 rajveer 16978
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
16979
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 16980
 
483 rajveer 16981
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 16982
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16983
 
483 rajveer 16984
    private long success;
68 ashish 16985
    private TransactionServiceException ex;
16986
 
16987
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16988
    public enum _Fields implements TFieldIdEnum {
16989
      SUCCESS((short)0, "success"),
16990
      EX((short)1, "ex");
16991
 
16992
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16993
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16994
 
16995
      static {
16996
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16997
          byId.put((int)field._thriftId, field);
16998
          byName.put(field.getFieldName(), field);
16999
        }
17000
      }
17001
 
17002
      /**
17003
       * Find the _Fields constant that matches fieldId, or null if its not found.
17004
       */
17005
      public static _Fields findByThriftId(int fieldId) {
17006
        return byId.get(fieldId);
17007
      }
17008
 
17009
      /**
17010
       * Find the _Fields constant that matches fieldId, throwing an exception
17011
       * if it is not found.
17012
       */
17013
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17014
        _Fields fields = findByThriftId(fieldId);
17015
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17016
        return fields;
17017
      }
17018
 
17019
      /**
17020
       * Find the _Fields constant that matches name, or null if its not found.
17021
       */
17022
      public static _Fields findByName(String name) {
17023
        return byName.get(name);
17024
      }
17025
 
17026
      private final short _thriftId;
17027
      private final String _fieldName;
17028
 
17029
      _Fields(short thriftId, String fieldName) {
17030
        _thriftId = thriftId;
17031
        _fieldName = fieldName;
17032
      }
17033
 
17034
      public short getThriftFieldId() {
17035
        return _thriftId;
17036
      }
17037
 
17038
      public String getFieldName() {
17039
        return _fieldName;
17040
      }
17041
    }
17042
 
17043
    // isset id assignments
17044
    private static final int __SUCCESS_ISSET_ID = 0;
17045
    private BitSet __isset_bit_vector = new BitSet(1);
17046
 
17047
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17048
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17049
          new FieldValueMetaData(TType.I64)));
68 ashish 17050
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17051
          new FieldValueMetaData(TType.STRUCT)));
17052
    }});
17053
 
17054
    static {
483 rajveer 17055
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 17056
    }
17057
 
483 rajveer 17058
    public createOrder_result() {
68 ashish 17059
    }
17060
 
483 rajveer 17061
    public createOrder_result(
17062
      long success,
68 ashish 17063
      TransactionServiceException ex)
17064
    {
17065
      this();
17066
      this.success = success;
17067
      setSuccessIsSet(true);
17068
      this.ex = ex;
17069
    }
17070
 
17071
    /**
17072
     * Performs a deep copy on <i>other</i>.
17073
     */
483 rajveer 17074
    public createOrder_result(createOrder_result other) {
68 ashish 17075
      __isset_bit_vector.clear();
17076
      __isset_bit_vector.or(other.__isset_bit_vector);
17077
      this.success = other.success;
17078
      if (other.isSetEx()) {
17079
        this.ex = new TransactionServiceException(other.ex);
17080
      }
17081
    }
17082
 
483 rajveer 17083
    public createOrder_result deepCopy() {
17084
      return new createOrder_result(this);
68 ashish 17085
    }
17086
 
17087
    @Deprecated
483 rajveer 17088
    public createOrder_result clone() {
17089
      return new createOrder_result(this);
68 ashish 17090
    }
17091
 
483 rajveer 17092
    public long getSuccess() {
68 ashish 17093
      return this.success;
17094
    }
17095
 
483 rajveer 17096
    public createOrder_result setSuccess(long success) {
68 ashish 17097
      this.success = success;
17098
      setSuccessIsSet(true);
17099
      return this;
17100
    }
17101
 
17102
    public void unsetSuccess() {
17103
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17104
    }
17105
 
17106
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17107
    public boolean isSetSuccess() {
17108
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17109
    }
17110
 
17111
    public void setSuccessIsSet(boolean value) {
17112
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17113
    }
17114
 
17115
    public TransactionServiceException getEx() {
17116
      return this.ex;
17117
    }
17118
 
483 rajveer 17119
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 17120
      this.ex = ex;
17121
      return this;
17122
    }
17123
 
17124
    public void unsetEx() {
17125
      this.ex = null;
17126
    }
17127
 
17128
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17129
    public boolean isSetEx() {
17130
      return this.ex != null;
17131
    }
17132
 
17133
    public void setExIsSet(boolean value) {
17134
      if (!value) {
17135
        this.ex = null;
17136
      }
17137
    }
17138
 
17139
    public void setFieldValue(_Fields field, Object value) {
17140
      switch (field) {
17141
      case SUCCESS:
17142
        if (value == null) {
17143
          unsetSuccess();
17144
        } else {
483 rajveer 17145
          setSuccess((Long)value);
68 ashish 17146
        }
17147
        break;
17148
 
17149
      case EX:
17150
        if (value == null) {
17151
          unsetEx();
17152
        } else {
17153
          setEx((TransactionServiceException)value);
17154
        }
17155
        break;
17156
 
17157
      }
17158
    }
17159
 
17160
    public void setFieldValue(int fieldID, Object value) {
17161
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17162
    }
17163
 
17164
    public Object getFieldValue(_Fields field) {
17165
      switch (field) {
17166
      case SUCCESS:
483 rajveer 17167
        return new Long(getSuccess());
68 ashish 17168
 
17169
      case EX:
17170
        return getEx();
17171
 
17172
      }
17173
      throw new IllegalStateException();
17174
    }
17175
 
17176
    public Object getFieldValue(int fieldId) {
17177
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17178
    }
17179
 
17180
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17181
    public boolean isSet(_Fields field) {
17182
      switch (field) {
17183
      case SUCCESS:
17184
        return isSetSuccess();
17185
      case EX:
17186
        return isSetEx();
17187
      }
17188
      throw new IllegalStateException();
17189
    }
17190
 
17191
    public boolean isSet(int fieldID) {
17192
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17193
    }
17194
 
17195
    @Override
17196
    public boolean equals(Object that) {
17197
      if (that == null)
17198
        return false;
483 rajveer 17199
      if (that instanceof createOrder_result)
17200
        return this.equals((createOrder_result)that);
68 ashish 17201
      return false;
17202
    }
17203
 
483 rajveer 17204
    public boolean equals(createOrder_result that) {
68 ashish 17205
      if (that == null)
17206
        return false;
17207
 
17208
      boolean this_present_success = true;
17209
      boolean that_present_success = true;
17210
      if (this_present_success || that_present_success) {
17211
        if (!(this_present_success && that_present_success))
17212
          return false;
17213
        if (this.success != that.success)
17214
          return false;
17215
      }
17216
 
17217
      boolean this_present_ex = true && this.isSetEx();
17218
      boolean that_present_ex = true && that.isSetEx();
17219
      if (this_present_ex || that_present_ex) {
17220
        if (!(this_present_ex && that_present_ex))
17221
          return false;
17222
        if (!this.ex.equals(that.ex))
17223
          return false;
17224
      }
17225
 
17226
      return true;
17227
    }
17228
 
17229
    @Override
17230
    public int hashCode() {
17231
      return 0;
17232
    }
17233
 
483 rajveer 17234
    public int compareTo(createOrder_result other) {
68 ashish 17235
      if (!getClass().equals(other.getClass())) {
17236
        return getClass().getName().compareTo(other.getClass().getName());
17237
      }
17238
 
17239
      int lastComparison = 0;
483 rajveer 17240
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 17241
 
17242
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17243
      if (lastComparison != 0) {
17244
        return lastComparison;
17245
      }
17246
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17247
      if (lastComparison != 0) {
17248
        return lastComparison;
17249
      }
17250
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17251
      if (lastComparison != 0) {
17252
        return lastComparison;
17253
      }
17254
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17255
      if (lastComparison != 0) {
17256
        return lastComparison;
17257
      }
17258
      return 0;
17259
    }
17260
 
17261
    public void read(TProtocol iprot) throws TException {
17262
      TField field;
17263
      iprot.readStructBegin();
17264
      while (true)
17265
      {
17266
        field = iprot.readFieldBegin();
17267
        if (field.type == TType.STOP) { 
17268
          break;
17269
        }
17270
        _Fields fieldId = _Fields.findByThriftId(field.id);
17271
        if (fieldId == null) {
17272
          TProtocolUtil.skip(iprot, field.type);
17273
        } else {
17274
          switch (fieldId) {
17275
            case SUCCESS:
483 rajveer 17276
              if (field.type == TType.I64) {
17277
                this.success = iprot.readI64();
68 ashish 17278
                setSuccessIsSet(true);
17279
              } else { 
17280
                TProtocolUtil.skip(iprot, field.type);
17281
              }
17282
              break;
17283
            case EX:
17284
              if (field.type == TType.STRUCT) {
17285
                this.ex = new TransactionServiceException();
17286
                this.ex.read(iprot);
17287
              } else { 
17288
                TProtocolUtil.skip(iprot, field.type);
17289
              }
17290
              break;
17291
          }
17292
          iprot.readFieldEnd();
17293
        }
17294
      }
17295
      iprot.readStructEnd();
17296
      validate();
17297
    }
17298
 
17299
    public void write(TProtocol oprot) throws TException {
17300
      oprot.writeStructBegin(STRUCT_DESC);
17301
 
17302
      if (this.isSetSuccess()) {
17303
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17304
        oprot.writeI64(this.success);
68 ashish 17305
        oprot.writeFieldEnd();
17306
      } else if (this.isSetEx()) {
17307
        oprot.writeFieldBegin(EX_FIELD_DESC);
17308
        this.ex.write(oprot);
17309
        oprot.writeFieldEnd();
17310
      }
17311
      oprot.writeFieldStop();
17312
      oprot.writeStructEnd();
17313
    }
17314
 
17315
    @Override
17316
    public String toString() {
483 rajveer 17317
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 17318
      boolean first = true;
17319
 
17320
      sb.append("success:");
17321
      sb.append(this.success);
17322
      first = false;
17323
      if (!first) sb.append(", ");
17324
      sb.append("ex:");
17325
      if (this.ex == null) {
17326
        sb.append("null");
17327
      } else {
17328
        sb.append(this.ex);
17329
      }
17330
      first = false;
17331
      sb.append(")");
17332
      return sb.toString();
17333
    }
17334
 
17335
    public void validate() throws TException {
17336
      // check for required fields
17337
    }
17338
 
17339
  }
17340
 
483 rajveer 17341
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17342
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17343
 
483 rajveer 17344
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17345
 
483 rajveer 17346
    private long id;
68 ashish 17347
 
17348
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17349
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17350
      ID((short)1, "id");
68 ashish 17351
 
17352
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17353
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17354
 
17355
      static {
17356
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17357
          byId.put((int)field._thriftId, field);
17358
          byName.put(field.getFieldName(), field);
17359
        }
17360
      }
17361
 
17362
      /**
17363
       * Find the _Fields constant that matches fieldId, or null if its not found.
17364
       */
17365
      public static _Fields findByThriftId(int fieldId) {
17366
        return byId.get(fieldId);
17367
      }
17368
 
17369
      /**
17370
       * Find the _Fields constant that matches fieldId, throwing an exception
17371
       * if it is not found.
17372
       */
17373
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17374
        _Fields fields = findByThriftId(fieldId);
17375
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17376
        return fields;
17377
      }
17378
 
17379
      /**
17380
       * Find the _Fields constant that matches name, or null if its not found.
17381
       */
17382
      public static _Fields findByName(String name) {
17383
        return byName.get(name);
17384
      }
17385
 
17386
      private final short _thriftId;
17387
      private final String _fieldName;
17388
 
17389
      _Fields(short thriftId, String fieldName) {
17390
        _thriftId = thriftId;
17391
        _fieldName = fieldName;
17392
      }
17393
 
17394
      public short getThriftFieldId() {
17395
        return _thriftId;
17396
      }
17397
 
17398
      public String getFieldName() {
17399
        return _fieldName;
17400
      }
17401
    }
17402
 
17403
    // isset id assignments
483 rajveer 17404
    private static final int __ID_ISSET_ID = 0;
17405
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17406
 
17407
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17408
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17409
          new FieldValueMetaData(TType.I64)));
17410
    }});
17411
 
17412
    static {
483 rajveer 17413
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17414
    }
17415
 
483 rajveer 17416
    public getOrder_args() {
68 ashish 17417
    }
17418
 
483 rajveer 17419
    public getOrder_args(
17420
      long id)
68 ashish 17421
    {
17422
      this();
483 rajveer 17423
      this.id = id;
17424
      setIdIsSet(true);
68 ashish 17425
    }
17426
 
17427
    /**
17428
     * Performs a deep copy on <i>other</i>.
17429
     */
483 rajveer 17430
    public getOrder_args(getOrder_args other) {
68 ashish 17431
      __isset_bit_vector.clear();
17432
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17433
      this.id = other.id;
68 ashish 17434
    }
17435
 
483 rajveer 17436
    public getOrder_args deepCopy() {
17437
      return new getOrder_args(this);
68 ashish 17438
    }
17439
 
17440
    @Deprecated
483 rajveer 17441
    public getOrder_args clone() {
17442
      return new getOrder_args(this);
68 ashish 17443
    }
17444
 
483 rajveer 17445
    public long getId() {
17446
      return this.id;
68 ashish 17447
    }
17448
 
483 rajveer 17449
    public getOrder_args setId(long id) {
17450
      this.id = id;
17451
      setIdIsSet(true);
68 ashish 17452
      return this;
17453
    }
17454
 
483 rajveer 17455
    public void unsetId() {
17456
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17457
    }
17458
 
483 rajveer 17459
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17460
    public boolean isSetId() {
17461
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17462
    }
17463
 
483 rajveer 17464
    public void setIdIsSet(boolean value) {
17465
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17466
    }
17467
 
17468
    public void setFieldValue(_Fields field, Object value) {
17469
      switch (field) {
483 rajveer 17470
      case ID:
68 ashish 17471
        if (value == null) {
483 rajveer 17472
          unsetId();
68 ashish 17473
        } else {
483 rajveer 17474
          setId((Long)value);
68 ashish 17475
        }
17476
        break;
17477
 
17478
      }
17479
    }
17480
 
17481
    public void setFieldValue(int fieldID, Object value) {
17482
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17483
    }
17484
 
17485
    public Object getFieldValue(_Fields field) {
17486
      switch (field) {
483 rajveer 17487
      case ID:
17488
        return new Long(getId());
68 ashish 17489
 
17490
      }
17491
      throw new IllegalStateException();
17492
    }
17493
 
17494
    public Object getFieldValue(int fieldId) {
17495
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17496
    }
17497
 
17498
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17499
    public boolean isSet(_Fields field) {
17500
      switch (field) {
483 rajveer 17501
      case ID:
17502
        return isSetId();
68 ashish 17503
      }
17504
      throw new IllegalStateException();
17505
    }
17506
 
17507
    public boolean isSet(int fieldID) {
17508
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17509
    }
17510
 
17511
    @Override
17512
    public boolean equals(Object that) {
17513
      if (that == null)
17514
        return false;
483 rajveer 17515
      if (that instanceof getOrder_args)
17516
        return this.equals((getOrder_args)that);
68 ashish 17517
      return false;
17518
    }
17519
 
483 rajveer 17520
    public boolean equals(getOrder_args that) {
68 ashish 17521
      if (that == null)
17522
        return false;
17523
 
483 rajveer 17524
      boolean this_present_id = true;
17525
      boolean that_present_id = true;
17526
      if (this_present_id || that_present_id) {
17527
        if (!(this_present_id && that_present_id))
68 ashish 17528
          return false;
483 rajveer 17529
        if (this.id != that.id)
68 ashish 17530
          return false;
17531
      }
17532
 
17533
      return true;
17534
    }
17535
 
17536
    @Override
17537
    public int hashCode() {
17538
      return 0;
17539
    }
17540
 
483 rajveer 17541
    public int compareTo(getOrder_args other) {
68 ashish 17542
      if (!getClass().equals(other.getClass())) {
17543
        return getClass().getName().compareTo(other.getClass().getName());
17544
      }
17545
 
17546
      int lastComparison = 0;
483 rajveer 17547
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17548
 
483 rajveer 17549
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17550
      if (lastComparison != 0) {
17551
        return lastComparison;
17552
      }
483 rajveer 17553
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 17554
      if (lastComparison != 0) {
17555
        return lastComparison;
17556
      }
17557
      return 0;
17558
    }
17559
 
17560
    public void read(TProtocol iprot) throws TException {
17561
      TField field;
17562
      iprot.readStructBegin();
17563
      while (true)
17564
      {
17565
        field = iprot.readFieldBegin();
17566
        if (field.type == TType.STOP) { 
17567
          break;
17568
        }
17569
        _Fields fieldId = _Fields.findByThriftId(field.id);
17570
        if (fieldId == null) {
17571
          TProtocolUtil.skip(iprot, field.type);
17572
        } else {
17573
          switch (fieldId) {
483 rajveer 17574
            case ID:
68 ashish 17575
              if (field.type == TType.I64) {
483 rajveer 17576
                this.id = iprot.readI64();
17577
                setIdIsSet(true);
68 ashish 17578
              } else { 
17579
                TProtocolUtil.skip(iprot, field.type);
17580
              }
17581
              break;
17582
          }
17583
          iprot.readFieldEnd();
17584
        }
17585
      }
17586
      iprot.readStructEnd();
17587
      validate();
17588
    }
17589
 
17590
    public void write(TProtocol oprot) throws TException {
17591
      validate();
17592
 
17593
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17594
      oprot.writeFieldBegin(ID_FIELD_DESC);
17595
      oprot.writeI64(this.id);
68 ashish 17596
      oprot.writeFieldEnd();
17597
      oprot.writeFieldStop();
17598
      oprot.writeStructEnd();
17599
    }
17600
 
17601
    @Override
17602
    public String toString() {
483 rajveer 17603
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 17604
      boolean first = true;
17605
 
483 rajveer 17606
      sb.append("id:");
17607
      sb.append(this.id);
68 ashish 17608
      first = false;
17609
      sb.append(")");
17610
      return sb.toString();
17611
    }
17612
 
17613
    public void validate() throws TException {
17614
      // check for required fields
17615
    }
17616
 
17617
  }
17618
 
483 rajveer 17619
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
17620
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 17621
 
483 rajveer 17622
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 17623
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17624
 
483 rajveer 17625
    private Order success;
68 ashish 17626
    private TransactionServiceException ex;
17627
 
17628
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17629
    public enum _Fields implements TFieldIdEnum {
17630
      SUCCESS((short)0, "success"),
17631
      EX((short)1, "ex");
17632
 
17633
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17634
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17635
 
17636
      static {
17637
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17638
          byId.put((int)field._thriftId, field);
17639
          byName.put(field.getFieldName(), field);
17640
        }
17641
      }
17642
 
17643
      /**
17644
       * Find the _Fields constant that matches fieldId, or null if its not found.
17645
       */
17646
      public static _Fields findByThriftId(int fieldId) {
17647
        return byId.get(fieldId);
17648
      }
17649
 
17650
      /**
17651
       * Find the _Fields constant that matches fieldId, throwing an exception
17652
       * if it is not found.
17653
       */
17654
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17655
        _Fields fields = findByThriftId(fieldId);
17656
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17657
        return fields;
17658
      }
17659
 
17660
      /**
17661
       * Find the _Fields constant that matches name, or null if its not found.
17662
       */
17663
      public static _Fields findByName(String name) {
17664
        return byName.get(name);
17665
      }
17666
 
17667
      private final short _thriftId;
17668
      private final String _fieldName;
17669
 
17670
      _Fields(short thriftId, String fieldName) {
17671
        _thriftId = thriftId;
17672
        _fieldName = fieldName;
17673
      }
17674
 
17675
      public short getThriftFieldId() {
17676
        return _thriftId;
17677
      }
17678
 
17679
      public String getFieldName() {
17680
        return _fieldName;
17681
      }
17682
    }
17683
 
17684
    // isset id assignments
17685
 
17686
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17687
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17688
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17689
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17690
          new FieldValueMetaData(TType.STRUCT)));
17691
    }});
17692
 
17693
    static {
483 rajveer 17694
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 17695
    }
17696
 
483 rajveer 17697
    public getOrder_result() {
68 ashish 17698
    }
17699
 
483 rajveer 17700
    public getOrder_result(
17701
      Order success,
68 ashish 17702
      TransactionServiceException ex)
17703
    {
17704
      this();
17705
      this.success = success;
17706
      this.ex = ex;
17707
    }
17708
 
17709
    /**
17710
     * Performs a deep copy on <i>other</i>.
17711
     */
483 rajveer 17712
    public getOrder_result(getOrder_result other) {
17713
      if (other.isSetSuccess()) {
17714
        this.success = new Order(other.success);
17715
      }
68 ashish 17716
      if (other.isSetEx()) {
17717
        this.ex = new TransactionServiceException(other.ex);
17718
      }
17719
    }
17720
 
483 rajveer 17721
    public getOrder_result deepCopy() {
17722
      return new getOrder_result(this);
68 ashish 17723
    }
17724
 
17725
    @Deprecated
483 rajveer 17726
    public getOrder_result clone() {
17727
      return new getOrder_result(this);
68 ashish 17728
    }
17729
 
483 rajveer 17730
    public Order getSuccess() {
68 ashish 17731
      return this.success;
17732
    }
17733
 
483 rajveer 17734
    public getOrder_result setSuccess(Order success) {
68 ashish 17735
      this.success = success;
17736
      return this;
17737
    }
17738
 
17739
    public void unsetSuccess() {
483 rajveer 17740
      this.success = null;
68 ashish 17741
    }
17742
 
17743
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17744
    public boolean isSetSuccess() {
483 rajveer 17745
      return this.success != null;
68 ashish 17746
    }
17747
 
17748
    public void setSuccessIsSet(boolean value) {
483 rajveer 17749
      if (!value) {
17750
        this.success = null;
17751
      }
68 ashish 17752
    }
17753
 
17754
    public TransactionServiceException getEx() {
17755
      return this.ex;
17756
    }
17757
 
483 rajveer 17758
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 17759
      this.ex = ex;
17760
      return this;
17761
    }
17762
 
17763
    public void unsetEx() {
17764
      this.ex = null;
17765
    }
17766
 
17767
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17768
    public boolean isSetEx() {
17769
      return this.ex != null;
17770
    }
17771
 
17772
    public void setExIsSet(boolean value) {
17773
      if (!value) {
17774
        this.ex = null;
17775
      }
17776
    }
17777
 
17778
    public void setFieldValue(_Fields field, Object value) {
17779
      switch (field) {
17780
      case SUCCESS:
17781
        if (value == null) {
17782
          unsetSuccess();
17783
        } else {
483 rajveer 17784
          setSuccess((Order)value);
68 ashish 17785
        }
17786
        break;
17787
 
17788
      case EX:
17789
        if (value == null) {
17790
          unsetEx();
17791
        } else {
17792
          setEx((TransactionServiceException)value);
17793
        }
17794
        break;
17795
 
17796
      }
17797
    }
17798
 
17799
    public void setFieldValue(int fieldID, Object value) {
17800
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17801
    }
17802
 
17803
    public Object getFieldValue(_Fields field) {
17804
      switch (field) {
17805
      case SUCCESS:
483 rajveer 17806
        return getSuccess();
68 ashish 17807
 
17808
      case EX:
17809
        return getEx();
17810
 
17811
      }
17812
      throw new IllegalStateException();
17813
    }
17814
 
17815
    public Object getFieldValue(int fieldId) {
17816
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17817
    }
17818
 
17819
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17820
    public boolean isSet(_Fields field) {
17821
      switch (field) {
17822
      case SUCCESS:
17823
        return isSetSuccess();
17824
      case EX:
17825
        return isSetEx();
17826
      }
17827
      throw new IllegalStateException();
17828
    }
17829
 
17830
    public boolean isSet(int fieldID) {
17831
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17832
    }
17833
 
17834
    @Override
17835
    public boolean equals(Object that) {
17836
      if (that == null)
17837
        return false;
483 rajveer 17838
      if (that instanceof getOrder_result)
17839
        return this.equals((getOrder_result)that);
68 ashish 17840
      return false;
17841
    }
17842
 
483 rajveer 17843
    public boolean equals(getOrder_result that) {
68 ashish 17844
      if (that == null)
17845
        return false;
17846
 
483 rajveer 17847
      boolean this_present_success = true && this.isSetSuccess();
17848
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17849
      if (this_present_success || that_present_success) {
17850
        if (!(this_present_success && that_present_success))
17851
          return false;
483 rajveer 17852
        if (!this.success.equals(that.success))
68 ashish 17853
          return false;
17854
      }
17855
 
17856
      boolean this_present_ex = true && this.isSetEx();
17857
      boolean that_present_ex = true && that.isSetEx();
17858
      if (this_present_ex || that_present_ex) {
17859
        if (!(this_present_ex && that_present_ex))
17860
          return false;
17861
        if (!this.ex.equals(that.ex))
17862
          return false;
17863
      }
17864
 
17865
      return true;
17866
    }
17867
 
17868
    @Override
17869
    public int hashCode() {
17870
      return 0;
17871
    }
17872
 
483 rajveer 17873
    public int compareTo(getOrder_result other) {
68 ashish 17874
      if (!getClass().equals(other.getClass())) {
17875
        return getClass().getName().compareTo(other.getClass().getName());
17876
      }
17877
 
17878
      int lastComparison = 0;
483 rajveer 17879
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 17880
 
17881
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17882
      if (lastComparison != 0) {
17883
        return lastComparison;
17884
      }
17885
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17886
      if (lastComparison != 0) {
17887
        return lastComparison;
17888
      }
17889
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17890
      if (lastComparison != 0) {
17891
        return lastComparison;
17892
      }
17893
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17894
      if (lastComparison != 0) {
17895
        return lastComparison;
17896
      }
17897
      return 0;
17898
    }
17899
 
17900
    public void read(TProtocol iprot) throws TException {
17901
      TField field;
17902
      iprot.readStructBegin();
17903
      while (true)
17904
      {
17905
        field = iprot.readFieldBegin();
17906
        if (field.type == TType.STOP) { 
17907
          break;
17908
        }
17909
        _Fields fieldId = _Fields.findByThriftId(field.id);
17910
        if (fieldId == null) {
17911
          TProtocolUtil.skip(iprot, field.type);
17912
        } else {
17913
          switch (fieldId) {
17914
            case SUCCESS:
483 rajveer 17915
              if (field.type == TType.STRUCT) {
17916
                this.success = new Order();
17917
                this.success.read(iprot);
68 ashish 17918
              } else { 
17919
                TProtocolUtil.skip(iprot, field.type);
17920
              }
17921
              break;
17922
            case EX:
17923
              if (field.type == TType.STRUCT) {
17924
                this.ex = new TransactionServiceException();
17925
                this.ex.read(iprot);
17926
              } else { 
17927
                TProtocolUtil.skip(iprot, field.type);
17928
              }
17929
              break;
17930
          }
17931
          iprot.readFieldEnd();
17932
        }
17933
      }
17934
      iprot.readStructEnd();
17935
      validate();
17936
    }
17937
 
17938
    public void write(TProtocol oprot) throws TException {
17939
      oprot.writeStructBegin(STRUCT_DESC);
17940
 
17941
      if (this.isSetSuccess()) {
17942
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17943
        this.success.write(oprot);
68 ashish 17944
        oprot.writeFieldEnd();
17945
      } else if (this.isSetEx()) {
17946
        oprot.writeFieldBegin(EX_FIELD_DESC);
17947
        this.ex.write(oprot);
17948
        oprot.writeFieldEnd();
17949
      }
17950
      oprot.writeFieldStop();
17951
      oprot.writeStructEnd();
17952
    }
17953
 
17954
    @Override
17955
    public String toString() {
483 rajveer 17956
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 17957
      boolean first = true;
17958
 
17959
      sb.append("success:");
483 rajveer 17960
      if (this.success == null) {
17961
        sb.append("null");
17962
      } else {
17963
        sb.append(this.success);
17964
      }
68 ashish 17965
      first = false;
17966
      if (!first) sb.append(", ");
17967
      sb.append("ex:");
17968
      if (this.ex == null) {
17969
        sb.append("null");
17970
      } else {
17971
        sb.append(this.ex);
17972
      }
17973
      first = false;
17974
      sb.append(")");
17975
      return sb.toString();
17976
    }
17977
 
17978
    public void validate() throws TException {
17979
      // check for required fields
17980
    }
17981
 
17982
  }
17983
 
483 rajveer 17984
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
17985
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 17986
 
483 rajveer 17987
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 17988
 
483 rajveer 17989
    private long orderId;
68 ashish 17990
 
17991
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17992
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17993
      ORDER_ID((short)1, "orderId");
68 ashish 17994
 
17995
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17996
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17997
 
17998
      static {
17999
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18000
          byId.put((int)field._thriftId, field);
18001
          byName.put(field.getFieldName(), field);
18002
        }
18003
      }
18004
 
18005
      /**
18006
       * Find the _Fields constant that matches fieldId, or null if its not found.
18007
       */
18008
      public static _Fields findByThriftId(int fieldId) {
18009
        return byId.get(fieldId);
18010
      }
18011
 
18012
      /**
18013
       * Find the _Fields constant that matches fieldId, throwing an exception
18014
       * if it is not found.
18015
       */
18016
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18017
        _Fields fields = findByThriftId(fieldId);
18018
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18019
        return fields;
18020
      }
18021
 
18022
      /**
18023
       * Find the _Fields constant that matches name, or null if its not found.
18024
       */
18025
      public static _Fields findByName(String name) {
18026
        return byName.get(name);
18027
      }
18028
 
18029
      private final short _thriftId;
18030
      private final String _fieldName;
18031
 
18032
      _Fields(short thriftId, String fieldName) {
18033
        _thriftId = thriftId;
18034
        _fieldName = fieldName;
18035
      }
18036
 
18037
      public short getThriftFieldId() {
18038
        return _thriftId;
18039
      }
18040
 
18041
      public String getFieldName() {
18042
        return _fieldName;
18043
      }
18044
    }
18045
 
18046
    // isset id assignments
483 rajveer 18047
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 18048
    private BitSet __isset_bit_vector = new BitSet(1);
18049
 
18050
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18051
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 18052
          new FieldValueMetaData(TType.I64)));
18053
    }});
18054
 
18055
    static {
483 rajveer 18056
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 18057
    }
18058
 
483 rajveer 18059
    public getLineItemsForOrder_args() {
68 ashish 18060
    }
18061
 
483 rajveer 18062
    public getLineItemsForOrder_args(
18063
      long orderId)
68 ashish 18064
    {
18065
      this();
483 rajveer 18066
      this.orderId = orderId;
18067
      setOrderIdIsSet(true);
68 ashish 18068
    }
18069
 
18070
    /**
18071
     * Performs a deep copy on <i>other</i>.
18072
     */
483 rajveer 18073
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 18074
      __isset_bit_vector.clear();
18075
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18076
      this.orderId = other.orderId;
68 ashish 18077
    }
18078
 
483 rajveer 18079
    public getLineItemsForOrder_args deepCopy() {
18080
      return new getLineItemsForOrder_args(this);
68 ashish 18081
    }
18082
 
18083
    @Deprecated
483 rajveer 18084
    public getLineItemsForOrder_args clone() {
18085
      return new getLineItemsForOrder_args(this);
68 ashish 18086
    }
18087
 
483 rajveer 18088
    public long getOrderId() {
18089
      return this.orderId;
68 ashish 18090
    }
18091
 
483 rajveer 18092
    public getLineItemsForOrder_args setOrderId(long orderId) {
18093
      this.orderId = orderId;
18094
      setOrderIdIsSet(true);
68 ashish 18095
      return this;
18096
    }
18097
 
483 rajveer 18098
    public void unsetOrderId() {
18099
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 18100
    }
18101
 
483 rajveer 18102
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18103
    public boolean isSetOrderId() {
18104
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 18105
    }
18106
 
483 rajveer 18107
    public void setOrderIdIsSet(boolean value) {
18108
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 18109
    }
18110
 
18111
    public void setFieldValue(_Fields field, Object value) {
18112
      switch (field) {
483 rajveer 18113
      case ORDER_ID:
68 ashish 18114
        if (value == null) {
483 rajveer 18115
          unsetOrderId();
68 ashish 18116
        } else {
483 rajveer 18117
          setOrderId((Long)value);
68 ashish 18118
        }
18119
        break;
18120
 
18121
      }
18122
    }
18123
 
18124
    public void setFieldValue(int fieldID, Object value) {
18125
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18126
    }
18127
 
18128
    public Object getFieldValue(_Fields field) {
18129
      switch (field) {
483 rajveer 18130
      case ORDER_ID:
18131
        return new Long(getOrderId());
68 ashish 18132
 
18133
      }
18134
      throw new IllegalStateException();
18135
    }
18136
 
18137
    public Object getFieldValue(int fieldId) {
18138
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18139
    }
18140
 
18141
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18142
    public boolean isSet(_Fields field) {
18143
      switch (field) {
483 rajveer 18144
      case ORDER_ID:
18145
        return isSetOrderId();
68 ashish 18146
      }
18147
      throw new IllegalStateException();
18148
    }
18149
 
18150
    public boolean isSet(int fieldID) {
18151
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18152
    }
18153
 
18154
    @Override
18155
    public boolean equals(Object that) {
18156
      if (that == null)
18157
        return false;
483 rajveer 18158
      if (that instanceof getLineItemsForOrder_args)
18159
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 18160
      return false;
18161
    }
18162
 
483 rajveer 18163
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 18164
      if (that == null)
18165
        return false;
18166
 
483 rajveer 18167
      boolean this_present_orderId = true;
18168
      boolean that_present_orderId = true;
18169
      if (this_present_orderId || that_present_orderId) {
18170
        if (!(this_present_orderId && that_present_orderId))
68 ashish 18171
          return false;
483 rajveer 18172
        if (this.orderId != that.orderId)
68 ashish 18173
          return false;
18174
      }
18175
 
18176
      return true;
18177
    }
18178
 
18179
    @Override
18180
    public int hashCode() {
18181
      return 0;
18182
    }
18183
 
483 rajveer 18184
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 18185
      if (!getClass().equals(other.getClass())) {
18186
        return getClass().getName().compareTo(other.getClass().getName());
18187
      }
18188
 
18189
      int lastComparison = 0;
483 rajveer 18190
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 18191
 
483 rajveer 18192
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 18193
      if (lastComparison != 0) {
18194
        return lastComparison;
18195
      }
483 rajveer 18196
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 18197
      if (lastComparison != 0) {
18198
        return lastComparison;
18199
      }
18200
      return 0;
18201
    }
18202
 
18203
    public void read(TProtocol iprot) throws TException {
18204
      TField field;
18205
      iprot.readStructBegin();
18206
      while (true)
18207
      {
18208
        field = iprot.readFieldBegin();
18209
        if (field.type == TType.STOP) { 
18210
          break;
18211
        }
18212
        _Fields fieldId = _Fields.findByThriftId(field.id);
18213
        if (fieldId == null) {
18214
          TProtocolUtil.skip(iprot, field.type);
18215
        } else {
18216
          switch (fieldId) {
483 rajveer 18217
            case ORDER_ID:
68 ashish 18218
              if (field.type == TType.I64) {
483 rajveer 18219
                this.orderId = iprot.readI64();
18220
                setOrderIdIsSet(true);
68 ashish 18221
              } else { 
18222
                TProtocolUtil.skip(iprot, field.type);
18223
              }
18224
              break;
18225
          }
18226
          iprot.readFieldEnd();
18227
        }
18228
      }
18229
      iprot.readStructEnd();
18230
      validate();
18231
    }
18232
 
18233
    public void write(TProtocol oprot) throws TException {
18234
      validate();
18235
 
18236
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18237
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18238
      oprot.writeI64(this.orderId);
68 ashish 18239
      oprot.writeFieldEnd();
18240
      oprot.writeFieldStop();
18241
      oprot.writeStructEnd();
18242
    }
18243
 
18244
    @Override
18245
    public String toString() {
483 rajveer 18246
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 18247
      boolean first = true;
18248
 
483 rajveer 18249
      sb.append("orderId:");
18250
      sb.append(this.orderId);
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 getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
18263
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 18264
 
483 rajveer 18265
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 18266
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18267
 
483 rajveer 18268
    private List<LineItem> 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
 
18329
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18330
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18331
          new ListMetaData(TType.LIST, 
18332
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18333
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18334
          new FieldValueMetaData(TType.STRUCT)));
18335
    }});
18336
 
18337
    static {
483 rajveer 18338
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18339
    }
18340
 
483 rajveer 18341
    public getLineItemsForOrder_result() {
68 ashish 18342
    }
18343
 
483 rajveer 18344
    public getLineItemsForOrder_result(
18345
      List<LineItem> success,
68 ashish 18346
      TransactionServiceException ex)
18347
    {
18348
      this();
18349
      this.success = success;
18350
      this.ex = ex;
18351
    }
18352
 
18353
    /**
18354
     * Performs a deep copy on <i>other</i>.
18355
     */
483 rajveer 18356
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18357
      if (other.isSetSuccess()) {
18358
        List<LineItem> __this__success = new ArrayList<LineItem>();
18359
        for (LineItem other_element : other.success) {
18360
          __this__success.add(new LineItem(other_element));
18361
        }
18362
        this.success = __this__success;
18363
      }
68 ashish 18364
      if (other.isSetEx()) {
18365
        this.ex = new TransactionServiceException(other.ex);
18366
      }
18367
    }
18368
 
483 rajveer 18369
    public getLineItemsForOrder_result deepCopy() {
18370
      return new getLineItemsForOrder_result(this);
68 ashish 18371
    }
18372
 
18373
    @Deprecated
483 rajveer 18374
    public getLineItemsForOrder_result clone() {
18375
      return new getLineItemsForOrder_result(this);
68 ashish 18376
    }
18377
 
483 rajveer 18378
    public int getSuccessSize() {
18379
      return (this.success == null) ? 0 : this.success.size();
18380
    }
18381
 
18382
    public java.util.Iterator<LineItem> getSuccessIterator() {
18383
      return (this.success == null) ? null : this.success.iterator();
18384
    }
18385
 
18386
    public void addToSuccess(LineItem elem) {
18387
      if (this.success == null) {
18388
        this.success = new ArrayList<LineItem>();
18389
      }
18390
      this.success.add(elem);
18391
    }
18392
 
18393
    public List<LineItem> getSuccess() {
68 ashish 18394
      return this.success;
18395
    }
18396
 
483 rajveer 18397
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18398
      this.success = success;
18399
      return this;
18400
    }
18401
 
18402
    public void unsetSuccess() {
483 rajveer 18403
      this.success = null;
68 ashish 18404
    }
18405
 
18406
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18407
    public boolean isSetSuccess() {
483 rajveer 18408
      return this.success != null;
68 ashish 18409
    }
18410
 
18411
    public void setSuccessIsSet(boolean value) {
483 rajveer 18412
      if (!value) {
18413
        this.success = null;
18414
      }
68 ashish 18415
    }
18416
 
18417
    public TransactionServiceException getEx() {
18418
      return this.ex;
18419
    }
18420
 
483 rajveer 18421
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18422
      this.ex = ex;
18423
      return this;
18424
    }
18425
 
18426
    public void unsetEx() {
18427
      this.ex = null;
18428
    }
18429
 
18430
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18431
    public boolean isSetEx() {
18432
      return this.ex != null;
18433
    }
18434
 
18435
    public void setExIsSet(boolean value) {
18436
      if (!value) {
18437
        this.ex = null;
18438
      }
18439
    }
18440
 
18441
    public void setFieldValue(_Fields field, Object value) {
18442
      switch (field) {
18443
      case SUCCESS:
18444
        if (value == null) {
18445
          unsetSuccess();
18446
        } else {
483 rajveer 18447
          setSuccess((List<LineItem>)value);
68 ashish 18448
        }
18449
        break;
18450
 
18451
      case EX:
18452
        if (value == null) {
18453
          unsetEx();
18454
        } else {
18455
          setEx((TransactionServiceException)value);
18456
        }
18457
        break;
18458
 
18459
      }
18460
    }
18461
 
18462
    public void setFieldValue(int fieldID, Object value) {
18463
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18464
    }
18465
 
18466
    public Object getFieldValue(_Fields field) {
18467
      switch (field) {
18468
      case SUCCESS:
483 rajveer 18469
        return getSuccess();
68 ashish 18470
 
18471
      case EX:
18472
        return getEx();
18473
 
18474
      }
18475
      throw new IllegalStateException();
18476
    }
18477
 
18478
    public Object getFieldValue(int fieldId) {
18479
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18480
    }
18481
 
18482
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18483
    public boolean isSet(_Fields field) {
18484
      switch (field) {
18485
      case SUCCESS:
18486
        return isSetSuccess();
18487
      case EX:
18488
        return isSetEx();
18489
      }
18490
      throw new IllegalStateException();
18491
    }
18492
 
18493
    public boolean isSet(int fieldID) {
18494
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18495
    }
18496
 
18497
    @Override
18498
    public boolean equals(Object that) {
18499
      if (that == null)
18500
        return false;
483 rajveer 18501
      if (that instanceof getLineItemsForOrder_result)
18502
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18503
      return false;
18504
    }
18505
 
483 rajveer 18506
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18507
      if (that == null)
18508
        return false;
18509
 
483 rajveer 18510
      boolean this_present_success = true && this.isSetSuccess();
18511
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18512
      if (this_present_success || that_present_success) {
18513
        if (!(this_present_success && that_present_success))
18514
          return false;
483 rajveer 18515
        if (!this.success.equals(that.success))
68 ashish 18516
          return false;
18517
      }
18518
 
18519
      boolean this_present_ex = true && this.isSetEx();
18520
      boolean that_present_ex = true && that.isSetEx();
18521
      if (this_present_ex || that_present_ex) {
18522
        if (!(this_present_ex && that_present_ex))
18523
          return false;
18524
        if (!this.ex.equals(that.ex))
18525
          return false;
18526
      }
18527
 
18528
      return true;
18529
    }
18530
 
18531
    @Override
18532
    public int hashCode() {
18533
      return 0;
18534
    }
18535
 
483 rajveer 18536
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18537
      if (!getClass().equals(other.getClass())) {
18538
        return getClass().getName().compareTo(other.getClass().getName());
18539
      }
18540
 
18541
      int lastComparison = 0;
483 rajveer 18542
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18543
 
18544
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18545
      if (lastComparison != 0) {
18546
        return lastComparison;
18547
      }
18548
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18549
      if (lastComparison != 0) {
18550
        return lastComparison;
18551
      }
18552
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18553
      if (lastComparison != 0) {
18554
        return lastComparison;
18555
      }
18556
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18557
      if (lastComparison != 0) {
18558
        return lastComparison;
18559
      }
18560
      return 0;
18561
    }
18562
 
18563
    public void read(TProtocol iprot) throws TException {
18564
      TField field;
18565
      iprot.readStructBegin();
18566
      while (true)
18567
      {
18568
        field = iprot.readFieldBegin();
18569
        if (field.type == TType.STOP) { 
18570
          break;
18571
        }
18572
        _Fields fieldId = _Fields.findByThriftId(field.id);
18573
        if (fieldId == null) {
18574
          TProtocolUtil.skip(iprot, field.type);
18575
        } else {
18576
          switch (fieldId) {
18577
            case SUCCESS:
483 rajveer 18578
              if (field.type == TType.LIST) {
18579
                {
1382 varun.gupt 18580
                  TList _list40 = iprot.readListBegin();
18581
                  this.success = new ArrayList<LineItem>(_list40.size);
18582
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 18583
                  {
1382 varun.gupt 18584
                    LineItem _elem42;
18585
                    _elem42 = new LineItem();
18586
                    _elem42.read(iprot);
18587
                    this.success.add(_elem42);
483 rajveer 18588
                  }
18589
                  iprot.readListEnd();
18590
                }
68 ashish 18591
              } else { 
18592
                TProtocolUtil.skip(iprot, field.type);
18593
              }
18594
              break;
18595
            case EX:
18596
              if (field.type == TType.STRUCT) {
18597
                this.ex = new TransactionServiceException();
18598
                this.ex.read(iprot);
18599
              } else { 
18600
                TProtocolUtil.skip(iprot, field.type);
18601
              }
18602
              break;
18603
          }
18604
          iprot.readFieldEnd();
18605
        }
18606
      }
18607
      iprot.readStructEnd();
18608
      validate();
18609
    }
18610
 
18611
    public void write(TProtocol oprot) throws TException {
18612
      oprot.writeStructBegin(STRUCT_DESC);
18613
 
18614
      if (this.isSetSuccess()) {
18615
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18616
        {
18617
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18618
          for (LineItem _iter43 : this.success)
483 rajveer 18619
          {
1382 varun.gupt 18620
            _iter43.write(oprot);
483 rajveer 18621
          }
18622
          oprot.writeListEnd();
18623
        }
68 ashish 18624
        oprot.writeFieldEnd();
18625
      } else if (this.isSetEx()) {
18626
        oprot.writeFieldBegin(EX_FIELD_DESC);
18627
        this.ex.write(oprot);
18628
        oprot.writeFieldEnd();
18629
      }
18630
      oprot.writeFieldStop();
18631
      oprot.writeStructEnd();
18632
    }
18633
 
18634
    @Override
18635
    public String toString() {
483 rajveer 18636
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 18637
      boolean first = true;
18638
 
18639
      sb.append("success:");
483 rajveer 18640
      if (this.success == null) {
18641
        sb.append("null");
18642
      } else {
18643
        sb.append(this.success);
18644
      }
68 ashish 18645
      first = false;
18646
      if (!first) sb.append(", ");
18647
      sb.append("ex:");
18648
      if (this.ex == null) {
18649
        sb.append("null");
18650
      } else {
18651
        sb.append(this.ex);
18652
      }
18653
      first = false;
18654
      sb.append(")");
18655
      return sb.toString();
18656
    }
18657
 
18658
    public void validate() throws TException {
18659
      // check for required fields
18660
    }
18661
 
18662
  }
18663
 
1529 ankur.sing 18664
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
18665
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
18666
 
18667
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
18668
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
18669
 
18670
    private long orderId;
18671
    private long customerId;
18672
 
18673
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18674
    public enum _Fields implements TFieldIdEnum {
18675
      ORDER_ID((short)1, "orderId"),
18676
      CUSTOMER_ID((short)2, "customerId");
18677
 
18678
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18679
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18680
 
18681
      static {
18682
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18683
          byId.put((int)field._thriftId, field);
18684
          byName.put(field.getFieldName(), field);
18685
        }
18686
      }
18687
 
18688
      /**
18689
       * Find the _Fields constant that matches fieldId, or null if its not found.
18690
       */
18691
      public static _Fields findByThriftId(int fieldId) {
18692
        return byId.get(fieldId);
18693
      }
18694
 
18695
      /**
18696
       * Find the _Fields constant that matches fieldId, throwing an exception
18697
       * if it is not found.
18698
       */
18699
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18700
        _Fields fields = findByThriftId(fieldId);
18701
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18702
        return fields;
18703
      }
18704
 
18705
      /**
18706
       * Find the _Fields constant that matches name, or null if its not found.
18707
       */
18708
      public static _Fields findByName(String name) {
18709
        return byName.get(name);
18710
      }
18711
 
18712
      private final short _thriftId;
18713
      private final String _fieldName;
18714
 
18715
      _Fields(short thriftId, String fieldName) {
18716
        _thriftId = thriftId;
18717
        _fieldName = fieldName;
18718
      }
18719
 
18720
      public short getThriftFieldId() {
18721
        return _thriftId;
18722
      }
18723
 
18724
      public String getFieldName() {
18725
        return _fieldName;
18726
      }
18727
    }
18728
 
18729
    // isset id assignments
18730
    private static final int __ORDERID_ISSET_ID = 0;
18731
    private static final int __CUSTOMERID_ISSET_ID = 1;
18732
    private BitSet __isset_bit_vector = new BitSet(2);
18733
 
18734
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18735
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
18736
          new FieldValueMetaData(TType.I64)));
18737
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
18738
          new FieldValueMetaData(TType.I64)));
18739
    }});
18740
 
18741
    static {
18742
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
18743
    }
18744
 
18745
    public getOrderForCustomer_args() {
18746
    }
18747
 
18748
    public getOrderForCustomer_args(
18749
      long orderId,
18750
      long customerId)
18751
    {
18752
      this();
18753
      this.orderId = orderId;
18754
      setOrderIdIsSet(true);
18755
      this.customerId = customerId;
18756
      setCustomerIdIsSet(true);
18757
    }
18758
 
18759
    /**
18760
     * Performs a deep copy on <i>other</i>.
18761
     */
18762
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
18763
      __isset_bit_vector.clear();
18764
      __isset_bit_vector.or(other.__isset_bit_vector);
18765
      this.orderId = other.orderId;
18766
      this.customerId = other.customerId;
18767
    }
18768
 
18769
    public getOrderForCustomer_args deepCopy() {
18770
      return new getOrderForCustomer_args(this);
18771
    }
18772
 
18773
    @Deprecated
18774
    public getOrderForCustomer_args clone() {
18775
      return new getOrderForCustomer_args(this);
18776
    }
18777
 
18778
    public long getOrderId() {
18779
      return this.orderId;
18780
    }
18781
 
18782
    public getOrderForCustomer_args setOrderId(long orderId) {
18783
      this.orderId = orderId;
18784
      setOrderIdIsSet(true);
18785
      return this;
18786
    }
18787
 
18788
    public void unsetOrderId() {
18789
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
18790
    }
18791
 
18792
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18793
    public boolean isSetOrderId() {
18794
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
18795
    }
18796
 
18797
    public void setOrderIdIsSet(boolean value) {
18798
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
18799
    }
18800
 
18801
    public long getCustomerId() {
18802
      return this.customerId;
18803
    }
18804
 
18805
    public getOrderForCustomer_args setCustomerId(long customerId) {
18806
      this.customerId = customerId;
18807
      setCustomerIdIsSet(true);
18808
      return this;
18809
    }
18810
 
18811
    public void unsetCustomerId() {
18812
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
18813
    }
18814
 
18815
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
18816
    public boolean isSetCustomerId() {
18817
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
18818
    }
18819
 
18820
    public void setCustomerIdIsSet(boolean value) {
18821
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
18822
    }
18823
 
18824
    public void setFieldValue(_Fields field, Object value) {
18825
      switch (field) {
18826
      case ORDER_ID:
18827
        if (value == null) {
18828
          unsetOrderId();
18829
        } else {
18830
          setOrderId((Long)value);
18831
        }
18832
        break;
18833
 
18834
      case CUSTOMER_ID:
18835
        if (value == null) {
18836
          unsetCustomerId();
18837
        } else {
18838
          setCustomerId((Long)value);
18839
        }
18840
        break;
18841
 
18842
      }
18843
    }
18844
 
18845
    public void setFieldValue(int fieldID, Object value) {
18846
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18847
    }
18848
 
18849
    public Object getFieldValue(_Fields field) {
18850
      switch (field) {
18851
      case ORDER_ID:
18852
        return new Long(getOrderId());
18853
 
18854
      case CUSTOMER_ID:
18855
        return new Long(getCustomerId());
18856
 
18857
      }
18858
      throw new IllegalStateException();
18859
    }
18860
 
18861
    public Object getFieldValue(int fieldId) {
18862
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18863
    }
18864
 
18865
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18866
    public boolean isSet(_Fields field) {
18867
      switch (field) {
18868
      case ORDER_ID:
18869
        return isSetOrderId();
18870
      case CUSTOMER_ID:
18871
        return isSetCustomerId();
18872
      }
18873
      throw new IllegalStateException();
18874
    }
18875
 
18876
    public boolean isSet(int fieldID) {
18877
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18878
    }
18879
 
18880
    @Override
18881
    public boolean equals(Object that) {
18882
      if (that == null)
18883
        return false;
18884
      if (that instanceof getOrderForCustomer_args)
18885
        return this.equals((getOrderForCustomer_args)that);
18886
      return false;
18887
    }
18888
 
18889
    public boolean equals(getOrderForCustomer_args that) {
18890
      if (that == null)
18891
        return false;
18892
 
18893
      boolean this_present_orderId = true;
18894
      boolean that_present_orderId = true;
18895
      if (this_present_orderId || that_present_orderId) {
18896
        if (!(this_present_orderId && that_present_orderId))
18897
          return false;
18898
        if (this.orderId != that.orderId)
18899
          return false;
18900
      }
18901
 
18902
      boolean this_present_customerId = true;
18903
      boolean that_present_customerId = true;
18904
      if (this_present_customerId || that_present_customerId) {
18905
        if (!(this_present_customerId && that_present_customerId))
18906
          return false;
18907
        if (this.customerId != that.customerId)
18908
          return false;
18909
      }
18910
 
18911
      return true;
18912
    }
18913
 
18914
    @Override
18915
    public int hashCode() {
18916
      return 0;
18917
    }
18918
 
18919
    public int compareTo(getOrderForCustomer_args other) {
18920
      if (!getClass().equals(other.getClass())) {
18921
        return getClass().getName().compareTo(other.getClass().getName());
18922
      }
18923
 
18924
      int lastComparison = 0;
18925
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
18926
 
18927
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
18928
      if (lastComparison != 0) {
18929
        return lastComparison;
18930
      }
18931
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
18932
      if (lastComparison != 0) {
18933
        return lastComparison;
18934
      }
18935
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
18936
      if (lastComparison != 0) {
18937
        return lastComparison;
18938
      }
18939
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
18940
      if (lastComparison != 0) {
18941
        return lastComparison;
18942
      }
18943
      return 0;
18944
    }
18945
 
18946
    public void read(TProtocol iprot) throws TException {
18947
      TField field;
18948
      iprot.readStructBegin();
18949
      while (true)
18950
      {
18951
        field = iprot.readFieldBegin();
18952
        if (field.type == TType.STOP) { 
18953
          break;
18954
        }
18955
        _Fields fieldId = _Fields.findByThriftId(field.id);
18956
        if (fieldId == null) {
18957
          TProtocolUtil.skip(iprot, field.type);
18958
        } else {
18959
          switch (fieldId) {
18960
            case ORDER_ID:
18961
              if (field.type == TType.I64) {
18962
                this.orderId = iprot.readI64();
18963
                setOrderIdIsSet(true);
18964
              } else { 
18965
                TProtocolUtil.skip(iprot, field.type);
18966
              }
18967
              break;
18968
            case CUSTOMER_ID:
18969
              if (field.type == TType.I64) {
18970
                this.customerId = iprot.readI64();
18971
                setCustomerIdIsSet(true);
18972
              } else { 
18973
                TProtocolUtil.skip(iprot, field.type);
18974
              }
18975
              break;
18976
          }
18977
          iprot.readFieldEnd();
18978
        }
18979
      }
18980
      iprot.readStructEnd();
18981
      validate();
18982
    }
18983
 
18984
    public void write(TProtocol oprot) throws TException {
18985
      validate();
18986
 
18987
      oprot.writeStructBegin(STRUCT_DESC);
18988
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18989
      oprot.writeI64(this.orderId);
18990
      oprot.writeFieldEnd();
18991
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
18992
      oprot.writeI64(this.customerId);
18993
      oprot.writeFieldEnd();
18994
      oprot.writeFieldStop();
18995
      oprot.writeStructEnd();
18996
    }
18997
 
18998
    @Override
18999
    public String toString() {
19000
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
19001
      boolean first = true;
19002
 
19003
      sb.append("orderId:");
19004
      sb.append(this.orderId);
19005
      first = false;
19006
      if (!first) sb.append(", ");
19007
      sb.append("customerId:");
19008
      sb.append(this.customerId);
19009
      first = false;
19010
      sb.append(")");
19011
      return sb.toString();
19012
    }
19013
 
19014
    public void validate() throws TException {
19015
      // check for required fields
19016
    }
19017
 
19018
  }
19019
 
19020
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
19021
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
19022
 
19023
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
19024
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19025
 
19026
    private Order success;
19027
    private TransactionServiceException ex;
19028
 
19029
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19030
    public enum _Fields implements TFieldIdEnum {
19031
      SUCCESS((short)0, "success"),
19032
      EX((short)1, "ex");
19033
 
19034
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19035
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19036
 
19037
      static {
19038
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19039
          byId.put((int)field._thriftId, field);
19040
          byName.put(field.getFieldName(), field);
19041
        }
19042
      }
19043
 
19044
      /**
19045
       * Find the _Fields constant that matches fieldId, or null if its not found.
19046
       */
19047
      public static _Fields findByThriftId(int fieldId) {
19048
        return byId.get(fieldId);
19049
      }
19050
 
19051
      /**
19052
       * Find the _Fields constant that matches fieldId, throwing an exception
19053
       * if it is not found.
19054
       */
19055
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19056
        _Fields fields = findByThriftId(fieldId);
19057
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19058
        return fields;
19059
      }
19060
 
19061
      /**
19062
       * Find the _Fields constant that matches name, or null if its not found.
19063
       */
19064
      public static _Fields findByName(String name) {
19065
        return byName.get(name);
19066
      }
19067
 
19068
      private final short _thriftId;
19069
      private final String _fieldName;
19070
 
19071
      _Fields(short thriftId, String fieldName) {
19072
        _thriftId = thriftId;
19073
        _fieldName = fieldName;
19074
      }
19075
 
19076
      public short getThriftFieldId() {
19077
        return _thriftId;
19078
      }
19079
 
19080
      public String getFieldName() {
19081
        return _fieldName;
19082
      }
19083
    }
19084
 
19085
    // isset id assignments
19086
 
19087
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19088
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19089
          new StructMetaData(TType.STRUCT, Order.class)));
19090
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19091
          new FieldValueMetaData(TType.STRUCT)));
19092
    }});
19093
 
19094
    static {
19095
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
19096
    }
19097
 
19098
    public getOrderForCustomer_result() {
19099
    }
19100
 
19101
    public getOrderForCustomer_result(
19102
      Order success,
19103
      TransactionServiceException ex)
19104
    {
19105
      this();
19106
      this.success = success;
19107
      this.ex = ex;
19108
    }
19109
 
19110
    /**
19111
     * Performs a deep copy on <i>other</i>.
19112
     */
19113
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
19114
      if (other.isSetSuccess()) {
19115
        this.success = new Order(other.success);
19116
      }
19117
      if (other.isSetEx()) {
19118
        this.ex = new TransactionServiceException(other.ex);
19119
      }
19120
    }
19121
 
19122
    public getOrderForCustomer_result deepCopy() {
19123
      return new getOrderForCustomer_result(this);
19124
    }
19125
 
19126
    @Deprecated
19127
    public getOrderForCustomer_result clone() {
19128
      return new getOrderForCustomer_result(this);
19129
    }
19130
 
19131
    public Order getSuccess() {
19132
      return this.success;
19133
    }
19134
 
19135
    public getOrderForCustomer_result setSuccess(Order success) {
19136
      this.success = success;
19137
      return this;
19138
    }
19139
 
19140
    public void unsetSuccess() {
19141
      this.success = null;
19142
    }
19143
 
19144
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19145
    public boolean isSetSuccess() {
19146
      return this.success != null;
19147
    }
19148
 
19149
    public void setSuccessIsSet(boolean value) {
19150
      if (!value) {
19151
        this.success = null;
19152
      }
19153
    }
19154
 
19155
    public TransactionServiceException getEx() {
19156
      return this.ex;
19157
    }
19158
 
19159
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
19160
      this.ex = ex;
19161
      return this;
19162
    }
19163
 
19164
    public void unsetEx() {
19165
      this.ex = null;
19166
    }
19167
 
19168
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19169
    public boolean isSetEx() {
19170
      return this.ex != null;
19171
    }
19172
 
19173
    public void setExIsSet(boolean value) {
19174
      if (!value) {
19175
        this.ex = null;
19176
      }
19177
    }
19178
 
19179
    public void setFieldValue(_Fields field, Object value) {
19180
      switch (field) {
19181
      case SUCCESS:
19182
        if (value == null) {
19183
          unsetSuccess();
19184
        } else {
19185
          setSuccess((Order)value);
19186
        }
19187
        break;
19188
 
19189
      case EX:
19190
        if (value == null) {
19191
          unsetEx();
19192
        } else {
19193
          setEx((TransactionServiceException)value);
19194
        }
19195
        break;
19196
 
19197
      }
19198
    }
19199
 
19200
    public void setFieldValue(int fieldID, Object value) {
19201
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19202
    }
19203
 
19204
    public Object getFieldValue(_Fields field) {
19205
      switch (field) {
19206
      case SUCCESS:
19207
        return getSuccess();
19208
 
19209
      case EX:
19210
        return getEx();
19211
 
19212
      }
19213
      throw new IllegalStateException();
19214
    }
19215
 
19216
    public Object getFieldValue(int fieldId) {
19217
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19218
    }
19219
 
19220
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19221
    public boolean isSet(_Fields field) {
19222
      switch (field) {
19223
      case SUCCESS:
19224
        return isSetSuccess();
19225
      case EX:
19226
        return isSetEx();
19227
      }
19228
      throw new IllegalStateException();
19229
    }
19230
 
19231
    public boolean isSet(int fieldID) {
19232
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19233
    }
19234
 
19235
    @Override
19236
    public boolean equals(Object that) {
19237
      if (that == null)
19238
        return false;
19239
      if (that instanceof getOrderForCustomer_result)
19240
        return this.equals((getOrderForCustomer_result)that);
19241
      return false;
19242
    }
19243
 
19244
    public boolean equals(getOrderForCustomer_result that) {
19245
      if (that == null)
19246
        return false;
19247
 
19248
      boolean this_present_success = true && this.isSetSuccess();
19249
      boolean that_present_success = true && that.isSetSuccess();
19250
      if (this_present_success || that_present_success) {
19251
        if (!(this_present_success && that_present_success))
19252
          return false;
19253
        if (!this.success.equals(that.success))
19254
          return false;
19255
      }
19256
 
19257
      boolean this_present_ex = true && this.isSetEx();
19258
      boolean that_present_ex = true && that.isSetEx();
19259
      if (this_present_ex || that_present_ex) {
19260
        if (!(this_present_ex && that_present_ex))
19261
          return false;
19262
        if (!this.ex.equals(that.ex))
19263
          return false;
19264
      }
19265
 
19266
      return true;
19267
    }
19268
 
19269
    @Override
19270
    public int hashCode() {
19271
      return 0;
19272
    }
19273
 
19274
    public int compareTo(getOrderForCustomer_result other) {
19275
      if (!getClass().equals(other.getClass())) {
19276
        return getClass().getName().compareTo(other.getClass().getName());
19277
      }
19278
 
19279
      int lastComparison = 0;
19280
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
19281
 
19282
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19283
      if (lastComparison != 0) {
19284
        return lastComparison;
19285
      }
19286
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19287
      if (lastComparison != 0) {
19288
        return lastComparison;
19289
      }
19290
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19291
      if (lastComparison != 0) {
19292
        return lastComparison;
19293
      }
19294
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19295
      if (lastComparison != 0) {
19296
        return lastComparison;
19297
      }
19298
      return 0;
19299
    }
19300
 
19301
    public void read(TProtocol iprot) throws TException {
19302
      TField field;
19303
      iprot.readStructBegin();
19304
      while (true)
19305
      {
19306
        field = iprot.readFieldBegin();
19307
        if (field.type == TType.STOP) { 
19308
          break;
19309
        }
19310
        _Fields fieldId = _Fields.findByThriftId(field.id);
19311
        if (fieldId == null) {
19312
          TProtocolUtil.skip(iprot, field.type);
19313
        } else {
19314
          switch (fieldId) {
19315
            case SUCCESS:
19316
              if (field.type == TType.STRUCT) {
19317
                this.success = new Order();
19318
                this.success.read(iprot);
19319
              } else { 
19320
                TProtocolUtil.skip(iprot, field.type);
19321
              }
19322
              break;
19323
            case EX:
19324
              if (field.type == TType.STRUCT) {
19325
                this.ex = new TransactionServiceException();
19326
                this.ex.read(iprot);
19327
              } else { 
19328
                TProtocolUtil.skip(iprot, field.type);
19329
              }
19330
              break;
19331
          }
19332
          iprot.readFieldEnd();
19333
        }
19334
      }
19335
      iprot.readStructEnd();
19336
      validate();
19337
    }
19338
 
19339
    public void write(TProtocol oprot) throws TException {
19340
      oprot.writeStructBegin(STRUCT_DESC);
19341
 
19342
      if (this.isSetSuccess()) {
19343
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19344
        this.success.write(oprot);
19345
        oprot.writeFieldEnd();
19346
      } else if (this.isSetEx()) {
19347
        oprot.writeFieldBegin(EX_FIELD_DESC);
19348
        this.ex.write(oprot);
19349
        oprot.writeFieldEnd();
19350
      }
19351
      oprot.writeFieldStop();
19352
      oprot.writeStructEnd();
19353
    }
19354
 
19355
    @Override
19356
    public String toString() {
19357
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
19358
      boolean first = true;
19359
 
19360
      sb.append("success:");
19361
      if (this.success == null) {
19362
        sb.append("null");
19363
      } else {
19364
        sb.append(this.success);
19365
      }
19366
      first = false;
19367
      if (!first) sb.append(", ");
19368
      sb.append("ex:");
19369
      if (this.ex == null) {
19370
        sb.append("null");
19371
      } else {
19372
        sb.append(this.ex);
19373
      }
19374
      first = false;
19375
      sb.append(")");
19376
      return sb.toString();
19377
    }
19378
 
19379
    public void validate() throws TException {
19380
      // check for required fields
19381
    }
19382
 
19383
  }
19384
 
1221 chandransh 19385
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
19386
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
19387
 
19388
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19389
 
19390
    private long warehouseId;
19391
 
19392
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19393
    public enum _Fields implements TFieldIdEnum {
19394
      WAREHOUSE_ID((short)1, "warehouseId");
19395
 
19396
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19397
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19398
 
19399
      static {
19400
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19401
          byId.put((int)field._thriftId, field);
19402
          byName.put(field.getFieldName(), field);
19403
        }
19404
      }
19405
 
19406
      /**
19407
       * Find the _Fields constant that matches fieldId, or null if its not found.
19408
       */
19409
      public static _Fields findByThriftId(int fieldId) {
19410
        return byId.get(fieldId);
19411
      }
19412
 
19413
      /**
19414
       * Find the _Fields constant that matches fieldId, throwing an exception
19415
       * if it is not found.
19416
       */
19417
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19418
        _Fields fields = findByThriftId(fieldId);
19419
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19420
        return fields;
19421
      }
19422
 
19423
      /**
19424
       * Find the _Fields constant that matches name, or null if its not found.
19425
       */
19426
      public static _Fields findByName(String name) {
19427
        return byName.get(name);
19428
      }
19429
 
19430
      private final short _thriftId;
19431
      private final String _fieldName;
19432
 
19433
      _Fields(short thriftId, String fieldName) {
19434
        _thriftId = thriftId;
19435
        _fieldName = fieldName;
19436
      }
19437
 
19438
      public short getThriftFieldId() {
19439
        return _thriftId;
19440
      }
19441
 
19442
      public String getFieldName() {
19443
        return _fieldName;
19444
      }
19445
    }
19446
 
19447
    // isset id assignments
19448
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19449
    private BitSet __isset_bit_vector = new BitSet(1);
19450
 
19451
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19452
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19453
          new FieldValueMetaData(TType.I64)));
19454
    }});
19455
 
19456
    static {
19457
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
19458
    }
19459
 
19460
    public batchOrders_args() {
19461
    }
19462
 
19463
    public batchOrders_args(
19464
      long warehouseId)
19465
    {
19466
      this();
19467
      this.warehouseId = warehouseId;
19468
      setWarehouseIdIsSet(true);
19469
    }
19470
 
19471
    /**
19472
     * Performs a deep copy on <i>other</i>.
19473
     */
19474
    public batchOrders_args(batchOrders_args other) {
19475
      __isset_bit_vector.clear();
19476
      __isset_bit_vector.or(other.__isset_bit_vector);
19477
      this.warehouseId = other.warehouseId;
19478
    }
19479
 
19480
    public batchOrders_args deepCopy() {
19481
      return new batchOrders_args(this);
19482
    }
19483
 
19484
    @Deprecated
19485
    public batchOrders_args clone() {
19486
      return new batchOrders_args(this);
19487
    }
19488
 
19489
    public long getWarehouseId() {
19490
      return this.warehouseId;
19491
    }
19492
 
19493
    public batchOrders_args setWarehouseId(long warehouseId) {
19494
      this.warehouseId = warehouseId;
19495
      setWarehouseIdIsSet(true);
19496
      return this;
19497
    }
19498
 
19499
    public void unsetWarehouseId() {
19500
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19501
    }
19502
 
19503
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19504
    public boolean isSetWarehouseId() {
19505
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19506
    }
19507
 
19508
    public void setWarehouseIdIsSet(boolean value) {
19509
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19510
    }
19511
 
19512
    public void setFieldValue(_Fields field, Object value) {
19513
      switch (field) {
19514
      case WAREHOUSE_ID:
19515
        if (value == null) {
19516
          unsetWarehouseId();
19517
        } else {
19518
          setWarehouseId((Long)value);
19519
        }
19520
        break;
19521
 
19522
      }
19523
    }
19524
 
19525
    public void setFieldValue(int fieldID, Object value) {
19526
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19527
    }
19528
 
19529
    public Object getFieldValue(_Fields field) {
19530
      switch (field) {
19531
      case WAREHOUSE_ID:
19532
        return new Long(getWarehouseId());
19533
 
19534
      }
19535
      throw new IllegalStateException();
19536
    }
19537
 
19538
    public Object getFieldValue(int fieldId) {
19539
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19540
    }
19541
 
19542
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19543
    public boolean isSet(_Fields field) {
19544
      switch (field) {
19545
      case WAREHOUSE_ID:
19546
        return isSetWarehouseId();
19547
      }
19548
      throw new IllegalStateException();
19549
    }
19550
 
19551
    public boolean isSet(int fieldID) {
19552
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19553
    }
19554
 
19555
    @Override
19556
    public boolean equals(Object that) {
19557
      if (that == null)
19558
        return false;
19559
      if (that instanceof batchOrders_args)
19560
        return this.equals((batchOrders_args)that);
19561
      return false;
19562
    }
19563
 
19564
    public boolean equals(batchOrders_args that) {
19565
      if (that == null)
19566
        return false;
19567
 
19568
      boolean this_present_warehouseId = true;
19569
      boolean that_present_warehouseId = true;
19570
      if (this_present_warehouseId || that_present_warehouseId) {
19571
        if (!(this_present_warehouseId && that_present_warehouseId))
19572
          return false;
19573
        if (this.warehouseId != that.warehouseId)
19574
          return false;
19575
      }
19576
 
19577
      return true;
19578
    }
19579
 
19580
    @Override
19581
    public int hashCode() {
19582
      return 0;
19583
    }
19584
 
19585
    public int compareTo(batchOrders_args other) {
19586
      if (!getClass().equals(other.getClass())) {
19587
        return getClass().getName().compareTo(other.getClass().getName());
19588
      }
19589
 
19590
      int lastComparison = 0;
19591
      batchOrders_args typedOther = (batchOrders_args)other;
19592
 
19593
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
19594
      if (lastComparison != 0) {
19595
        return lastComparison;
19596
      }
19597
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
19598
      if (lastComparison != 0) {
19599
        return lastComparison;
19600
      }
19601
      return 0;
19602
    }
19603
 
19604
    public void read(TProtocol iprot) throws TException {
19605
      TField field;
19606
      iprot.readStructBegin();
19607
      while (true)
19608
      {
19609
        field = iprot.readFieldBegin();
19610
        if (field.type == TType.STOP) { 
19611
          break;
19612
        }
19613
        _Fields fieldId = _Fields.findByThriftId(field.id);
19614
        if (fieldId == null) {
19615
          TProtocolUtil.skip(iprot, field.type);
19616
        } else {
19617
          switch (fieldId) {
19618
            case WAREHOUSE_ID:
19619
              if (field.type == TType.I64) {
19620
                this.warehouseId = iprot.readI64();
19621
                setWarehouseIdIsSet(true);
19622
              } else { 
19623
                TProtocolUtil.skip(iprot, field.type);
19624
              }
19625
              break;
19626
          }
19627
          iprot.readFieldEnd();
19628
        }
19629
      }
19630
      iprot.readStructEnd();
19631
      validate();
19632
    }
19633
 
19634
    public void write(TProtocol oprot) throws TException {
19635
      validate();
19636
 
19637
      oprot.writeStructBegin(STRUCT_DESC);
19638
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19639
      oprot.writeI64(this.warehouseId);
19640
      oprot.writeFieldEnd();
19641
      oprot.writeFieldStop();
19642
      oprot.writeStructEnd();
19643
    }
19644
 
19645
    @Override
19646
    public String toString() {
19647
      StringBuilder sb = new StringBuilder("batchOrders_args(");
19648
      boolean first = true;
19649
 
19650
      sb.append("warehouseId:");
19651
      sb.append(this.warehouseId);
19652
      first = false;
19653
      sb.append(")");
19654
      return sb.toString();
19655
    }
19656
 
19657
    public void validate() throws TException {
19658
      // check for required fields
19659
    }
19660
 
19661
  }
19662
 
19663
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
19664
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
19665
 
19666
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19667
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19668
 
19669
    private List<Order> success;
19670
    private TransactionServiceException ex;
19671
 
19672
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19673
    public enum _Fields implements TFieldIdEnum {
19674
      SUCCESS((short)0, "success"),
19675
      EX((short)1, "ex");
19676
 
19677
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19678
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19679
 
19680
      static {
19681
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19682
          byId.put((int)field._thriftId, field);
19683
          byName.put(field.getFieldName(), field);
19684
        }
19685
      }
19686
 
19687
      /**
19688
       * Find the _Fields constant that matches fieldId, or null if its not found.
19689
       */
19690
      public static _Fields findByThriftId(int fieldId) {
19691
        return byId.get(fieldId);
19692
      }
19693
 
19694
      /**
19695
       * Find the _Fields constant that matches fieldId, throwing an exception
19696
       * if it is not found.
19697
       */
19698
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19699
        _Fields fields = findByThriftId(fieldId);
19700
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19701
        return fields;
19702
      }
19703
 
19704
      /**
19705
       * Find the _Fields constant that matches name, or null if its not found.
19706
       */
19707
      public static _Fields findByName(String name) {
19708
        return byName.get(name);
19709
      }
19710
 
19711
      private final short _thriftId;
19712
      private final String _fieldName;
19713
 
19714
      _Fields(short thriftId, String fieldName) {
19715
        _thriftId = thriftId;
19716
        _fieldName = fieldName;
19717
      }
19718
 
19719
      public short getThriftFieldId() {
19720
        return _thriftId;
19721
      }
19722
 
19723
      public String getFieldName() {
19724
        return _fieldName;
19725
      }
19726
    }
19727
 
19728
    // isset id assignments
19729
 
19730
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19731
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19732
          new ListMetaData(TType.LIST, 
19733
              new StructMetaData(TType.STRUCT, Order.class))));
19734
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19735
          new FieldValueMetaData(TType.STRUCT)));
19736
    }});
19737
 
19738
    static {
19739
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
19740
    }
19741
 
19742
    public batchOrders_result() {
19743
    }
19744
 
19745
    public batchOrders_result(
19746
      List<Order> success,
19747
      TransactionServiceException ex)
19748
    {
19749
      this();
19750
      this.success = success;
19751
      this.ex = ex;
19752
    }
19753
 
19754
    /**
19755
     * Performs a deep copy on <i>other</i>.
19756
     */
19757
    public batchOrders_result(batchOrders_result other) {
19758
      if (other.isSetSuccess()) {
19759
        List<Order> __this__success = new ArrayList<Order>();
19760
        for (Order other_element : other.success) {
19761
          __this__success.add(new Order(other_element));
19762
        }
19763
        this.success = __this__success;
19764
      }
19765
      if (other.isSetEx()) {
19766
        this.ex = new TransactionServiceException(other.ex);
19767
      }
19768
    }
19769
 
19770
    public batchOrders_result deepCopy() {
19771
      return new batchOrders_result(this);
19772
    }
19773
 
19774
    @Deprecated
19775
    public batchOrders_result clone() {
19776
      return new batchOrders_result(this);
19777
    }
19778
 
19779
    public int getSuccessSize() {
19780
      return (this.success == null) ? 0 : this.success.size();
19781
    }
19782
 
19783
    public java.util.Iterator<Order> getSuccessIterator() {
19784
      return (this.success == null) ? null : this.success.iterator();
19785
    }
19786
 
19787
    public void addToSuccess(Order elem) {
19788
      if (this.success == null) {
19789
        this.success = new ArrayList<Order>();
19790
      }
19791
      this.success.add(elem);
19792
    }
19793
 
19794
    public List<Order> getSuccess() {
19795
      return this.success;
19796
    }
19797
 
19798
    public batchOrders_result setSuccess(List<Order> success) {
19799
      this.success = success;
19800
      return this;
19801
    }
19802
 
19803
    public void unsetSuccess() {
19804
      this.success = null;
19805
    }
19806
 
19807
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19808
    public boolean isSetSuccess() {
19809
      return this.success != null;
19810
    }
19811
 
19812
    public void setSuccessIsSet(boolean value) {
19813
      if (!value) {
19814
        this.success = null;
19815
      }
19816
    }
19817
 
19818
    public TransactionServiceException getEx() {
19819
      return this.ex;
19820
    }
19821
 
19822
    public batchOrders_result setEx(TransactionServiceException ex) {
19823
      this.ex = ex;
19824
      return this;
19825
    }
19826
 
19827
    public void unsetEx() {
19828
      this.ex = null;
19829
    }
19830
 
19831
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19832
    public boolean isSetEx() {
19833
      return this.ex != null;
19834
    }
19835
 
19836
    public void setExIsSet(boolean value) {
19837
      if (!value) {
19838
        this.ex = null;
19839
      }
19840
    }
19841
 
19842
    public void setFieldValue(_Fields field, Object value) {
19843
      switch (field) {
19844
      case SUCCESS:
19845
        if (value == null) {
19846
          unsetSuccess();
19847
        } else {
19848
          setSuccess((List<Order>)value);
19849
        }
19850
        break;
19851
 
19852
      case EX:
19853
        if (value == null) {
19854
          unsetEx();
19855
        } else {
19856
          setEx((TransactionServiceException)value);
19857
        }
19858
        break;
19859
 
19860
      }
19861
    }
19862
 
19863
    public void setFieldValue(int fieldID, Object value) {
19864
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19865
    }
19866
 
19867
    public Object getFieldValue(_Fields field) {
19868
      switch (field) {
19869
      case SUCCESS:
19870
        return getSuccess();
19871
 
19872
      case EX:
19873
        return getEx();
19874
 
19875
      }
19876
      throw new IllegalStateException();
19877
    }
19878
 
19879
    public Object getFieldValue(int fieldId) {
19880
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19881
    }
19882
 
19883
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19884
    public boolean isSet(_Fields field) {
19885
      switch (field) {
19886
      case SUCCESS:
19887
        return isSetSuccess();
19888
      case EX:
19889
        return isSetEx();
19890
      }
19891
      throw new IllegalStateException();
19892
    }
19893
 
19894
    public boolean isSet(int fieldID) {
19895
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19896
    }
19897
 
19898
    @Override
19899
    public boolean equals(Object that) {
19900
      if (that == null)
19901
        return false;
19902
      if (that instanceof batchOrders_result)
19903
        return this.equals((batchOrders_result)that);
19904
      return false;
19905
    }
19906
 
19907
    public boolean equals(batchOrders_result that) {
19908
      if (that == null)
19909
        return false;
19910
 
19911
      boolean this_present_success = true && this.isSetSuccess();
19912
      boolean that_present_success = true && that.isSetSuccess();
19913
      if (this_present_success || that_present_success) {
19914
        if (!(this_present_success && that_present_success))
19915
          return false;
19916
        if (!this.success.equals(that.success))
19917
          return false;
19918
      }
19919
 
19920
      boolean this_present_ex = true && this.isSetEx();
19921
      boolean that_present_ex = true && that.isSetEx();
19922
      if (this_present_ex || that_present_ex) {
19923
        if (!(this_present_ex && that_present_ex))
19924
          return false;
19925
        if (!this.ex.equals(that.ex))
19926
          return false;
19927
      }
19928
 
19929
      return true;
19930
    }
19931
 
19932
    @Override
19933
    public int hashCode() {
19934
      return 0;
19935
    }
19936
 
19937
    public int compareTo(batchOrders_result other) {
19938
      if (!getClass().equals(other.getClass())) {
19939
        return getClass().getName().compareTo(other.getClass().getName());
19940
      }
19941
 
19942
      int lastComparison = 0;
19943
      batchOrders_result typedOther = (batchOrders_result)other;
19944
 
19945
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19946
      if (lastComparison != 0) {
19947
        return lastComparison;
19948
      }
19949
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19950
      if (lastComparison != 0) {
19951
        return lastComparison;
19952
      }
19953
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19954
      if (lastComparison != 0) {
19955
        return lastComparison;
19956
      }
19957
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19958
      if (lastComparison != 0) {
19959
        return lastComparison;
19960
      }
19961
      return 0;
19962
    }
19963
 
19964
    public void read(TProtocol iprot) throws TException {
19965
      TField field;
19966
      iprot.readStructBegin();
19967
      while (true)
19968
      {
19969
        field = iprot.readFieldBegin();
19970
        if (field.type == TType.STOP) { 
19971
          break;
19972
        }
19973
        _Fields fieldId = _Fields.findByThriftId(field.id);
19974
        if (fieldId == null) {
19975
          TProtocolUtil.skip(iprot, field.type);
19976
        } else {
19977
          switch (fieldId) {
19978
            case SUCCESS:
19979
              if (field.type == TType.LIST) {
19980
                {
1382 varun.gupt 19981
                  TList _list44 = iprot.readListBegin();
19982
                  this.success = new ArrayList<Order>(_list44.size);
19983
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 19984
                  {
1382 varun.gupt 19985
                    Order _elem46;
19986
                    _elem46 = new Order();
19987
                    _elem46.read(iprot);
19988
                    this.success.add(_elem46);
1221 chandransh 19989
                  }
19990
                  iprot.readListEnd();
19991
                }
19992
              } else { 
19993
                TProtocolUtil.skip(iprot, field.type);
19994
              }
19995
              break;
19996
            case EX:
19997
              if (field.type == TType.STRUCT) {
19998
                this.ex = new TransactionServiceException();
19999
                this.ex.read(iprot);
20000
              } else { 
20001
                TProtocolUtil.skip(iprot, field.type);
20002
              }
20003
              break;
20004
          }
20005
          iprot.readFieldEnd();
20006
        }
20007
      }
20008
      iprot.readStructEnd();
20009
      validate();
20010
    }
20011
 
20012
    public void write(TProtocol oprot) throws TException {
20013
      oprot.writeStructBegin(STRUCT_DESC);
20014
 
20015
      if (this.isSetSuccess()) {
20016
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20017
        {
20018
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 20019
          for (Order _iter47 : this.success)
1221 chandransh 20020
          {
1382 varun.gupt 20021
            _iter47.write(oprot);
1221 chandransh 20022
          }
20023
          oprot.writeListEnd();
20024
        }
20025
        oprot.writeFieldEnd();
20026
      } else if (this.isSetEx()) {
20027
        oprot.writeFieldBegin(EX_FIELD_DESC);
20028
        this.ex.write(oprot);
20029
        oprot.writeFieldEnd();
20030
      }
20031
      oprot.writeFieldStop();
20032
      oprot.writeStructEnd();
20033
    }
20034
 
20035
    @Override
20036
    public String toString() {
20037
      StringBuilder sb = new StringBuilder("batchOrders_result(");
20038
      boolean first = true;
20039
 
20040
      sb.append("success:");
20041
      if (this.success == null) {
20042
        sb.append("null");
20043
      } else {
20044
        sb.append(this.success);
20045
      }
20046
      first = false;
20047
      if (!first) sb.append(", ");
20048
      sb.append("ex:");
20049
      if (this.ex == null) {
20050
        sb.append("null");
20051
      } else {
20052
        sb.append(this.ex);
20053
      }
20054
      first = false;
20055
      sb.append(")");
20056
      return sb.toString();
20057
    }
20058
 
20059
    public void validate() throws TException {
20060
      // check for required fields
20061
    }
20062
 
20063
  }
20064
 
1209 chandransh 20065
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
20066
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
20067
 
20068
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
20069
 
20070
    private long orderId;
20071
 
20072
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20073
    public enum _Fields implements TFieldIdEnum {
20074
      ORDER_ID((short)1, "orderId");
20075
 
20076
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20077
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20078
 
20079
      static {
20080
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20081
          byId.put((int)field._thriftId, field);
20082
          byName.put(field.getFieldName(), field);
20083
        }
20084
      }
20085
 
20086
      /**
20087
       * Find the _Fields constant that matches fieldId, or null if its not found.
20088
       */
20089
      public static _Fields findByThriftId(int fieldId) {
20090
        return byId.get(fieldId);
20091
      }
20092
 
20093
      /**
20094
       * Find the _Fields constant that matches fieldId, throwing an exception
20095
       * if it is not found.
20096
       */
20097
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20098
        _Fields fields = findByThriftId(fieldId);
20099
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20100
        return fields;
20101
      }
20102
 
20103
      /**
20104
       * Find the _Fields constant that matches name, or null if its not found.
20105
       */
20106
      public static _Fields findByName(String name) {
20107
        return byName.get(name);
20108
      }
20109
 
20110
      private final short _thriftId;
20111
      private final String _fieldName;
20112
 
20113
      _Fields(short thriftId, String fieldName) {
20114
        _thriftId = thriftId;
20115
        _fieldName = fieldName;
20116
      }
20117
 
20118
      public short getThriftFieldId() {
20119
        return _thriftId;
20120
      }
20121
 
20122
      public String getFieldName() {
20123
        return _fieldName;
20124
      }
20125
    }
20126
 
20127
    // isset id assignments
20128
    private static final int __ORDERID_ISSET_ID = 0;
20129
    private BitSet __isset_bit_vector = new BitSet(1);
20130
 
20131
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20132
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
20133
          new FieldValueMetaData(TType.I64)));
20134
    }});
20135
 
20136
    static {
20137
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
20138
    }
20139
 
20140
    public markOrderAsOutOfStock_args() {
20141
    }
20142
 
20143
    public markOrderAsOutOfStock_args(
20144
      long orderId)
20145
    {
20146
      this();
20147
      this.orderId = orderId;
20148
      setOrderIdIsSet(true);
20149
    }
20150
 
20151
    /**
20152
     * Performs a deep copy on <i>other</i>.
20153
     */
20154
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
20155
      __isset_bit_vector.clear();
20156
      __isset_bit_vector.or(other.__isset_bit_vector);
20157
      this.orderId = other.orderId;
20158
    }
20159
 
20160
    public markOrderAsOutOfStock_args deepCopy() {
20161
      return new markOrderAsOutOfStock_args(this);
20162
    }
20163
 
20164
    @Deprecated
20165
    public markOrderAsOutOfStock_args clone() {
20166
      return new markOrderAsOutOfStock_args(this);
20167
    }
20168
 
20169
    public long getOrderId() {
20170
      return this.orderId;
20171
    }
20172
 
20173
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
20174
      this.orderId = orderId;
20175
      setOrderIdIsSet(true);
20176
      return this;
20177
    }
20178
 
20179
    public void unsetOrderId() {
20180
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20181
    }
20182
 
20183
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20184
    public boolean isSetOrderId() {
20185
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20186
    }
20187
 
20188
    public void setOrderIdIsSet(boolean value) {
20189
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20190
    }
20191
 
20192
    public void setFieldValue(_Fields field, Object value) {
20193
      switch (field) {
20194
      case ORDER_ID:
20195
        if (value == null) {
20196
          unsetOrderId();
20197
        } else {
20198
          setOrderId((Long)value);
20199
        }
20200
        break;
20201
 
20202
      }
20203
    }
20204
 
20205
    public void setFieldValue(int fieldID, Object value) {
20206
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20207
    }
20208
 
20209
    public Object getFieldValue(_Fields field) {
20210
      switch (field) {
20211
      case ORDER_ID:
20212
        return new Long(getOrderId());
20213
 
20214
      }
20215
      throw new IllegalStateException();
20216
    }
20217
 
20218
    public Object getFieldValue(int fieldId) {
20219
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20220
    }
20221
 
20222
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20223
    public boolean isSet(_Fields field) {
20224
      switch (field) {
20225
      case ORDER_ID:
20226
        return isSetOrderId();
20227
      }
20228
      throw new IllegalStateException();
20229
    }
20230
 
20231
    public boolean isSet(int fieldID) {
20232
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20233
    }
20234
 
20235
    @Override
20236
    public boolean equals(Object that) {
20237
      if (that == null)
20238
        return false;
20239
      if (that instanceof markOrderAsOutOfStock_args)
20240
        return this.equals((markOrderAsOutOfStock_args)that);
20241
      return false;
20242
    }
20243
 
20244
    public boolean equals(markOrderAsOutOfStock_args that) {
20245
      if (that == null)
20246
        return false;
20247
 
20248
      boolean this_present_orderId = true;
20249
      boolean that_present_orderId = true;
20250
      if (this_present_orderId || that_present_orderId) {
20251
        if (!(this_present_orderId && that_present_orderId))
20252
          return false;
20253
        if (this.orderId != that.orderId)
20254
          return false;
20255
      }
20256
 
20257
      return true;
20258
    }
20259
 
20260
    @Override
20261
    public int hashCode() {
20262
      return 0;
20263
    }
20264
 
20265
    public int compareTo(markOrderAsOutOfStock_args other) {
20266
      if (!getClass().equals(other.getClass())) {
20267
        return getClass().getName().compareTo(other.getClass().getName());
20268
      }
20269
 
20270
      int lastComparison = 0;
20271
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
20272
 
20273
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20274
      if (lastComparison != 0) {
20275
        return lastComparison;
20276
      }
20277
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20278
      if (lastComparison != 0) {
20279
        return lastComparison;
20280
      }
20281
      return 0;
20282
    }
20283
 
20284
    public void read(TProtocol iprot) throws TException {
20285
      TField field;
20286
      iprot.readStructBegin();
20287
      while (true)
20288
      {
20289
        field = iprot.readFieldBegin();
20290
        if (field.type == TType.STOP) { 
20291
          break;
20292
        }
20293
        _Fields fieldId = _Fields.findByThriftId(field.id);
20294
        if (fieldId == null) {
20295
          TProtocolUtil.skip(iprot, field.type);
20296
        } else {
20297
          switch (fieldId) {
20298
            case ORDER_ID:
20299
              if (field.type == TType.I64) {
20300
                this.orderId = iprot.readI64();
20301
                setOrderIdIsSet(true);
20302
              } else { 
20303
                TProtocolUtil.skip(iprot, field.type);
20304
              }
20305
              break;
20306
          }
20307
          iprot.readFieldEnd();
20308
        }
20309
      }
20310
      iprot.readStructEnd();
20311
      validate();
20312
    }
20313
 
20314
    public void write(TProtocol oprot) throws TException {
20315
      validate();
20316
 
20317
      oprot.writeStructBegin(STRUCT_DESC);
20318
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20319
      oprot.writeI64(this.orderId);
20320
      oprot.writeFieldEnd();
20321
      oprot.writeFieldStop();
20322
      oprot.writeStructEnd();
20323
    }
20324
 
20325
    @Override
20326
    public String toString() {
20327
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
20328
      boolean first = true;
20329
 
20330
      sb.append("orderId:");
20331
      sb.append(this.orderId);
20332
      first = false;
20333
      sb.append(")");
20334
      return sb.toString();
20335
    }
20336
 
20337
    public void validate() throws TException {
20338
      // check for required fields
20339
    }
20340
 
20341
  }
20342
 
20343
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
20344
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
20345
 
20346
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20347
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20348
 
20349
    private boolean success;
20350
    private TransactionServiceException ex;
20351
 
20352
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20353
    public enum _Fields implements TFieldIdEnum {
20354
      SUCCESS((short)0, "success"),
20355
      EX((short)1, "ex");
20356
 
20357
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20358
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20359
 
20360
      static {
20361
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20362
          byId.put((int)field._thriftId, field);
20363
          byName.put(field.getFieldName(), field);
20364
        }
20365
      }
20366
 
20367
      /**
20368
       * Find the _Fields constant that matches fieldId, or null if its not found.
20369
       */
20370
      public static _Fields findByThriftId(int fieldId) {
20371
        return byId.get(fieldId);
20372
      }
20373
 
20374
      /**
20375
       * Find the _Fields constant that matches fieldId, throwing an exception
20376
       * if it is not found.
20377
       */
20378
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20379
        _Fields fields = findByThriftId(fieldId);
20380
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20381
        return fields;
20382
      }
20383
 
20384
      /**
20385
       * Find the _Fields constant that matches name, or null if its not found.
20386
       */
20387
      public static _Fields findByName(String name) {
20388
        return byName.get(name);
20389
      }
20390
 
20391
      private final short _thriftId;
20392
      private final String _fieldName;
20393
 
20394
      _Fields(short thriftId, String fieldName) {
20395
        _thriftId = thriftId;
20396
        _fieldName = fieldName;
20397
      }
20398
 
20399
      public short getThriftFieldId() {
20400
        return _thriftId;
20401
      }
20402
 
20403
      public String getFieldName() {
20404
        return _fieldName;
20405
      }
20406
    }
20407
 
20408
    // isset id assignments
20409
    private static final int __SUCCESS_ISSET_ID = 0;
20410
    private BitSet __isset_bit_vector = new BitSet(1);
20411
 
20412
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20413
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20414
          new FieldValueMetaData(TType.BOOL)));
20415
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20416
          new FieldValueMetaData(TType.STRUCT)));
20417
    }});
20418
 
20419
    static {
20420
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
20421
    }
20422
 
20423
    public markOrderAsOutOfStock_result() {
20424
    }
20425
 
20426
    public markOrderAsOutOfStock_result(
20427
      boolean success,
20428
      TransactionServiceException ex)
20429
    {
20430
      this();
20431
      this.success = success;
20432
      setSuccessIsSet(true);
20433
      this.ex = ex;
20434
    }
20435
 
20436
    /**
20437
     * Performs a deep copy on <i>other</i>.
20438
     */
20439
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
20440
      __isset_bit_vector.clear();
20441
      __isset_bit_vector.or(other.__isset_bit_vector);
20442
      this.success = other.success;
20443
      if (other.isSetEx()) {
20444
        this.ex = new TransactionServiceException(other.ex);
20445
      }
20446
    }
20447
 
20448
    public markOrderAsOutOfStock_result deepCopy() {
20449
      return new markOrderAsOutOfStock_result(this);
20450
    }
20451
 
20452
    @Deprecated
20453
    public markOrderAsOutOfStock_result clone() {
20454
      return new markOrderAsOutOfStock_result(this);
20455
    }
20456
 
20457
    public boolean isSuccess() {
20458
      return this.success;
20459
    }
20460
 
20461
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
20462
      this.success = success;
20463
      setSuccessIsSet(true);
20464
      return this;
20465
    }
20466
 
20467
    public void unsetSuccess() {
20468
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20469
    }
20470
 
20471
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20472
    public boolean isSetSuccess() {
20473
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20474
    }
20475
 
20476
    public void setSuccessIsSet(boolean value) {
20477
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20478
    }
20479
 
20480
    public TransactionServiceException getEx() {
20481
      return this.ex;
20482
    }
20483
 
20484
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
20485
      this.ex = ex;
20486
      return this;
20487
    }
20488
 
20489
    public void unsetEx() {
20490
      this.ex = null;
20491
    }
20492
 
20493
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20494
    public boolean isSetEx() {
20495
      return this.ex != null;
20496
    }
20497
 
20498
    public void setExIsSet(boolean value) {
20499
      if (!value) {
20500
        this.ex = null;
20501
      }
20502
    }
20503
 
20504
    public void setFieldValue(_Fields field, Object value) {
20505
      switch (field) {
20506
      case SUCCESS:
20507
        if (value == null) {
20508
          unsetSuccess();
20509
        } else {
20510
          setSuccess((Boolean)value);
20511
        }
20512
        break;
20513
 
20514
      case EX:
20515
        if (value == null) {
20516
          unsetEx();
20517
        } else {
20518
          setEx((TransactionServiceException)value);
20519
        }
20520
        break;
20521
 
20522
      }
20523
    }
20524
 
20525
    public void setFieldValue(int fieldID, Object value) {
20526
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20527
    }
20528
 
20529
    public Object getFieldValue(_Fields field) {
20530
      switch (field) {
20531
      case SUCCESS:
20532
        return new Boolean(isSuccess());
20533
 
20534
      case EX:
20535
        return getEx();
20536
 
20537
      }
20538
      throw new IllegalStateException();
20539
    }
20540
 
20541
    public Object getFieldValue(int fieldId) {
20542
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20543
    }
20544
 
20545
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20546
    public boolean isSet(_Fields field) {
20547
      switch (field) {
20548
      case SUCCESS:
20549
        return isSetSuccess();
20550
      case EX:
20551
        return isSetEx();
20552
      }
20553
      throw new IllegalStateException();
20554
    }
20555
 
20556
    public boolean isSet(int fieldID) {
20557
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20558
    }
20559
 
20560
    @Override
20561
    public boolean equals(Object that) {
20562
      if (that == null)
20563
        return false;
20564
      if (that instanceof markOrderAsOutOfStock_result)
20565
        return this.equals((markOrderAsOutOfStock_result)that);
20566
      return false;
20567
    }
20568
 
20569
    public boolean equals(markOrderAsOutOfStock_result that) {
20570
      if (that == null)
20571
        return false;
20572
 
20573
      boolean this_present_success = true;
20574
      boolean that_present_success = true;
20575
      if (this_present_success || that_present_success) {
20576
        if (!(this_present_success && that_present_success))
20577
          return false;
20578
        if (this.success != that.success)
20579
          return false;
20580
      }
20581
 
20582
      boolean this_present_ex = true && this.isSetEx();
20583
      boolean that_present_ex = true && that.isSetEx();
20584
      if (this_present_ex || that_present_ex) {
20585
        if (!(this_present_ex && that_present_ex))
20586
          return false;
20587
        if (!this.ex.equals(that.ex))
20588
          return false;
20589
      }
20590
 
20591
      return true;
20592
    }
20593
 
20594
    @Override
20595
    public int hashCode() {
20596
      return 0;
20597
    }
20598
 
20599
    public int compareTo(markOrderAsOutOfStock_result other) {
20600
      if (!getClass().equals(other.getClass())) {
20601
        return getClass().getName().compareTo(other.getClass().getName());
20602
      }
20603
 
20604
      int lastComparison = 0;
20605
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
20606
 
20607
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20608
      if (lastComparison != 0) {
20609
        return lastComparison;
20610
      }
20611
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20612
      if (lastComparison != 0) {
20613
        return lastComparison;
20614
      }
20615
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20616
      if (lastComparison != 0) {
20617
        return lastComparison;
20618
      }
20619
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20620
      if (lastComparison != 0) {
20621
        return lastComparison;
20622
      }
20623
      return 0;
20624
    }
20625
 
20626
    public void read(TProtocol iprot) throws TException {
20627
      TField field;
20628
      iprot.readStructBegin();
20629
      while (true)
20630
      {
20631
        field = iprot.readFieldBegin();
20632
        if (field.type == TType.STOP) { 
20633
          break;
20634
        }
20635
        _Fields fieldId = _Fields.findByThriftId(field.id);
20636
        if (fieldId == null) {
20637
          TProtocolUtil.skip(iprot, field.type);
20638
        } else {
20639
          switch (fieldId) {
20640
            case SUCCESS:
20641
              if (field.type == TType.BOOL) {
20642
                this.success = iprot.readBool();
20643
                setSuccessIsSet(true);
20644
              } else { 
20645
                TProtocolUtil.skip(iprot, field.type);
20646
              }
20647
              break;
20648
            case EX:
20649
              if (field.type == TType.STRUCT) {
20650
                this.ex = new TransactionServiceException();
20651
                this.ex.read(iprot);
20652
              } else { 
20653
                TProtocolUtil.skip(iprot, field.type);
20654
              }
20655
              break;
20656
          }
20657
          iprot.readFieldEnd();
20658
        }
20659
      }
20660
      iprot.readStructEnd();
20661
      validate();
20662
    }
20663
 
20664
    public void write(TProtocol oprot) throws TException {
20665
      oprot.writeStructBegin(STRUCT_DESC);
20666
 
20667
      if (this.isSetSuccess()) {
20668
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20669
        oprot.writeBool(this.success);
20670
        oprot.writeFieldEnd();
20671
      } else if (this.isSetEx()) {
20672
        oprot.writeFieldBegin(EX_FIELD_DESC);
20673
        this.ex.write(oprot);
20674
        oprot.writeFieldEnd();
20675
      }
20676
      oprot.writeFieldStop();
20677
      oprot.writeStructEnd();
20678
    }
20679
 
20680
    @Override
20681
    public String toString() {
20682
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
20683
      boolean first = true;
20684
 
20685
      sb.append("success:");
20686
      sb.append(this.success);
20687
      first = false;
20688
      if (!first) sb.append(", ");
20689
      sb.append("ex:");
20690
      if (this.ex == null) {
20691
        sb.append("null");
20692
      } else {
20693
        sb.append(this.ex);
20694
      }
20695
      first = false;
20696
      sb.append(")");
20697
      return sb.toString();
20698
    }
20699
 
20700
    public void validate() throws TException {
20701
      // check for required fields
20702
    }
20703
 
20704
  }
20705
 
758 chandransh 20706
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
20707
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
20708
 
20709
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
20710
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
20711
 
20712
    private long warehouseId;
20713
    private long providerId;
20714
 
20715
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20716
    public enum _Fields implements TFieldIdEnum {
20717
      WAREHOUSE_ID((short)1, "warehouseId"),
20718
      PROVIDER_ID((short)2, "providerId");
20719
 
20720
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20721
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20722
 
20723
      static {
20724
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20725
          byId.put((int)field._thriftId, field);
20726
          byName.put(field.getFieldName(), field);
20727
        }
20728
      }
20729
 
20730
      /**
20731
       * Find the _Fields constant that matches fieldId, or null if its not found.
20732
       */
20733
      public static _Fields findByThriftId(int fieldId) {
20734
        return byId.get(fieldId);
20735
      }
20736
 
20737
      /**
20738
       * Find the _Fields constant that matches fieldId, throwing an exception
20739
       * if it is not found.
20740
       */
20741
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20742
        _Fields fields = findByThriftId(fieldId);
20743
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20744
        return fields;
20745
      }
20746
 
20747
      /**
20748
       * Find the _Fields constant that matches name, or null if its not found.
20749
       */
20750
      public static _Fields findByName(String name) {
20751
        return byName.get(name);
20752
      }
20753
 
20754
      private final short _thriftId;
20755
      private final String _fieldName;
20756
 
20757
      _Fields(short thriftId, String fieldName) {
20758
        _thriftId = thriftId;
20759
        _fieldName = fieldName;
20760
      }
20761
 
20762
      public short getThriftFieldId() {
20763
        return _thriftId;
20764
      }
20765
 
20766
      public String getFieldName() {
20767
        return _fieldName;
20768
      }
20769
    }
20770
 
20771
    // isset id assignments
20772
    private static final int __WAREHOUSEID_ISSET_ID = 0;
20773
    private static final int __PROVIDERID_ISSET_ID = 1;
20774
    private BitSet __isset_bit_vector = new BitSet(2);
20775
 
20776
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20777
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
20778
          new FieldValueMetaData(TType.I64)));
20779
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
20780
          new FieldValueMetaData(TType.I64)));
20781
    }});
20782
 
20783
    static {
20784
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
20785
    }
20786
 
20787
    public markOrdersAsManifested_args() {
20788
    }
20789
 
20790
    public markOrdersAsManifested_args(
20791
      long warehouseId,
20792
      long providerId)
20793
    {
20794
      this();
20795
      this.warehouseId = warehouseId;
20796
      setWarehouseIdIsSet(true);
20797
      this.providerId = providerId;
20798
      setProviderIdIsSet(true);
20799
    }
20800
 
20801
    /**
20802
     * Performs a deep copy on <i>other</i>.
20803
     */
20804
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
20805
      __isset_bit_vector.clear();
20806
      __isset_bit_vector.or(other.__isset_bit_vector);
20807
      this.warehouseId = other.warehouseId;
20808
      this.providerId = other.providerId;
20809
    }
20810
 
20811
    public markOrdersAsManifested_args deepCopy() {
20812
      return new markOrdersAsManifested_args(this);
20813
    }
20814
 
20815
    @Deprecated
20816
    public markOrdersAsManifested_args clone() {
20817
      return new markOrdersAsManifested_args(this);
20818
    }
20819
 
20820
    public long getWarehouseId() {
20821
      return this.warehouseId;
20822
    }
20823
 
20824
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
20825
      this.warehouseId = warehouseId;
20826
      setWarehouseIdIsSet(true);
20827
      return this;
20828
    }
20829
 
20830
    public void unsetWarehouseId() {
20831
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20832
    }
20833
 
20834
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
20835
    public boolean isSetWarehouseId() {
20836
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20837
    }
20838
 
20839
    public void setWarehouseIdIsSet(boolean value) {
20840
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20841
    }
20842
 
20843
    public long getProviderId() {
20844
      return this.providerId;
20845
    }
20846
 
20847
    public markOrdersAsManifested_args setProviderId(long providerId) {
20848
      this.providerId = providerId;
20849
      setProviderIdIsSet(true);
20850
      return this;
20851
    }
20852
 
20853
    public void unsetProviderId() {
20854
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
20855
    }
20856
 
20857
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
20858
    public boolean isSetProviderId() {
20859
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
20860
    }
20861
 
20862
    public void setProviderIdIsSet(boolean value) {
20863
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
20864
    }
20865
 
20866
    public void setFieldValue(_Fields field, Object value) {
20867
      switch (field) {
20868
      case WAREHOUSE_ID:
20869
        if (value == null) {
20870
          unsetWarehouseId();
20871
        } else {
20872
          setWarehouseId((Long)value);
20873
        }
20874
        break;
20875
 
20876
      case PROVIDER_ID:
20877
        if (value == null) {
20878
          unsetProviderId();
20879
        } else {
20880
          setProviderId((Long)value);
20881
        }
20882
        break;
20883
 
20884
      }
20885
    }
20886
 
20887
    public void setFieldValue(int fieldID, Object value) {
20888
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20889
    }
20890
 
20891
    public Object getFieldValue(_Fields field) {
20892
      switch (field) {
20893
      case WAREHOUSE_ID:
20894
        return new Long(getWarehouseId());
20895
 
20896
      case PROVIDER_ID:
20897
        return new Long(getProviderId());
20898
 
20899
      }
20900
      throw new IllegalStateException();
20901
    }
20902
 
20903
    public Object getFieldValue(int fieldId) {
20904
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20905
    }
20906
 
20907
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20908
    public boolean isSet(_Fields field) {
20909
      switch (field) {
20910
      case WAREHOUSE_ID:
20911
        return isSetWarehouseId();
20912
      case PROVIDER_ID:
20913
        return isSetProviderId();
20914
      }
20915
      throw new IllegalStateException();
20916
    }
20917
 
20918
    public boolean isSet(int fieldID) {
20919
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20920
    }
20921
 
20922
    @Override
20923
    public boolean equals(Object that) {
20924
      if (that == null)
20925
        return false;
20926
      if (that instanceof markOrdersAsManifested_args)
20927
        return this.equals((markOrdersAsManifested_args)that);
20928
      return false;
20929
    }
20930
 
20931
    public boolean equals(markOrdersAsManifested_args that) {
20932
      if (that == null)
20933
        return false;
20934
 
20935
      boolean this_present_warehouseId = true;
20936
      boolean that_present_warehouseId = true;
20937
      if (this_present_warehouseId || that_present_warehouseId) {
20938
        if (!(this_present_warehouseId && that_present_warehouseId))
20939
          return false;
20940
        if (this.warehouseId != that.warehouseId)
20941
          return false;
20942
      }
20943
 
20944
      boolean this_present_providerId = true;
20945
      boolean that_present_providerId = true;
20946
      if (this_present_providerId || that_present_providerId) {
20947
        if (!(this_present_providerId && that_present_providerId))
20948
          return false;
20949
        if (this.providerId != that.providerId)
20950
          return false;
20951
      }
20952
 
20953
      return true;
20954
    }
20955
 
20956
    @Override
20957
    public int hashCode() {
20958
      return 0;
20959
    }
20960
 
20961
    public int compareTo(markOrdersAsManifested_args other) {
20962
      if (!getClass().equals(other.getClass())) {
20963
        return getClass().getName().compareTo(other.getClass().getName());
20964
      }
20965
 
20966
      int lastComparison = 0;
20967
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
20968
 
20969
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
20970
      if (lastComparison != 0) {
20971
        return lastComparison;
20972
      }
20973
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
20974
      if (lastComparison != 0) {
20975
        return lastComparison;
20976
      }
20977
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
20978
      if (lastComparison != 0) {
20979
        return lastComparison;
20980
      }
20981
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
20982
      if (lastComparison != 0) {
20983
        return lastComparison;
20984
      }
20985
      return 0;
20986
    }
20987
 
20988
    public void read(TProtocol iprot) throws TException {
20989
      TField field;
20990
      iprot.readStructBegin();
20991
      while (true)
20992
      {
20993
        field = iprot.readFieldBegin();
20994
        if (field.type == TType.STOP) { 
20995
          break;
20996
        }
20997
        _Fields fieldId = _Fields.findByThriftId(field.id);
20998
        if (fieldId == null) {
20999
          TProtocolUtil.skip(iprot, field.type);
21000
        } else {
21001
          switch (fieldId) {
21002
            case WAREHOUSE_ID:
21003
              if (field.type == TType.I64) {
21004
                this.warehouseId = iprot.readI64();
21005
                setWarehouseIdIsSet(true);
21006
              } else { 
21007
                TProtocolUtil.skip(iprot, field.type);
21008
              }
21009
              break;
21010
            case PROVIDER_ID:
21011
              if (field.type == TType.I64) {
21012
                this.providerId = iprot.readI64();
21013
                setProviderIdIsSet(true);
21014
              } else { 
21015
                TProtocolUtil.skip(iprot, field.type);
21016
              }
21017
              break;
21018
          }
21019
          iprot.readFieldEnd();
21020
        }
21021
      }
21022
      iprot.readStructEnd();
21023
      validate();
21024
    }
21025
 
21026
    public void write(TProtocol oprot) throws TException {
21027
      validate();
21028
 
21029
      oprot.writeStructBegin(STRUCT_DESC);
21030
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21031
      oprot.writeI64(this.warehouseId);
21032
      oprot.writeFieldEnd();
21033
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21034
      oprot.writeI64(this.providerId);
21035
      oprot.writeFieldEnd();
21036
      oprot.writeFieldStop();
21037
      oprot.writeStructEnd();
21038
    }
21039
 
21040
    @Override
21041
    public String toString() {
21042
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
21043
      boolean first = true;
21044
 
21045
      sb.append("warehouseId:");
21046
      sb.append(this.warehouseId);
21047
      first = false;
21048
      if (!first) sb.append(", ");
21049
      sb.append("providerId:");
21050
      sb.append(this.providerId);
21051
      first = false;
21052
      sb.append(")");
21053
      return sb.toString();
21054
    }
21055
 
21056
    public void validate() throws TException {
21057
      // check for required fields
21058
    }
21059
 
21060
  }
21061
 
21062
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
21063
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
21064
 
21065
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21066
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21067
 
21068
    private boolean success;
21069
    private TransactionServiceException ex;
21070
 
21071
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21072
    public enum _Fields implements TFieldIdEnum {
21073
      SUCCESS((short)0, "success"),
21074
      EX((short)1, "ex");
21075
 
21076
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21077
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21078
 
21079
      static {
21080
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21081
          byId.put((int)field._thriftId, field);
21082
          byName.put(field.getFieldName(), field);
21083
        }
21084
      }
21085
 
21086
      /**
21087
       * Find the _Fields constant that matches fieldId, or null if its not found.
21088
       */
21089
      public static _Fields findByThriftId(int fieldId) {
21090
        return byId.get(fieldId);
21091
      }
21092
 
21093
      /**
21094
       * Find the _Fields constant that matches fieldId, throwing an exception
21095
       * if it is not found.
21096
       */
21097
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21098
        _Fields fields = findByThriftId(fieldId);
21099
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21100
        return fields;
21101
      }
21102
 
21103
      /**
21104
       * Find the _Fields constant that matches name, or null if its not found.
21105
       */
21106
      public static _Fields findByName(String name) {
21107
        return byName.get(name);
21108
      }
21109
 
21110
      private final short _thriftId;
21111
      private final String _fieldName;
21112
 
21113
      _Fields(short thriftId, String fieldName) {
21114
        _thriftId = thriftId;
21115
        _fieldName = fieldName;
21116
      }
21117
 
21118
      public short getThriftFieldId() {
21119
        return _thriftId;
21120
      }
21121
 
21122
      public String getFieldName() {
21123
        return _fieldName;
21124
      }
21125
    }
21126
 
21127
    // isset id assignments
21128
    private static final int __SUCCESS_ISSET_ID = 0;
21129
    private BitSet __isset_bit_vector = new BitSet(1);
21130
 
21131
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21132
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21133
          new FieldValueMetaData(TType.BOOL)));
21134
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21135
          new FieldValueMetaData(TType.STRUCT)));
21136
    }});
21137
 
21138
    static {
21139
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
21140
    }
21141
 
21142
    public markOrdersAsManifested_result() {
21143
    }
21144
 
21145
    public markOrdersAsManifested_result(
21146
      boolean success,
21147
      TransactionServiceException ex)
21148
    {
21149
      this();
21150
      this.success = success;
21151
      setSuccessIsSet(true);
21152
      this.ex = ex;
21153
    }
21154
 
21155
    /**
21156
     * Performs a deep copy on <i>other</i>.
21157
     */
21158
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
21159
      __isset_bit_vector.clear();
21160
      __isset_bit_vector.or(other.__isset_bit_vector);
21161
      this.success = other.success;
21162
      if (other.isSetEx()) {
21163
        this.ex = new TransactionServiceException(other.ex);
21164
      }
21165
    }
21166
 
21167
    public markOrdersAsManifested_result deepCopy() {
21168
      return new markOrdersAsManifested_result(this);
21169
    }
21170
 
21171
    @Deprecated
21172
    public markOrdersAsManifested_result clone() {
21173
      return new markOrdersAsManifested_result(this);
21174
    }
21175
 
21176
    public boolean isSuccess() {
21177
      return this.success;
21178
    }
21179
 
21180
    public markOrdersAsManifested_result setSuccess(boolean success) {
21181
      this.success = success;
21182
      setSuccessIsSet(true);
21183
      return this;
21184
    }
21185
 
21186
    public void unsetSuccess() {
21187
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21188
    }
21189
 
21190
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21191
    public boolean isSetSuccess() {
21192
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21193
    }
21194
 
21195
    public void setSuccessIsSet(boolean value) {
21196
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21197
    }
21198
 
21199
    public TransactionServiceException getEx() {
21200
      return this.ex;
21201
    }
21202
 
21203
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
21204
      this.ex = ex;
21205
      return this;
21206
    }
21207
 
21208
    public void unsetEx() {
21209
      this.ex = null;
21210
    }
21211
 
21212
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21213
    public boolean isSetEx() {
21214
      return this.ex != null;
21215
    }
21216
 
21217
    public void setExIsSet(boolean value) {
21218
      if (!value) {
21219
        this.ex = null;
21220
      }
21221
    }
21222
 
21223
    public void setFieldValue(_Fields field, Object value) {
21224
      switch (field) {
21225
      case SUCCESS:
21226
        if (value == null) {
21227
          unsetSuccess();
21228
        } else {
21229
          setSuccess((Boolean)value);
21230
        }
21231
        break;
21232
 
21233
      case EX:
21234
        if (value == null) {
21235
          unsetEx();
21236
        } else {
21237
          setEx((TransactionServiceException)value);
21238
        }
21239
        break;
21240
 
21241
      }
21242
    }
21243
 
21244
    public void setFieldValue(int fieldID, Object value) {
21245
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21246
    }
21247
 
21248
    public Object getFieldValue(_Fields field) {
21249
      switch (field) {
21250
      case SUCCESS:
21251
        return new Boolean(isSuccess());
21252
 
21253
      case EX:
21254
        return getEx();
21255
 
21256
      }
21257
      throw new IllegalStateException();
21258
    }
21259
 
21260
    public Object getFieldValue(int fieldId) {
21261
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21262
    }
21263
 
21264
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21265
    public boolean isSet(_Fields field) {
21266
      switch (field) {
21267
      case SUCCESS:
21268
        return isSetSuccess();
21269
      case EX:
21270
        return isSetEx();
21271
      }
21272
      throw new IllegalStateException();
21273
    }
21274
 
21275
    public boolean isSet(int fieldID) {
21276
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21277
    }
21278
 
21279
    @Override
21280
    public boolean equals(Object that) {
21281
      if (that == null)
21282
        return false;
21283
      if (that instanceof markOrdersAsManifested_result)
21284
        return this.equals((markOrdersAsManifested_result)that);
21285
      return false;
21286
    }
21287
 
21288
    public boolean equals(markOrdersAsManifested_result that) {
21289
      if (that == null)
21290
        return false;
21291
 
21292
      boolean this_present_success = true;
21293
      boolean that_present_success = true;
21294
      if (this_present_success || that_present_success) {
21295
        if (!(this_present_success && that_present_success))
21296
          return false;
21297
        if (this.success != that.success)
21298
          return false;
21299
      }
21300
 
21301
      boolean this_present_ex = true && this.isSetEx();
21302
      boolean that_present_ex = true && that.isSetEx();
21303
      if (this_present_ex || that_present_ex) {
21304
        if (!(this_present_ex && that_present_ex))
21305
          return false;
21306
        if (!this.ex.equals(that.ex))
21307
          return false;
21308
      }
21309
 
21310
      return true;
21311
    }
21312
 
21313
    @Override
21314
    public int hashCode() {
21315
      return 0;
21316
    }
21317
 
21318
    public int compareTo(markOrdersAsManifested_result other) {
21319
      if (!getClass().equals(other.getClass())) {
21320
        return getClass().getName().compareTo(other.getClass().getName());
21321
      }
21322
 
21323
      int lastComparison = 0;
21324
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
21325
 
21326
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21327
      if (lastComparison != 0) {
21328
        return lastComparison;
21329
      }
21330
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21331
      if (lastComparison != 0) {
21332
        return lastComparison;
21333
      }
21334
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21335
      if (lastComparison != 0) {
21336
        return lastComparison;
21337
      }
21338
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21339
      if (lastComparison != 0) {
21340
        return lastComparison;
21341
      }
21342
      return 0;
21343
    }
21344
 
21345
    public void read(TProtocol iprot) throws TException {
21346
      TField field;
21347
      iprot.readStructBegin();
21348
      while (true)
21349
      {
21350
        field = iprot.readFieldBegin();
21351
        if (field.type == TType.STOP) { 
21352
          break;
21353
        }
21354
        _Fields fieldId = _Fields.findByThriftId(field.id);
21355
        if (fieldId == null) {
21356
          TProtocolUtil.skip(iprot, field.type);
21357
        } else {
21358
          switch (fieldId) {
21359
            case SUCCESS:
21360
              if (field.type == TType.BOOL) {
21361
                this.success = iprot.readBool();
21362
                setSuccessIsSet(true);
21363
              } else { 
21364
                TProtocolUtil.skip(iprot, field.type);
21365
              }
21366
              break;
21367
            case EX:
21368
              if (field.type == TType.STRUCT) {
21369
                this.ex = new TransactionServiceException();
21370
                this.ex.read(iprot);
21371
              } else { 
21372
                TProtocolUtil.skip(iprot, field.type);
21373
              }
21374
              break;
21375
          }
21376
          iprot.readFieldEnd();
21377
        }
21378
      }
21379
      iprot.readStructEnd();
21380
      validate();
21381
    }
21382
 
21383
    public void write(TProtocol oprot) throws TException {
21384
      oprot.writeStructBegin(STRUCT_DESC);
21385
 
21386
      if (this.isSetSuccess()) {
21387
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21388
        oprot.writeBool(this.success);
21389
        oprot.writeFieldEnd();
21390
      } else if (this.isSetEx()) {
21391
        oprot.writeFieldBegin(EX_FIELD_DESC);
21392
        this.ex.write(oprot);
21393
        oprot.writeFieldEnd();
21394
      }
21395
      oprot.writeFieldStop();
21396
      oprot.writeStructEnd();
21397
    }
21398
 
21399
    @Override
21400
    public String toString() {
21401
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
21402
      boolean first = true;
21403
 
21404
      sb.append("success:");
21405
      sb.append(this.success);
21406
      first = false;
21407
      if (!first) sb.append(", ");
21408
      sb.append("ex:");
21409
      if (this.ex == null) {
21410
        sb.append("null");
21411
      } else {
21412
        sb.append(this.ex);
21413
      }
21414
      first = false;
21415
      sb.append(")");
21416
      return sb.toString();
21417
    }
21418
 
21419
    public void validate() throws TException {
21420
      // check for required fields
21421
    }
21422
 
21423
  }
21424
 
1114 chandransh 21425
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
21426
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
21427
 
21428
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21429
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
21430
 
21431
    private long providerId;
1245 chandransh 21432
    private Map<String,String> pickupDetails;
1114 chandransh 21433
 
21434
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21435
    public enum _Fields implements TFieldIdEnum {
21436
      PROVIDER_ID((short)1, "providerId"),
21437
      PICKUP_DETAILS((short)2, "pickupDetails");
21438
 
21439
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21440
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21441
 
21442
      static {
21443
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21444
          byId.put((int)field._thriftId, field);
21445
          byName.put(field.getFieldName(), field);
21446
        }
21447
      }
21448
 
21449
      /**
21450
       * Find the _Fields constant that matches fieldId, or null if its not found.
21451
       */
21452
      public static _Fields findByThriftId(int fieldId) {
21453
        return byId.get(fieldId);
21454
      }
21455
 
21456
      /**
21457
       * Find the _Fields constant that matches fieldId, throwing an exception
21458
       * if it is not found.
21459
       */
21460
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21461
        _Fields fields = findByThriftId(fieldId);
21462
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21463
        return fields;
21464
      }
21465
 
21466
      /**
21467
       * Find the _Fields constant that matches name, or null if its not found.
21468
       */
21469
      public static _Fields findByName(String name) {
21470
        return byName.get(name);
21471
      }
21472
 
21473
      private final short _thriftId;
21474
      private final String _fieldName;
21475
 
21476
      _Fields(short thriftId, String fieldName) {
21477
        _thriftId = thriftId;
21478
        _fieldName = fieldName;
21479
      }
21480
 
21481
      public short getThriftFieldId() {
21482
        return _thriftId;
21483
      }
21484
 
21485
      public String getFieldName() {
21486
        return _fieldName;
21487
      }
21488
    }
21489
 
21490
    // isset id assignments
21491
    private static final int __PROVIDERID_ISSET_ID = 0;
21492
    private BitSet __isset_bit_vector = new BitSet(1);
21493
 
21494
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21495
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21496
          new FieldValueMetaData(TType.I64)));
21497
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
21498
          new MapMetaData(TType.MAP, 
21499
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 21500
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 21501
    }});
21502
 
21503
    static {
21504
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
21505
    }
21506
 
21507
    public markOrdersAsPickedUp_args() {
21508
    }
21509
 
21510
    public markOrdersAsPickedUp_args(
21511
      long providerId,
1245 chandransh 21512
      Map<String,String> pickupDetails)
1114 chandransh 21513
    {
21514
      this();
21515
      this.providerId = providerId;
21516
      setProviderIdIsSet(true);
21517
      this.pickupDetails = pickupDetails;
21518
    }
21519
 
21520
    /**
21521
     * Performs a deep copy on <i>other</i>.
21522
     */
21523
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
21524
      __isset_bit_vector.clear();
21525
      __isset_bit_vector.or(other.__isset_bit_vector);
21526
      this.providerId = other.providerId;
21527
      if (other.isSetPickupDetails()) {
1245 chandransh 21528
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
21529
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 21530
 
21531
          String other_element_key = other_element.getKey();
1245 chandransh 21532
          String other_element_value = other_element.getValue();
1114 chandransh 21533
 
21534
          String __this__pickupDetails_copy_key = other_element_key;
21535
 
1245 chandransh 21536
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 21537
 
21538
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
21539
        }
21540
        this.pickupDetails = __this__pickupDetails;
21541
      }
21542
    }
21543
 
21544
    public markOrdersAsPickedUp_args deepCopy() {
21545
      return new markOrdersAsPickedUp_args(this);
21546
    }
21547
 
21548
    @Deprecated
21549
    public markOrdersAsPickedUp_args clone() {
21550
      return new markOrdersAsPickedUp_args(this);
21551
    }
21552
 
21553
    public long getProviderId() {
21554
      return this.providerId;
21555
    }
21556
 
21557
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
21558
      this.providerId = providerId;
21559
      setProviderIdIsSet(true);
21560
      return this;
21561
    }
21562
 
21563
    public void unsetProviderId() {
21564
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21565
    }
21566
 
21567
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21568
    public boolean isSetProviderId() {
21569
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21570
    }
21571
 
21572
    public void setProviderIdIsSet(boolean value) {
21573
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21574
    }
21575
 
21576
    public int getPickupDetailsSize() {
21577
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
21578
    }
21579
 
1245 chandransh 21580
    public void putToPickupDetails(String key, String val) {
1114 chandransh 21581
      if (this.pickupDetails == null) {
1245 chandransh 21582
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 21583
      }
21584
      this.pickupDetails.put(key, val);
21585
    }
21586
 
1245 chandransh 21587
    public Map<String,String> getPickupDetails() {
1114 chandransh 21588
      return this.pickupDetails;
21589
    }
21590
 
1245 chandransh 21591
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 21592
      this.pickupDetails = pickupDetails;
21593
      return this;
21594
    }
21595
 
21596
    public void unsetPickupDetails() {
21597
      this.pickupDetails = null;
21598
    }
21599
 
21600
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
21601
    public boolean isSetPickupDetails() {
21602
      return this.pickupDetails != null;
21603
    }
21604
 
21605
    public void setPickupDetailsIsSet(boolean value) {
21606
      if (!value) {
21607
        this.pickupDetails = null;
21608
      }
21609
    }
21610
 
21611
    public void setFieldValue(_Fields field, Object value) {
21612
      switch (field) {
21613
      case PROVIDER_ID:
21614
        if (value == null) {
21615
          unsetProviderId();
21616
        } else {
21617
          setProviderId((Long)value);
21618
        }
21619
        break;
21620
 
21621
      case PICKUP_DETAILS:
21622
        if (value == null) {
21623
          unsetPickupDetails();
21624
        } else {
1245 chandransh 21625
          setPickupDetails((Map<String,String>)value);
1114 chandransh 21626
        }
21627
        break;
21628
 
21629
      }
21630
    }
21631
 
21632
    public void setFieldValue(int fieldID, Object value) {
21633
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21634
    }
21635
 
21636
    public Object getFieldValue(_Fields field) {
21637
      switch (field) {
21638
      case PROVIDER_ID:
21639
        return new Long(getProviderId());
21640
 
21641
      case PICKUP_DETAILS:
21642
        return getPickupDetails();
21643
 
21644
      }
21645
      throw new IllegalStateException();
21646
    }
21647
 
21648
    public Object getFieldValue(int fieldId) {
21649
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21650
    }
21651
 
21652
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21653
    public boolean isSet(_Fields field) {
21654
      switch (field) {
21655
      case PROVIDER_ID:
21656
        return isSetProviderId();
21657
      case PICKUP_DETAILS:
21658
        return isSetPickupDetails();
21659
      }
21660
      throw new IllegalStateException();
21661
    }
21662
 
21663
    public boolean isSet(int fieldID) {
21664
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21665
    }
21666
 
21667
    @Override
21668
    public boolean equals(Object that) {
21669
      if (that == null)
21670
        return false;
21671
      if (that instanceof markOrdersAsPickedUp_args)
21672
        return this.equals((markOrdersAsPickedUp_args)that);
21673
      return false;
21674
    }
21675
 
21676
    public boolean equals(markOrdersAsPickedUp_args that) {
21677
      if (that == null)
21678
        return false;
21679
 
21680
      boolean this_present_providerId = true;
21681
      boolean that_present_providerId = true;
21682
      if (this_present_providerId || that_present_providerId) {
21683
        if (!(this_present_providerId && that_present_providerId))
21684
          return false;
21685
        if (this.providerId != that.providerId)
21686
          return false;
21687
      }
21688
 
21689
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
21690
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
21691
      if (this_present_pickupDetails || that_present_pickupDetails) {
21692
        if (!(this_present_pickupDetails && that_present_pickupDetails))
21693
          return false;
21694
        if (!this.pickupDetails.equals(that.pickupDetails))
21695
          return false;
21696
      }
21697
 
21698
      return true;
21699
    }
21700
 
21701
    @Override
21702
    public int hashCode() {
21703
      return 0;
21704
    }
21705
 
21706
    public void read(TProtocol iprot) throws TException {
21707
      TField field;
21708
      iprot.readStructBegin();
21709
      while (true)
21710
      {
21711
        field = iprot.readFieldBegin();
21712
        if (field.type == TType.STOP) { 
21713
          break;
21714
        }
21715
        _Fields fieldId = _Fields.findByThriftId(field.id);
21716
        if (fieldId == null) {
21717
          TProtocolUtil.skip(iprot, field.type);
21718
        } else {
21719
          switch (fieldId) {
21720
            case PROVIDER_ID:
21721
              if (field.type == TType.I64) {
21722
                this.providerId = iprot.readI64();
21723
                setProviderIdIsSet(true);
21724
              } else { 
21725
                TProtocolUtil.skip(iprot, field.type);
21726
              }
21727
              break;
21728
            case PICKUP_DETAILS:
21729
              if (field.type == TType.MAP) {
21730
                {
1382 varun.gupt 21731
                  TMap _map48 = iprot.readMapBegin();
21732
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
21733
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 21734
                  {
1382 varun.gupt 21735
                    String _key50;
21736
                    String _val51;
21737
                    _key50 = iprot.readString();
21738
                    _val51 = iprot.readString();
21739
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 21740
                  }
21741
                  iprot.readMapEnd();
21742
                }
21743
              } else { 
21744
                TProtocolUtil.skip(iprot, field.type);
21745
              }
21746
              break;
21747
          }
21748
          iprot.readFieldEnd();
21749
        }
21750
      }
21751
      iprot.readStructEnd();
21752
      validate();
21753
    }
21754
 
21755
    public void write(TProtocol oprot) throws TException {
21756
      validate();
21757
 
21758
      oprot.writeStructBegin(STRUCT_DESC);
21759
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21760
      oprot.writeI64(this.providerId);
21761
      oprot.writeFieldEnd();
21762
      if (this.pickupDetails != null) {
21763
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
21764
        {
1245 chandransh 21765
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 21766
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 21767
          {
1382 varun.gupt 21768
            oprot.writeString(_iter52.getKey());
21769
            oprot.writeString(_iter52.getValue());
1114 chandransh 21770
          }
21771
          oprot.writeMapEnd();
21772
        }
21773
        oprot.writeFieldEnd();
21774
      }
21775
      oprot.writeFieldStop();
21776
      oprot.writeStructEnd();
21777
    }
21778
 
21779
    @Override
21780
    public String toString() {
21781
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
21782
      boolean first = true;
21783
 
21784
      sb.append("providerId:");
21785
      sb.append(this.providerId);
21786
      first = false;
21787
      if (!first) sb.append(", ");
21788
      sb.append("pickupDetails:");
21789
      if (this.pickupDetails == null) {
21790
        sb.append("null");
21791
      } else {
21792
        sb.append(this.pickupDetails);
21793
      }
21794
      first = false;
21795
      sb.append(")");
21796
      return sb.toString();
21797
    }
21798
 
21799
    public void validate() throws TException {
21800
      // check for required fields
21801
    }
21802
 
21803
  }
21804
 
21805
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
21806
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
21807
 
21808
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
21809
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21810
 
21811
    private List<Order> success;
21812
    private TransactionServiceException ex;
21813
 
21814
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21815
    public enum _Fields implements TFieldIdEnum {
21816
      SUCCESS((short)0, "success"),
21817
      EX((short)1, "ex");
21818
 
21819
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21820
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21821
 
21822
      static {
21823
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21824
          byId.put((int)field._thriftId, field);
21825
          byName.put(field.getFieldName(), field);
21826
        }
21827
      }
21828
 
21829
      /**
21830
       * Find the _Fields constant that matches fieldId, or null if its not found.
21831
       */
21832
      public static _Fields findByThriftId(int fieldId) {
21833
        return byId.get(fieldId);
21834
      }
21835
 
21836
      /**
21837
       * Find the _Fields constant that matches fieldId, throwing an exception
21838
       * if it is not found.
21839
       */
21840
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21841
        _Fields fields = findByThriftId(fieldId);
21842
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21843
        return fields;
21844
      }
21845
 
21846
      /**
21847
       * Find the _Fields constant that matches name, or null if its not found.
21848
       */
21849
      public static _Fields findByName(String name) {
21850
        return byName.get(name);
21851
      }
21852
 
21853
      private final short _thriftId;
21854
      private final String _fieldName;
21855
 
21856
      _Fields(short thriftId, String fieldName) {
21857
        _thriftId = thriftId;
21858
        _fieldName = fieldName;
21859
      }
21860
 
21861
      public short getThriftFieldId() {
21862
        return _thriftId;
21863
      }
21864
 
21865
      public String getFieldName() {
21866
        return _fieldName;
21867
      }
21868
    }
21869
 
21870
    // isset id assignments
21871
 
21872
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21873
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21874
          new ListMetaData(TType.LIST, 
21875
              new StructMetaData(TType.STRUCT, Order.class))));
21876
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21877
          new FieldValueMetaData(TType.STRUCT)));
21878
    }});
21879
 
21880
    static {
21881
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
21882
    }
21883
 
21884
    public markOrdersAsPickedUp_result() {
21885
    }
21886
 
21887
    public markOrdersAsPickedUp_result(
21888
      List<Order> success,
21889
      TransactionServiceException ex)
21890
    {
21891
      this();
21892
      this.success = success;
21893
      this.ex = ex;
21894
    }
21895
 
21896
    /**
21897
     * Performs a deep copy on <i>other</i>.
21898
     */
21899
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
21900
      if (other.isSetSuccess()) {
21901
        List<Order> __this__success = new ArrayList<Order>();
21902
        for (Order other_element : other.success) {
21903
          __this__success.add(new Order(other_element));
21904
        }
21905
        this.success = __this__success;
21906
      }
21907
      if (other.isSetEx()) {
21908
        this.ex = new TransactionServiceException(other.ex);
21909
      }
21910
    }
21911
 
21912
    public markOrdersAsPickedUp_result deepCopy() {
21913
      return new markOrdersAsPickedUp_result(this);
21914
    }
21915
 
21916
    @Deprecated
21917
    public markOrdersAsPickedUp_result clone() {
21918
      return new markOrdersAsPickedUp_result(this);
21919
    }
21920
 
21921
    public int getSuccessSize() {
21922
      return (this.success == null) ? 0 : this.success.size();
21923
    }
21924
 
21925
    public java.util.Iterator<Order> getSuccessIterator() {
21926
      return (this.success == null) ? null : this.success.iterator();
21927
    }
21928
 
21929
    public void addToSuccess(Order elem) {
21930
      if (this.success == null) {
21931
        this.success = new ArrayList<Order>();
21932
      }
21933
      this.success.add(elem);
21934
    }
21935
 
21936
    public List<Order> getSuccess() {
21937
      return this.success;
21938
    }
21939
 
21940
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
21941
      this.success = success;
21942
      return this;
21943
    }
21944
 
21945
    public void unsetSuccess() {
21946
      this.success = null;
21947
    }
21948
 
21949
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21950
    public boolean isSetSuccess() {
21951
      return this.success != null;
21952
    }
21953
 
21954
    public void setSuccessIsSet(boolean value) {
21955
      if (!value) {
21956
        this.success = null;
21957
      }
21958
    }
21959
 
21960
    public TransactionServiceException getEx() {
21961
      return this.ex;
21962
    }
21963
 
21964
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
21965
      this.ex = ex;
21966
      return this;
21967
    }
21968
 
21969
    public void unsetEx() {
21970
      this.ex = null;
21971
    }
21972
 
21973
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21974
    public boolean isSetEx() {
21975
      return this.ex != null;
21976
    }
21977
 
21978
    public void setExIsSet(boolean value) {
21979
      if (!value) {
21980
        this.ex = null;
21981
      }
21982
    }
21983
 
21984
    public void setFieldValue(_Fields field, Object value) {
21985
      switch (field) {
21986
      case SUCCESS:
21987
        if (value == null) {
21988
          unsetSuccess();
21989
        } else {
21990
          setSuccess((List<Order>)value);
21991
        }
21992
        break;
21993
 
21994
      case EX:
21995
        if (value == null) {
21996
          unsetEx();
21997
        } else {
21998
          setEx((TransactionServiceException)value);
21999
        }
22000
        break;
22001
 
22002
      }
22003
    }
22004
 
22005
    public void setFieldValue(int fieldID, Object value) {
22006
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22007
    }
22008
 
22009
    public Object getFieldValue(_Fields field) {
22010
      switch (field) {
22011
      case SUCCESS:
22012
        return getSuccess();
22013
 
22014
      case EX:
22015
        return getEx();
22016
 
22017
      }
22018
      throw new IllegalStateException();
22019
    }
22020
 
22021
    public Object getFieldValue(int fieldId) {
22022
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22023
    }
22024
 
22025
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22026
    public boolean isSet(_Fields field) {
22027
      switch (field) {
22028
      case SUCCESS:
22029
        return isSetSuccess();
22030
      case EX:
22031
        return isSetEx();
22032
      }
22033
      throw new IllegalStateException();
22034
    }
22035
 
22036
    public boolean isSet(int fieldID) {
22037
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22038
    }
22039
 
22040
    @Override
22041
    public boolean equals(Object that) {
22042
      if (that == null)
22043
        return false;
22044
      if (that instanceof markOrdersAsPickedUp_result)
22045
        return this.equals((markOrdersAsPickedUp_result)that);
22046
      return false;
22047
    }
22048
 
22049
    public boolean equals(markOrdersAsPickedUp_result that) {
22050
      if (that == null)
22051
        return false;
22052
 
22053
      boolean this_present_success = true && this.isSetSuccess();
22054
      boolean that_present_success = true && that.isSetSuccess();
22055
      if (this_present_success || that_present_success) {
22056
        if (!(this_present_success && that_present_success))
22057
          return false;
22058
        if (!this.success.equals(that.success))
22059
          return false;
22060
      }
22061
 
22062
      boolean this_present_ex = true && this.isSetEx();
22063
      boolean that_present_ex = true && that.isSetEx();
22064
      if (this_present_ex || that_present_ex) {
22065
        if (!(this_present_ex && that_present_ex))
22066
          return false;
22067
        if (!this.ex.equals(that.ex))
22068
          return false;
22069
      }
22070
 
22071
      return true;
22072
    }
22073
 
22074
    @Override
22075
    public int hashCode() {
22076
      return 0;
22077
    }
22078
 
22079
    public int compareTo(markOrdersAsPickedUp_result other) {
22080
      if (!getClass().equals(other.getClass())) {
22081
        return getClass().getName().compareTo(other.getClass().getName());
22082
      }
22083
 
22084
      int lastComparison = 0;
22085
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
22086
 
22087
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22088
      if (lastComparison != 0) {
22089
        return lastComparison;
22090
      }
22091
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22092
      if (lastComparison != 0) {
22093
        return lastComparison;
22094
      }
22095
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22096
      if (lastComparison != 0) {
22097
        return lastComparison;
22098
      }
22099
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22100
      if (lastComparison != 0) {
22101
        return lastComparison;
22102
      }
22103
      return 0;
22104
    }
22105
 
22106
    public void read(TProtocol iprot) throws TException {
22107
      TField field;
22108
      iprot.readStructBegin();
22109
      while (true)
22110
      {
22111
        field = iprot.readFieldBegin();
22112
        if (field.type == TType.STOP) { 
22113
          break;
22114
        }
22115
        _Fields fieldId = _Fields.findByThriftId(field.id);
22116
        if (fieldId == null) {
22117
          TProtocolUtil.skip(iprot, field.type);
22118
        } else {
22119
          switch (fieldId) {
22120
            case SUCCESS:
22121
              if (field.type == TType.LIST) {
22122
                {
1382 varun.gupt 22123
                  TList _list53 = iprot.readListBegin();
22124
                  this.success = new ArrayList<Order>(_list53.size);
22125
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 22126
                  {
1382 varun.gupt 22127
                    Order _elem55;
22128
                    _elem55 = new Order();
22129
                    _elem55.read(iprot);
22130
                    this.success.add(_elem55);
1114 chandransh 22131
                  }
22132
                  iprot.readListEnd();
22133
                }
22134
              } else { 
22135
                TProtocolUtil.skip(iprot, field.type);
22136
              }
22137
              break;
22138
            case EX:
22139
              if (field.type == TType.STRUCT) {
22140
                this.ex = new TransactionServiceException();
22141
                this.ex.read(iprot);
22142
              } else { 
22143
                TProtocolUtil.skip(iprot, field.type);
22144
              }
22145
              break;
22146
          }
22147
          iprot.readFieldEnd();
22148
        }
22149
      }
22150
      iprot.readStructEnd();
22151
      validate();
22152
    }
22153
 
22154
    public void write(TProtocol oprot) throws TException {
22155
      oprot.writeStructBegin(STRUCT_DESC);
22156
 
22157
      if (this.isSetSuccess()) {
22158
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22159
        {
22160
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 22161
          for (Order _iter56 : this.success)
1114 chandransh 22162
          {
1382 varun.gupt 22163
            _iter56.write(oprot);
1114 chandransh 22164
          }
22165
          oprot.writeListEnd();
22166
        }
22167
        oprot.writeFieldEnd();
22168
      } else if (this.isSetEx()) {
22169
        oprot.writeFieldBegin(EX_FIELD_DESC);
22170
        this.ex.write(oprot);
22171
        oprot.writeFieldEnd();
22172
      }
22173
      oprot.writeFieldStop();
22174
      oprot.writeStructEnd();
22175
    }
22176
 
22177
    @Override
22178
    public String toString() {
22179
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
22180
      boolean first = true;
22181
 
22182
      sb.append("success:");
22183
      if (this.success == null) {
22184
        sb.append("null");
22185
      } else {
22186
        sb.append(this.success);
22187
      }
22188
      first = false;
22189
      if (!first) sb.append(", ");
22190
      sb.append("ex:");
22191
      if (this.ex == null) {
22192
        sb.append("null");
22193
      } else {
22194
        sb.append(this.ex);
22195
      }
22196
      first = false;
22197
      sb.append(")");
22198
      return sb.toString();
22199
    }
22200
 
22201
    public void validate() throws TException {
22202
      // check for required fields
22203
    }
22204
 
22205
  }
22206
 
1133 chandransh 22207
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
22208
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
22209
 
22210
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22211
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
22212
 
22213
    private long providerId;
22214
    private Map<String,String> deliveredOrders;
22215
 
22216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22217
    public enum _Fields implements TFieldIdEnum {
22218
      PROVIDER_ID((short)1, "providerId"),
22219
      DELIVERED_ORDERS((short)2, "deliveredOrders");
22220
 
22221
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22222
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22223
 
22224
      static {
22225
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22226
          byId.put((int)field._thriftId, field);
22227
          byName.put(field.getFieldName(), field);
22228
        }
22229
      }
22230
 
22231
      /**
22232
       * Find the _Fields constant that matches fieldId, or null if its not found.
22233
       */
22234
      public static _Fields findByThriftId(int fieldId) {
22235
        return byId.get(fieldId);
22236
      }
22237
 
22238
      /**
22239
       * Find the _Fields constant that matches fieldId, throwing an exception
22240
       * if it is not found.
22241
       */
22242
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22243
        _Fields fields = findByThriftId(fieldId);
22244
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22245
        return fields;
22246
      }
22247
 
22248
      /**
22249
       * Find the _Fields constant that matches name, or null if its not found.
22250
       */
22251
      public static _Fields findByName(String name) {
22252
        return byName.get(name);
22253
      }
22254
 
22255
      private final short _thriftId;
22256
      private final String _fieldName;
22257
 
22258
      _Fields(short thriftId, String fieldName) {
22259
        _thriftId = thriftId;
22260
        _fieldName = fieldName;
22261
      }
22262
 
22263
      public short getThriftFieldId() {
22264
        return _thriftId;
22265
      }
22266
 
22267
      public String getFieldName() {
22268
        return _fieldName;
22269
      }
22270
    }
22271
 
22272
    // isset id assignments
22273
    private static final int __PROVIDERID_ISSET_ID = 0;
22274
    private BitSet __isset_bit_vector = new BitSet(1);
22275
 
22276
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22277
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22278
          new FieldValueMetaData(TType.I64)));
22279
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
22280
          new MapMetaData(TType.MAP, 
22281
              new FieldValueMetaData(TType.STRING), 
22282
              new FieldValueMetaData(TType.STRING))));
22283
    }});
22284
 
22285
    static {
22286
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
22287
    }
22288
 
22289
    public markOrdersAsDelivered_args() {
22290
    }
22291
 
22292
    public markOrdersAsDelivered_args(
22293
      long providerId,
22294
      Map<String,String> deliveredOrders)
22295
    {
22296
      this();
22297
      this.providerId = providerId;
22298
      setProviderIdIsSet(true);
22299
      this.deliveredOrders = deliveredOrders;
22300
    }
22301
 
22302
    /**
22303
     * Performs a deep copy on <i>other</i>.
22304
     */
22305
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
22306
      __isset_bit_vector.clear();
22307
      __isset_bit_vector.or(other.__isset_bit_vector);
22308
      this.providerId = other.providerId;
22309
      if (other.isSetDeliveredOrders()) {
22310
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
22311
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
22312
 
22313
          String other_element_key = other_element.getKey();
22314
          String other_element_value = other_element.getValue();
22315
 
22316
          String __this__deliveredOrders_copy_key = other_element_key;
22317
 
22318
          String __this__deliveredOrders_copy_value = other_element_value;
22319
 
22320
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
22321
        }
22322
        this.deliveredOrders = __this__deliveredOrders;
22323
      }
22324
    }
22325
 
22326
    public markOrdersAsDelivered_args deepCopy() {
22327
      return new markOrdersAsDelivered_args(this);
22328
    }
22329
 
22330
    @Deprecated
22331
    public markOrdersAsDelivered_args clone() {
22332
      return new markOrdersAsDelivered_args(this);
22333
    }
22334
 
22335
    public long getProviderId() {
22336
      return this.providerId;
22337
    }
22338
 
22339
    public markOrdersAsDelivered_args setProviderId(long providerId) {
22340
      this.providerId = providerId;
22341
      setProviderIdIsSet(true);
22342
      return this;
22343
    }
22344
 
22345
    public void unsetProviderId() {
22346
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22347
    }
22348
 
22349
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22350
    public boolean isSetProviderId() {
22351
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22352
    }
22353
 
22354
    public void setProviderIdIsSet(boolean value) {
22355
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22356
    }
22357
 
22358
    public int getDeliveredOrdersSize() {
22359
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
22360
    }
22361
 
22362
    public void putToDeliveredOrders(String key, String val) {
22363
      if (this.deliveredOrders == null) {
22364
        this.deliveredOrders = new HashMap<String,String>();
22365
      }
22366
      this.deliveredOrders.put(key, val);
22367
    }
22368
 
22369
    public Map<String,String> getDeliveredOrders() {
22370
      return this.deliveredOrders;
22371
    }
22372
 
22373
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
22374
      this.deliveredOrders = deliveredOrders;
22375
      return this;
22376
    }
22377
 
22378
    public void unsetDeliveredOrders() {
22379
      this.deliveredOrders = null;
22380
    }
22381
 
22382
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
22383
    public boolean isSetDeliveredOrders() {
22384
      return this.deliveredOrders != null;
22385
    }
22386
 
22387
    public void setDeliveredOrdersIsSet(boolean value) {
22388
      if (!value) {
22389
        this.deliveredOrders = null;
22390
      }
22391
    }
22392
 
22393
    public void setFieldValue(_Fields field, Object value) {
22394
      switch (field) {
22395
      case PROVIDER_ID:
22396
        if (value == null) {
22397
          unsetProviderId();
22398
        } else {
22399
          setProviderId((Long)value);
22400
        }
22401
        break;
22402
 
22403
      case DELIVERED_ORDERS:
22404
        if (value == null) {
22405
          unsetDeliveredOrders();
22406
        } else {
22407
          setDeliveredOrders((Map<String,String>)value);
22408
        }
22409
        break;
22410
 
22411
      }
22412
    }
22413
 
22414
    public void setFieldValue(int fieldID, Object value) {
22415
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22416
    }
22417
 
22418
    public Object getFieldValue(_Fields field) {
22419
      switch (field) {
22420
      case PROVIDER_ID:
22421
        return new Long(getProviderId());
22422
 
22423
      case DELIVERED_ORDERS:
22424
        return getDeliveredOrders();
22425
 
22426
      }
22427
      throw new IllegalStateException();
22428
    }
22429
 
22430
    public Object getFieldValue(int fieldId) {
22431
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22432
    }
22433
 
22434
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22435
    public boolean isSet(_Fields field) {
22436
      switch (field) {
22437
      case PROVIDER_ID:
22438
        return isSetProviderId();
22439
      case DELIVERED_ORDERS:
22440
        return isSetDeliveredOrders();
22441
      }
22442
      throw new IllegalStateException();
22443
    }
22444
 
22445
    public boolean isSet(int fieldID) {
22446
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22447
    }
22448
 
22449
    @Override
22450
    public boolean equals(Object that) {
22451
      if (that == null)
22452
        return false;
22453
      if (that instanceof markOrdersAsDelivered_args)
22454
        return this.equals((markOrdersAsDelivered_args)that);
22455
      return false;
22456
    }
22457
 
22458
    public boolean equals(markOrdersAsDelivered_args that) {
22459
      if (that == null)
22460
        return false;
22461
 
22462
      boolean this_present_providerId = true;
22463
      boolean that_present_providerId = true;
22464
      if (this_present_providerId || that_present_providerId) {
22465
        if (!(this_present_providerId && that_present_providerId))
22466
          return false;
22467
        if (this.providerId != that.providerId)
22468
          return false;
22469
      }
22470
 
22471
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
22472
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
22473
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
22474
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
22475
          return false;
22476
        if (!this.deliveredOrders.equals(that.deliveredOrders))
22477
          return false;
22478
      }
22479
 
22480
      return true;
22481
    }
22482
 
22483
    @Override
22484
    public int hashCode() {
22485
      return 0;
22486
    }
22487
 
22488
    public void read(TProtocol iprot) throws TException {
22489
      TField field;
22490
      iprot.readStructBegin();
22491
      while (true)
22492
      {
22493
        field = iprot.readFieldBegin();
22494
        if (field.type == TType.STOP) { 
22495
          break;
22496
        }
22497
        _Fields fieldId = _Fields.findByThriftId(field.id);
22498
        if (fieldId == null) {
22499
          TProtocolUtil.skip(iprot, field.type);
22500
        } else {
22501
          switch (fieldId) {
22502
            case PROVIDER_ID:
22503
              if (field.type == TType.I64) {
22504
                this.providerId = iprot.readI64();
22505
                setProviderIdIsSet(true);
22506
              } else { 
22507
                TProtocolUtil.skip(iprot, field.type);
22508
              }
22509
              break;
22510
            case DELIVERED_ORDERS:
22511
              if (field.type == TType.MAP) {
22512
                {
1382 varun.gupt 22513
                  TMap _map57 = iprot.readMapBegin();
22514
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
22515
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 22516
                  {
1382 varun.gupt 22517
                    String _key59;
22518
                    String _val60;
22519
                    _key59 = iprot.readString();
22520
                    _val60 = iprot.readString();
22521
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 22522
                  }
22523
                  iprot.readMapEnd();
22524
                }
22525
              } else { 
22526
                TProtocolUtil.skip(iprot, field.type);
22527
              }
22528
              break;
22529
          }
22530
          iprot.readFieldEnd();
22531
        }
22532
      }
22533
      iprot.readStructEnd();
22534
      validate();
22535
    }
22536
 
22537
    public void write(TProtocol oprot) throws TException {
22538
      validate();
22539
 
22540
      oprot.writeStructBegin(STRUCT_DESC);
22541
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22542
      oprot.writeI64(this.providerId);
22543
      oprot.writeFieldEnd();
22544
      if (this.deliveredOrders != null) {
22545
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
22546
        {
22547
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 22548
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 22549
          {
1382 varun.gupt 22550
            oprot.writeString(_iter61.getKey());
22551
            oprot.writeString(_iter61.getValue());
1133 chandransh 22552
          }
22553
          oprot.writeMapEnd();
22554
        }
22555
        oprot.writeFieldEnd();
22556
      }
22557
      oprot.writeFieldStop();
22558
      oprot.writeStructEnd();
22559
    }
22560
 
22561
    @Override
22562
    public String toString() {
22563
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
22564
      boolean first = true;
22565
 
22566
      sb.append("providerId:");
22567
      sb.append(this.providerId);
22568
      first = false;
22569
      if (!first) sb.append(", ");
22570
      sb.append("deliveredOrders:");
22571
      if (this.deliveredOrders == null) {
22572
        sb.append("null");
22573
      } else {
22574
        sb.append(this.deliveredOrders);
22575
      }
22576
      first = false;
22577
      sb.append(")");
22578
      return sb.toString();
22579
    }
22580
 
22581
    public void validate() throws TException {
22582
      // check for required fields
22583
    }
22584
 
22585
  }
22586
 
22587
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
22588
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
22589
 
22590
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22591
 
22592
    private TransactionServiceException ex;
22593
 
22594
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22595
    public enum _Fields implements TFieldIdEnum {
22596
      EX((short)1, "ex");
22597
 
22598
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22599
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22600
 
22601
      static {
22602
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22603
          byId.put((int)field._thriftId, field);
22604
          byName.put(field.getFieldName(), field);
22605
        }
22606
      }
22607
 
22608
      /**
22609
       * Find the _Fields constant that matches fieldId, or null if its not found.
22610
       */
22611
      public static _Fields findByThriftId(int fieldId) {
22612
        return byId.get(fieldId);
22613
      }
22614
 
22615
      /**
22616
       * Find the _Fields constant that matches fieldId, throwing an exception
22617
       * if it is not found.
22618
       */
22619
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22620
        _Fields fields = findByThriftId(fieldId);
22621
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22622
        return fields;
22623
      }
22624
 
22625
      /**
22626
       * Find the _Fields constant that matches name, or null if its not found.
22627
       */
22628
      public static _Fields findByName(String name) {
22629
        return byName.get(name);
22630
      }
22631
 
22632
      private final short _thriftId;
22633
      private final String _fieldName;
22634
 
22635
      _Fields(short thriftId, String fieldName) {
22636
        _thriftId = thriftId;
22637
        _fieldName = fieldName;
22638
      }
22639
 
22640
      public short getThriftFieldId() {
22641
        return _thriftId;
22642
      }
22643
 
22644
      public String getFieldName() {
22645
        return _fieldName;
22646
      }
22647
    }
22648
 
22649
    // isset id assignments
22650
 
22651
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22652
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22653
          new FieldValueMetaData(TType.STRUCT)));
22654
    }});
22655
 
22656
    static {
22657
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
22658
    }
22659
 
22660
    public markOrdersAsDelivered_result() {
22661
    }
22662
 
22663
    public markOrdersAsDelivered_result(
22664
      TransactionServiceException ex)
22665
    {
22666
      this();
22667
      this.ex = ex;
22668
    }
22669
 
22670
    /**
22671
     * Performs a deep copy on <i>other</i>.
22672
     */
22673
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
22674
      if (other.isSetEx()) {
22675
        this.ex = new TransactionServiceException(other.ex);
22676
      }
22677
    }
22678
 
22679
    public markOrdersAsDelivered_result deepCopy() {
22680
      return new markOrdersAsDelivered_result(this);
22681
    }
22682
 
22683
    @Deprecated
22684
    public markOrdersAsDelivered_result clone() {
22685
      return new markOrdersAsDelivered_result(this);
22686
    }
22687
 
22688
    public TransactionServiceException getEx() {
22689
      return this.ex;
22690
    }
22691
 
22692
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
22693
      this.ex = ex;
22694
      return this;
22695
    }
22696
 
22697
    public void unsetEx() {
22698
      this.ex = null;
22699
    }
22700
 
22701
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22702
    public boolean isSetEx() {
22703
      return this.ex != null;
22704
    }
22705
 
22706
    public void setExIsSet(boolean value) {
22707
      if (!value) {
22708
        this.ex = null;
22709
      }
22710
    }
22711
 
22712
    public void setFieldValue(_Fields field, Object value) {
22713
      switch (field) {
22714
      case EX:
22715
        if (value == null) {
22716
          unsetEx();
22717
        } else {
22718
          setEx((TransactionServiceException)value);
22719
        }
22720
        break;
22721
 
22722
      }
22723
    }
22724
 
22725
    public void setFieldValue(int fieldID, Object value) {
22726
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22727
    }
22728
 
22729
    public Object getFieldValue(_Fields field) {
22730
      switch (field) {
22731
      case EX:
22732
        return getEx();
22733
 
22734
      }
22735
      throw new IllegalStateException();
22736
    }
22737
 
22738
    public Object getFieldValue(int fieldId) {
22739
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22740
    }
22741
 
22742
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22743
    public boolean isSet(_Fields field) {
22744
      switch (field) {
22745
      case EX:
22746
        return isSetEx();
22747
      }
22748
      throw new IllegalStateException();
22749
    }
22750
 
22751
    public boolean isSet(int fieldID) {
22752
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22753
    }
22754
 
22755
    @Override
22756
    public boolean equals(Object that) {
22757
      if (that == null)
22758
        return false;
22759
      if (that instanceof markOrdersAsDelivered_result)
22760
        return this.equals((markOrdersAsDelivered_result)that);
22761
      return false;
22762
    }
22763
 
22764
    public boolean equals(markOrdersAsDelivered_result that) {
22765
      if (that == null)
22766
        return false;
22767
 
22768
      boolean this_present_ex = true && this.isSetEx();
22769
      boolean that_present_ex = true && that.isSetEx();
22770
      if (this_present_ex || that_present_ex) {
22771
        if (!(this_present_ex && that_present_ex))
22772
          return false;
22773
        if (!this.ex.equals(that.ex))
22774
          return false;
22775
      }
22776
 
22777
      return true;
22778
    }
22779
 
22780
    @Override
22781
    public int hashCode() {
22782
      return 0;
22783
    }
22784
 
22785
    public int compareTo(markOrdersAsDelivered_result other) {
22786
      if (!getClass().equals(other.getClass())) {
22787
        return getClass().getName().compareTo(other.getClass().getName());
22788
      }
22789
 
22790
      int lastComparison = 0;
22791
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
22792
 
22793
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22794
      if (lastComparison != 0) {
22795
        return lastComparison;
22796
      }
22797
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22798
      if (lastComparison != 0) {
22799
        return lastComparison;
22800
      }
22801
      return 0;
22802
    }
22803
 
22804
    public void read(TProtocol iprot) throws TException {
22805
      TField field;
22806
      iprot.readStructBegin();
22807
      while (true)
22808
      {
22809
        field = iprot.readFieldBegin();
22810
        if (field.type == TType.STOP) { 
22811
          break;
22812
        }
22813
        _Fields fieldId = _Fields.findByThriftId(field.id);
22814
        if (fieldId == null) {
22815
          TProtocolUtil.skip(iprot, field.type);
22816
        } else {
22817
          switch (fieldId) {
22818
            case EX:
22819
              if (field.type == TType.STRUCT) {
22820
                this.ex = new TransactionServiceException();
22821
                this.ex.read(iprot);
22822
              } else { 
22823
                TProtocolUtil.skip(iprot, field.type);
22824
              }
22825
              break;
22826
          }
22827
          iprot.readFieldEnd();
22828
        }
22829
      }
22830
      iprot.readStructEnd();
22831
      validate();
22832
    }
22833
 
22834
    public void write(TProtocol oprot) throws TException {
22835
      oprot.writeStructBegin(STRUCT_DESC);
22836
 
22837
      if (this.isSetEx()) {
22838
        oprot.writeFieldBegin(EX_FIELD_DESC);
22839
        this.ex.write(oprot);
22840
        oprot.writeFieldEnd();
22841
      }
22842
      oprot.writeFieldStop();
22843
      oprot.writeStructEnd();
22844
    }
22845
 
22846
    @Override
22847
    public String toString() {
22848
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
22849
      boolean first = true;
22850
 
22851
      sb.append("ex:");
22852
      if (this.ex == null) {
22853
        sb.append("null");
22854
      } else {
22855
        sb.append(this.ex);
22856
      }
22857
      first = false;
22858
      sb.append(")");
22859
      return sb.toString();
22860
    }
22861
 
22862
    public void validate() throws TException {
22863
      // check for required fields
22864
    }
22865
 
22866
  }
22867
 
22868
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
22869
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
22870
 
22871
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22872
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
22873
 
22874
    private long providerId;
22875
    private Map<String,String> returnedOrders;
22876
 
22877
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22878
    public enum _Fields implements TFieldIdEnum {
22879
      PROVIDER_ID((short)1, "providerId"),
22880
      RETURNED_ORDERS((short)2, "returnedOrders");
22881
 
22882
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22883
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22884
 
22885
      static {
22886
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22887
          byId.put((int)field._thriftId, field);
22888
          byName.put(field.getFieldName(), field);
22889
        }
22890
      }
22891
 
22892
      /**
22893
       * Find the _Fields constant that matches fieldId, or null if its not found.
22894
       */
22895
      public static _Fields findByThriftId(int fieldId) {
22896
        return byId.get(fieldId);
22897
      }
22898
 
22899
      /**
22900
       * Find the _Fields constant that matches fieldId, throwing an exception
22901
       * if it is not found.
22902
       */
22903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22904
        _Fields fields = findByThriftId(fieldId);
22905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22906
        return fields;
22907
      }
22908
 
22909
      /**
22910
       * Find the _Fields constant that matches name, or null if its not found.
22911
       */
22912
      public static _Fields findByName(String name) {
22913
        return byName.get(name);
22914
      }
22915
 
22916
      private final short _thriftId;
22917
      private final String _fieldName;
22918
 
22919
      _Fields(short thriftId, String fieldName) {
22920
        _thriftId = thriftId;
22921
        _fieldName = fieldName;
22922
      }
22923
 
22924
      public short getThriftFieldId() {
22925
        return _thriftId;
22926
      }
22927
 
22928
      public String getFieldName() {
22929
        return _fieldName;
22930
      }
22931
    }
22932
 
22933
    // isset id assignments
22934
    private static final int __PROVIDERID_ISSET_ID = 0;
22935
    private BitSet __isset_bit_vector = new BitSet(1);
22936
 
22937
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22938
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22939
          new FieldValueMetaData(TType.I64)));
22940
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
22941
          new MapMetaData(TType.MAP, 
22942
              new FieldValueMetaData(TType.STRING), 
22943
              new FieldValueMetaData(TType.STRING))));
22944
    }});
22945
 
22946
    static {
22947
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
22948
    }
22949
 
22950
    public markOrdersAsFailed_args() {
22951
    }
22952
 
22953
    public markOrdersAsFailed_args(
22954
      long providerId,
22955
      Map<String,String> returnedOrders)
22956
    {
22957
      this();
22958
      this.providerId = providerId;
22959
      setProviderIdIsSet(true);
22960
      this.returnedOrders = returnedOrders;
22961
    }
22962
 
22963
    /**
22964
     * Performs a deep copy on <i>other</i>.
22965
     */
22966
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
22967
      __isset_bit_vector.clear();
22968
      __isset_bit_vector.or(other.__isset_bit_vector);
22969
      this.providerId = other.providerId;
22970
      if (other.isSetReturnedOrders()) {
22971
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
22972
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
22973
 
22974
          String other_element_key = other_element.getKey();
22975
          String other_element_value = other_element.getValue();
22976
 
22977
          String __this__returnedOrders_copy_key = other_element_key;
22978
 
22979
          String __this__returnedOrders_copy_value = other_element_value;
22980
 
22981
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
22982
        }
22983
        this.returnedOrders = __this__returnedOrders;
22984
      }
22985
    }
22986
 
22987
    public markOrdersAsFailed_args deepCopy() {
22988
      return new markOrdersAsFailed_args(this);
22989
    }
22990
 
22991
    @Deprecated
22992
    public markOrdersAsFailed_args clone() {
22993
      return new markOrdersAsFailed_args(this);
22994
    }
22995
 
22996
    public long getProviderId() {
22997
      return this.providerId;
22998
    }
22999
 
23000
    public markOrdersAsFailed_args setProviderId(long providerId) {
23001
      this.providerId = providerId;
23002
      setProviderIdIsSet(true);
23003
      return this;
23004
    }
23005
 
23006
    public void unsetProviderId() {
23007
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23008
    }
23009
 
23010
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23011
    public boolean isSetProviderId() {
23012
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23013
    }
23014
 
23015
    public void setProviderIdIsSet(boolean value) {
23016
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23017
    }
23018
 
23019
    public int getReturnedOrdersSize() {
23020
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
23021
    }
23022
 
23023
    public void putToReturnedOrders(String key, String val) {
23024
      if (this.returnedOrders == null) {
23025
        this.returnedOrders = new HashMap<String,String>();
23026
      }
23027
      this.returnedOrders.put(key, val);
23028
    }
23029
 
23030
    public Map<String,String> getReturnedOrders() {
23031
      return this.returnedOrders;
23032
    }
23033
 
23034
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
23035
      this.returnedOrders = returnedOrders;
23036
      return this;
23037
    }
23038
 
23039
    public void unsetReturnedOrders() {
23040
      this.returnedOrders = null;
23041
    }
23042
 
23043
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
23044
    public boolean isSetReturnedOrders() {
23045
      return this.returnedOrders != null;
23046
    }
23047
 
23048
    public void setReturnedOrdersIsSet(boolean value) {
23049
      if (!value) {
23050
        this.returnedOrders = null;
23051
      }
23052
    }
23053
 
23054
    public void setFieldValue(_Fields field, Object value) {
23055
      switch (field) {
23056
      case PROVIDER_ID:
23057
        if (value == null) {
23058
          unsetProviderId();
23059
        } else {
23060
          setProviderId((Long)value);
23061
        }
23062
        break;
23063
 
23064
      case RETURNED_ORDERS:
23065
        if (value == null) {
23066
          unsetReturnedOrders();
23067
        } else {
23068
          setReturnedOrders((Map<String,String>)value);
23069
        }
23070
        break;
23071
 
23072
      }
23073
    }
23074
 
23075
    public void setFieldValue(int fieldID, Object value) {
23076
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23077
    }
23078
 
23079
    public Object getFieldValue(_Fields field) {
23080
      switch (field) {
23081
      case PROVIDER_ID:
23082
        return new Long(getProviderId());
23083
 
23084
      case RETURNED_ORDERS:
23085
        return getReturnedOrders();
23086
 
23087
      }
23088
      throw new IllegalStateException();
23089
    }
23090
 
23091
    public Object getFieldValue(int fieldId) {
23092
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23093
    }
23094
 
23095
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23096
    public boolean isSet(_Fields field) {
23097
      switch (field) {
23098
      case PROVIDER_ID:
23099
        return isSetProviderId();
23100
      case RETURNED_ORDERS:
23101
        return isSetReturnedOrders();
23102
      }
23103
      throw new IllegalStateException();
23104
    }
23105
 
23106
    public boolean isSet(int fieldID) {
23107
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23108
    }
23109
 
23110
    @Override
23111
    public boolean equals(Object that) {
23112
      if (that == null)
23113
        return false;
23114
      if (that instanceof markOrdersAsFailed_args)
23115
        return this.equals((markOrdersAsFailed_args)that);
23116
      return false;
23117
    }
23118
 
23119
    public boolean equals(markOrdersAsFailed_args that) {
23120
      if (that == null)
23121
        return false;
23122
 
23123
      boolean this_present_providerId = true;
23124
      boolean that_present_providerId = true;
23125
      if (this_present_providerId || that_present_providerId) {
23126
        if (!(this_present_providerId && that_present_providerId))
23127
          return false;
23128
        if (this.providerId != that.providerId)
23129
          return false;
23130
      }
23131
 
23132
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
23133
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
23134
      if (this_present_returnedOrders || that_present_returnedOrders) {
23135
        if (!(this_present_returnedOrders && that_present_returnedOrders))
23136
          return false;
23137
        if (!this.returnedOrders.equals(that.returnedOrders))
23138
          return false;
23139
      }
23140
 
23141
      return true;
23142
    }
23143
 
23144
    @Override
23145
    public int hashCode() {
23146
      return 0;
23147
    }
23148
 
23149
    public void read(TProtocol iprot) throws TException {
23150
      TField field;
23151
      iprot.readStructBegin();
23152
      while (true)
23153
      {
23154
        field = iprot.readFieldBegin();
23155
        if (field.type == TType.STOP) { 
23156
          break;
23157
        }
23158
        _Fields fieldId = _Fields.findByThriftId(field.id);
23159
        if (fieldId == null) {
23160
          TProtocolUtil.skip(iprot, field.type);
23161
        } else {
23162
          switch (fieldId) {
23163
            case PROVIDER_ID:
23164
              if (field.type == TType.I64) {
23165
                this.providerId = iprot.readI64();
23166
                setProviderIdIsSet(true);
23167
              } else { 
23168
                TProtocolUtil.skip(iprot, field.type);
23169
              }
23170
              break;
23171
            case RETURNED_ORDERS:
23172
              if (field.type == TType.MAP) {
23173
                {
1382 varun.gupt 23174
                  TMap _map62 = iprot.readMapBegin();
23175
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
23176
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 23177
                  {
1382 varun.gupt 23178
                    String _key64;
23179
                    String _val65;
23180
                    _key64 = iprot.readString();
23181
                    _val65 = iprot.readString();
23182
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 23183
                  }
23184
                  iprot.readMapEnd();
23185
                }
23186
              } else { 
23187
                TProtocolUtil.skip(iprot, field.type);
23188
              }
23189
              break;
23190
          }
23191
          iprot.readFieldEnd();
23192
        }
23193
      }
23194
      iprot.readStructEnd();
23195
      validate();
23196
    }
23197
 
23198
    public void write(TProtocol oprot) throws TException {
23199
      validate();
23200
 
23201
      oprot.writeStructBegin(STRUCT_DESC);
23202
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23203
      oprot.writeI64(this.providerId);
23204
      oprot.writeFieldEnd();
23205
      if (this.returnedOrders != null) {
23206
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
23207
        {
23208
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 23209
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 23210
          {
1382 varun.gupt 23211
            oprot.writeString(_iter66.getKey());
23212
            oprot.writeString(_iter66.getValue());
1133 chandransh 23213
          }
23214
          oprot.writeMapEnd();
23215
        }
23216
        oprot.writeFieldEnd();
23217
      }
23218
      oprot.writeFieldStop();
23219
      oprot.writeStructEnd();
23220
    }
23221
 
23222
    @Override
23223
    public String toString() {
23224
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
23225
      boolean first = true;
23226
 
23227
      sb.append("providerId:");
23228
      sb.append(this.providerId);
23229
      first = false;
23230
      if (!first) sb.append(", ");
23231
      sb.append("returnedOrders:");
23232
      if (this.returnedOrders == null) {
23233
        sb.append("null");
23234
      } else {
23235
        sb.append(this.returnedOrders);
23236
      }
23237
      first = false;
23238
      sb.append(")");
23239
      return sb.toString();
23240
    }
23241
 
23242
    public void validate() throws TException {
23243
      // check for required fields
23244
    }
23245
 
23246
  }
23247
 
23248
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
23249
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
23250
 
23251
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23252
 
23253
    private TransactionServiceException ex;
23254
 
23255
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23256
    public enum _Fields implements TFieldIdEnum {
23257
      EX((short)1, "ex");
23258
 
23259
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23260
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23261
 
23262
      static {
23263
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23264
          byId.put((int)field._thriftId, field);
23265
          byName.put(field.getFieldName(), field);
23266
        }
23267
      }
23268
 
23269
      /**
23270
       * Find the _Fields constant that matches fieldId, or null if its not found.
23271
       */
23272
      public static _Fields findByThriftId(int fieldId) {
23273
        return byId.get(fieldId);
23274
      }
23275
 
23276
      /**
23277
       * Find the _Fields constant that matches fieldId, throwing an exception
23278
       * if it is not found.
23279
       */
23280
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23281
        _Fields fields = findByThriftId(fieldId);
23282
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23283
        return fields;
23284
      }
23285
 
23286
      /**
23287
       * Find the _Fields constant that matches name, or null if its not found.
23288
       */
23289
      public static _Fields findByName(String name) {
23290
        return byName.get(name);
23291
      }
23292
 
23293
      private final short _thriftId;
23294
      private final String _fieldName;
23295
 
23296
      _Fields(short thriftId, String fieldName) {
23297
        _thriftId = thriftId;
23298
        _fieldName = fieldName;
23299
      }
23300
 
23301
      public short getThriftFieldId() {
23302
        return _thriftId;
23303
      }
23304
 
23305
      public String getFieldName() {
23306
        return _fieldName;
23307
      }
23308
    }
23309
 
23310
    // isset id assignments
23311
 
23312
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23313
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23314
          new FieldValueMetaData(TType.STRUCT)));
23315
    }});
23316
 
23317
    static {
23318
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
23319
    }
23320
 
23321
    public markOrdersAsFailed_result() {
23322
    }
23323
 
23324
    public markOrdersAsFailed_result(
23325
      TransactionServiceException ex)
23326
    {
23327
      this();
23328
      this.ex = ex;
23329
    }
23330
 
23331
    /**
23332
     * Performs a deep copy on <i>other</i>.
23333
     */
23334
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
23335
      if (other.isSetEx()) {
23336
        this.ex = new TransactionServiceException(other.ex);
23337
      }
23338
    }
23339
 
23340
    public markOrdersAsFailed_result deepCopy() {
23341
      return new markOrdersAsFailed_result(this);
23342
    }
23343
 
23344
    @Deprecated
23345
    public markOrdersAsFailed_result clone() {
23346
      return new markOrdersAsFailed_result(this);
23347
    }
23348
 
23349
    public TransactionServiceException getEx() {
23350
      return this.ex;
23351
    }
23352
 
23353
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
23354
      this.ex = ex;
23355
      return this;
23356
    }
23357
 
23358
    public void unsetEx() {
23359
      this.ex = null;
23360
    }
23361
 
23362
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23363
    public boolean isSetEx() {
23364
      return this.ex != null;
23365
    }
23366
 
23367
    public void setExIsSet(boolean value) {
23368
      if (!value) {
23369
        this.ex = null;
23370
      }
23371
    }
23372
 
23373
    public void setFieldValue(_Fields field, Object value) {
23374
      switch (field) {
23375
      case EX:
23376
        if (value == null) {
23377
          unsetEx();
23378
        } else {
23379
          setEx((TransactionServiceException)value);
23380
        }
23381
        break;
23382
 
23383
      }
23384
    }
23385
 
23386
    public void setFieldValue(int fieldID, Object value) {
23387
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23388
    }
23389
 
23390
    public Object getFieldValue(_Fields field) {
23391
      switch (field) {
23392
      case EX:
23393
        return getEx();
23394
 
23395
      }
23396
      throw new IllegalStateException();
23397
    }
23398
 
23399
    public Object getFieldValue(int fieldId) {
23400
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23401
    }
23402
 
23403
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23404
    public boolean isSet(_Fields field) {
23405
      switch (field) {
23406
      case EX:
23407
        return isSetEx();
23408
      }
23409
      throw new IllegalStateException();
23410
    }
23411
 
23412
    public boolean isSet(int fieldID) {
23413
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23414
    }
23415
 
23416
    @Override
23417
    public boolean equals(Object that) {
23418
      if (that == null)
23419
        return false;
23420
      if (that instanceof markOrdersAsFailed_result)
23421
        return this.equals((markOrdersAsFailed_result)that);
23422
      return false;
23423
    }
23424
 
23425
    public boolean equals(markOrdersAsFailed_result that) {
23426
      if (that == null)
23427
        return false;
23428
 
23429
      boolean this_present_ex = true && this.isSetEx();
23430
      boolean that_present_ex = true && that.isSetEx();
23431
      if (this_present_ex || that_present_ex) {
23432
        if (!(this_present_ex && that_present_ex))
23433
          return false;
23434
        if (!this.ex.equals(that.ex))
23435
          return false;
23436
      }
23437
 
23438
      return true;
23439
    }
23440
 
23441
    @Override
23442
    public int hashCode() {
23443
      return 0;
23444
    }
23445
 
23446
    public int compareTo(markOrdersAsFailed_result other) {
23447
      if (!getClass().equals(other.getClass())) {
23448
        return getClass().getName().compareTo(other.getClass().getName());
23449
      }
23450
 
23451
      int lastComparison = 0;
23452
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
23453
 
23454
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23455
      if (lastComparison != 0) {
23456
        return lastComparison;
23457
      }
23458
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23459
      if (lastComparison != 0) {
23460
        return lastComparison;
23461
      }
23462
      return 0;
23463
    }
23464
 
23465
    public void read(TProtocol iprot) throws TException {
23466
      TField field;
23467
      iprot.readStructBegin();
23468
      while (true)
23469
      {
23470
        field = iprot.readFieldBegin();
23471
        if (field.type == TType.STOP) { 
23472
          break;
23473
        }
23474
        _Fields fieldId = _Fields.findByThriftId(field.id);
23475
        if (fieldId == null) {
23476
          TProtocolUtil.skip(iprot, field.type);
23477
        } else {
23478
          switch (fieldId) {
23479
            case EX:
23480
              if (field.type == TType.STRUCT) {
23481
                this.ex = new TransactionServiceException();
23482
                this.ex.read(iprot);
23483
              } else { 
23484
                TProtocolUtil.skip(iprot, field.type);
23485
              }
23486
              break;
23487
          }
23488
          iprot.readFieldEnd();
23489
        }
23490
      }
23491
      iprot.readStructEnd();
23492
      validate();
23493
    }
23494
 
23495
    public void write(TProtocol oprot) throws TException {
23496
      oprot.writeStructBegin(STRUCT_DESC);
23497
 
23498
      if (this.isSetEx()) {
23499
        oprot.writeFieldBegin(EX_FIELD_DESC);
23500
        this.ex.write(oprot);
23501
        oprot.writeFieldEnd();
23502
      }
23503
      oprot.writeFieldStop();
23504
      oprot.writeStructEnd();
23505
    }
23506
 
23507
    @Override
23508
    public String toString() {
23509
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
23510
      boolean first = true;
23511
 
23512
      sb.append("ex:");
23513
      if (this.ex == null) {
23514
        sb.append("null");
23515
      } else {
23516
        sb.append(this.ex);
23517
      }
23518
      first = false;
23519
      sb.append(")");
23520
      return sb.toString();
23521
    }
23522
 
23523
    public void validate() throws TException {
23524
      // check for required fields
23525
    }
23526
 
23527
  }
23528
 
1245 chandransh 23529
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
23530
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
23531
 
23532
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23533
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
23534
 
23535
    private long providerId;
23536
    private Map<String,String> undeliveredOrders;
23537
 
23538
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23539
    public enum _Fields implements TFieldIdEnum {
23540
      PROVIDER_ID((short)1, "providerId"),
23541
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
23542
 
23543
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23544
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23545
 
23546
      static {
23547
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23548
          byId.put((int)field._thriftId, field);
23549
          byName.put(field.getFieldName(), field);
23550
        }
23551
      }
23552
 
23553
      /**
23554
       * Find the _Fields constant that matches fieldId, or null if its not found.
23555
       */
23556
      public static _Fields findByThriftId(int fieldId) {
23557
        return byId.get(fieldId);
23558
      }
23559
 
23560
      /**
23561
       * Find the _Fields constant that matches fieldId, throwing an exception
23562
       * if it is not found.
23563
       */
23564
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23565
        _Fields fields = findByThriftId(fieldId);
23566
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23567
        return fields;
23568
      }
23569
 
23570
      /**
23571
       * Find the _Fields constant that matches name, or null if its not found.
23572
       */
23573
      public static _Fields findByName(String name) {
23574
        return byName.get(name);
23575
      }
23576
 
23577
      private final short _thriftId;
23578
      private final String _fieldName;
23579
 
23580
      _Fields(short thriftId, String fieldName) {
23581
        _thriftId = thriftId;
23582
        _fieldName = fieldName;
23583
      }
23584
 
23585
      public short getThriftFieldId() {
23586
        return _thriftId;
23587
      }
23588
 
23589
      public String getFieldName() {
23590
        return _fieldName;
23591
      }
23592
    }
23593
 
23594
    // isset id assignments
23595
    private static final int __PROVIDERID_ISSET_ID = 0;
23596
    private BitSet __isset_bit_vector = new BitSet(1);
23597
 
23598
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23599
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23600
          new FieldValueMetaData(TType.I64)));
23601
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
23602
          new MapMetaData(TType.MAP, 
23603
              new FieldValueMetaData(TType.STRING), 
23604
              new FieldValueMetaData(TType.STRING))));
23605
    }});
23606
 
23607
    static {
23608
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
23609
    }
23610
 
23611
    public updateNonDeliveryReason_args() {
23612
    }
23613
 
23614
    public updateNonDeliveryReason_args(
23615
      long providerId,
23616
      Map<String,String> undeliveredOrders)
23617
    {
23618
      this();
23619
      this.providerId = providerId;
23620
      setProviderIdIsSet(true);
23621
      this.undeliveredOrders = undeliveredOrders;
23622
    }
23623
 
23624
    /**
23625
     * Performs a deep copy on <i>other</i>.
23626
     */
23627
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
23628
      __isset_bit_vector.clear();
23629
      __isset_bit_vector.or(other.__isset_bit_vector);
23630
      this.providerId = other.providerId;
23631
      if (other.isSetUndeliveredOrders()) {
23632
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
23633
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
23634
 
23635
          String other_element_key = other_element.getKey();
23636
          String other_element_value = other_element.getValue();
23637
 
23638
          String __this__undeliveredOrders_copy_key = other_element_key;
23639
 
23640
          String __this__undeliveredOrders_copy_value = other_element_value;
23641
 
23642
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
23643
        }
23644
        this.undeliveredOrders = __this__undeliveredOrders;
23645
      }
23646
    }
23647
 
23648
    public updateNonDeliveryReason_args deepCopy() {
23649
      return new updateNonDeliveryReason_args(this);
23650
    }
23651
 
23652
    @Deprecated
23653
    public updateNonDeliveryReason_args clone() {
23654
      return new updateNonDeliveryReason_args(this);
23655
    }
23656
 
23657
    public long getProviderId() {
23658
      return this.providerId;
23659
    }
23660
 
23661
    public updateNonDeliveryReason_args setProviderId(long providerId) {
23662
      this.providerId = providerId;
23663
      setProviderIdIsSet(true);
23664
      return this;
23665
    }
23666
 
23667
    public void unsetProviderId() {
23668
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23669
    }
23670
 
23671
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23672
    public boolean isSetProviderId() {
23673
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23674
    }
23675
 
23676
    public void setProviderIdIsSet(boolean value) {
23677
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23678
    }
23679
 
23680
    public int getUndeliveredOrdersSize() {
23681
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
23682
    }
23683
 
23684
    public void putToUndeliveredOrders(String key, String val) {
23685
      if (this.undeliveredOrders == null) {
23686
        this.undeliveredOrders = new HashMap<String,String>();
23687
      }
23688
      this.undeliveredOrders.put(key, val);
23689
    }
23690
 
23691
    public Map<String,String> getUndeliveredOrders() {
23692
      return this.undeliveredOrders;
23693
    }
23694
 
23695
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
23696
      this.undeliveredOrders = undeliveredOrders;
23697
      return this;
23698
    }
23699
 
23700
    public void unsetUndeliveredOrders() {
23701
      this.undeliveredOrders = null;
23702
    }
23703
 
23704
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
23705
    public boolean isSetUndeliveredOrders() {
23706
      return this.undeliveredOrders != null;
23707
    }
23708
 
23709
    public void setUndeliveredOrdersIsSet(boolean value) {
23710
      if (!value) {
23711
        this.undeliveredOrders = null;
23712
      }
23713
    }
23714
 
23715
    public void setFieldValue(_Fields field, Object value) {
23716
      switch (field) {
23717
      case PROVIDER_ID:
23718
        if (value == null) {
23719
          unsetProviderId();
23720
        } else {
23721
          setProviderId((Long)value);
23722
        }
23723
        break;
23724
 
23725
      case UNDELIVERED_ORDERS:
23726
        if (value == null) {
23727
          unsetUndeliveredOrders();
23728
        } else {
23729
          setUndeliveredOrders((Map<String,String>)value);
23730
        }
23731
        break;
23732
 
23733
      }
23734
    }
23735
 
23736
    public void setFieldValue(int fieldID, Object value) {
23737
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23738
    }
23739
 
23740
    public Object getFieldValue(_Fields field) {
23741
      switch (field) {
23742
      case PROVIDER_ID:
23743
        return new Long(getProviderId());
23744
 
23745
      case UNDELIVERED_ORDERS:
23746
        return getUndeliveredOrders();
23747
 
23748
      }
23749
      throw new IllegalStateException();
23750
    }
23751
 
23752
    public Object getFieldValue(int fieldId) {
23753
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23754
    }
23755
 
23756
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23757
    public boolean isSet(_Fields field) {
23758
      switch (field) {
23759
      case PROVIDER_ID:
23760
        return isSetProviderId();
23761
      case UNDELIVERED_ORDERS:
23762
        return isSetUndeliveredOrders();
23763
      }
23764
      throw new IllegalStateException();
23765
    }
23766
 
23767
    public boolean isSet(int fieldID) {
23768
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23769
    }
23770
 
23771
    @Override
23772
    public boolean equals(Object that) {
23773
      if (that == null)
23774
        return false;
23775
      if (that instanceof updateNonDeliveryReason_args)
23776
        return this.equals((updateNonDeliveryReason_args)that);
23777
      return false;
23778
    }
23779
 
23780
    public boolean equals(updateNonDeliveryReason_args that) {
23781
      if (that == null)
23782
        return false;
23783
 
23784
      boolean this_present_providerId = true;
23785
      boolean that_present_providerId = true;
23786
      if (this_present_providerId || that_present_providerId) {
23787
        if (!(this_present_providerId && that_present_providerId))
23788
          return false;
23789
        if (this.providerId != that.providerId)
23790
          return false;
23791
      }
23792
 
23793
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
23794
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
23795
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
23796
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
23797
          return false;
23798
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
23799
          return false;
23800
      }
23801
 
23802
      return true;
23803
    }
23804
 
23805
    @Override
23806
    public int hashCode() {
23807
      return 0;
23808
    }
23809
 
23810
    public void read(TProtocol iprot) throws TException {
23811
      TField field;
23812
      iprot.readStructBegin();
23813
      while (true)
23814
      {
23815
        field = iprot.readFieldBegin();
23816
        if (field.type == TType.STOP) { 
23817
          break;
23818
        }
23819
        _Fields fieldId = _Fields.findByThriftId(field.id);
23820
        if (fieldId == null) {
23821
          TProtocolUtil.skip(iprot, field.type);
23822
        } else {
23823
          switch (fieldId) {
23824
            case PROVIDER_ID:
23825
              if (field.type == TType.I64) {
23826
                this.providerId = iprot.readI64();
23827
                setProviderIdIsSet(true);
23828
              } else { 
23829
                TProtocolUtil.skip(iprot, field.type);
23830
              }
23831
              break;
23832
            case UNDELIVERED_ORDERS:
23833
              if (field.type == TType.MAP) {
23834
                {
1382 varun.gupt 23835
                  TMap _map67 = iprot.readMapBegin();
23836
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
23837
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 23838
                  {
1382 varun.gupt 23839
                    String _key69;
23840
                    String _val70;
23841
                    _key69 = iprot.readString();
23842
                    _val70 = iprot.readString();
23843
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 23844
                  }
23845
                  iprot.readMapEnd();
23846
                }
23847
              } else { 
23848
                TProtocolUtil.skip(iprot, field.type);
23849
              }
23850
              break;
23851
          }
23852
          iprot.readFieldEnd();
23853
        }
23854
      }
23855
      iprot.readStructEnd();
23856
      validate();
23857
    }
23858
 
23859
    public void write(TProtocol oprot) throws TException {
23860
      validate();
23861
 
23862
      oprot.writeStructBegin(STRUCT_DESC);
23863
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23864
      oprot.writeI64(this.providerId);
23865
      oprot.writeFieldEnd();
23866
      if (this.undeliveredOrders != null) {
23867
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
23868
        {
23869
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 23870
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 23871
          {
1382 varun.gupt 23872
            oprot.writeString(_iter71.getKey());
23873
            oprot.writeString(_iter71.getValue());
1245 chandransh 23874
          }
23875
          oprot.writeMapEnd();
23876
        }
23877
        oprot.writeFieldEnd();
23878
      }
23879
      oprot.writeFieldStop();
23880
      oprot.writeStructEnd();
23881
    }
23882
 
23883
    @Override
23884
    public String toString() {
23885
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
23886
      boolean first = true;
23887
 
23888
      sb.append("providerId:");
23889
      sb.append(this.providerId);
23890
      first = false;
23891
      if (!first) sb.append(", ");
23892
      sb.append("undeliveredOrders:");
23893
      if (this.undeliveredOrders == null) {
23894
        sb.append("null");
23895
      } else {
23896
        sb.append(this.undeliveredOrders);
23897
      }
23898
      first = false;
23899
      sb.append(")");
23900
      return sb.toString();
23901
    }
23902
 
23903
    public void validate() throws TException {
23904
      // check for required fields
23905
    }
23906
 
23907
  }
23908
 
23909
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
23910
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
23911
 
23912
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23913
 
23914
    private TransactionServiceException ex;
23915
 
23916
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23917
    public enum _Fields implements TFieldIdEnum {
23918
      EX((short)1, "ex");
23919
 
23920
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23922
 
23923
      static {
23924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23925
          byId.put((int)field._thriftId, field);
23926
          byName.put(field.getFieldName(), field);
23927
        }
23928
      }
23929
 
23930
      /**
23931
       * Find the _Fields constant that matches fieldId, or null if its not found.
23932
       */
23933
      public static _Fields findByThriftId(int fieldId) {
23934
        return byId.get(fieldId);
23935
      }
23936
 
23937
      /**
23938
       * Find the _Fields constant that matches fieldId, throwing an exception
23939
       * if it is not found.
23940
       */
23941
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23942
        _Fields fields = findByThriftId(fieldId);
23943
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23944
        return fields;
23945
      }
23946
 
23947
      /**
23948
       * Find the _Fields constant that matches name, or null if its not found.
23949
       */
23950
      public static _Fields findByName(String name) {
23951
        return byName.get(name);
23952
      }
23953
 
23954
      private final short _thriftId;
23955
      private final String _fieldName;
23956
 
23957
      _Fields(short thriftId, String fieldName) {
23958
        _thriftId = thriftId;
23959
        _fieldName = fieldName;
23960
      }
23961
 
23962
      public short getThriftFieldId() {
23963
        return _thriftId;
23964
      }
23965
 
23966
      public String getFieldName() {
23967
        return _fieldName;
23968
      }
23969
    }
23970
 
23971
    // isset id assignments
23972
 
23973
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23974
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23975
          new FieldValueMetaData(TType.STRUCT)));
23976
    }});
23977
 
23978
    static {
23979
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
23980
    }
23981
 
23982
    public updateNonDeliveryReason_result() {
23983
    }
23984
 
23985
    public updateNonDeliveryReason_result(
23986
      TransactionServiceException ex)
23987
    {
23988
      this();
23989
      this.ex = ex;
23990
    }
23991
 
23992
    /**
23993
     * Performs a deep copy on <i>other</i>.
23994
     */
23995
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
23996
      if (other.isSetEx()) {
23997
        this.ex = new TransactionServiceException(other.ex);
23998
      }
23999
    }
24000
 
24001
    public updateNonDeliveryReason_result deepCopy() {
24002
      return new updateNonDeliveryReason_result(this);
24003
    }
24004
 
24005
    @Deprecated
24006
    public updateNonDeliveryReason_result clone() {
24007
      return new updateNonDeliveryReason_result(this);
24008
    }
24009
 
24010
    public TransactionServiceException getEx() {
24011
      return this.ex;
24012
    }
24013
 
24014
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
24015
      this.ex = ex;
24016
      return this;
24017
    }
24018
 
24019
    public void unsetEx() {
24020
      this.ex = null;
24021
    }
24022
 
24023
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
24024
    public boolean isSetEx() {
24025
      return this.ex != null;
24026
    }
24027
 
24028
    public void setExIsSet(boolean value) {
24029
      if (!value) {
24030
        this.ex = null;
24031
      }
24032
    }
24033
 
24034
    public void setFieldValue(_Fields field, Object value) {
24035
      switch (field) {
24036
      case EX:
24037
        if (value == null) {
24038
          unsetEx();
24039
        } else {
24040
          setEx((TransactionServiceException)value);
24041
        }
24042
        break;
24043
 
24044
      }
24045
    }
24046
 
24047
    public void setFieldValue(int fieldID, Object value) {
24048
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24049
    }
24050
 
24051
    public Object getFieldValue(_Fields field) {
24052
      switch (field) {
24053
      case EX:
24054
        return getEx();
24055
 
24056
      }
24057
      throw new IllegalStateException();
24058
    }
24059
 
24060
    public Object getFieldValue(int fieldId) {
24061
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24062
    }
24063
 
24064
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24065
    public boolean isSet(_Fields field) {
24066
      switch (field) {
24067
      case EX:
24068
        return isSetEx();
24069
      }
24070
      throw new IllegalStateException();
24071
    }
24072
 
24073
    public boolean isSet(int fieldID) {
24074
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24075
    }
24076
 
24077
    @Override
24078
    public boolean equals(Object that) {
24079
      if (that == null)
24080
        return false;
24081
      if (that instanceof updateNonDeliveryReason_result)
24082
        return this.equals((updateNonDeliveryReason_result)that);
24083
      return false;
24084
    }
24085
 
24086
    public boolean equals(updateNonDeliveryReason_result that) {
24087
      if (that == null)
24088
        return false;
24089
 
24090
      boolean this_present_ex = true && this.isSetEx();
24091
      boolean that_present_ex = true && that.isSetEx();
24092
      if (this_present_ex || that_present_ex) {
24093
        if (!(this_present_ex && that_present_ex))
24094
          return false;
24095
        if (!this.ex.equals(that.ex))
24096
          return false;
24097
      }
24098
 
24099
      return true;
24100
    }
24101
 
24102
    @Override
24103
    public int hashCode() {
24104
      return 0;
24105
    }
24106
 
24107
    public int compareTo(updateNonDeliveryReason_result other) {
24108
      if (!getClass().equals(other.getClass())) {
24109
        return getClass().getName().compareTo(other.getClass().getName());
24110
      }
24111
 
24112
      int lastComparison = 0;
24113
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
24114
 
24115
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24116
      if (lastComparison != 0) {
24117
        return lastComparison;
24118
      }
24119
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24120
      if (lastComparison != 0) {
24121
        return lastComparison;
24122
      }
24123
      return 0;
24124
    }
24125
 
24126
    public void read(TProtocol iprot) throws TException {
24127
      TField field;
24128
      iprot.readStructBegin();
24129
      while (true)
24130
      {
24131
        field = iprot.readFieldBegin();
24132
        if (field.type == TType.STOP) { 
24133
          break;
24134
        }
24135
        _Fields fieldId = _Fields.findByThriftId(field.id);
24136
        if (fieldId == null) {
24137
          TProtocolUtil.skip(iprot, field.type);
24138
        } else {
24139
          switch (fieldId) {
24140
            case EX:
24141
              if (field.type == TType.STRUCT) {
24142
                this.ex = new TransactionServiceException();
24143
                this.ex.read(iprot);
24144
              } else { 
24145
                TProtocolUtil.skip(iprot, field.type);
24146
              }
24147
              break;
24148
          }
24149
          iprot.readFieldEnd();
24150
        }
24151
      }
24152
      iprot.readStructEnd();
24153
      validate();
24154
    }
24155
 
24156
    public void write(TProtocol oprot) throws TException {
24157
      oprot.writeStructBegin(STRUCT_DESC);
24158
 
24159
      if (this.isSetEx()) {
24160
        oprot.writeFieldBegin(EX_FIELD_DESC);
24161
        this.ex.write(oprot);
24162
        oprot.writeFieldEnd();
24163
      }
24164
      oprot.writeFieldStop();
24165
      oprot.writeStructEnd();
24166
    }
24167
 
24168
    @Override
24169
    public String toString() {
24170
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
24171
      boolean first = true;
24172
 
24173
      sb.append("ex:");
24174
      if (this.ex == null) {
24175
        sb.append("null");
24176
      } else {
24177
        sb.append(this.ex);
24178
      }
24179
      first = false;
24180
      sb.append(")");
24181
      return sb.toString();
24182
    }
24183
 
24184
    public void validate() throws TException {
24185
      // check for required fields
24186
    }
24187
 
24188
  }
24189
 
1406 ankur.sing 24190
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
24191
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
24192
 
24193
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24194
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
24195
 
24196
    private long providerId;
24197
    private long warehouseId;
24198
 
24199
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24200
    public enum _Fields implements TFieldIdEnum {
24201
      PROVIDER_ID((short)1, "providerId"),
24202
      WAREHOUSE_ID((short)2, "warehouseId");
24203
 
24204
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24205
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24206
 
24207
      static {
24208
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24209
          byId.put((int)field._thriftId, field);
24210
          byName.put(field.getFieldName(), field);
24211
        }
24212
      }
24213
 
24214
      /**
24215
       * Find the _Fields constant that matches fieldId, or null if its not found.
24216
       */
24217
      public static _Fields findByThriftId(int fieldId) {
24218
        return byId.get(fieldId);
24219
      }
24220
 
24221
      /**
24222
       * Find the _Fields constant that matches fieldId, throwing an exception
24223
       * if it is not found.
24224
       */
24225
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24226
        _Fields fields = findByThriftId(fieldId);
24227
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24228
        return fields;
24229
      }
24230
 
24231
      /**
24232
       * Find the _Fields constant that matches name, or null if its not found.
24233
       */
24234
      public static _Fields findByName(String name) {
24235
        return byName.get(name);
24236
      }
24237
 
24238
      private final short _thriftId;
24239
      private final String _fieldName;
24240
 
24241
      _Fields(short thriftId, String fieldName) {
24242
        _thriftId = thriftId;
24243
        _fieldName = fieldName;
24244
      }
24245
 
24246
      public short getThriftFieldId() {
24247
        return _thriftId;
24248
      }
24249
 
24250
      public String getFieldName() {
24251
        return _fieldName;
24252
      }
24253
    }
24254
 
24255
    // isset id assignments
24256
    private static final int __PROVIDERID_ISSET_ID = 0;
24257
    private static final int __WAREHOUSEID_ISSET_ID = 1;
24258
    private BitSet __isset_bit_vector = new BitSet(2);
24259
 
24260
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24261
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24262
          new FieldValueMetaData(TType.I64)));
24263
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
24264
          new FieldValueMetaData(TType.I64)));
24265
    }});
24266
 
24267
    static {
24268
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
24269
    }
24270
 
24271
    public getUndeliveredOrders_args() {
24272
    }
24273
 
24274
    public getUndeliveredOrders_args(
24275
      long providerId,
24276
      long warehouseId)
24277
    {
24278
      this();
24279
      this.providerId = providerId;
24280
      setProviderIdIsSet(true);
24281
      this.warehouseId = warehouseId;
24282
      setWarehouseIdIsSet(true);
24283
    }
24284
 
24285
    /**
24286
     * Performs a deep copy on <i>other</i>.
24287
     */
24288
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
24289
      __isset_bit_vector.clear();
24290
      __isset_bit_vector.or(other.__isset_bit_vector);
24291
      this.providerId = other.providerId;
24292
      this.warehouseId = other.warehouseId;
24293
    }
24294
 
24295
    public getUndeliveredOrders_args deepCopy() {
24296
      return new getUndeliveredOrders_args(this);
24297
    }
24298
 
24299
    @Deprecated
24300
    public getUndeliveredOrders_args clone() {
24301
      return new getUndeliveredOrders_args(this);
24302
    }
24303
 
24304
    public long getProviderId() {
24305
      return this.providerId;
24306
    }
24307
 
24308
    public getUndeliveredOrders_args setProviderId(long providerId) {
24309
      this.providerId = providerId;
24310
      setProviderIdIsSet(true);
24311
      return this;
24312
    }
24313
 
24314
    public void unsetProviderId() {
24315
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24316
    }
24317
 
24318
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24319
    public boolean isSetProviderId() {
24320
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24321
    }
24322
 
24323
    public void setProviderIdIsSet(boolean value) {
24324
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24325
    }
24326
 
24327
    public long getWarehouseId() {
24328
      return this.warehouseId;
24329
    }
24330
 
24331
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
24332
      this.warehouseId = warehouseId;
24333
      setWarehouseIdIsSet(true);
24334
      return this;
24335
    }
24336
 
24337
    public void unsetWarehouseId() {
24338
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
24339
    }
24340
 
24341
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
24342
    public boolean isSetWarehouseId() {
24343
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
24344
    }
24345
 
24346
    public void setWarehouseIdIsSet(boolean value) {
24347
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
24348
    }
24349
 
24350
    public void setFieldValue(_Fields field, Object value) {
24351
      switch (field) {
24352
      case PROVIDER_ID:
24353
        if (value == null) {
24354
          unsetProviderId();
24355
        } else {
24356
          setProviderId((Long)value);
24357
        }
24358
        break;
24359
 
24360
      case WAREHOUSE_ID:
24361
        if (value == null) {
24362
          unsetWarehouseId();
24363
        } else {
24364
          setWarehouseId((Long)value);
24365
        }
24366
        break;
24367
 
24368
      }
24369
    }
24370
 
24371
    public void setFieldValue(int fieldID, Object value) {
24372
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24373
    }
24374
 
24375
    public Object getFieldValue(_Fields field) {
24376
      switch (field) {
24377
      case PROVIDER_ID:
24378
        return new Long(getProviderId());
24379
 
24380
      case WAREHOUSE_ID:
24381
        return new Long(getWarehouseId());
24382
 
24383
      }
24384
      throw new IllegalStateException();
24385
    }
24386
 
24387
    public Object getFieldValue(int fieldId) {
24388
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24389
    }
24390
 
24391
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24392
    public boolean isSet(_Fields field) {
24393
      switch (field) {
24394
      case PROVIDER_ID:
24395
        return isSetProviderId();
24396
      case WAREHOUSE_ID:
24397
        return isSetWarehouseId();
24398
      }
24399
      throw new IllegalStateException();
24400
    }
24401
 
24402
    public boolean isSet(int fieldID) {
24403
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24404
    }
24405
 
24406
    @Override
24407
    public boolean equals(Object that) {
24408
      if (that == null)
24409
        return false;
24410
      if (that instanceof getUndeliveredOrders_args)
24411
        return this.equals((getUndeliveredOrders_args)that);
24412
      return false;
24413
    }
24414
 
24415
    public boolean equals(getUndeliveredOrders_args that) {
24416
      if (that == null)
24417
        return false;
24418
 
24419
      boolean this_present_providerId = true;
24420
      boolean that_present_providerId = true;
24421
      if (this_present_providerId || that_present_providerId) {
24422
        if (!(this_present_providerId && that_present_providerId))
24423
          return false;
24424
        if (this.providerId != that.providerId)
24425
          return false;
24426
      }
24427
 
24428
      boolean this_present_warehouseId = true;
24429
      boolean that_present_warehouseId = true;
24430
      if (this_present_warehouseId || that_present_warehouseId) {
24431
        if (!(this_present_warehouseId && that_present_warehouseId))
24432
          return false;
24433
        if (this.warehouseId != that.warehouseId)
24434
          return false;
24435
      }
24436
 
24437
      return true;
24438
    }
24439
 
24440
    @Override
24441
    public int hashCode() {
24442
      return 0;
24443
    }
24444
 
24445
    public int compareTo(getUndeliveredOrders_args other) {
24446
      if (!getClass().equals(other.getClass())) {
24447
        return getClass().getName().compareTo(other.getClass().getName());
24448
      }
24449
 
24450
      int lastComparison = 0;
24451
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
24452
 
24453
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
24454
      if (lastComparison != 0) {
24455
        return lastComparison;
24456
      }
24457
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
24458
      if (lastComparison != 0) {
24459
        return lastComparison;
24460
      }
24461
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
24462
      if (lastComparison != 0) {
24463
        return lastComparison;
24464
      }
24465
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
24466
      if (lastComparison != 0) {
24467
        return lastComparison;
24468
      }
24469
      return 0;
24470
    }
24471
 
24472
    public void read(TProtocol iprot) throws TException {
24473
      TField field;
24474
      iprot.readStructBegin();
24475
      while (true)
24476
      {
24477
        field = iprot.readFieldBegin();
24478
        if (field.type == TType.STOP) { 
24479
          break;
24480
        }
24481
        _Fields fieldId = _Fields.findByThriftId(field.id);
24482
        if (fieldId == null) {
24483
          TProtocolUtil.skip(iprot, field.type);
24484
        } else {
24485
          switch (fieldId) {
24486
            case PROVIDER_ID:
24487
              if (field.type == TType.I64) {
24488
                this.providerId = iprot.readI64();
24489
                setProviderIdIsSet(true);
24490
              } else { 
24491
                TProtocolUtil.skip(iprot, field.type);
24492
              }
24493
              break;
24494
            case WAREHOUSE_ID:
24495
              if (field.type == TType.I64) {
24496
                this.warehouseId = iprot.readI64();
24497
                setWarehouseIdIsSet(true);
24498
              } else { 
24499
                TProtocolUtil.skip(iprot, field.type);
24500
              }
24501
              break;
24502
          }
24503
          iprot.readFieldEnd();
24504
        }
24505
      }
24506
      iprot.readStructEnd();
24507
      validate();
24508
    }
24509
 
24510
    public void write(TProtocol oprot) throws TException {
24511
      validate();
24512
 
24513
      oprot.writeStructBegin(STRUCT_DESC);
24514
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24515
      oprot.writeI64(this.providerId);
24516
      oprot.writeFieldEnd();
24517
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
24518
      oprot.writeI64(this.warehouseId);
24519
      oprot.writeFieldEnd();
24520
      oprot.writeFieldStop();
24521
      oprot.writeStructEnd();
24522
    }
24523
 
24524
    @Override
24525
    public String toString() {
24526
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
24527
      boolean first = true;
24528
 
24529
      sb.append("providerId:");
24530
      sb.append(this.providerId);
24531
      first = false;
24532
      if (!first) sb.append(", ");
24533
      sb.append("warehouseId:");
24534
      sb.append(this.warehouseId);
24535
      first = false;
24536
      sb.append(")");
24537
      return sb.toString();
24538
    }
24539
 
24540
    public void validate() throws TException {
24541
      // check for required fields
24542
    }
24543
 
24544
  }
24545
 
24546
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
24547
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
24548
 
24549
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
24550
 
24551
    private List<Order> success;
24552
 
24553
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24554
    public enum _Fields implements TFieldIdEnum {
24555
      SUCCESS((short)0, "success");
24556
 
24557
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24558
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24559
 
24560
      static {
24561
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24562
          byId.put((int)field._thriftId, field);
24563
          byName.put(field.getFieldName(), field);
24564
        }
24565
      }
24566
 
24567
      /**
24568
       * Find the _Fields constant that matches fieldId, or null if its not found.
24569
       */
24570
      public static _Fields findByThriftId(int fieldId) {
24571
        return byId.get(fieldId);
24572
      }
24573
 
24574
      /**
24575
       * Find the _Fields constant that matches fieldId, throwing an exception
24576
       * if it is not found.
24577
       */
24578
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24579
        _Fields fields = findByThriftId(fieldId);
24580
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24581
        return fields;
24582
      }
24583
 
24584
      /**
24585
       * Find the _Fields constant that matches name, or null if its not found.
24586
       */
24587
      public static _Fields findByName(String name) {
24588
        return byName.get(name);
24589
      }
24590
 
24591
      private final short _thriftId;
24592
      private final String _fieldName;
24593
 
24594
      _Fields(short thriftId, String fieldName) {
24595
        _thriftId = thriftId;
24596
        _fieldName = fieldName;
24597
      }
24598
 
24599
      public short getThriftFieldId() {
24600
        return _thriftId;
24601
      }
24602
 
24603
      public String getFieldName() {
24604
        return _fieldName;
24605
      }
24606
    }
24607
 
24608
    // isset id assignments
24609
 
24610
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24611
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24612
          new ListMetaData(TType.LIST, 
24613
              new StructMetaData(TType.STRUCT, Order.class))));
24614
    }});
24615
 
24616
    static {
24617
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
24618
    }
24619
 
24620
    public getUndeliveredOrders_result() {
24621
    }
24622
 
24623
    public getUndeliveredOrders_result(
24624
      List<Order> success)
24625
    {
24626
      this();
24627
      this.success = success;
24628
    }
24629
 
24630
    /**
24631
     * Performs a deep copy on <i>other</i>.
24632
     */
24633
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
24634
      if (other.isSetSuccess()) {
24635
        List<Order> __this__success = new ArrayList<Order>();
24636
        for (Order other_element : other.success) {
24637
          __this__success.add(new Order(other_element));
24638
        }
24639
        this.success = __this__success;
24640
      }
24641
    }
24642
 
24643
    public getUndeliveredOrders_result deepCopy() {
24644
      return new getUndeliveredOrders_result(this);
24645
    }
24646
 
24647
    @Deprecated
24648
    public getUndeliveredOrders_result clone() {
24649
      return new getUndeliveredOrders_result(this);
24650
    }
24651
 
24652
    public int getSuccessSize() {
24653
      return (this.success == null) ? 0 : this.success.size();
24654
    }
24655
 
24656
    public java.util.Iterator<Order> getSuccessIterator() {
24657
      return (this.success == null) ? null : this.success.iterator();
24658
    }
24659
 
24660
    public void addToSuccess(Order elem) {
24661
      if (this.success == null) {
24662
        this.success = new ArrayList<Order>();
24663
      }
24664
      this.success.add(elem);
24665
    }
24666
 
24667
    public List<Order> getSuccess() {
24668
      return this.success;
24669
    }
24670
 
24671
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
24672
      this.success = success;
24673
      return this;
24674
    }
24675
 
24676
    public void unsetSuccess() {
24677
      this.success = null;
24678
    }
24679
 
24680
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24681
    public boolean isSetSuccess() {
24682
      return this.success != null;
24683
    }
24684
 
24685
    public void setSuccessIsSet(boolean value) {
24686
      if (!value) {
24687
        this.success = null;
24688
      }
24689
    }
24690
 
24691
    public void setFieldValue(_Fields field, Object value) {
24692
      switch (field) {
24693
      case SUCCESS:
24694
        if (value == null) {
24695
          unsetSuccess();
24696
        } else {
24697
          setSuccess((List<Order>)value);
24698
        }
24699
        break;
24700
 
24701
      }
24702
    }
24703
 
24704
    public void setFieldValue(int fieldID, Object value) {
24705
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24706
    }
24707
 
24708
    public Object getFieldValue(_Fields field) {
24709
      switch (field) {
24710
      case SUCCESS:
24711
        return getSuccess();
24712
 
24713
      }
24714
      throw new IllegalStateException();
24715
    }
24716
 
24717
    public Object getFieldValue(int fieldId) {
24718
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24719
    }
24720
 
24721
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24722
    public boolean isSet(_Fields field) {
24723
      switch (field) {
24724
      case SUCCESS:
24725
        return isSetSuccess();
24726
      }
24727
      throw new IllegalStateException();
24728
    }
24729
 
24730
    public boolean isSet(int fieldID) {
24731
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24732
    }
24733
 
24734
    @Override
24735
    public boolean equals(Object that) {
24736
      if (that == null)
24737
        return false;
24738
      if (that instanceof getUndeliveredOrders_result)
24739
        return this.equals((getUndeliveredOrders_result)that);
24740
      return false;
24741
    }
24742
 
24743
    public boolean equals(getUndeliveredOrders_result that) {
24744
      if (that == null)
24745
        return false;
24746
 
24747
      boolean this_present_success = true && this.isSetSuccess();
24748
      boolean that_present_success = true && that.isSetSuccess();
24749
      if (this_present_success || that_present_success) {
24750
        if (!(this_present_success && that_present_success))
24751
          return false;
24752
        if (!this.success.equals(that.success))
24753
          return false;
24754
      }
24755
 
24756
      return true;
24757
    }
24758
 
24759
    @Override
24760
    public int hashCode() {
24761
      return 0;
24762
    }
24763
 
24764
    public int compareTo(getUndeliveredOrders_result other) {
24765
      if (!getClass().equals(other.getClass())) {
24766
        return getClass().getName().compareTo(other.getClass().getName());
24767
      }
24768
 
24769
      int lastComparison = 0;
24770
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
24771
 
24772
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24773
      if (lastComparison != 0) {
24774
        return lastComparison;
24775
      }
24776
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24777
      if (lastComparison != 0) {
24778
        return lastComparison;
24779
      }
24780
      return 0;
24781
    }
24782
 
24783
    public void read(TProtocol iprot) throws TException {
24784
      TField field;
24785
      iprot.readStructBegin();
24786
      while (true)
24787
      {
24788
        field = iprot.readFieldBegin();
24789
        if (field.type == TType.STOP) { 
24790
          break;
24791
        }
24792
        _Fields fieldId = _Fields.findByThriftId(field.id);
24793
        if (fieldId == null) {
24794
          TProtocolUtil.skip(iprot, field.type);
24795
        } else {
24796
          switch (fieldId) {
24797
            case SUCCESS:
24798
              if (field.type == TType.LIST) {
24799
                {
24800
                  TList _list72 = iprot.readListBegin();
24801
                  this.success = new ArrayList<Order>(_list72.size);
24802
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
24803
                  {
24804
                    Order _elem74;
24805
                    _elem74 = new Order();
24806
                    _elem74.read(iprot);
24807
                    this.success.add(_elem74);
24808
                  }
24809
                  iprot.readListEnd();
24810
                }
24811
              } else { 
24812
                TProtocolUtil.skip(iprot, field.type);
24813
              }
24814
              break;
24815
          }
24816
          iprot.readFieldEnd();
24817
        }
24818
      }
24819
      iprot.readStructEnd();
24820
      validate();
24821
    }
24822
 
24823
    public void write(TProtocol oprot) throws TException {
24824
      oprot.writeStructBegin(STRUCT_DESC);
24825
 
24826
      if (this.isSetSuccess()) {
24827
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24828
        {
24829
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
24830
          for (Order _iter75 : this.success)
24831
          {
24832
            _iter75.write(oprot);
24833
          }
24834
          oprot.writeListEnd();
24835
        }
24836
        oprot.writeFieldEnd();
24837
      }
24838
      oprot.writeFieldStop();
24839
      oprot.writeStructEnd();
24840
    }
24841
 
24842
    @Override
24843
    public String toString() {
24844
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
24845
      boolean first = true;
24846
 
24847
      sb.append("success:");
24848
      if (this.success == null) {
24849
        sb.append("null");
24850
      } else {
24851
        sb.append(this.success);
24852
      }
24853
      first = false;
24854
      sb.append(")");
24855
      return sb.toString();
24856
    }
24857
 
24858
    public void validate() throws TException {
24859
      // check for required fields
24860
    }
24861
 
24862
  }
24863
 
305 ashish 24864
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
24865
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
24866
 
483 rajveer 24867
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 24868
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
24869
 
483 rajveer 24870
    private long orderId;
305 ashish 24871
    private boolean valid;
24872
 
24873
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24874
    public enum _Fields implements TFieldIdEnum {
483 rajveer 24875
      ORDER_ID((short)1, "orderId"),
305 ashish 24876
      VALID((short)2, "valid");
24877
 
24878
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24879
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24880
 
24881
      static {
24882
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24883
          byId.put((int)field._thriftId, field);
24884
          byName.put(field.getFieldName(), field);
24885
        }
24886
      }
24887
 
24888
      /**
24889
       * Find the _Fields constant that matches fieldId, or null if its not found.
24890
       */
24891
      public static _Fields findByThriftId(int fieldId) {
24892
        return byId.get(fieldId);
24893
      }
24894
 
24895
      /**
24896
       * Find the _Fields constant that matches fieldId, throwing an exception
24897
       * if it is not found.
24898
       */
24899
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24900
        _Fields fields = findByThriftId(fieldId);
24901
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24902
        return fields;
24903
      }
24904
 
24905
      /**
24906
       * Find the _Fields constant that matches name, or null if its not found.
24907
       */
24908
      public static _Fields findByName(String name) {
24909
        return byName.get(name);
24910
      }
24911
 
24912
      private final short _thriftId;
24913
      private final String _fieldName;
24914
 
24915
      _Fields(short thriftId, String fieldName) {
24916
        _thriftId = thriftId;
24917
        _fieldName = fieldName;
24918
      }
24919
 
24920
      public short getThriftFieldId() {
24921
        return _thriftId;
24922
      }
24923
 
24924
      public String getFieldName() {
24925
        return _fieldName;
24926
      }
24927
    }
24928
 
24929
    // isset id assignments
483 rajveer 24930
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 24931
    private static final int __VALID_ISSET_ID = 1;
24932
    private BitSet __isset_bit_vector = new BitSet(2);
24933
 
24934
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 24935
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 24936
          new FieldValueMetaData(TType.I64)));
24937
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
24938
          new FieldValueMetaData(TType.BOOL)));
24939
    }});
24940
 
24941
    static {
24942
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
24943
    }
24944
 
24945
    public getAlerts_args() {
24946
    }
24947
 
24948
    public getAlerts_args(
483 rajveer 24949
      long orderId,
305 ashish 24950
      boolean valid)
24951
    {
24952
      this();
483 rajveer 24953
      this.orderId = orderId;
24954
      setOrderIdIsSet(true);
305 ashish 24955
      this.valid = valid;
24956
      setValidIsSet(true);
24957
    }
24958
 
24959
    /**
24960
     * Performs a deep copy on <i>other</i>.
24961
     */
24962
    public getAlerts_args(getAlerts_args other) {
24963
      __isset_bit_vector.clear();
24964
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 24965
      this.orderId = other.orderId;
305 ashish 24966
      this.valid = other.valid;
24967
    }
24968
 
24969
    public getAlerts_args deepCopy() {
24970
      return new getAlerts_args(this);
24971
    }
24972
 
24973
    @Deprecated
24974
    public getAlerts_args clone() {
24975
      return new getAlerts_args(this);
24976
    }
24977
 
483 rajveer 24978
    public long getOrderId() {
24979
      return this.orderId;
305 ashish 24980
    }
24981
 
483 rajveer 24982
    public getAlerts_args setOrderId(long orderId) {
24983
      this.orderId = orderId;
24984
      setOrderIdIsSet(true);
305 ashish 24985
      return this;
24986
    }
24987
 
483 rajveer 24988
    public void unsetOrderId() {
24989
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 24990
    }
24991
 
483 rajveer 24992
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
24993
    public boolean isSetOrderId() {
24994
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 24995
    }
24996
 
483 rajveer 24997
    public void setOrderIdIsSet(boolean value) {
24998
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 24999
    }
25000
 
25001
    public boolean isValid() {
25002
      return this.valid;
25003
    }
25004
 
25005
    public getAlerts_args setValid(boolean valid) {
25006
      this.valid = valid;
25007
      setValidIsSet(true);
25008
      return this;
25009
    }
25010
 
25011
    public void unsetValid() {
25012
      __isset_bit_vector.clear(__VALID_ISSET_ID);
25013
    }
25014
 
25015
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
25016
    public boolean isSetValid() {
25017
      return __isset_bit_vector.get(__VALID_ISSET_ID);
25018
    }
25019
 
25020
    public void setValidIsSet(boolean value) {
25021
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
25022
    }
25023
 
25024
    public void setFieldValue(_Fields field, Object value) {
25025
      switch (field) {
483 rajveer 25026
      case ORDER_ID:
305 ashish 25027
        if (value == null) {
483 rajveer 25028
          unsetOrderId();
305 ashish 25029
        } else {
483 rajveer 25030
          setOrderId((Long)value);
305 ashish 25031
        }
25032
        break;
25033
 
25034
      case VALID:
25035
        if (value == null) {
25036
          unsetValid();
25037
        } else {
25038
          setValid((Boolean)value);
25039
        }
25040
        break;
25041
 
25042
      }
25043
    }
25044
 
25045
    public void setFieldValue(int fieldID, Object value) {
25046
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25047
    }
25048
 
25049
    public Object getFieldValue(_Fields field) {
25050
      switch (field) {
483 rajveer 25051
      case ORDER_ID:
25052
        return new Long(getOrderId());
305 ashish 25053
 
25054
      case VALID:
25055
        return new Boolean(isValid());
25056
 
25057
      }
25058
      throw new IllegalStateException();
25059
    }
25060
 
25061
    public Object getFieldValue(int fieldId) {
25062
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25063
    }
25064
 
25065
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25066
    public boolean isSet(_Fields field) {
25067
      switch (field) {
483 rajveer 25068
      case ORDER_ID:
25069
        return isSetOrderId();
305 ashish 25070
      case VALID:
25071
        return isSetValid();
25072
      }
25073
      throw new IllegalStateException();
25074
    }
25075
 
25076
    public boolean isSet(int fieldID) {
25077
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25078
    }
25079
 
25080
    @Override
25081
    public boolean equals(Object that) {
25082
      if (that == null)
25083
        return false;
25084
      if (that instanceof getAlerts_args)
25085
        return this.equals((getAlerts_args)that);
25086
      return false;
25087
    }
25088
 
25089
    public boolean equals(getAlerts_args that) {
25090
      if (that == null)
25091
        return false;
25092
 
483 rajveer 25093
      boolean this_present_orderId = true;
25094
      boolean that_present_orderId = true;
25095
      if (this_present_orderId || that_present_orderId) {
25096
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25097
          return false;
483 rajveer 25098
        if (this.orderId != that.orderId)
305 ashish 25099
          return false;
25100
      }
25101
 
25102
      boolean this_present_valid = true;
25103
      boolean that_present_valid = true;
25104
      if (this_present_valid || that_present_valid) {
25105
        if (!(this_present_valid && that_present_valid))
25106
          return false;
25107
        if (this.valid != that.valid)
25108
          return false;
25109
      }
25110
 
25111
      return true;
25112
    }
25113
 
25114
    @Override
25115
    public int hashCode() {
25116
      return 0;
25117
    }
25118
 
25119
    public int compareTo(getAlerts_args other) {
25120
      if (!getClass().equals(other.getClass())) {
25121
        return getClass().getName().compareTo(other.getClass().getName());
25122
      }
25123
 
25124
      int lastComparison = 0;
25125
      getAlerts_args typedOther = (getAlerts_args)other;
25126
 
483 rajveer 25127
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25128
      if (lastComparison != 0) {
25129
        return lastComparison;
25130
      }
483 rajveer 25131
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25132
      if (lastComparison != 0) {
25133
        return lastComparison;
25134
      }
25135
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
25136
      if (lastComparison != 0) {
25137
        return lastComparison;
25138
      }
25139
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
25140
      if (lastComparison != 0) {
25141
        return lastComparison;
25142
      }
25143
      return 0;
25144
    }
25145
 
25146
    public void read(TProtocol iprot) throws TException {
25147
      TField field;
25148
      iprot.readStructBegin();
25149
      while (true)
25150
      {
25151
        field = iprot.readFieldBegin();
25152
        if (field.type == TType.STOP) { 
25153
          break;
25154
        }
25155
        _Fields fieldId = _Fields.findByThriftId(field.id);
25156
        if (fieldId == null) {
25157
          TProtocolUtil.skip(iprot, field.type);
25158
        } else {
25159
          switch (fieldId) {
483 rajveer 25160
            case ORDER_ID:
305 ashish 25161
              if (field.type == TType.I64) {
483 rajveer 25162
                this.orderId = iprot.readI64();
25163
                setOrderIdIsSet(true);
305 ashish 25164
              } else { 
25165
                TProtocolUtil.skip(iprot, field.type);
25166
              }
25167
              break;
25168
            case VALID:
25169
              if (field.type == TType.BOOL) {
25170
                this.valid = iprot.readBool();
25171
                setValidIsSet(true);
25172
              } else { 
25173
                TProtocolUtil.skip(iprot, field.type);
25174
              }
25175
              break;
25176
          }
25177
          iprot.readFieldEnd();
25178
        }
25179
      }
25180
      iprot.readStructEnd();
25181
      validate();
25182
    }
25183
 
25184
    public void write(TProtocol oprot) throws TException {
25185
      validate();
25186
 
25187
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25188
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25189
      oprot.writeI64(this.orderId);
305 ashish 25190
      oprot.writeFieldEnd();
25191
      oprot.writeFieldBegin(VALID_FIELD_DESC);
25192
      oprot.writeBool(this.valid);
25193
      oprot.writeFieldEnd();
25194
      oprot.writeFieldStop();
25195
      oprot.writeStructEnd();
25196
    }
25197
 
25198
    @Override
25199
    public String toString() {
25200
      StringBuilder sb = new StringBuilder("getAlerts_args(");
25201
      boolean first = true;
25202
 
483 rajveer 25203
      sb.append("orderId:");
25204
      sb.append(this.orderId);
305 ashish 25205
      first = false;
25206
      if (!first) sb.append(", ");
25207
      sb.append("valid:");
25208
      sb.append(this.valid);
25209
      first = false;
25210
      sb.append(")");
25211
      return sb.toString();
25212
    }
25213
 
25214
    public void validate() throws TException {
25215
      // check for required fields
25216
    }
25217
 
25218
  }
25219
 
25220
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
25221
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
25222
 
25223
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25224
 
25225
    private List<Alert> success;
25226
 
25227
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25228
    public enum _Fields implements TFieldIdEnum {
25229
      SUCCESS((short)0, "success");
25230
 
25231
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25232
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25233
 
25234
      static {
25235
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25236
          byId.put((int)field._thriftId, field);
25237
          byName.put(field.getFieldName(), field);
25238
        }
25239
      }
25240
 
25241
      /**
25242
       * Find the _Fields constant that matches fieldId, or null if its not found.
25243
       */
25244
      public static _Fields findByThriftId(int fieldId) {
25245
        return byId.get(fieldId);
25246
      }
25247
 
25248
      /**
25249
       * Find the _Fields constant that matches fieldId, throwing an exception
25250
       * if it is not found.
25251
       */
25252
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25253
        _Fields fields = findByThriftId(fieldId);
25254
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25255
        return fields;
25256
      }
25257
 
25258
      /**
25259
       * Find the _Fields constant that matches name, or null if its not found.
25260
       */
25261
      public static _Fields findByName(String name) {
25262
        return byName.get(name);
25263
      }
25264
 
25265
      private final short _thriftId;
25266
      private final String _fieldName;
25267
 
25268
      _Fields(short thriftId, String fieldName) {
25269
        _thriftId = thriftId;
25270
        _fieldName = fieldName;
25271
      }
25272
 
25273
      public short getThriftFieldId() {
25274
        return _thriftId;
25275
      }
25276
 
25277
      public String getFieldName() {
25278
        return _fieldName;
25279
      }
25280
    }
25281
 
25282
    // isset id assignments
25283
 
25284
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25285
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25286
          new ListMetaData(TType.LIST, 
25287
              new StructMetaData(TType.STRUCT, Alert.class))));
25288
    }});
25289
 
25290
    static {
25291
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
25292
    }
25293
 
25294
    public getAlerts_result() {
25295
    }
25296
 
25297
    public getAlerts_result(
25298
      List<Alert> success)
25299
    {
25300
      this();
25301
      this.success = success;
25302
    }
25303
 
25304
    /**
25305
     * Performs a deep copy on <i>other</i>.
25306
     */
25307
    public getAlerts_result(getAlerts_result other) {
25308
      if (other.isSetSuccess()) {
25309
        List<Alert> __this__success = new ArrayList<Alert>();
25310
        for (Alert other_element : other.success) {
25311
          __this__success.add(new Alert(other_element));
25312
        }
25313
        this.success = __this__success;
25314
      }
25315
    }
25316
 
25317
    public getAlerts_result deepCopy() {
25318
      return new getAlerts_result(this);
25319
    }
25320
 
25321
    @Deprecated
25322
    public getAlerts_result clone() {
25323
      return new getAlerts_result(this);
25324
    }
25325
 
25326
    public int getSuccessSize() {
25327
      return (this.success == null) ? 0 : this.success.size();
25328
    }
25329
 
25330
    public java.util.Iterator<Alert> getSuccessIterator() {
25331
      return (this.success == null) ? null : this.success.iterator();
25332
    }
25333
 
25334
    public void addToSuccess(Alert elem) {
25335
      if (this.success == null) {
25336
        this.success = new ArrayList<Alert>();
25337
      }
25338
      this.success.add(elem);
25339
    }
25340
 
25341
    public List<Alert> getSuccess() {
25342
      return this.success;
25343
    }
25344
 
25345
    public getAlerts_result setSuccess(List<Alert> success) {
25346
      this.success = success;
25347
      return this;
25348
    }
25349
 
25350
    public void unsetSuccess() {
25351
      this.success = null;
25352
    }
25353
 
25354
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25355
    public boolean isSetSuccess() {
25356
      return this.success != null;
25357
    }
25358
 
25359
    public void setSuccessIsSet(boolean value) {
25360
      if (!value) {
25361
        this.success = null;
25362
      }
25363
    }
25364
 
25365
    public void setFieldValue(_Fields field, Object value) {
25366
      switch (field) {
25367
      case SUCCESS:
25368
        if (value == null) {
25369
          unsetSuccess();
25370
        } else {
25371
          setSuccess((List<Alert>)value);
25372
        }
25373
        break;
25374
 
25375
      }
25376
    }
25377
 
25378
    public void setFieldValue(int fieldID, Object value) {
25379
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25380
    }
25381
 
25382
    public Object getFieldValue(_Fields field) {
25383
      switch (field) {
25384
      case SUCCESS:
25385
        return getSuccess();
25386
 
25387
      }
25388
      throw new IllegalStateException();
25389
    }
25390
 
25391
    public Object getFieldValue(int fieldId) {
25392
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25393
    }
25394
 
25395
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25396
    public boolean isSet(_Fields field) {
25397
      switch (field) {
25398
      case SUCCESS:
25399
        return isSetSuccess();
25400
      }
25401
      throw new IllegalStateException();
25402
    }
25403
 
25404
    public boolean isSet(int fieldID) {
25405
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25406
    }
25407
 
25408
    @Override
25409
    public boolean equals(Object that) {
25410
      if (that == null)
25411
        return false;
25412
      if (that instanceof getAlerts_result)
25413
        return this.equals((getAlerts_result)that);
25414
      return false;
25415
    }
25416
 
25417
    public boolean equals(getAlerts_result that) {
25418
      if (that == null)
25419
        return false;
25420
 
25421
      boolean this_present_success = true && this.isSetSuccess();
25422
      boolean that_present_success = true && that.isSetSuccess();
25423
      if (this_present_success || that_present_success) {
25424
        if (!(this_present_success && that_present_success))
25425
          return false;
25426
        if (!this.success.equals(that.success))
25427
          return false;
25428
      }
25429
 
25430
      return true;
25431
    }
25432
 
25433
    @Override
25434
    public int hashCode() {
25435
      return 0;
25436
    }
25437
 
25438
    public int compareTo(getAlerts_result other) {
25439
      if (!getClass().equals(other.getClass())) {
25440
        return getClass().getName().compareTo(other.getClass().getName());
25441
      }
25442
 
25443
      int lastComparison = 0;
25444
      getAlerts_result typedOther = (getAlerts_result)other;
25445
 
25446
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25447
      if (lastComparison != 0) {
25448
        return lastComparison;
25449
      }
25450
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25451
      if (lastComparison != 0) {
25452
        return lastComparison;
25453
      }
25454
      return 0;
25455
    }
25456
 
25457
    public void read(TProtocol iprot) throws TException {
25458
      TField field;
25459
      iprot.readStructBegin();
25460
      while (true)
25461
      {
25462
        field = iprot.readFieldBegin();
25463
        if (field.type == TType.STOP) { 
25464
          break;
25465
        }
25466
        _Fields fieldId = _Fields.findByThriftId(field.id);
25467
        if (fieldId == null) {
25468
          TProtocolUtil.skip(iprot, field.type);
25469
        } else {
25470
          switch (fieldId) {
25471
            case SUCCESS:
25472
              if (field.type == TType.LIST) {
25473
                {
1406 ankur.sing 25474
                  TList _list76 = iprot.readListBegin();
25475
                  this.success = new ArrayList<Alert>(_list76.size);
25476
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 25477
                  {
1406 ankur.sing 25478
                    Alert _elem78;
25479
                    _elem78 = new Alert();
25480
                    _elem78.read(iprot);
25481
                    this.success.add(_elem78);
305 ashish 25482
                  }
25483
                  iprot.readListEnd();
25484
                }
25485
              } else { 
25486
                TProtocolUtil.skip(iprot, field.type);
25487
              }
25488
              break;
25489
          }
25490
          iprot.readFieldEnd();
25491
        }
25492
      }
25493
      iprot.readStructEnd();
25494
      validate();
25495
    }
25496
 
25497
    public void write(TProtocol oprot) throws TException {
25498
      oprot.writeStructBegin(STRUCT_DESC);
25499
 
25500
      if (this.isSetSuccess()) {
25501
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25502
        {
25503
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 25504
          for (Alert _iter79 : this.success)
305 ashish 25505
          {
1406 ankur.sing 25506
            _iter79.write(oprot);
305 ashish 25507
          }
25508
          oprot.writeListEnd();
25509
        }
25510
        oprot.writeFieldEnd();
25511
      }
25512
      oprot.writeFieldStop();
25513
      oprot.writeStructEnd();
25514
    }
25515
 
25516
    @Override
25517
    public String toString() {
25518
      StringBuilder sb = new StringBuilder("getAlerts_result(");
25519
      boolean first = true;
25520
 
25521
      sb.append("success:");
25522
      if (this.success == null) {
25523
        sb.append("null");
25524
      } else {
25525
        sb.append(this.success);
25526
      }
25527
      first = false;
25528
      sb.append(")");
25529
      return sb.toString();
25530
    }
25531
 
25532
    public void validate() throws TException {
25533
      // check for required fields
25534
    }
25535
 
25536
  }
25537
 
25538
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
25539
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
25540
 
483 rajveer 25541
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25542
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
25543
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
25544
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
25545
 
483 rajveer 25546
    private long orderId;
305 ashish 25547
    private boolean unset;
25548
    private long type;
25549
    private String comment;
25550
 
25551
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25552
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25553
      ORDER_ID((short)1, "orderId"),
305 ashish 25554
      UNSET((short)2, "unset"),
25555
      TYPE((short)3, "type"),
25556
      COMMENT((short)4, "comment");
25557
 
25558
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25559
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25560
 
25561
      static {
25562
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25563
          byId.put((int)field._thriftId, field);
25564
          byName.put(field.getFieldName(), field);
25565
        }
25566
      }
25567
 
25568
      /**
25569
       * Find the _Fields constant that matches fieldId, or null if its not found.
25570
       */
25571
      public static _Fields findByThriftId(int fieldId) {
25572
        return byId.get(fieldId);
25573
      }
25574
 
25575
      /**
25576
       * Find the _Fields constant that matches fieldId, throwing an exception
25577
       * if it is not found.
25578
       */
25579
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25580
        _Fields fields = findByThriftId(fieldId);
25581
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25582
        return fields;
25583
      }
25584
 
25585
      /**
25586
       * Find the _Fields constant that matches name, or null if its not found.
25587
       */
25588
      public static _Fields findByName(String name) {
25589
        return byName.get(name);
25590
      }
25591
 
25592
      private final short _thriftId;
25593
      private final String _fieldName;
25594
 
25595
      _Fields(short thriftId, String fieldName) {
25596
        _thriftId = thriftId;
25597
        _fieldName = fieldName;
25598
      }
25599
 
25600
      public short getThriftFieldId() {
25601
        return _thriftId;
25602
      }
25603
 
25604
      public String getFieldName() {
25605
        return _fieldName;
25606
      }
25607
    }
25608
 
25609
    // isset id assignments
483 rajveer 25610
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25611
    private static final int __UNSET_ISSET_ID = 1;
25612
    private static final int __TYPE_ISSET_ID = 2;
25613
    private BitSet __isset_bit_vector = new BitSet(3);
25614
 
25615
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25616
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25617
          new FieldValueMetaData(TType.I64)));
25618
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
25619
          new FieldValueMetaData(TType.BOOL)));
25620
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
25621
          new FieldValueMetaData(TType.I64)));
25622
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
25623
          new FieldValueMetaData(TType.STRING)));
25624
    }});
25625
 
25626
    static {
25627
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
25628
    }
25629
 
25630
    public setAlert_args() {
25631
    }
25632
 
25633
    public setAlert_args(
483 rajveer 25634
      long orderId,
305 ashish 25635
      boolean unset,
25636
      long type,
25637
      String comment)
25638
    {
25639
      this();
483 rajveer 25640
      this.orderId = orderId;
25641
      setOrderIdIsSet(true);
305 ashish 25642
      this.unset = unset;
25643
      setUnsetIsSet(true);
25644
      this.type = type;
25645
      setTypeIsSet(true);
25646
      this.comment = comment;
25647
    }
25648
 
25649
    /**
25650
     * Performs a deep copy on <i>other</i>.
25651
     */
25652
    public setAlert_args(setAlert_args other) {
25653
      __isset_bit_vector.clear();
25654
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25655
      this.orderId = other.orderId;
305 ashish 25656
      this.unset = other.unset;
25657
      this.type = other.type;
25658
      if (other.isSetComment()) {
25659
        this.comment = other.comment;
25660
      }
25661
    }
25662
 
25663
    public setAlert_args deepCopy() {
25664
      return new setAlert_args(this);
25665
    }
25666
 
25667
    @Deprecated
25668
    public setAlert_args clone() {
25669
      return new setAlert_args(this);
25670
    }
25671
 
483 rajveer 25672
    public long getOrderId() {
25673
      return this.orderId;
305 ashish 25674
    }
25675
 
483 rajveer 25676
    public setAlert_args setOrderId(long orderId) {
25677
      this.orderId = orderId;
25678
      setOrderIdIsSet(true);
305 ashish 25679
      return this;
25680
    }
25681
 
483 rajveer 25682
    public void unsetOrderId() {
25683
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25684
    }
25685
 
483 rajveer 25686
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25687
    public boolean isSetOrderId() {
25688
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25689
    }
25690
 
483 rajveer 25691
    public void setOrderIdIsSet(boolean value) {
25692
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25693
    }
25694
 
25695
    public boolean isUnset() {
25696
      return this.unset;
25697
    }
25698
 
25699
    public setAlert_args setUnset(boolean unset) {
25700
      this.unset = unset;
25701
      setUnsetIsSet(true);
25702
      return this;
25703
    }
25704
 
25705
    public void unsetUnset() {
25706
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
25707
    }
25708
 
25709
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
25710
    public boolean isSetUnset() {
25711
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
25712
    }
25713
 
25714
    public void setUnsetIsSet(boolean value) {
25715
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
25716
    }
25717
 
25718
    public long getType() {
25719
      return this.type;
25720
    }
25721
 
25722
    public setAlert_args setType(long type) {
25723
      this.type = type;
25724
      setTypeIsSet(true);
25725
      return this;
25726
    }
25727
 
25728
    public void unsetType() {
25729
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
25730
    }
25731
 
25732
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
25733
    public boolean isSetType() {
25734
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
25735
    }
25736
 
25737
    public void setTypeIsSet(boolean value) {
25738
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
25739
    }
25740
 
25741
    public String getComment() {
25742
      return this.comment;
25743
    }
25744
 
25745
    public setAlert_args setComment(String comment) {
25746
      this.comment = comment;
25747
      return this;
25748
    }
25749
 
25750
    public void unsetComment() {
25751
      this.comment = null;
25752
    }
25753
 
25754
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
25755
    public boolean isSetComment() {
25756
      return this.comment != null;
25757
    }
25758
 
25759
    public void setCommentIsSet(boolean value) {
25760
      if (!value) {
25761
        this.comment = null;
25762
      }
25763
    }
25764
 
25765
    public void setFieldValue(_Fields field, Object value) {
25766
      switch (field) {
483 rajveer 25767
      case ORDER_ID:
305 ashish 25768
        if (value == null) {
483 rajveer 25769
          unsetOrderId();
305 ashish 25770
        } else {
483 rajveer 25771
          setOrderId((Long)value);
305 ashish 25772
        }
25773
        break;
25774
 
25775
      case UNSET:
25776
        if (value == null) {
25777
          unsetUnset();
25778
        } else {
25779
          setUnset((Boolean)value);
25780
        }
25781
        break;
25782
 
25783
      case TYPE:
25784
        if (value == null) {
25785
          unsetType();
25786
        } else {
25787
          setType((Long)value);
25788
        }
25789
        break;
25790
 
25791
      case COMMENT:
25792
        if (value == null) {
25793
          unsetComment();
25794
        } else {
25795
          setComment((String)value);
25796
        }
25797
        break;
25798
 
25799
      }
25800
    }
25801
 
25802
    public void setFieldValue(int fieldID, Object value) {
25803
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25804
    }
25805
 
25806
    public Object getFieldValue(_Fields field) {
25807
      switch (field) {
483 rajveer 25808
      case ORDER_ID:
25809
        return new Long(getOrderId());
305 ashish 25810
 
25811
      case UNSET:
25812
        return new Boolean(isUnset());
25813
 
25814
      case TYPE:
25815
        return new Long(getType());
25816
 
25817
      case COMMENT:
25818
        return getComment();
25819
 
25820
      }
25821
      throw new IllegalStateException();
25822
    }
25823
 
25824
    public Object getFieldValue(int fieldId) {
25825
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25826
    }
25827
 
25828
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25829
    public boolean isSet(_Fields field) {
25830
      switch (field) {
483 rajveer 25831
      case ORDER_ID:
25832
        return isSetOrderId();
305 ashish 25833
      case UNSET:
25834
        return isSetUnset();
25835
      case TYPE:
25836
        return isSetType();
25837
      case COMMENT:
25838
        return isSetComment();
25839
      }
25840
      throw new IllegalStateException();
25841
    }
25842
 
25843
    public boolean isSet(int fieldID) {
25844
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25845
    }
25846
 
25847
    @Override
25848
    public boolean equals(Object that) {
25849
      if (that == null)
25850
        return false;
25851
      if (that instanceof setAlert_args)
25852
        return this.equals((setAlert_args)that);
25853
      return false;
25854
    }
25855
 
25856
    public boolean equals(setAlert_args that) {
25857
      if (that == null)
25858
        return false;
25859
 
483 rajveer 25860
      boolean this_present_orderId = true;
25861
      boolean that_present_orderId = true;
25862
      if (this_present_orderId || that_present_orderId) {
25863
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25864
          return false;
483 rajveer 25865
        if (this.orderId != that.orderId)
305 ashish 25866
          return false;
25867
      }
25868
 
25869
      boolean this_present_unset = true;
25870
      boolean that_present_unset = true;
25871
      if (this_present_unset || that_present_unset) {
25872
        if (!(this_present_unset && that_present_unset))
25873
          return false;
25874
        if (this.unset != that.unset)
25875
          return false;
25876
      }
25877
 
25878
      boolean this_present_type = true;
25879
      boolean that_present_type = true;
25880
      if (this_present_type || that_present_type) {
25881
        if (!(this_present_type && that_present_type))
25882
          return false;
25883
        if (this.type != that.type)
25884
          return false;
25885
      }
25886
 
25887
      boolean this_present_comment = true && this.isSetComment();
25888
      boolean that_present_comment = true && that.isSetComment();
25889
      if (this_present_comment || that_present_comment) {
25890
        if (!(this_present_comment && that_present_comment))
25891
          return false;
25892
        if (!this.comment.equals(that.comment))
25893
          return false;
25894
      }
25895
 
25896
      return true;
25897
    }
25898
 
25899
    @Override
25900
    public int hashCode() {
25901
      return 0;
25902
    }
25903
 
25904
    public int compareTo(setAlert_args other) {
25905
      if (!getClass().equals(other.getClass())) {
25906
        return getClass().getName().compareTo(other.getClass().getName());
25907
      }
25908
 
25909
      int lastComparison = 0;
25910
      setAlert_args typedOther = (setAlert_args)other;
25911
 
483 rajveer 25912
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25913
      if (lastComparison != 0) {
25914
        return lastComparison;
25915
      }
483 rajveer 25916
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25917
      if (lastComparison != 0) {
25918
        return lastComparison;
25919
      }
25920
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
25921
      if (lastComparison != 0) {
25922
        return lastComparison;
25923
      }
25924
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
25925
      if (lastComparison != 0) {
25926
        return lastComparison;
25927
      }
25928
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
25929
      if (lastComparison != 0) {
25930
        return lastComparison;
25931
      }
25932
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
25933
      if (lastComparison != 0) {
25934
        return lastComparison;
25935
      }
25936
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
25937
      if (lastComparison != 0) {
25938
        return lastComparison;
25939
      }
25940
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
25941
      if (lastComparison != 0) {
25942
        return lastComparison;
25943
      }
25944
      return 0;
25945
    }
25946
 
25947
    public void read(TProtocol iprot) throws TException {
25948
      TField field;
25949
      iprot.readStructBegin();
25950
      while (true)
25951
      {
25952
        field = iprot.readFieldBegin();
25953
        if (field.type == TType.STOP) { 
25954
          break;
25955
        }
25956
        _Fields fieldId = _Fields.findByThriftId(field.id);
25957
        if (fieldId == null) {
25958
          TProtocolUtil.skip(iprot, field.type);
25959
        } else {
25960
          switch (fieldId) {
483 rajveer 25961
            case ORDER_ID:
305 ashish 25962
              if (field.type == TType.I64) {
483 rajveer 25963
                this.orderId = iprot.readI64();
25964
                setOrderIdIsSet(true);
305 ashish 25965
              } else { 
25966
                TProtocolUtil.skip(iprot, field.type);
25967
              }
25968
              break;
25969
            case UNSET:
25970
              if (field.type == TType.BOOL) {
25971
                this.unset = iprot.readBool();
25972
                setUnsetIsSet(true);
25973
              } else { 
25974
                TProtocolUtil.skip(iprot, field.type);
25975
              }
25976
              break;
25977
            case TYPE:
25978
              if (field.type == TType.I64) {
25979
                this.type = iprot.readI64();
25980
                setTypeIsSet(true);
25981
              } else { 
25982
                TProtocolUtil.skip(iprot, field.type);
25983
              }
25984
              break;
25985
            case COMMENT:
25986
              if (field.type == TType.STRING) {
25987
                this.comment = iprot.readString();
25988
              } else { 
25989
                TProtocolUtil.skip(iprot, field.type);
25990
              }
25991
              break;
25992
          }
25993
          iprot.readFieldEnd();
25994
        }
25995
      }
25996
      iprot.readStructEnd();
25997
      validate();
25998
    }
25999
 
26000
    public void write(TProtocol oprot) throws TException {
26001
      validate();
26002
 
26003
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 26004
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
26005
      oprot.writeI64(this.orderId);
305 ashish 26006
      oprot.writeFieldEnd();
26007
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
26008
      oprot.writeBool(this.unset);
26009
      oprot.writeFieldEnd();
26010
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
26011
      oprot.writeI64(this.type);
26012
      oprot.writeFieldEnd();
26013
      if (this.comment != null) {
26014
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
26015
        oprot.writeString(this.comment);
26016
        oprot.writeFieldEnd();
26017
      }
26018
      oprot.writeFieldStop();
26019
      oprot.writeStructEnd();
26020
    }
26021
 
26022
    @Override
26023
    public String toString() {
26024
      StringBuilder sb = new StringBuilder("setAlert_args(");
26025
      boolean first = true;
26026
 
483 rajveer 26027
      sb.append("orderId:");
26028
      sb.append(this.orderId);
305 ashish 26029
      first = false;
26030
      if (!first) sb.append(", ");
26031
      sb.append("unset:");
26032
      sb.append(this.unset);
26033
      first = false;
26034
      if (!first) sb.append(", ");
26035
      sb.append("type:");
26036
      sb.append(this.type);
26037
      first = false;
26038
      if (!first) sb.append(", ");
26039
      sb.append("comment:");
26040
      if (this.comment == null) {
26041
        sb.append("null");
26042
      } else {
26043
        sb.append(this.comment);
26044
      }
26045
      first = false;
26046
      sb.append(")");
26047
      return sb.toString();
26048
    }
26049
 
26050
    public void validate() throws TException {
26051
      // check for required fields
26052
    }
26053
 
26054
  }
26055
 
26056
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
26057
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
26058
 
26059
 
26060
 
26061
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26062
    public enum _Fields implements TFieldIdEnum {
26063
;
26064
 
26065
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26066
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26067
 
26068
      static {
26069
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26070
          byId.put((int)field._thriftId, field);
26071
          byName.put(field.getFieldName(), field);
26072
        }
26073
      }
26074
 
26075
      /**
26076
       * Find the _Fields constant that matches fieldId, or null if its not found.
26077
       */
26078
      public static _Fields findByThriftId(int fieldId) {
26079
        return byId.get(fieldId);
26080
      }
26081
 
26082
      /**
26083
       * Find the _Fields constant that matches fieldId, throwing an exception
26084
       * if it is not found.
26085
       */
26086
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26087
        _Fields fields = findByThriftId(fieldId);
26088
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26089
        return fields;
26090
      }
26091
 
26092
      /**
26093
       * Find the _Fields constant that matches name, or null if its not found.
26094
       */
26095
      public static _Fields findByName(String name) {
26096
        return byName.get(name);
26097
      }
26098
 
26099
      private final short _thriftId;
26100
      private final String _fieldName;
26101
 
26102
      _Fields(short thriftId, String fieldName) {
26103
        _thriftId = thriftId;
26104
        _fieldName = fieldName;
26105
      }
26106
 
26107
      public short getThriftFieldId() {
26108
        return _thriftId;
26109
      }
26110
 
26111
      public String getFieldName() {
26112
        return _fieldName;
26113
      }
26114
    }
26115
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26116
    }});
26117
 
26118
    static {
26119
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
26120
    }
26121
 
26122
    public setAlert_result() {
26123
    }
26124
 
26125
    /**
26126
     * Performs a deep copy on <i>other</i>.
26127
     */
26128
    public setAlert_result(setAlert_result other) {
26129
    }
26130
 
26131
    public setAlert_result deepCopy() {
26132
      return new setAlert_result(this);
26133
    }
26134
 
26135
    @Deprecated
26136
    public setAlert_result clone() {
26137
      return new setAlert_result(this);
26138
    }
26139
 
26140
    public void setFieldValue(_Fields field, Object value) {
26141
      switch (field) {
26142
      }
26143
    }
26144
 
26145
    public void setFieldValue(int fieldID, Object value) {
26146
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26147
    }
26148
 
26149
    public Object getFieldValue(_Fields field) {
26150
      switch (field) {
26151
      }
26152
      throw new IllegalStateException();
26153
    }
26154
 
26155
    public Object getFieldValue(int fieldId) {
26156
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26157
    }
26158
 
26159
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26160
    public boolean isSet(_Fields field) {
26161
      switch (field) {
26162
      }
26163
      throw new IllegalStateException();
26164
    }
26165
 
26166
    public boolean isSet(int fieldID) {
26167
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26168
    }
26169
 
26170
    @Override
26171
    public boolean equals(Object that) {
26172
      if (that == null)
26173
        return false;
26174
      if (that instanceof setAlert_result)
26175
        return this.equals((setAlert_result)that);
26176
      return false;
26177
    }
26178
 
26179
    public boolean equals(setAlert_result that) {
26180
      if (that == null)
26181
        return false;
26182
 
26183
      return true;
26184
    }
26185
 
26186
    @Override
26187
    public int hashCode() {
26188
      return 0;
26189
    }
26190
 
26191
    public int compareTo(setAlert_result other) {
26192
      if (!getClass().equals(other.getClass())) {
26193
        return getClass().getName().compareTo(other.getClass().getName());
26194
      }
26195
 
26196
      int lastComparison = 0;
26197
      setAlert_result typedOther = (setAlert_result)other;
26198
 
26199
      return 0;
26200
    }
26201
 
26202
    public void read(TProtocol iprot) throws TException {
26203
      TField field;
26204
      iprot.readStructBegin();
26205
      while (true)
26206
      {
26207
        field = iprot.readFieldBegin();
26208
        if (field.type == TType.STOP) { 
26209
          break;
26210
        }
26211
        _Fields fieldId = _Fields.findByThriftId(field.id);
26212
        if (fieldId == null) {
26213
          TProtocolUtil.skip(iprot, field.type);
26214
        } else {
26215
          switch (fieldId) {
26216
          }
26217
          iprot.readFieldEnd();
26218
        }
26219
      }
26220
      iprot.readStructEnd();
26221
      validate();
26222
    }
26223
 
26224
    public void write(TProtocol oprot) throws TException {
26225
      oprot.writeStructBegin(STRUCT_DESC);
26226
 
26227
      oprot.writeFieldStop();
26228
      oprot.writeStructEnd();
26229
    }
26230
 
26231
    @Override
26232
    public String toString() {
26233
      StringBuilder sb = new StringBuilder("setAlert_result(");
26234
      boolean first = true;
26235
 
26236
      sb.append(")");
26237
      return sb.toString();
26238
    }
26239
 
26240
    public void validate() throws TException {
26241
      // check for required fields
26242
    }
26243
 
26244
  }
26245
 
1598 ankur.sing 26246
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
26247
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
26248
 
26249
 
26250
 
26251
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26252
    public enum _Fields implements TFieldIdEnum {
26253
;
26254
 
26255
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26256
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26257
 
26258
      static {
26259
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26260
          byId.put((int)field._thriftId, field);
26261
          byName.put(field.getFieldName(), field);
26262
        }
26263
      }
26264
 
26265
      /**
26266
       * Find the _Fields constant that matches fieldId, or null if its not found.
26267
       */
26268
      public static _Fields findByThriftId(int fieldId) {
26269
        return byId.get(fieldId);
26270
      }
26271
 
26272
      /**
26273
       * Find the _Fields constant that matches fieldId, throwing an exception
26274
       * if it is not found.
26275
       */
26276
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26277
        _Fields fields = findByThriftId(fieldId);
26278
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26279
        return fields;
26280
      }
26281
 
26282
      /**
26283
       * Find the _Fields constant that matches name, or null if its not found.
26284
       */
26285
      public static _Fields findByName(String name) {
26286
        return byName.get(name);
26287
      }
26288
 
26289
      private final short _thriftId;
26290
      private final String _fieldName;
26291
 
26292
      _Fields(short thriftId, String fieldName) {
26293
        _thriftId = thriftId;
26294
        _fieldName = fieldName;
26295
      }
26296
 
26297
      public short getThriftFieldId() {
26298
        return _thriftId;
26299
      }
26300
 
26301
      public String getFieldName() {
26302
        return _fieldName;
26303
      }
26304
    }
26305
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26306
    }});
26307
 
26308
    static {
26309
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
26310
    }
26311
 
26312
    public getValidOrderCount_args() {
26313
    }
26314
 
26315
    /**
26316
     * Performs a deep copy on <i>other</i>.
26317
     */
26318
    public getValidOrderCount_args(getValidOrderCount_args other) {
26319
    }
26320
 
26321
    public getValidOrderCount_args deepCopy() {
26322
      return new getValidOrderCount_args(this);
26323
    }
26324
 
26325
    @Deprecated
26326
    public getValidOrderCount_args clone() {
26327
      return new getValidOrderCount_args(this);
26328
    }
26329
 
26330
    public void setFieldValue(_Fields field, Object value) {
26331
      switch (field) {
26332
      }
26333
    }
26334
 
26335
    public void setFieldValue(int fieldID, Object value) {
26336
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26337
    }
26338
 
26339
    public Object getFieldValue(_Fields field) {
26340
      switch (field) {
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) {
26352
      }
26353
      throw new IllegalStateException();
26354
    }
26355
 
26356
    public boolean isSet(int fieldID) {
26357
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26358
    }
26359
 
26360
    @Override
26361
    public boolean equals(Object that) {
26362
      if (that == null)
26363
        return false;
26364
      if (that instanceof getValidOrderCount_args)
26365
        return this.equals((getValidOrderCount_args)that);
26366
      return false;
26367
    }
26368
 
26369
    public boolean equals(getValidOrderCount_args that) {
26370
      if (that == null)
26371
        return false;
26372
 
26373
      return true;
26374
    }
26375
 
26376
    @Override
26377
    public int hashCode() {
26378
      return 0;
26379
    }
26380
 
26381
    public int compareTo(getValidOrderCount_args other) {
26382
      if (!getClass().equals(other.getClass())) {
26383
        return getClass().getName().compareTo(other.getClass().getName());
26384
      }
26385
 
26386
      int lastComparison = 0;
26387
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
26388
 
26389
      return 0;
26390
    }
26391
 
26392
    public void read(TProtocol iprot) throws TException {
26393
      TField field;
26394
      iprot.readStructBegin();
26395
      while (true)
26396
      {
26397
        field = iprot.readFieldBegin();
26398
        if (field.type == TType.STOP) { 
26399
          break;
26400
        }
26401
        _Fields fieldId = _Fields.findByThriftId(field.id);
26402
        if (fieldId == null) {
26403
          TProtocolUtil.skip(iprot, field.type);
26404
        } else {
26405
          switch (fieldId) {
26406
          }
26407
          iprot.readFieldEnd();
26408
        }
26409
      }
26410
      iprot.readStructEnd();
26411
      validate();
26412
    }
26413
 
26414
    public void write(TProtocol oprot) throws TException {
26415
      validate();
26416
 
26417
      oprot.writeStructBegin(STRUCT_DESC);
26418
      oprot.writeFieldStop();
26419
      oprot.writeStructEnd();
26420
    }
26421
 
26422
    @Override
26423
    public String toString() {
26424
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
26425
      boolean first = true;
26426
 
26427
      sb.append(")");
26428
      return sb.toString();
26429
    }
26430
 
26431
    public void validate() throws TException {
26432
      // check for required fields
26433
    }
26434
 
26435
  }
26436
 
26437
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
26438
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
26439
 
26440
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26441
 
26442
    private long success;
26443
 
26444
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26445
    public enum _Fields implements TFieldIdEnum {
26446
      SUCCESS((short)0, "success");
26447
 
26448
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26450
 
26451
      static {
26452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26453
          byId.put((int)field._thriftId, field);
26454
          byName.put(field.getFieldName(), field);
26455
        }
26456
      }
26457
 
26458
      /**
26459
       * Find the _Fields constant that matches fieldId, or null if its not found.
26460
       */
26461
      public static _Fields findByThriftId(int fieldId) {
26462
        return byId.get(fieldId);
26463
      }
26464
 
26465
      /**
26466
       * Find the _Fields constant that matches fieldId, throwing an exception
26467
       * if it is not found.
26468
       */
26469
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26470
        _Fields fields = findByThriftId(fieldId);
26471
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26472
        return fields;
26473
      }
26474
 
26475
      /**
26476
       * Find the _Fields constant that matches name, or null if its not found.
26477
       */
26478
      public static _Fields findByName(String name) {
26479
        return byName.get(name);
26480
      }
26481
 
26482
      private final short _thriftId;
26483
      private final String _fieldName;
26484
 
26485
      _Fields(short thriftId, String fieldName) {
26486
        _thriftId = thriftId;
26487
        _fieldName = fieldName;
26488
      }
26489
 
26490
      public short getThriftFieldId() {
26491
        return _thriftId;
26492
      }
26493
 
26494
      public String getFieldName() {
26495
        return _fieldName;
26496
      }
26497
    }
26498
 
26499
    // isset id assignments
26500
    private static final int __SUCCESS_ISSET_ID = 0;
26501
    private BitSet __isset_bit_vector = new BitSet(1);
26502
 
26503
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26504
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26505
          new FieldValueMetaData(TType.I64)));
26506
    }});
26507
 
26508
    static {
26509
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
26510
    }
26511
 
26512
    public getValidOrderCount_result() {
26513
    }
26514
 
26515
    public getValidOrderCount_result(
26516
      long success)
26517
    {
26518
      this();
26519
      this.success = success;
26520
      setSuccessIsSet(true);
26521
    }
26522
 
26523
    /**
26524
     * Performs a deep copy on <i>other</i>.
26525
     */
26526
    public getValidOrderCount_result(getValidOrderCount_result other) {
26527
      __isset_bit_vector.clear();
26528
      __isset_bit_vector.or(other.__isset_bit_vector);
26529
      this.success = other.success;
26530
    }
26531
 
26532
    public getValidOrderCount_result deepCopy() {
26533
      return new getValidOrderCount_result(this);
26534
    }
26535
 
26536
    @Deprecated
26537
    public getValidOrderCount_result clone() {
26538
      return new getValidOrderCount_result(this);
26539
    }
26540
 
26541
    public long getSuccess() {
26542
      return this.success;
26543
    }
26544
 
26545
    public getValidOrderCount_result setSuccess(long success) {
26546
      this.success = success;
26547
      setSuccessIsSet(true);
26548
      return this;
26549
    }
26550
 
26551
    public void unsetSuccess() {
26552
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26553
    }
26554
 
26555
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26556
    public boolean isSetSuccess() {
26557
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26558
    }
26559
 
26560
    public void setSuccessIsSet(boolean value) {
26561
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26562
    }
26563
 
26564
    public void setFieldValue(_Fields field, Object value) {
26565
      switch (field) {
26566
      case SUCCESS:
26567
        if (value == null) {
26568
          unsetSuccess();
26569
        } else {
26570
          setSuccess((Long)value);
26571
        }
26572
        break;
26573
 
26574
      }
26575
    }
26576
 
26577
    public void setFieldValue(int fieldID, Object value) {
26578
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26579
    }
26580
 
26581
    public Object getFieldValue(_Fields field) {
26582
      switch (field) {
26583
      case SUCCESS:
26584
        return new Long(getSuccess());
26585
 
26586
      }
26587
      throw new IllegalStateException();
26588
    }
26589
 
26590
    public Object getFieldValue(int fieldId) {
26591
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26592
    }
26593
 
26594
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26595
    public boolean isSet(_Fields field) {
26596
      switch (field) {
26597
      case SUCCESS:
26598
        return isSetSuccess();
26599
      }
26600
      throw new IllegalStateException();
26601
    }
26602
 
26603
    public boolean isSet(int fieldID) {
26604
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26605
    }
26606
 
26607
    @Override
26608
    public boolean equals(Object that) {
26609
      if (that == null)
26610
        return false;
26611
      if (that instanceof getValidOrderCount_result)
26612
        return this.equals((getValidOrderCount_result)that);
26613
      return false;
26614
    }
26615
 
26616
    public boolean equals(getValidOrderCount_result that) {
26617
      if (that == null)
26618
        return false;
26619
 
26620
      boolean this_present_success = true;
26621
      boolean that_present_success = true;
26622
      if (this_present_success || that_present_success) {
26623
        if (!(this_present_success && that_present_success))
26624
          return false;
26625
        if (this.success != that.success)
26626
          return false;
26627
      }
26628
 
26629
      return true;
26630
    }
26631
 
26632
    @Override
26633
    public int hashCode() {
26634
      return 0;
26635
    }
26636
 
26637
    public int compareTo(getValidOrderCount_result other) {
26638
      if (!getClass().equals(other.getClass())) {
26639
        return getClass().getName().compareTo(other.getClass().getName());
26640
      }
26641
 
26642
      int lastComparison = 0;
26643
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
26644
 
26645
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26646
      if (lastComparison != 0) {
26647
        return lastComparison;
26648
      }
26649
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26650
      if (lastComparison != 0) {
26651
        return lastComparison;
26652
      }
26653
      return 0;
26654
    }
26655
 
26656
    public void read(TProtocol iprot) throws TException {
26657
      TField field;
26658
      iprot.readStructBegin();
26659
      while (true)
26660
      {
26661
        field = iprot.readFieldBegin();
26662
        if (field.type == TType.STOP) { 
26663
          break;
26664
        }
26665
        _Fields fieldId = _Fields.findByThriftId(field.id);
26666
        if (fieldId == null) {
26667
          TProtocolUtil.skip(iprot, field.type);
26668
        } else {
26669
          switch (fieldId) {
26670
            case SUCCESS:
26671
              if (field.type == TType.I64) {
26672
                this.success = iprot.readI64();
26673
                setSuccessIsSet(true);
26674
              } else { 
26675
                TProtocolUtil.skip(iprot, field.type);
26676
              }
26677
              break;
26678
          }
26679
          iprot.readFieldEnd();
26680
        }
26681
      }
26682
      iprot.readStructEnd();
26683
      validate();
26684
    }
26685
 
26686
    public void write(TProtocol oprot) throws TException {
26687
      oprot.writeStructBegin(STRUCT_DESC);
26688
 
26689
      if (this.isSetSuccess()) {
26690
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26691
        oprot.writeI64(this.success);
26692
        oprot.writeFieldEnd();
26693
      }
26694
      oprot.writeFieldStop();
26695
      oprot.writeStructEnd();
26696
    }
26697
 
26698
    @Override
26699
    public String toString() {
26700
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
26701
      boolean first = true;
26702
 
26703
      sb.append("success:");
26704
      sb.append(this.success);
26705
      first = false;
26706
      sb.append(")");
26707
      return sb.toString();
26708
    }
26709
 
26710
    public void validate() throws TException {
26711
      // check for required fields
26712
    }
26713
 
26714
  }
26715
 
1629 ankur.sing 26716
  public static class getNoOfCustomersWithSuccessfulTransaction_args implements TBase<getNoOfCustomersWithSuccessfulTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_args>   {
26717
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_args");
26718
 
26719
 
26720
 
26721
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26722
    public enum _Fields implements TFieldIdEnum {
26723
;
26724
 
26725
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26726
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26727
 
26728
      static {
26729
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26730
          byId.put((int)field._thriftId, field);
26731
          byName.put(field.getFieldName(), field);
26732
        }
26733
      }
26734
 
26735
      /**
26736
       * Find the _Fields constant that matches fieldId, or null if its not found.
26737
       */
26738
      public static _Fields findByThriftId(int fieldId) {
26739
        return byId.get(fieldId);
26740
      }
26741
 
26742
      /**
26743
       * Find the _Fields constant that matches fieldId, throwing an exception
26744
       * if it is not found.
26745
       */
26746
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26747
        _Fields fields = findByThriftId(fieldId);
26748
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26749
        return fields;
26750
      }
26751
 
26752
      /**
26753
       * Find the _Fields constant that matches name, or null if its not found.
26754
       */
26755
      public static _Fields findByName(String name) {
26756
        return byName.get(name);
26757
      }
26758
 
26759
      private final short _thriftId;
26760
      private final String _fieldName;
26761
 
26762
      _Fields(short thriftId, String fieldName) {
26763
        _thriftId = thriftId;
26764
        _fieldName = fieldName;
26765
      }
26766
 
26767
      public short getThriftFieldId() {
26768
        return _thriftId;
26769
      }
26770
 
26771
      public String getFieldName() {
26772
        return _fieldName;
26773
      }
26774
    }
26775
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26776
    }});
26777
 
26778
    static {
26779
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_args.class, metaDataMap);
26780
    }
26781
 
26782
    public getNoOfCustomersWithSuccessfulTransaction_args() {
26783
    }
26784
 
26785
    /**
26786
     * Performs a deep copy on <i>other</i>.
26787
     */
26788
    public getNoOfCustomersWithSuccessfulTransaction_args(getNoOfCustomersWithSuccessfulTransaction_args other) {
26789
    }
26790
 
26791
    public getNoOfCustomersWithSuccessfulTransaction_args deepCopy() {
26792
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
26793
    }
26794
 
26795
    @Deprecated
26796
    public getNoOfCustomersWithSuccessfulTransaction_args clone() {
26797
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
26798
    }
26799
 
26800
    public void setFieldValue(_Fields field, Object value) {
26801
      switch (field) {
26802
      }
26803
    }
26804
 
26805
    public void setFieldValue(int fieldID, Object value) {
26806
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26807
    }
26808
 
26809
    public Object getFieldValue(_Fields field) {
26810
      switch (field) {
26811
      }
26812
      throw new IllegalStateException();
26813
    }
26814
 
26815
    public Object getFieldValue(int fieldId) {
26816
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26817
    }
26818
 
26819
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26820
    public boolean isSet(_Fields field) {
26821
      switch (field) {
26822
      }
26823
      throw new IllegalStateException();
26824
    }
26825
 
26826
    public boolean isSet(int fieldID) {
26827
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26828
    }
26829
 
26830
    @Override
26831
    public boolean equals(Object that) {
26832
      if (that == null)
26833
        return false;
26834
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_args)
26835
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_args)that);
26836
      return false;
26837
    }
26838
 
26839
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_args that) {
26840
      if (that == null)
26841
        return false;
26842
 
26843
      return true;
26844
    }
26845
 
26846
    @Override
26847
    public int hashCode() {
26848
      return 0;
26849
    }
26850
 
26851
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_args other) {
26852
      if (!getClass().equals(other.getClass())) {
26853
        return getClass().getName().compareTo(other.getClass().getName());
26854
      }
26855
 
26856
      int lastComparison = 0;
26857
      getNoOfCustomersWithSuccessfulTransaction_args typedOther = (getNoOfCustomersWithSuccessfulTransaction_args)other;
26858
 
26859
      return 0;
26860
    }
26861
 
26862
    public void read(TProtocol iprot) throws TException {
26863
      TField field;
26864
      iprot.readStructBegin();
26865
      while (true)
26866
      {
26867
        field = iprot.readFieldBegin();
26868
        if (field.type == TType.STOP) { 
26869
          break;
26870
        }
26871
        _Fields fieldId = _Fields.findByThriftId(field.id);
26872
        if (fieldId == null) {
26873
          TProtocolUtil.skip(iprot, field.type);
26874
        } else {
26875
          switch (fieldId) {
26876
          }
26877
          iprot.readFieldEnd();
26878
        }
26879
      }
26880
      iprot.readStructEnd();
26881
      validate();
26882
    }
26883
 
26884
    public void write(TProtocol oprot) throws TException {
26885
      validate();
26886
 
26887
      oprot.writeStructBegin(STRUCT_DESC);
26888
      oprot.writeFieldStop();
26889
      oprot.writeStructEnd();
26890
    }
26891
 
26892
    @Override
26893
    public String toString() {
26894
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_args(");
26895
      boolean first = true;
26896
 
26897
      sb.append(")");
26898
      return sb.toString();
26899
    }
26900
 
26901
    public void validate() throws TException {
26902
      // check for required fields
26903
    }
26904
 
26905
  }
26906
 
26907
  public static class getNoOfCustomersWithSuccessfulTransaction_result implements TBase<getNoOfCustomersWithSuccessfulTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_result>   {
26908
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_result");
26909
 
26910
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26911
 
26912
    private long success;
26913
 
26914
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26915
    public enum _Fields implements TFieldIdEnum {
26916
      SUCCESS((short)0, "success");
26917
 
26918
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26919
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26920
 
26921
      static {
26922
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26923
          byId.put((int)field._thriftId, field);
26924
          byName.put(field.getFieldName(), field);
26925
        }
26926
      }
26927
 
26928
      /**
26929
       * Find the _Fields constant that matches fieldId, or null if its not found.
26930
       */
26931
      public static _Fields findByThriftId(int fieldId) {
26932
        return byId.get(fieldId);
26933
      }
26934
 
26935
      /**
26936
       * Find the _Fields constant that matches fieldId, throwing an exception
26937
       * if it is not found.
26938
       */
26939
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26940
        _Fields fields = findByThriftId(fieldId);
26941
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26942
        return fields;
26943
      }
26944
 
26945
      /**
26946
       * Find the _Fields constant that matches name, or null if its not found.
26947
       */
26948
      public static _Fields findByName(String name) {
26949
        return byName.get(name);
26950
      }
26951
 
26952
      private final short _thriftId;
26953
      private final String _fieldName;
26954
 
26955
      _Fields(short thriftId, String fieldName) {
26956
        _thriftId = thriftId;
26957
        _fieldName = fieldName;
26958
      }
26959
 
26960
      public short getThriftFieldId() {
26961
        return _thriftId;
26962
      }
26963
 
26964
      public String getFieldName() {
26965
        return _fieldName;
26966
      }
26967
    }
26968
 
26969
    // isset id assignments
26970
    private static final int __SUCCESS_ISSET_ID = 0;
26971
    private BitSet __isset_bit_vector = new BitSet(1);
26972
 
26973
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26974
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26975
          new FieldValueMetaData(TType.I64)));
26976
    }});
26977
 
26978
    static {
26979
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_result.class, metaDataMap);
26980
    }
26981
 
26982
    public getNoOfCustomersWithSuccessfulTransaction_result() {
26983
    }
26984
 
26985
    public getNoOfCustomersWithSuccessfulTransaction_result(
26986
      long success)
26987
    {
26988
      this();
26989
      this.success = success;
26990
      setSuccessIsSet(true);
26991
    }
26992
 
26993
    /**
26994
     * Performs a deep copy on <i>other</i>.
26995
     */
26996
    public getNoOfCustomersWithSuccessfulTransaction_result(getNoOfCustomersWithSuccessfulTransaction_result other) {
26997
      __isset_bit_vector.clear();
26998
      __isset_bit_vector.or(other.__isset_bit_vector);
26999
      this.success = other.success;
27000
    }
27001
 
27002
    public getNoOfCustomersWithSuccessfulTransaction_result deepCopy() {
27003
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27004
    }
27005
 
27006
    @Deprecated
27007
    public getNoOfCustomersWithSuccessfulTransaction_result clone() {
27008
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27009
    }
27010
 
27011
    public long getSuccess() {
27012
      return this.success;
27013
    }
27014
 
27015
    public getNoOfCustomersWithSuccessfulTransaction_result setSuccess(long success) {
27016
      this.success = success;
27017
      setSuccessIsSet(true);
27018
      return this;
27019
    }
27020
 
27021
    public void unsetSuccess() {
27022
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27023
    }
27024
 
27025
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27026
    public boolean isSetSuccess() {
27027
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27028
    }
27029
 
27030
    public void setSuccessIsSet(boolean value) {
27031
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27032
    }
27033
 
27034
    public void setFieldValue(_Fields field, Object value) {
27035
      switch (field) {
27036
      case SUCCESS:
27037
        if (value == null) {
27038
          unsetSuccess();
27039
        } else {
27040
          setSuccess((Long)value);
27041
        }
27042
        break;
27043
 
27044
      }
27045
    }
27046
 
27047
    public void setFieldValue(int fieldID, Object value) {
27048
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27049
    }
27050
 
27051
    public Object getFieldValue(_Fields field) {
27052
      switch (field) {
27053
      case SUCCESS:
27054
        return new Long(getSuccess());
27055
 
27056
      }
27057
      throw new IllegalStateException();
27058
    }
27059
 
27060
    public Object getFieldValue(int fieldId) {
27061
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27062
    }
27063
 
27064
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27065
    public boolean isSet(_Fields field) {
27066
      switch (field) {
27067
      case SUCCESS:
27068
        return isSetSuccess();
27069
      }
27070
      throw new IllegalStateException();
27071
    }
27072
 
27073
    public boolean isSet(int fieldID) {
27074
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27075
    }
27076
 
27077
    @Override
27078
    public boolean equals(Object that) {
27079
      if (that == null)
27080
        return false;
27081
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_result)
27082
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_result)that);
27083
      return false;
27084
    }
27085
 
27086
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_result that) {
27087
      if (that == null)
27088
        return false;
27089
 
27090
      boolean this_present_success = true;
27091
      boolean that_present_success = true;
27092
      if (this_present_success || that_present_success) {
27093
        if (!(this_present_success && that_present_success))
27094
          return false;
27095
        if (this.success != that.success)
27096
          return false;
27097
      }
27098
 
27099
      return true;
27100
    }
27101
 
27102
    @Override
27103
    public int hashCode() {
27104
      return 0;
27105
    }
27106
 
27107
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_result other) {
27108
      if (!getClass().equals(other.getClass())) {
27109
        return getClass().getName().compareTo(other.getClass().getName());
27110
      }
27111
 
27112
      int lastComparison = 0;
27113
      getNoOfCustomersWithSuccessfulTransaction_result typedOther = (getNoOfCustomersWithSuccessfulTransaction_result)other;
27114
 
27115
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27116
      if (lastComparison != 0) {
27117
        return lastComparison;
27118
      }
27119
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27120
      if (lastComparison != 0) {
27121
        return lastComparison;
27122
      }
27123
      return 0;
27124
    }
27125
 
27126
    public void read(TProtocol iprot) throws TException {
27127
      TField field;
27128
      iprot.readStructBegin();
27129
      while (true)
27130
      {
27131
        field = iprot.readFieldBegin();
27132
        if (field.type == TType.STOP) { 
27133
          break;
27134
        }
27135
        _Fields fieldId = _Fields.findByThriftId(field.id);
27136
        if (fieldId == null) {
27137
          TProtocolUtil.skip(iprot, field.type);
27138
        } else {
27139
          switch (fieldId) {
27140
            case SUCCESS:
27141
              if (field.type == TType.I64) {
27142
                this.success = iprot.readI64();
27143
                setSuccessIsSet(true);
27144
              } else { 
27145
                TProtocolUtil.skip(iprot, field.type);
27146
              }
27147
              break;
27148
          }
27149
          iprot.readFieldEnd();
27150
        }
27151
      }
27152
      iprot.readStructEnd();
27153
      validate();
27154
    }
27155
 
27156
    public void write(TProtocol oprot) throws TException {
27157
      oprot.writeStructBegin(STRUCT_DESC);
27158
 
27159
      if (this.isSetSuccess()) {
27160
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27161
        oprot.writeI64(this.success);
27162
        oprot.writeFieldEnd();
27163
      }
27164
      oprot.writeFieldStop();
27165
      oprot.writeStructEnd();
27166
    }
27167
 
27168
    @Override
27169
    public String toString() {
27170
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_result(");
27171
      boolean first = true;
27172
 
27173
      sb.append("success:");
27174
      sb.append(this.success);
27175
      first = false;
27176
      sb.append(")");
27177
      return sb.toString();
27178
    }
27179
 
27180
    public void validate() throws TException {
27181
      // check for required fields
27182
    }
27183
 
27184
  }
27185
 
1731 ankur.sing 27186
  public static class getValidOrdersAmountRange_args implements TBase<getValidOrdersAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_args>   {
27187
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_args");
1629 ankur.sing 27188
 
27189
 
27190
 
27191
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27192
    public enum _Fields implements TFieldIdEnum {
27193
;
27194
 
27195
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27196
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27197
 
27198
      static {
27199
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27200
          byId.put((int)field._thriftId, field);
27201
          byName.put(field.getFieldName(), field);
27202
        }
27203
      }
27204
 
27205
      /**
27206
       * Find the _Fields constant that matches fieldId, or null if its not found.
27207
       */
27208
      public static _Fields findByThriftId(int fieldId) {
27209
        return byId.get(fieldId);
27210
      }
27211
 
27212
      /**
27213
       * Find the _Fields constant that matches fieldId, throwing an exception
27214
       * if it is not found.
27215
       */
27216
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27217
        _Fields fields = findByThriftId(fieldId);
27218
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27219
        return fields;
27220
      }
27221
 
27222
      /**
27223
       * Find the _Fields constant that matches name, or null if its not found.
27224
       */
27225
      public static _Fields findByName(String name) {
27226
        return byName.get(name);
27227
      }
27228
 
27229
      private final short _thriftId;
27230
      private final String _fieldName;
27231
 
27232
      _Fields(short thriftId, String fieldName) {
27233
        _thriftId = thriftId;
27234
        _fieldName = fieldName;
27235
      }
27236
 
27237
      public short getThriftFieldId() {
27238
        return _thriftId;
27239
      }
27240
 
27241
      public String getFieldName() {
27242
        return _fieldName;
27243
      }
27244
    }
27245
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27246
    }});
27247
 
27248
    static {
1731 ankur.sing 27249
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_args.class, metaDataMap);
1629 ankur.sing 27250
    }
27251
 
1731 ankur.sing 27252
    public getValidOrdersAmountRange_args() {
1629 ankur.sing 27253
    }
27254
 
27255
    /**
27256
     * Performs a deep copy on <i>other</i>.
27257
     */
1731 ankur.sing 27258
    public getValidOrdersAmountRange_args(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27259
    }
27260
 
1731 ankur.sing 27261
    public getValidOrdersAmountRange_args deepCopy() {
27262
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27263
    }
27264
 
27265
    @Deprecated
1731 ankur.sing 27266
    public getValidOrdersAmountRange_args clone() {
27267
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27268
    }
27269
 
27270
    public void setFieldValue(_Fields field, Object value) {
27271
      switch (field) {
27272
      }
27273
    }
27274
 
27275
    public void setFieldValue(int fieldID, Object value) {
27276
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27277
    }
27278
 
27279
    public Object getFieldValue(_Fields field) {
27280
      switch (field) {
27281
      }
27282
      throw new IllegalStateException();
27283
    }
27284
 
27285
    public Object getFieldValue(int fieldId) {
27286
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27287
    }
27288
 
27289
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27290
    public boolean isSet(_Fields field) {
27291
      switch (field) {
27292
      }
27293
      throw new IllegalStateException();
27294
    }
27295
 
27296
    public boolean isSet(int fieldID) {
27297
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27298
    }
27299
 
27300
    @Override
27301
    public boolean equals(Object that) {
27302
      if (that == null)
27303
        return false;
1731 ankur.sing 27304
      if (that instanceof getValidOrdersAmountRange_args)
27305
        return this.equals((getValidOrdersAmountRange_args)that);
1629 ankur.sing 27306
      return false;
27307
    }
27308
 
1731 ankur.sing 27309
    public boolean equals(getValidOrdersAmountRange_args that) {
1629 ankur.sing 27310
      if (that == null)
27311
        return false;
27312
 
27313
      return true;
27314
    }
27315
 
27316
    @Override
27317
    public int hashCode() {
27318
      return 0;
27319
    }
27320
 
1731 ankur.sing 27321
    public int compareTo(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27322
      if (!getClass().equals(other.getClass())) {
27323
        return getClass().getName().compareTo(other.getClass().getName());
27324
      }
27325
 
27326
      int lastComparison = 0;
1731 ankur.sing 27327
      getValidOrdersAmountRange_args typedOther = (getValidOrdersAmountRange_args)other;
1629 ankur.sing 27328
 
27329
      return 0;
27330
    }
27331
 
27332
    public void read(TProtocol iprot) throws TException {
27333
      TField field;
27334
      iprot.readStructBegin();
27335
      while (true)
27336
      {
27337
        field = iprot.readFieldBegin();
27338
        if (field.type == TType.STOP) { 
27339
          break;
27340
        }
27341
        _Fields fieldId = _Fields.findByThriftId(field.id);
27342
        if (fieldId == null) {
27343
          TProtocolUtil.skip(iprot, field.type);
27344
        } else {
27345
          switch (fieldId) {
27346
          }
27347
          iprot.readFieldEnd();
27348
        }
27349
      }
27350
      iprot.readStructEnd();
27351
      validate();
27352
    }
27353
 
27354
    public void write(TProtocol oprot) throws TException {
27355
      validate();
27356
 
27357
      oprot.writeStructBegin(STRUCT_DESC);
27358
      oprot.writeFieldStop();
27359
      oprot.writeStructEnd();
27360
    }
27361
 
27362
    @Override
27363
    public String toString() {
1731 ankur.sing 27364
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_args(");
1629 ankur.sing 27365
      boolean first = true;
27366
 
27367
      sb.append(")");
27368
      return sb.toString();
27369
    }
27370
 
27371
    public void validate() throws TException {
27372
      // check for required fields
27373
    }
27374
 
27375
  }
27376
 
1731 ankur.sing 27377
  public static class getValidOrdersAmountRange_result implements TBase<getValidOrdersAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_result>   {
27378
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_result");
1629 ankur.sing 27379
 
1731 ankur.sing 27380
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 27381
 
1731 ankur.sing 27382
    private List<Double> success;
1629 ankur.sing 27383
 
27384
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27385
    public enum _Fields implements TFieldIdEnum {
27386
      SUCCESS((short)0, "success");
27387
 
27388
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27389
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27390
 
27391
      static {
27392
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27393
          byId.put((int)field._thriftId, field);
27394
          byName.put(field.getFieldName(), field);
27395
        }
27396
      }
27397
 
27398
      /**
27399
       * Find the _Fields constant that matches fieldId, or null if its not found.
27400
       */
27401
      public static _Fields findByThriftId(int fieldId) {
27402
        return byId.get(fieldId);
27403
      }
27404
 
27405
      /**
27406
       * Find the _Fields constant that matches fieldId, throwing an exception
27407
       * if it is not found.
27408
       */
27409
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27410
        _Fields fields = findByThriftId(fieldId);
27411
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27412
        return fields;
27413
      }
27414
 
27415
      /**
27416
       * Find the _Fields constant that matches name, or null if its not found.
27417
       */
27418
      public static _Fields findByName(String name) {
27419
        return byName.get(name);
27420
      }
27421
 
27422
      private final short _thriftId;
27423
      private final String _fieldName;
27424
 
27425
      _Fields(short thriftId, String fieldName) {
27426
        _thriftId = thriftId;
27427
        _fieldName = fieldName;
27428
      }
27429
 
27430
      public short getThriftFieldId() {
27431
        return _thriftId;
27432
      }
27433
 
27434
      public String getFieldName() {
27435
        return _fieldName;
27436
      }
27437
    }
27438
 
27439
    // isset id assignments
27440
 
27441
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27442
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 27443
          new ListMetaData(TType.LIST, 
27444
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 27445
    }});
27446
 
27447
    static {
1731 ankur.sing 27448
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_result.class, metaDataMap);
1629 ankur.sing 27449
    }
27450
 
1731 ankur.sing 27451
    public getValidOrdersAmountRange_result() {
1629 ankur.sing 27452
    }
27453
 
1731 ankur.sing 27454
    public getValidOrdersAmountRange_result(
27455
      List<Double> success)
1629 ankur.sing 27456
    {
27457
      this();
27458
      this.success = success;
27459
    }
27460
 
27461
    /**
27462
     * Performs a deep copy on <i>other</i>.
27463
     */
1731 ankur.sing 27464
    public getValidOrdersAmountRange_result(getValidOrdersAmountRange_result other) {
27465
      if (other.isSetSuccess()) {
27466
        List<Double> __this__success = new ArrayList<Double>();
27467
        for (Double other_element : other.success) {
27468
          __this__success.add(other_element);
1629 ankur.sing 27469
        }
1731 ankur.sing 27470
        this.success = __this__success;
1629 ankur.sing 27471
      }
27472
    }
27473
 
1731 ankur.sing 27474
    public getValidOrdersAmountRange_result deepCopy() {
27475
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27476
    }
27477
 
27478
    @Deprecated
1731 ankur.sing 27479
    public getValidOrdersAmountRange_result clone() {
27480
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27481
    }
27482
 
1731 ankur.sing 27483
    public int getSuccessSize() {
27484
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 27485
    }
27486
 
1731 ankur.sing 27487
    public java.util.Iterator<Double> getSuccessIterator() {
27488
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 27489
    }
27490
 
1731 ankur.sing 27491
    public void addToSuccess(double elem) {
27492
      if (this.success == null) {
27493
        this.success = new ArrayList<Double>();
1629 ankur.sing 27494
      }
1731 ankur.sing 27495
      this.success.add(elem);
1629 ankur.sing 27496
    }
27497
 
1731 ankur.sing 27498
    public List<Double> getSuccess() {
1629 ankur.sing 27499
      return this.success;
27500
    }
27501
 
1731 ankur.sing 27502
    public getValidOrdersAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 27503
      this.success = success;
27504
      return this;
27505
    }
27506
 
27507
    public void unsetSuccess() {
1731 ankur.sing 27508
      this.success = null;
1629 ankur.sing 27509
    }
27510
 
27511
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27512
    public boolean isSetSuccess() {
1731 ankur.sing 27513
      return this.success != null;
1629 ankur.sing 27514
    }
27515
 
27516
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 27517
      if (!value) {
27518
        this.success = null;
27519
      }
1629 ankur.sing 27520
    }
27521
 
27522
    public void setFieldValue(_Fields field, Object value) {
27523
      switch (field) {
27524
      case SUCCESS:
27525
        if (value == null) {
27526
          unsetSuccess();
27527
        } else {
1731 ankur.sing 27528
          setSuccess((List<Double>)value);
1629 ankur.sing 27529
        }
27530
        break;
27531
 
27532
      }
27533
    }
27534
 
27535
    public void setFieldValue(int fieldID, Object value) {
27536
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27537
    }
27538
 
27539
    public Object getFieldValue(_Fields field) {
27540
      switch (field) {
27541
      case SUCCESS:
1731 ankur.sing 27542
        return getSuccess();
1629 ankur.sing 27543
 
27544
      }
27545
      throw new IllegalStateException();
27546
    }
27547
 
27548
    public Object getFieldValue(int fieldId) {
27549
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27550
    }
27551
 
27552
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27553
    public boolean isSet(_Fields field) {
27554
      switch (field) {
27555
      case SUCCESS:
27556
        return isSetSuccess();
27557
      }
27558
      throw new IllegalStateException();
27559
    }
27560
 
27561
    public boolean isSet(int fieldID) {
27562
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27563
    }
27564
 
27565
    @Override
27566
    public boolean equals(Object that) {
27567
      if (that == null)
27568
        return false;
1731 ankur.sing 27569
      if (that instanceof getValidOrdersAmountRange_result)
27570
        return this.equals((getValidOrdersAmountRange_result)that);
1629 ankur.sing 27571
      return false;
27572
    }
27573
 
1731 ankur.sing 27574
    public boolean equals(getValidOrdersAmountRange_result that) {
1629 ankur.sing 27575
      if (that == null)
27576
        return false;
27577
 
1731 ankur.sing 27578
      boolean this_present_success = true && this.isSetSuccess();
27579
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 27580
      if (this_present_success || that_present_success) {
27581
        if (!(this_present_success && that_present_success))
27582
          return false;
1731 ankur.sing 27583
        if (!this.success.equals(that.success))
1629 ankur.sing 27584
          return false;
27585
      }
27586
 
27587
      return true;
27588
    }
27589
 
27590
    @Override
27591
    public int hashCode() {
27592
      return 0;
27593
    }
27594
 
1731 ankur.sing 27595
    public int compareTo(getValidOrdersAmountRange_result other) {
1629 ankur.sing 27596
      if (!getClass().equals(other.getClass())) {
27597
        return getClass().getName().compareTo(other.getClass().getName());
27598
      }
27599
 
27600
      int lastComparison = 0;
1731 ankur.sing 27601
      getValidOrdersAmountRange_result typedOther = (getValidOrdersAmountRange_result)other;
1629 ankur.sing 27602
 
27603
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27604
      if (lastComparison != 0) {
27605
        return lastComparison;
27606
      }
27607
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27608
      if (lastComparison != 0) {
27609
        return lastComparison;
27610
      }
27611
      return 0;
27612
    }
27613
 
27614
    public void read(TProtocol iprot) throws TException {
27615
      TField field;
27616
      iprot.readStructBegin();
27617
      while (true)
27618
      {
27619
        field = iprot.readFieldBegin();
27620
        if (field.type == TType.STOP) { 
27621
          break;
27622
        }
27623
        _Fields fieldId = _Fields.findByThriftId(field.id);
27624
        if (fieldId == null) {
27625
          TProtocolUtil.skip(iprot, field.type);
27626
        } else {
27627
          switch (fieldId) {
27628
            case SUCCESS:
1731 ankur.sing 27629
              if (field.type == TType.LIST) {
27630
                {
27631
                  TList _list80 = iprot.readListBegin();
27632
                  this.success = new ArrayList<Double>(_list80.size);
27633
                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
27634
                  {
27635
                    double _elem82;
27636
                    _elem82 = iprot.readDouble();
27637
                    this.success.add(_elem82);
27638
                  }
27639
                  iprot.readListEnd();
27640
                }
1629 ankur.sing 27641
              } else { 
27642
                TProtocolUtil.skip(iprot, field.type);
27643
              }
27644
              break;
27645
          }
27646
          iprot.readFieldEnd();
27647
        }
27648
      }
27649
      iprot.readStructEnd();
27650
      validate();
27651
    }
27652
 
27653
    public void write(TProtocol oprot) throws TException {
27654
      oprot.writeStructBegin(STRUCT_DESC);
27655
 
27656
      if (this.isSetSuccess()) {
27657
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 27658
        {
27659
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
27660
          for (double _iter83 : this.success)
27661
          {
27662
            oprot.writeDouble(_iter83);
27663
          }
27664
          oprot.writeListEnd();
27665
        }
1629 ankur.sing 27666
        oprot.writeFieldEnd();
27667
      }
27668
      oprot.writeFieldStop();
27669
      oprot.writeStructEnd();
27670
    }
27671
 
27672
    @Override
27673
    public String toString() {
1731 ankur.sing 27674
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_result(");
1629 ankur.sing 27675
      boolean first = true;
27676
 
27677
      sb.append("success:");
1731 ankur.sing 27678
      if (this.success == null) {
27679
        sb.append("null");
27680
      } else {
27681
        sb.append(this.success);
27682
      }
1629 ankur.sing 27683
      first = false;
27684
      sb.append(")");
27685
      return sb.toString();
27686
    }
27687
 
27688
    public void validate() throws TException {
27689
      // check for required fields
27690
    }
27691
 
27692
  }
27693
 
68 ashish 27694
}